-
Notifications
You must be signed in to change notification settings - Fork 167
/
index.html
executable file
·219 lines (175 loc) · 9.79 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
---
layout: compress
---
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: 'en' }}" prefix="og: http://ogp.me/ns#">
<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 }}">
<meta name="keywords" content="redaxo,community,cms,people,map,github,leaflet">
<meta name="author" content="Friends Of REDAXO">
<meta name="robots" content="index, follow">
<!-- styles -->
<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 }}">
<!-- urls -->
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
<!-- Prefetch external CDN-Domain -->
<link rel="dns-prefetch" href="//cartodb-basemaps-b.global.ssl.fastly.net">
<!-- icons -->
<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">
<!-- open graph -->
<meta property="og:site_name" content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}">
<meta property="og:type" content="website">
<meta property="og:title" content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}">
<meta property="og:description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<meta property="og:url" content="{{ page.url | absolute_url }}">
<meta property="og:image" content="{{ '/icons/redaxo-community.png' | absolute_url }}">
<meta property="og:locale" content="de_DE">
<!-- twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@REDAXO">
<meta name="twitter:title" content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}">
<meta name="twitter:description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<meta name="twitter:image" content="{{ '/icons/redaxo-community.png' | absolute_url }}">
<meta name="twitter:image:alt" content="Screenshot of community map">
<!-- JSON LD -->
<script type="application/ld+json">
[
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}",
"publisher": "Friends Of REDAXO",
"url": "{{ page.url | absolute_url }}",
"description": "{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}",
"image": "{{ '/icons/redaxo-community.png' | absolute_url }}"
}
]
</script>
<!-- scripts -->
<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>
<script src="{{ '/assets/plugins/hash/hash.js' | relative_url }}"></script>
<!-- init directory data and items counter -->
{% assign directoryData = site.collections | where: "label", "directory" | first %}
{% assign itemsCount = 0 %}
<!-- process 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 idRaw = parts[index] %}
{% assign id = idRaw | slugify | jsonify %}
<!-- name -->
{% assign name = entry.name | strip_html | truncate: 100 | escape_once | jsonify %}
<!-- latitude -->
{% assign latitude = entry.latitude | strip_html | escape_once %}
{% if latitude.size > 0 %}
{% assign latitude = latitude | jsonify %}
{% else %}
{% continue %}
{% endif %}
<!-- longitude -->
{% assign longitude = entry.longitude | strip_html | escape_once %}
{% if longitude.size > 0 %}
{% assign longitude = longitude | jsonify %}
{% else %}
{% continue %}
{% endif %}
<!-- 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: """, '"' %}
<!-- last modified -->
{% assign lastModified = site.data.last-modified[idRaw] | default: 0 %}
<!-- increment counter -->
{% assign itemsCount = itemsCount | plus: 1 %}
<!-- output -->
{
'id': {{ id }},
'name': {{ name }},
'latitude': {{ latitude }},
'longitude': {{ longitude }},
'bio': {{ bio }},
'image': {{ image }},
'links': {{ links }},
'lastModified': {{ lastModified }},
}{% unless forloop.last == true %},{% endunless %}
{% endfor %}
];
</script>
<script src="{{ '/assets/js/script.js' | relative_url }}"></script>
</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>{{ itemsCount }}</strong> location markers on this map represents someone who’s involved in <a href="https://redaxo.org" target="_blank" rel="noopener noreferrer">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" target="_blank" rel="noopener noreferrer">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" target="_blank" rel="noopener noreferrer">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" target="_blank" rel="noopener noreferrer">Yakamara Media</a>. It is <abbr title="Free and Open Source Software">FOSS</abbr> and usage is free of charge.</p>
</div>
</div>
</div>
</body>
</html>