s
214
collections/projectinca/tokenomics/tokens.html
Normal file
@ -0,0 +1,214 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mermaid Flowchart Custom Pan Zoom Demo</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<style>
|
||||
#svg-container {
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
border: 1px solid #dbdbdb;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#mermaid-diagram {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
#mermaid-diagram svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.mermaid .node rect,
|
||||
.mermaid .node circle,
|
||||
.mermaid .node ellipse,
|
||||
.mermaid .node polygon,
|
||||
.mermaid .node path {
|
||||
stroke: #1a5f94 !important;
|
||||
stroke-width: 2px !important;
|
||||
fill: #3298dc !important;
|
||||
filter: url(#rough);
|
||||
}
|
||||
.mermaid .edgePath .path {
|
||||
stroke: #1a5f94 !important;
|
||||
stroke-width: 3px !important;
|
||||
filter: url(#rough);
|
||||
}
|
||||
.mermaid .label {
|
||||
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
|
||||
color: #ffffff !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.button-container {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 class="title">Mermaid Flowchart Demo</h1>
|
||||
<svg width="0" height="0">
|
||||
<defs>
|
||||
<filter id="rough">
|
||||
<feTurbulence type="turbulence" baseFrequency="0.02" numOctaves="3" result="noise" seed="0"/>
|
||||
<feDisplacementMap in="SourceGraphic" in2="noise" scale="2" />
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
<div id="svg-container">
|
||||
<div id="mermaid-diagram" class="mermaid">
|
||||
flowchart TD
|
||||
A["Cloud User"] -- CHF/EUR/... --> B("CLOUD MARKET PLACE<br>Discount based on position<br>in TF Liquidity Pool.") & B2(("ThreeFold<br>Liquidity Pool"))
|
||||
B2 -- TFT or INCA --> B
|
||||
B -- TFT or INCA --> C{"Proof Of Utilization"}
|
||||
G["FARMING GRANTS<br>40m Tokens / Month"] --> I{"Proof Of Capacity<br>uptime, location, ..."}
|
||||
I --> D["ThreeFold Farmers"]
|
||||
C -- 80% --> D
|
||||
C -- 10% --> E["ThreeFold Cooperative"] & F["Validators<br>Commercial Partners"]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="button-container">
|
||||
<button id="zoom-in" class="button is-small is-primary">
|
||||
<span class="icon is-small">
|
||||
<i class="fas fa-search-plus"></i>
|
||||
</span>
|
||||
<span>Zoom In</span>
|
||||
</button>
|
||||
<button id="zoom-out" class="button is-small is-info">
|
||||
<span class="icon is-small">
|
||||
<i class="fas fa-search-minus"></i>
|
||||
</span>
|
||||
<span>Zoom Out</span>
|
||||
</button>
|
||||
<button id="reset" class="button is-small is-warning">
|
||||
<span class="icon is-small">
|
||||
<i class="fas fa-undo"></i>
|
||||
</span>
|
||||
<span>Reset</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: 'base',
|
||||
themeVariables: {
|
||||
primaryColor: '#3298dc',
|
||||
primaryTextColor: '#ffffff',
|
||||
// primaryBorderColor: '#3298dc',
|
||||
lineColor: '#3298dc',
|
||||
secondaryColor: '#4FC3F7',
|
||||
// tertiaryColor: '#3298dc'
|
||||
},
|
||||
flowchart: {
|
||||
curve: 'basis',
|
||||
useMaxWidth: true,
|
||||
htmlLabels: true,
|
||||
diagramPadding: 8,
|
||||
nodeSpacing: 60,
|
||||
rankSpacing: 60,
|
||||
edgeThickness: 3,
|
||||
curve: 'basis'
|
||||
}
|
||||
});
|
||||
|
||||
mermaid.init(undefined, "#mermaid-diagram").then(function() {
|
||||
const container = document.getElementById('svg-container');
|
||||
const diagram = document.getElementById('mermaid-diagram');
|
||||
let scale = 1;
|
||||
let panning = false;
|
||||
let start = { x: 0, y: 0 };
|
||||
let translate = { x: 0, y: 0 };
|
||||
|
||||
function setTransform() {
|
||||
diagram.style.transform = `translate(${translate.x}px, ${translate.y}px) scale(${scale})`;
|
||||
}
|
||||
|
||||
container.addEventListener('mousedown', (e) => {
|
||||
panning = true;
|
||||
start = { x: e.clientX - translate.x, y: e.clientY - translate.y };
|
||||
});
|
||||
|
||||
container.addEventListener('mousemove', (e) => {
|
||||
if (!panning) return;
|
||||
translate = {
|
||||
x: e.clientX - start.x,
|
||||
y: e.clientY - start.y
|
||||
};
|
||||
setTransform();
|
||||
});
|
||||
|
||||
container.addEventListener('mouseup', () => {
|
||||
panning = false;
|
||||
});
|
||||
|
||||
container.addEventListener('mouseleave', () => {
|
||||
panning = false;
|
||||
});
|
||||
|
||||
container.addEventListener('touchstart', (e) => {
|
||||
if (e.touches.length === 1) {
|
||||
panning = true;
|
||||
start = { x: e.touches[0].clientX - translate.x, y: e.touches[0].clientY - translate.y };
|
||||
}
|
||||
});
|
||||
|
||||
container.addEventListener('touchmove', (e) => {
|
||||
if (!panning || e.touches.length !== 1) return;
|
||||
translate = {
|
||||
x: e.touches[0].clientX - start.x,
|
||||
y: e.touches[0].clientY - start.y
|
||||
};
|
||||
setTransform();
|
||||
});
|
||||
|
||||
container.addEventListener('touchend', () => {
|
||||
panning = false;
|
||||
});
|
||||
|
||||
container.addEventListener('wheel', (e) => {
|
||||
e.preventDefault();
|
||||
const xs = (e.clientX - translate.x) / scale;
|
||||
const ys = (e.clientY - translate.y) / scale;
|
||||
const delta = -e.deltaY;
|
||||
const newScale = scale * Math.pow(1.001, delta);
|
||||
scale = Math.min(Math.max(0.1, newScale), 10);
|
||||
translate = {
|
||||
x: e.clientX - xs * scale,
|
||||
y: e.clientY - ys * scale
|
||||
};
|
||||
setTransform();
|
||||
}, { passive: false });
|
||||
|
||||
document.getElementById('zoom-in').addEventListener('click', () => {
|
||||
scale *= 1.2;
|
||||
setTransform();
|
||||
});
|
||||
|
||||
document.getElementById('zoom-out').addEventListener('click', () => {
|
||||
scale /= 1.2;
|
||||
setTransform();
|
||||
});
|
||||
|
||||
document.getElementById('reset').addEventListener('click', () => {
|
||||
scale = 1;
|
||||
translate = { x: 0, y: 0 };
|
||||
setTransform();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
164
collections/projectinca/tokenomics/tokens1.html
Normal file
@ -0,0 +1,164 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mermaid Diagram with Zoom and Pan</title>
|
||||
|
||||
<!-- Include the Mermaid library via CDN -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.9.0/dist/mermaid.min.js"></script>
|
||||
|
||||
<!-- Include the Panzoom.js library -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/panzoom@9.4.3/dist/panzoom.min.js"></script>
|
||||
|
||||
<style>
|
||||
/* Container to hold the Mermaid diagram */
|
||||
#mermaidContainer {
|
||||
width: 100%;
|
||||
max-width: 1200px; /* Control the max width */
|
||||
height: 80vh; /* Control the height based on the viewport */
|
||||
margin: auto;
|
||||
border: 1px solid #ddd; /* Optional: border for visibility */
|
||||
position: relative;
|
||||
overflow: hidden; /* Ensure overflow is hidden */
|
||||
}
|
||||
|
||||
/* Position the zoom buttons at the top of the diagram */
|
||||
#zoomControls {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.zoom-btn {
|
||||
padding: 10px;
|
||||
margin: 0 5px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
background-color: #007BFF;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.zoom-btn:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 100%; /* Ensure the SVG fits the container width */
|
||||
height: 100%; /* Ensure the SVG fits the container height */
|
||||
}
|
||||
|
||||
/* Styles for the log container */
|
||||
#logContainer {
|
||||
margin-top: 20px;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #f9f9f9;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Mermaid Flowchart with Zoom and Pan</h1>
|
||||
|
||||
<!-- Zoom Controls -->
|
||||
<div id="zoomControls">
|
||||
<button class="zoom-btn" id="zoomIn">Zoom In</button>
|
||||
<button class="zoom-btn" id="zoomOut">Zoom Out</button>
|
||||
<button class="zoom-btn" id="resetZoom">Reset</button>
|
||||
</div>
|
||||
|
||||
<!-- Mermaid diagram container -->
|
||||
<div id="mermaidContainer" class="mermaid">
|
||||
flowchart TD
|
||||
A[Cloud User] -->|CHF/EUR/...| B(CLOUD MARKET PLACE<br>Discount based on position<br>in TF Liquidity Pool.)
|
||||
A[Cloud User] -->|CHF/EUR/...| B2((ThreeFold<br>Liquidity Pool))
|
||||
B2 -->|TFT or INCA| B
|
||||
B -->|TFT or INCA| C{Proof Of Utilization}
|
||||
G[FARMING GRANTS<br>40m Tokens / Month] --> I{Proof Of Capacity<br>uptime, location, ...} --> D
|
||||
C -->|80%| D[ThreeFold Farmers]
|
||||
C -->|10%| E[ThreeFold Cooperative]
|
||||
C -->|10%| F[Validators<br>Commercial Partners]
|
||||
</div>
|
||||
|
||||
<!-- Log container -->
|
||||
<div id="logContainer"></div>
|
||||
|
||||
<script>
|
||||
function log(message) {
|
||||
const logContainer = document.getElementById('logContainer');
|
||||
logContainer.innerHTML += message + '<br>';
|
||||
console.log(message);
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Initialize Mermaid
|
||||
mermaid.initialize({ startOnLoad: true });
|
||||
|
||||
// Watch for changes in the DOM to detect when the SVG is rendered
|
||||
const observer = new MutationObserver(function () {
|
||||
const svgElement = document.querySelector('#mermaidContainer svg');
|
||||
if (svgElement) {
|
||||
// Once the SVG is found, disconnect the observer
|
||||
observer.disconnect();
|
||||
|
||||
// Log SVG details
|
||||
log('SVG found:');
|
||||
log(`- Width: ${svgElement.width.baseVal.value}`);
|
||||
log(`- Height: ${svgElement.height.baseVal.value}`);
|
||||
log(`- ViewBox: ${svgElement.getAttribute('viewBox')}`);
|
||||
|
||||
// Set the viewBox on the SVG element to fit the entire diagram
|
||||
const svgBox = svgElement.getBBox();
|
||||
svgElement.setAttribute('viewBox', `0 0 ${svgBox.width} ${svgBox.height}`);
|
||||
log(`- Updated ViewBox: ${svgElement.getAttribute('viewBox')}`);
|
||||
|
||||
// Log the number of child elements
|
||||
log(`- Number of child elements: ${svgElement.children.length}`);
|
||||
|
||||
// Apply Panzoom to enable zoom and pan functionality
|
||||
const panzoomInstance = panzoom(svgElement, {
|
||||
maxScale: 10, // Maximum zoom level
|
||||
minScale: 0.5, // Minimum zoom level
|
||||
contain: 'outside', // Ensure the SVG stays within bounds
|
||||
panOnlyWhenZoomed: true, // Enable panning only when zoomed
|
||||
initialX: 300,
|
||||
initialY: 500,
|
||||
initialZoom: 2
|
||||
});
|
||||
|
||||
log('Panzoom initialized');
|
||||
|
||||
// Enable zooming with the mouse wheel, marking the event listener as passive
|
||||
svgElement.parentElement.addEventListener('wheel', panzoomInstance.zoomWithWheel, { passive: true });
|
||||
|
||||
// Hook up the zoom buttons
|
||||
document.getElementById('zoomIn').addEventListener('click', function() {
|
||||
const currentScale = panzoomInstance.getScale();
|
||||
panzoomInstance.scaleTo(svgElement.clientWidth / 2, svgElement.clientHeight / 2, currentScale * 1.2);
|
||||
log(`Zoomed in. New scale: ${panzoomInstance.getScale()}`);
|
||||
});
|
||||
|
||||
document.getElementById('zoomOut').addEventListener('click', function() {
|
||||
const currentScale = panzoomInstance.getScale();
|
||||
panzoomInstance.scaleTo(svgElement.clientWidth / 2, svgElement.clientHeight / 2, currentScale * 0.8);
|
||||
log(`Zoomed out. New scale: ${panzoomInstance.getScale()}`);
|
||||
});
|
||||
|
||||
document.getElementById('resetZoom').addEventListener('click', function() {
|
||||
panzoomInstance.reset(); // Reset zoom and pan to the initial state
|
||||
log('Zoom reset');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Observe changes inside the mermaidContainer
|
||||
const container = document.querySelector('#mermaidContainer');
|
||||
observer.observe(container, { childList: true, subtree: true });
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
46
collections/projectinca/tokenomics/tokens2.html
Normal file
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mermaid Diagram</title>
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
|
||||
|
||||
// Initialize Mermaid with the correct configuration
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: "forest", // Set the theme to "forest"
|
||||
flowchart: {
|
||||
curve: 'basis', // For smoother edges
|
||||
},
|
||||
themeVariables: {
|
||||
handDrawn: true, // Enable hand-drawn look
|
||||
fontFamily: 'Comic Sans MS', // Optional: to make the font match a more "hand-drawn" style
|
||||
},
|
||||
width: '100%', // Ensure the diagram uses max available width
|
||||
height: '600px' // Limit the height to emphasize horizontal space
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Mermaid Diagram -->
|
||||
<div class="mermaid">
|
||||
flowchart LR
|
||||
A["The Customer"] -- CHF/EUR/... --> B("CLOUD MARKET PLACE<br>Discount based on position<br>in TF Liquidity Pool.")
|
||||
B -- TFT or INCA --> C{"Proof Of Utilization"}
|
||||
G["FARMING GRANTS<br>40m Tokens / Month"] --> I{"Proof Of Capacity<br>uptime, location, ..."}
|
||||
I --> D["ThreeFold Farmers<br>Can be Tier-S Datacenters"]
|
||||
C -- 80% --> D
|
||||
C -- 10% --> E["ThreeFold Cooperative"] & F["Validators<br>Commercial Partners"]
|
||||
D -- license fees --> H["TF9<br>ThreeFold Belgium"]
|
||||
X["Autonomous AI & Cloud Solutions"] --> B
|
||||
A --> X
|
||||
X -- Margin --> Y["ThreeFold Dubai"]
|
||||
style H fill:#BBDEFB
|
||||
style Y fill:#BBDEFB
|
||||
style D fill:#BBDEFB
|
||||
style F fill:#BBDEFB
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
141
collections/projectinca/tokenomics/tokens_example.html
Normal file
@ -0,0 +1,141 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mermaid Flowchart Pan Zoom Demo</title>
|
||||
<script src="https://bumbu.github.io/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
||||
<style>
|
||||
#svg-container {
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
border: 1px solid black;
|
||||
overflow: hidden;
|
||||
}
|
||||
#mermaid-diagram {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#mermaid-diagram svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="svg-container">
|
||||
<div id="mermaid-diagram" class="mermaid">
|
||||
flowchart TD
|
||||
A["Cloud User"] -- CHF/EUR/... --> B("CLOUD MARKET PLACE<br>Discount based on position<br>in TF Liquidity Pool.") & B2(("ThreeFold<br>Liquidity Pool"))
|
||||
B2 -- TFT or INCA --> B
|
||||
B -- TFT or INCA --> C{"Proof Of Utilization"}
|
||||
G["FARMING GRANTS<br>40m Tokens / Month"] --> I{"Proof Of Capacity<br>uptime, location, ..."}
|
||||
I --> D["ThreeFold Farmers"]
|
||||
C -- 80% --> D
|
||||
C -- 10% --> E["ThreeFold Cooperative"] & F["Validators<br>Commercial Partners"]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button id="zoom-in">Zoom In</button>
|
||||
<button id="zoom-out">Zoom Out</button>
|
||||
<button id="reset">Reset</button>
|
||||
<button id="center">Center</button>
|
||||
<button id="fit">Fit</button>
|
||||
<button id="toggle-pan">Toggle Pan</button>
|
||||
<button id="toggle-zoom">Toggle Zoom</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
mermaid.initialize({ startOnLoad: true });
|
||||
|
||||
// Wait for Mermaid to render the flowchart
|
||||
mermaid.init(undefined, "#mermaid-diagram").then(function() {
|
||||
// Get the SVG element created by Mermaid
|
||||
var svgElement = document.querySelector("#mermaid-diagram svg");
|
||||
|
||||
// Initialize svg-pan-zoom
|
||||
var panZoomInstance = svgPanZoom(svgElement, {
|
||||
zoomEnabled: true,
|
||||
controlIconsEnabled: true,
|
||||
fit: true,
|
||||
center: true,
|
||||
minZoom: 0.1,
|
||||
maxZoom: 10,
|
||||
zoomScaleSensitivity: 0.3
|
||||
});
|
||||
|
||||
svgElement.addEventListener('touchstart', function(){}, { passive: true });
|
||||
svgElement.addEventListener('touchmove', function(){}, { passive: true });
|
||||
svgElement.addEventListener('touchend', function(){}, { passive: true });
|
||||
|
||||
// Event listeners for buttons
|
||||
document.getElementById('zoom-in').addEventListener('click', function() {
|
||||
panZoomInstance.zoomIn();
|
||||
});
|
||||
|
||||
document.getElementById('zoom-out').addEventListener('click', function() {
|
||||
panZoomInstance.zoomOut();
|
||||
});
|
||||
|
||||
document.getElementById('reset').addEventListener('click', function() {
|
||||
panZoomInstance.resetZoom();
|
||||
panZoomInstance.resetPan();
|
||||
});
|
||||
|
||||
document.getElementById('center').addEventListener('click', function() {
|
||||
panZoomInstance.center();
|
||||
});
|
||||
|
||||
document.getElementById('fit').addEventListener('click', function() {
|
||||
panZoomInstance.fit();
|
||||
});
|
||||
|
||||
document.getElementById('toggle-pan').addEventListener('click', function() {
|
||||
if (panZoomInstance.isPanEnabled()) {
|
||||
panZoomInstance.disablePan();
|
||||
this.textContent = 'Enable Pan';
|
||||
} else {
|
||||
panZoomInstance.enablePan();
|
||||
this.textContent = 'Disable Pan';
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('toggle-zoom').addEventListener('click', function() {
|
||||
if (panZoomInstance.isZoomEnabled()) {
|
||||
panZoomInstance.disableZoom();
|
||||
this.textContent = 'Enable Zoom';
|
||||
} else {
|
||||
panZoomInstance.enableZoom();
|
||||
this.textContent = 'Disable Zoom';
|
||||
}
|
||||
});
|
||||
|
||||
// Example of programmatic panning
|
||||
setTimeout(function() {
|
||||
panZoomInstance.panBy({x: 50, y: 50});
|
||||
}, 1000);
|
||||
|
||||
// Example of getting sizes
|
||||
console.log('SVG Sizes:', panZoomInstance.getSizes());
|
||||
|
||||
// Example of zoom at a specific point
|
||||
setTimeout(function() {
|
||||
panZoomInstance.zoomAtPoint(2, {x: 300, y: 200});
|
||||
}, 2000);
|
||||
|
||||
// Example of setting a custom beforeZoom function
|
||||
panZoomInstance.setBeforeZoom(function(oldZoom, newZoom) {
|
||||
console.log('Zoom is about to change from', oldZoom, 'to', newZoom);
|
||||
return true; // Allows zooming to continue
|
||||
});
|
||||
|
||||
// Example of setting a custom onZoom function
|
||||
panZoomInstance.setOnZoom(function(newZoom) {
|
||||
console.log('Zoom has changed to', newZoom);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
211
collections/projectinca/tokenomics/tokens_working.html
Normal file
@ -0,0 +1,211 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mermaid Flowchart Custom Pan Zoom Demo</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<style>
|
||||
#svg-container {
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
border: 1px solid #dbdbdb;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#mermaid-diagram {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
#mermaid-diagram svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.mermaid .node rect,
|
||||
.mermaid .node circle,
|
||||
.mermaid .node ellipse,
|
||||
.mermaid .node polygon,
|
||||
.mermaid .node path {
|
||||
stroke: #3298dc;
|
||||
stroke-width: 2px;
|
||||
fill: #ffffff;
|
||||
filter: url(#rough);
|
||||
}
|
||||
.mermaid .edgePath .path {
|
||||
stroke: #3298dc;
|
||||
stroke-width: 2px;
|
||||
filter: url(#rough);
|
||||
}
|
||||
.mermaid .label {
|
||||
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
|
||||
color: #4a4a4a;
|
||||
}
|
||||
.button-container {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 class="title">Mermaid Flowchart Demo</h1>
|
||||
<svg width="0" height="0">
|
||||
<defs>
|
||||
<filter id="rough">
|
||||
<feTurbulence type="turbulence" baseFrequency="0.02" numOctaves="3" result="noise" seed="0"/>
|
||||
<feDisplacementMap in="SourceGraphic" in2="noise" scale="2" />
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
<div id="svg-container">
|
||||
<div id="mermaid-diagram" class="mermaid">
|
||||
flowchart TD
|
||||
A["Cloud User"] -- CHF/EUR/... --> B("CLOUD MARKET PLACE<br>Discount based on position<br>in TF Liquidity Pool.") & B2(("ThreeFold<br>Liquidity Pool"))
|
||||
B2 -- TFT or INCA --> B
|
||||
B -- TFT or INCA --> C{"Proof Of Utilization"}
|
||||
G["FARMING GRANTS<br>40m Tokens / Month"] --> I{"Proof Of Capacity<br>uptime, location, ..."}
|
||||
I --> D["ThreeFold Farmers"]
|
||||
C -- 80% --> D
|
||||
C -- 10% --> E["ThreeFold Cooperative"] & F["Validators<br>Commercial Partners"]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="button-container">
|
||||
<button id="zoom-in" class="button is-small is-primary">
|
||||
<span class="icon is-small">
|
||||
<i class="fas fa-search-plus"></i>
|
||||
</span>
|
||||
<span>Zoom In</span>
|
||||
</button>
|
||||
<button id="zoom-out" class="button is-small is-info">
|
||||
<span class="icon is-small">
|
||||
<i class="fas fa-search-minus"></i>
|
||||
</span>
|
||||
<span>Zoom Out</span>
|
||||
</button>
|
||||
<button id="reset" class="button is-small is-warning">
|
||||
<span class="icon is-small">
|
||||
<i class="fas fa-undo"></i>
|
||||
</span>
|
||||
<span>Reset</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: 'default',
|
||||
themeVariables: {
|
||||
primaryColor: '#3298dc',
|
||||
primaryTextColor: '#ffffff',
|
||||
primaryBorderColor: '#3298dc',
|
||||
lineColor: '#3298dc',
|
||||
secondaryColor: '#3298dc',
|
||||
tertiaryColor: '#3298dc'
|
||||
},
|
||||
flowchart: {
|
||||
curve: 'basis',
|
||||
useMaxWidth: false,
|
||||
htmlLabels: true,
|
||||
diagramPadding: 8,
|
||||
nodeSpacing: 60,
|
||||
rankSpacing: 60,
|
||||
curve: 'basis'
|
||||
}
|
||||
});
|
||||
|
||||
mermaid.init(undefined, "#mermaid-diagram").then(function() {
|
||||
const container = document.getElementById('svg-container');
|
||||
const diagram = document.getElementById('mermaid-diagram');
|
||||
let scale = 1;
|
||||
let panning = false;
|
||||
let start = { x: 0, y: 0 };
|
||||
let translate = { x: 0, y: 0 };
|
||||
|
||||
function setTransform() {
|
||||
diagram.style.transform = `translate(${translate.x}px, ${translate.y}px) scale(${scale})`;
|
||||
}
|
||||
|
||||
container.addEventListener('mousedown', (e) => {
|
||||
panning = true;
|
||||
start = { x: e.clientX - translate.x, y: e.clientY - translate.y };
|
||||
});
|
||||
|
||||
container.addEventListener('mousemove', (e) => {
|
||||
if (!panning) return;
|
||||
translate = {
|
||||
x: e.clientX - start.x,
|
||||
y: e.clientY - start.y
|
||||
};
|
||||
setTransform();
|
||||
});
|
||||
|
||||
container.addEventListener('mouseup', () => {
|
||||
panning = false;
|
||||
});
|
||||
|
||||
container.addEventListener('mouseleave', () => {
|
||||
panning = false;
|
||||
});
|
||||
|
||||
container.addEventListener('touchstart', (e) => {
|
||||
if (e.touches.length === 1) {
|
||||
panning = true;
|
||||
start = { x: e.touches[0].clientX - translate.x, y: e.touches[0].clientY - translate.y };
|
||||
}
|
||||
});
|
||||
|
||||
container.addEventListener('touchmove', (e) => {
|
||||
if (!panning || e.touches.length !== 1) return;
|
||||
translate = {
|
||||
x: e.touches[0].clientX - start.x,
|
||||
y: e.touches[0].clientY - start.y
|
||||
};
|
||||
setTransform();
|
||||
});
|
||||
|
||||
container.addEventListener('touchend', () => {
|
||||
panning = false;
|
||||
});
|
||||
|
||||
container.addEventListener('wheel', (e) => {
|
||||
e.preventDefault();
|
||||
const xs = (e.clientX - translate.x) / scale;
|
||||
const ys = (e.clientY - translate.y) / scale;
|
||||
const delta = -e.deltaY;
|
||||
const newScale = scale * Math.pow(1.001, delta);
|
||||
scale = Math.min(Math.max(0.1, newScale), 10);
|
||||
translate = {
|
||||
x: e.clientX - xs * scale,
|
||||
y: e.clientY - ys * scale
|
||||
};
|
||||
setTransform();
|
||||
}, { passive: false });
|
||||
|
||||
document.getElementById('zoom-in').addEventListener('click', () => {
|
||||
scale *= 1.2;
|
||||
setTransform();
|
||||
});
|
||||
|
||||
document.getElementById('zoom-out').addEventListener('click', () => {
|
||||
scale /= 1.2;
|
||||
setTransform();
|
||||
});
|
||||
|
||||
document.getElementById('reset').addEventListener('click', () => {
|
||||
scale = 1;
|
||||
translate = { x: 0, y: 0 };
|
||||
setTransform();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
BIN
collections/slides_threefold_depin/adoption.png
Normal file
After Width: | Height: | Size: 178 KiB |
BIN
collections/slides_threefold_depin/arch_layers.png
Normal file
After Width: | Height: | Size: 365 KiB |
BIN
collections/slides_threefold_depin/cloud_limitations.png
Normal file
After Width: | Height: | Size: 256 KiB |
BIN
collections/slides_threefold_depin/compare.png
Normal file
After Width: | Height: | Size: 176 KiB |
BIN
collections/slides_threefold_depin/container.png
Normal file
After Width: | Height: | Size: 646 KiB |
BIN
collections/slides_threefold_depin/dashboard.png
Normal file
After Width: | Height: | Size: 276 KiB |
BIN
collections/slides_threefold_depin/depin.png
Normal file
After Width: | Height: | Size: 278 KiB |
BIN
collections/slides_threefold_depin/deployment.png
Normal file
After Width: | Height: | Size: 493 KiB |
BIN
collections/slides_threefold_depin/experience.png
Normal file
After Width: | Height: | Size: 313 KiB |
BIN
collections/slides_threefold_depin/hardware_powerful.png
Normal file
After Width: | Height: | Size: 194 KiB |
BIN
collections/slides_threefold_depin/inhomes.png
Normal file
After Width: | Height: | Size: 191 KiB |
BIN
collections/slides_threefold_depin/inventions.png
Normal file
After Width: | Height: | Size: 203 KiB |
BIN
collections/slides_threefold_depin/investment.png
Normal file
After Width: | Height: | Size: 232 KiB |
BIN
collections/slides_threefold_depin/layers.png
Normal file
After Width: | Height: | Size: 190 KiB |
BIN
collections/slides_threefold_depin/money_flows.png
Normal file
After Width: | Height: | Size: 433 KiB |
BIN
collections/slides_threefold_depin/pricing.png
Normal file
After Width: | Height: | Size: 204 KiB |
BIN
collections/slides_threefold_depin/roadmap.png
Normal file
After Width: | Height: | Size: 221 KiB |
BIN
collections/slides_threefold_depin/scalable.png
Normal file
After Width: | Height: | Size: 428 KiB |
BIN
collections/slides_threefold_depin/team.png
Normal file
After Width: | Height: | Size: 464 KiB |
BIN
collections/slides_threefold_depin/threefold_intro_depin.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
collections/slides_threefold_depin/threelayers.png
Normal file
After Width: | Height: | Size: 221 KiB |
BIN
collections/slides_threefold_depin/title_fundraise.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
collections/slides_threefold_depin/title_its_happening.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
collections/slides_threefold_depin/title_problem.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
collections/slides_threefold_depin/title_solution.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
collections/slides_threefold_depin/tnz.png
Normal file
After Width: | Height: | Size: 468 KiB |
BIN
collections/slides_threefold_depin/token_expansion.png
Normal file
After Width: | Height: | Size: 217 KiB |
BIN
collections/slides_threefold_depin/trillionusd.png
Normal file
After Width: | Height: | Size: 187 KiB |
BIN
collections/slides_threefold_depin/usecases.png
Normal file
After Width: | Height: | Size: 249 KiB |
BIN
collections/slides_threefold_depin/why_this.png
Normal file
After Width: | Height: | Size: 244 KiB |
BIN
collections/slides_threefold_depin/worldrecords.png
Normal file
After Width: | Height: | Size: 252 KiB |
BIN
collections/slides_threefold_depin/zos1.png
Normal file
After Width: | Height: | Size: 227 KiB |
BIN
collections/slides_threefold_depin/zos_network.png
Normal file
After Width: | Height: | Size: 341 KiB |