mirror of
https://github.com/aljazceru/twentyone-world.github.io.git
synced 2025-12-18 23:14:30 +01:00
142 lines
5.0 KiB
HTML
142 lines
5.0 KiB
HTML
---
|
|
layout: default
|
|
title: Twentyone.World
|
|
---
|
|
|
|
<link rel="stylesheet" type="text/css" href="/css/jquery.qtip.css">
|
|
<script type="text/javascript" src="/js/jquery.qtip.min.js"></script>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
// Colors
|
|
const cOrange = '#F79621';
|
|
const cGray = '#333';
|
|
const cWhite = '#777';
|
|
const cDarkGray = '#222';
|
|
const cDarkOrange = '#735000';
|
|
const cDarkWhite = '#555';
|
|
|
|
// initialize tooltips
|
|
$.fn.qtip.defaults.style.classes = 'ui-tooltip-bootstrap';
|
|
$.fn.qtip.defaults.style.def = false;
|
|
|
|
var map = kartograph.map('#map');
|
|
|
|
map.loadMap('map/world.svg', function () {
|
|
map.addLayer('countries', {
|
|
id: 'bg',
|
|
styles: {
|
|
stroke: '#000',
|
|
'stroke-width': 6.15,
|
|
'stroke-linejoin': 'round'
|
|
}
|
|
});
|
|
|
|
$.ajax({
|
|
url: 'data/countries.json',
|
|
dataType: 'json',
|
|
success: function (countries) {
|
|
|
|
var basedCountries = countries.filter(function hasLink(c) {
|
|
var hasLink = c.link_to_public_community_group ? true : false;
|
|
return hasLink;
|
|
});
|
|
var basedCountryCodes = basedCountries.map(function(c) {
|
|
return c.alpha3;
|
|
});
|
|
function isBased(iso) {
|
|
return basedCountryCodes.includes(iso);
|
|
}
|
|
function getColor(iso) {
|
|
let country = countries.find(c => c.alpha3 == iso);
|
|
if (country && country.link_to_public_community_group) {
|
|
return country.offbrand ? cWhite : cOrange;
|
|
}
|
|
return cGray;
|
|
}
|
|
function basedName(iso) {
|
|
let country = countries.find(c => c.alpha3 == iso);
|
|
if (country && country.country && country.name) {
|
|
return country.country + ": " + country.name;
|
|
}
|
|
return "";
|
|
}
|
|
|
|
map.addLayer('countries', {
|
|
title: function (d) {
|
|
if (isBased(d.iso)) {
|
|
return basedName(d.iso);
|
|
} else {
|
|
return d.name;
|
|
}
|
|
},
|
|
styles: {
|
|
stroke: cDarkGray,
|
|
fill: cGray
|
|
},
|
|
mouseenter: function (d, path) {
|
|
if (!isBased(d.iso)) {
|
|
path.attr('fill', Math.random() < 0.5 ? cDarkOrange : cDarkWhite );
|
|
}
|
|
return;
|
|
},
|
|
mouseleave: function (d, path) {
|
|
if (!isBased(d.iso)) {
|
|
path.animate({ fill: getColor(d.iso) }, 1000);
|
|
}
|
|
return;
|
|
},
|
|
click: function (d, path) {
|
|
let country = countries.find(c => c.alpha3 == d.iso);
|
|
if (country.link_to_public_community_group) {
|
|
window.open(country.link_to_public_community_group);
|
|
} else {
|
|
// window.open('/fork');
|
|
// Do nothing.
|
|
}
|
|
}
|
|
});
|
|
|
|
map.getLayer('countries').style('fill', function (data) {
|
|
return getColor(data.iso);
|
|
});
|
|
}
|
|
});
|
|
|
|
}, { padding: -5 });
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<div id="map" style="margin:1em 0;">
|
|
</div>
|
|
|
|
<center>
|
|
<h3>This is NOT about meetups</h3>
|
|
<p>
|
|
For meetups, have a look at one of those:<br/>
|
|
<a href="https://portal.einundzwanzig.space/de/meetup/world?l=en" target="_blank">portal.einundzwanzig.space</a><br/>
|
|
<a href="https://bitcoin-only.com/meetups" target="_blank">bitcoin-only.com/meetups</a><br/>
|
|
<a href="https://bitcoinerevents.com" target="_blank">bitcoinerevents.com</a></br>
|
|
…or take a <a href="https://plebwalks.com" target="_blank">walk</a>.
|
|
</p>
|
|
<p>
|
|
This is about building communities that last. And scale.
|
|
</p>
|
|
<p>
|
|
<a href="/concept">
|
|
<button type="button" class="btn btn-primary btn-large btn-custom">Understand the Concept</button>
|
|
</a>
|
|
</p>
|
|
|
|
<p> </p>
|
|
|
|
<p>
|
|
<a href="/concept">
|
|
<img src="/images/concept.svg" width="69%" />
|
|
</a>
|
|
</p>
|
|
</center> |