forked from FriendsOfREDAXO/community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·160 lines (122 loc) · 6.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
---
layout: compress
---
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: " en" }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<link rel="stylesheet" href="{{ '/assets/vendor/leaflet/leaflet.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/vendor/leaflet.markercluster/dist/MarkerCluster.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/vendor/leaflet.markercluster/dist/MarkerCluster.Default.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ '/feed.xml' | relative_url }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ '/icons/apple-touch-icon.png' | relative_url }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ '/icons/favicon-32x32.png' | relative_url }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ '/icons/favicon-16x16.png' | relative_url }}">
<link rel="manifest" href="{{ '/icons/manifest.json' | relative_url }}">
<link rel="mask-icon" href="{{ '/icons/safari-pinned-tab.svg' | relative_url }}" color="#5bbad5">
<meta name="theme-color" content="#ffffff">
<script src="{{ '/assets/vendor/leaflet/leaflet.js' | relative_url }}"></script>
<script src="{{ '/assets/vendor/leaflet.markercluster/dist/leaflet.markercluster.js' | relative_url }}"></script>
<script src="{{ '/assets/vendor/leaflet.edgebuffer/src/leaflet.edgebuffer.js' | relative_url }}"></script>
<!-- inject SEO stuff -->
{% seo %}
</head>
<body>
<!-- map container -->
<div class="map" id="map"></div>
<!-- info banner at bottom on site, click toggles popover -->
<a class="infobanner" id="popover-open">
<div class="infobanner__redaxo">
<img class="infobanner__logo" src="{{ '/assets/images/redaxo.svg' | relative_url }}" alt="REDAXO">
<span>Community <span class="hide-xs">World</span> Map</span>
</div>
<div class="infobanner__join">
<span class="infobanner__heart">♥</span>
<span>Join!</span>
</div>
</a>
<!-- popover -->
<div class="popover" id="popover">
<button id="popover-close" class="popover__close" type="button"><span>Close</span><i><i></i></i></button>
<div class="popover__body">
<h1 class="popover__title">
<img class="redaxo-logo" src="{{ '/assets/images/redaxo-cms.svg' | relative_url }}" alt="REDAXO"><br>
Community World Map
</h1>
<p>Any of the <strong>{{ site.directory | size }}</strong> location markers on this map represents someone who’s involved in <a href="https://redaxo.org">REDAXO</a>, which we the community believe is one of the finest CMS around. ✌️</p>
<p>The project is hosted at <a href="https://github.com/FriendsOfREDAXO/community">GitHub</a>, which allows for everyone to <strong>add and manage their map entries by themselves</strong>! This is pretty cool. If you like to join the map, just follow the link and find all information:</p>
<div class="calltoaction">
<p>👉 <a href="https://github.com/FriendsOfREDAXO/community/tree/master/_directory">Learn how to manage your marker!</a></p>
</div>
<div class="legals">
<p>Legals: This service is provided by the REDAXO community which is represented by <a href="http://www.yakamara.de/#impressum">Yakamara Media</a>. It is <abbr title="Free and Open Source Software">FOSS</abbr> and usage is free of charge.</p>
</div>
</div>
</div>
<!-- load directory data -->
{% assign directoryData = site.collections | where: "label", "directory" | first %}
<!-- directory data -->
<script>
var directory = [
{% for entry in site.directory %}
<!-- id -->
<!-- split path to user folder and select id from second to last part -->
{% assign parts = entry.id | split: "/" %}
{% assign index = parts | size | minus: 2 %}
{% assign id = parts[index] | slugify | jsonify %}
<!-- name -->
{% assign name = entry.name | strip_html | truncate: 100 | escape_once | jsonify %}
<!-- latitude -->
{% assign latitude = entry.latitude | strip_html | escape_once | jsonify %}
<!-- longitude -->
{% assign longitude = entry.longitude | strip_html | escape_once | jsonify %}
<!-- bio -->
{% assign bio = entry.bio | strip_html | truncate: 300 | escape_once | jsonify %}
<!-- image -->
{% assign image = entry.image | strip_html %}
{% unless image contains 'http://' or image contains 'https://' %}
<!-- split path into parts and reassemble to get clean path (which jekyll does not provide) -->
{% assign parts = entry.id | split: "/" %}
{% assign path = "" %}
{% for part in parts %}
{% if part != "" and forloop.last != true %}
{% capture path %}{{ path }}/{{ part }}{% endcapture %}
{% endif %}
{% endfor %}
<!-- set up complete image path (without leading '/') -->
{% assign imagePath = path | slice: 1, 99999 | append: "/" | append: image %}
<!-- create internal path stored by jeykll and check if image exists -->
{% assign checkPath = imagePath | prepend: "_" %}
{% assign imageObject = directoryData.files | where: "path", checkPath | first %}
<!-- assign final image path -->
{% if imageObject %}
{% assign image = imagePath %}
{% else %}
{% assign image = "" %}
{% endif %}
{% endunless %}
{% assign image = image | jsonify %}
<!-- links -->
{% assign links = entry.links | jsonify | escape_once | replace: """, '"' %}
<!-- output -->
{
'id': {{ id }},
'name': {{ name }},
'latitude': {{ latitude }},
'longitude': {{ longitude }},
'bio': {{ bio }},
'image': {{ image }},
'links': {{ links }}
}{% unless forloop.last == true %},{% endunless %}
{% endfor %}
];
</script>
<script src="{{ '/assets/js/script.js' | relative_url }}"></script>
</body>
</html>