Skip to content

Commit

Permalink
Merge pull request #11 from school-of-data/allevents
Browse files Browse the repository at this point in the history
All event page implemented as per #7
  • Loading branch information
benhur07b authored Oct 5, 2022
2 parents 5e5023e + 50052fd commit c5d1f5b
Show file tree
Hide file tree
Showing 32 changed files with 512 additions and 92 deletions.
4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ title: Open Knowledge Foundation Training Events
description: Open Knowledge Foundation Training Events
github: [metadata]
baseurl: /okf-events-a

plugins: [jekyll-paginate]
paginate: 5
paginate_path: "/events/page:num"
lang: en
7 changes: 1 addition & 6 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
<div class="container">
<nav class="primary-nav">
<ul>
{% assign pagelist = site.pages | where: "permalink", "/allevents" %}
{% for node in pagelist%}
<!-- <li><a href="https://okfn.org">Open Knowledge homepage</a></li> -->
<li><a href="{{ site.baseurl }}{{ node.permalink }}">All training events</a></li>
<!-- <li><a href="{{ site.baseurl }}/series/">Series</a></li> -->
{% endfor %}
<li><a href="{{ site.baseurl }}/events">All training events</a></li>
</ul>
</nav>
<a class="header-logo" href="{{ site.baseurl }}/">
Expand Down
28 changes: 28 additions & 0 deletions _includes/langlist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% assign rawtags = "" %}
{% for post in site.posts %}
{% assign posttags = post.lang | join:"|" | append:"|" %}
{% assign rawtags = rawtags | append:posttags %}
{% endfor %}
{% assign rawtags = rawtags | split:"|" | sort %}
{% assign tags = "" %}
{% for tag in rawtags %}
{% if tag != "" %}
{% if tags == "" %}
{% assign tags = tag | split:"|" %}
{% endif %}
{% unless tags contains tag %}
{% assign tags = tags | join:"|" | append:"|" | append:tag | split:"|" %}
{% endunless %}
{% endif %}
{% endfor %}
<div class="pt-1">
<p>
<h3>Language</h3>
{% for tag in tags %}
<a href="{{ site.baseurl }}/events/lang.html#{{ tag | slugify }}"
class="small post-meta-tag m-0.5 mt-2 no-underline-link"
style="border:1px solid #22B7F8; border-radius:10px; padding:2px 8px;">
{{
tag }} </a>
{% endfor %}
</div>
3 changes: 3 additions & 0 deletions _includes/paginated-posts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for post in paginator.posts %}
{% include post-archive-meta.html %}
{% endfor %}
30 changes: 30 additions & 0 deletions _includes/pagination.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% if paginator.total_pages > 1 %}
<div style="text-align:center">
{% if paginator.previous_page %}
<a class="ml-1 mr-1 pe-2 reverse-bnhr-link font-weight-bold h6 "
href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: " //", "/" }}"
style="color:#22B7F8">&laquo; Prev</a>
{% else %}
<span class="text-secondary font-weight-bold h6 ">&laquo; Prev</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="ml-1 mr-1 pe-2 text-secondary font-weight-bold h6">{{ page }}</span>
{% elsif page == 1 %}
<a class="ml-1 mr-1 pe-2 reverse-bnhr-link font-weight-bold h6" href="{{ site.baseurl }}/events/index.html"
style="color:#22B7F8">{{ page
}}</a>
{% else %}
<a class="ml-1 mr-1 pe-2 reverse-bnhr-link font-weight-bold h6"
href="{{ site.baseurl }}/{{ site.paginate_path | replace: " //", "/" | replace: ":num" , page }}"
style="color:#22B7F8">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a class="ml-1 mr-1 pe-2 reverse-bnhr-link font-weight-bold h6" style="color:#22B7F8"
href="{{ paginator.next_page_path | prepend: site.baseurl | replace: " //", "/" }}">Next &raquo;</a>
{% else %}
<span class="text-secondary font-weight-bold h6">Next &raquo;</span>
{% endif %}
</div>
{% endif %}
16 changes: 16 additions & 0 deletions _includes/post-archive-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div class="row eventlisting-container">
<div class="eventlisting">
<p class="eventlisting-eventdateandtitle" style="margin-top: 0px">
<span class="eventlisting-eventtitle"><a href="{{ site.baseurl }}{{ post.permalink }}"
class="eventlisting-eventtitle">{{ post.title }}</a></span>
<p>
<span class="eventlisting-eventdate" style="font-size: large; color: #4F4F4F">{{ post.date | date: "%d %B
%Y" }}</span>
<span class="eventlisting-eventlocation" style="font-size: large; color: #4F4F4F">{{ post.location }}</span>
</p>
</p>
<p class="eventlisting-eventdescription">{{ post.description }}</p>
<a class="btn btn-primary btn-sm active" role="button" aria-pressed="true"
href="{{ site.baseurl }}{{ post.permalink }}">Details</a>
</div>
</div>
28 changes: 28 additions & 0 deletions _includes/regionlist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% assign rawtags = "" %}
{% for post in site.posts %}
{% assign posttags = post.region | join:"|" | append:"|" %}
{% assign rawtags = rawtags | append:posttags %}
{% endfor %}
{% assign rawtags = rawtags | split:"|" | sort %}
{% assign tags = "" %}
{% for tag in rawtags %}
{% if tag != "" %}
{% if tags == "" %}
{% assign tags = tag | split:"|" %}
{% endif %}
{% unless tags contains tag %}
{% assign tags = tags | join:"|" | append:"|" | append:tag | split:"|" %}
{% endunless %}
{% endif %}
{% endfor %}
<div class="pt-1">
<p>
<h3>Region</h3>
{% for tag in tags %}
<a href="{{ site.baseurl }}/events/region.html#{{ tag | slugify }}"
class="small post-meta-tag m-0.5 mt-2 no-underline-link"
style="border:1px solid #22B7F8; border-radius:10px; padding:2px 8px;">
{{
tag }} </a>
{% endfor %}
</div>
8 changes: 8 additions & 0 deletions _includes/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
json: '../search.json',
searchResultTemplate: '<div><a href="{url}"><h6 style="font-weight:400;color:#007FB1; padding-right:4px">{title}</h6></a>-<span style="font-weight:400; color:#007FB1; padding-left:4px;">{date}</span></div>',
})
</script>
8 changes: 8 additions & 0 deletions _includes/search_script.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script type="text/javascript">
/*!
* Simple-Jekyll-Search
* Copyright 2015-2020, Christian Fei
* Licensed under the MIT License.
*/
!function () { "use strict"; var f = { compile: function (r) { return i.template.replace(i.pattern, function (t, e) { var n = i.middleware(e, r[e], i.template); return void 0 !== n ? n : r[e] || t }) }, setOptions: function (t) { i.pattern = t.pattern || i.pattern, i.template = t.template || i.template, "function" == typeof t.middleware && (i.middleware = t.middleware) } }; const i = { pattern: /\{(.*?)\}/g, template: "", middleware: function () { } }; var n = function (t, e) { var n = e.length, r = t.length; if (n < r) return !1; if (r === n) return t === e; t: for (var i = 0, o = 0; i < r; i++) { for (var u = t.charCodeAt(i); o < n;)if (e.charCodeAt(o++) === u) continue t; return !1 } return !0 }, e = new function () { this.matches = function (t, e) { return n(e.toLowerCase(), t.toLowerCase()) } }, r = new function () { this.matches = function (e, t) { return !!e && (e = e.trim().toLowerCase(), (t = t.trim().toLowerCase()).split(" ").filter(function (t) { return 0 <= e.indexOf(t) }).length === t.split(" ").length) } }, d = { put: function (t) { if (l(t)) return a(t); if (function (t) { return Boolean(t) && "[object Array]" === Object.prototype.toString.call(t) }(t)) return function (n) { const r = []; s(); for (let t = 0, e = n.length; t < e; t++)l(n[t]) && r.push(a(n[t])); return r }(t); return undefined }, clear: s, search: function (t) { return t ? function (e, n, r, i) { const o = []; for (let t = 0; t < e.length && o.length < i.limit; t++) { var u = function (t, e, n, r) { for (const i in t) if (!function (n, r) { for (let t = 0, e = r.length; t < e; t++) { var i = r[t]; if (new RegExp(i).test(n)) return !0 } return !1 }(t[i], r.exclude) && n.matches(t[i], e)) return t }(e[t], n, r, i); u && o.push(u) } return o }(u, t, c.searchStrategy, c).sort(c.sort) : [] }, setOptions: function (t) { c = t || {}, c.fuzzy = t.fuzzy || !1, c.limit = t.limit || 10, c.searchStrategy = t.fuzzy ? e : r, c.sort = t.sort || o, c.exclude = t.exclude || [] } }; function o() { return 0 } const u = []; let c = {}; function s() { return u.length = 0, u } function l(t) { return Boolean(t) && "[object Object]" === Object.prototype.toString.call(t) } function a(t) { return u.push(t), u } c.fuzzy = !1, c.limit = 10, c.searchStrategy = c.fuzzy ? e : r, c.sort = o, c.exclude = []; var p = { load: function (t, e) { const n = window.XMLHttpRequest ? new window.XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"); n.open("GET", t, !0), n.onreadystatechange = h(n, e), n.send() } }; function h(e, n) { return function () { if (4 === e.readyState && 200 === e.status) try { n(null, JSON.parse(e.responseText)) } catch (t) { n(t, null) } } } var m = function y(t) { if (!(e = t) || !("undefined" != typeof e.required && e.required instanceof Array)) throw new Error("-- OptionsValidator: required options missing"); var e; if (!(this instanceof y)) return new y(t); const r = t.required; this.getRequiredOptions = function () { return r }, this.validate = function (e) { const n = []; return r.forEach(function (t) { "undefined" == typeof e[t] && n.push(t) }), n } }, w = { merge: function (t, e) { const n = {}; for (const r in t) n[r] = t[r], "undefined" != typeof e[r] && (n[r] = e[r]); return n }, isJSON: function (t) { try { return t instanceof Object && JSON.parse(JSON.stringify(t)) ? !0 : !1 } catch (e) { return !1 } } }; !function (t) { let i = { searchInput: null, resultsContainer: null, json: [], success: Function.prototype, searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>', templateMiddleware: Function.prototype, sortMiddleware: function () { return 0 }, noResultsText: "No results found", limit: 10, fuzzy: !1, debounceTime: null, exclude: [] }, n; const e = function (t, e) { e ? (clearTimeout(n), n = setTimeout(t, e)) : t.call() }; var r = ["searchInput", "resultsContainer", "json"]; const o = m({ required: r }); function u(t) { d.put(t), i.searchInput.addEventListener("input", function (t) { -1 === [13, 16, 20, 37, 38, 39, 40, 91].indexOf(t.which) && (c(), e(function () { l(t.target.value) }, i.debounceTime)) }) } function c() { i.resultsContainer.innerHTML = "" } function s(t) { i.resultsContainer.innerHTML += t } function l(t) { var e; (e = t) && 0 < e.length && (c(), function (e, n) { var r = e.length; if (0 === r) return s(i.noResultsText); for (let t = 0; t < r; t++)e[t].query = n, s(f.compile(e[t])) }(d.search(t), t)) } function a(t) { throw new Error("SimpleJekyllSearch --- " + t) } t.SimpleJekyllSearch = function (t) { var n; 0 < o.validate(t).length && a("You must specify the following required options: " + r), i = w.merge(i, t), f.setOptions({ template: i.searchResultTemplate, middleware: i.templateMiddleware }), d.setOptions({ fuzzy: i.fuzzy, limit: i.limit, sort: i.sortMiddleware, exclude: i.exclude }), w.isJSON(i.json) ? u(i.json) : (n = i.json, p.load(n, function (t, e) { t && a("failed to get JSON (" + n + ")"), u(e) })); t = { search: l }; return "function" == typeof i.success && i.success.call(t), t } }(window) }();
</script>
28 changes: 28 additions & 0 deletions _includes/serieslist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% assign rawtags = "" %}
{% for post in site.posts %}
{% assign posttags = post.series | join:"|" | append:"|" %}
{% assign rawtags = rawtags | append:posttags %}
{% endfor %}
{% assign rawtags = rawtags | split:"|" | sort %}
{% assign tags = "" %}
{% for tag in rawtags %}
{% if tag != "" %}
{% if tags == "" %}
{% assign tags = tag | split:"|" %}
{% endif %}
{% unless tags contains tag %}
{% assign tags = tags | join:"|" | append:"|" | append:tag | split:"|" %}
{% endunless %}
{% endif %}
{% endfor %}
<div class="pt-1">
<p>
<h3>Series</h3>
{% for tag in tags %}
<a href="{{ site.baseurl }}/events/series.html#{{ tag | slugify }}"
class="small post-meta-tag m-0.5 mt-2 no-underline-link"
style="border:1px solid #22B7F8; border-radius:10px; padding:2px 8px;">
{{
tag }} </a>
{% endfor %}
</div>
3 changes: 3 additions & 0 deletions _includes/tags-post-archive-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h4 class="pt-2"><a class="tags-archive-title bnhr-link" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h4>
<p class="small post-meta-info">{{ post.date | date_to_string}}</p>
<!-- <p class="small">{{ post.description | strip_html | truncatewords:100 }}</p> -->
28 changes: 28 additions & 0 deletions _includes/tagslist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% assign rawtags = "" %}
{% for post in site.posts %}
{% assign posttags = post.tags | join:"|" | append:"|" %}
{% assign rawtags = rawtags | append:posttags %}
{% endfor %}
{% assign rawtags = rawtags | split:"|" | sort %}
{% assign tags = "" %}
{% for tag in rawtags %}
{% if tag != "" %}
{% if tags == "" %}
{% assign tags = tag | split:"|" %}
{% endif %}
{% unless tags contains tag %}
{% assign tags = tags | join:"|" | append:"|" | append:tag | split:"|" %}
{% endunless %}
{% endif %}
{% endfor %}
<div class="pt-1">
<p>
<h3>Tags</h3>
{% for tag in tags %}
<a href="{{ site.baseurl }}/events/tags.html#{{ tag | slugify }}"
class="small post-meta-tag m-0.5 mt-2 no-underline-link"
style="border:1px solid #22B7F8; border-radius:10px; padding:2px 8px;">
{{
tag }} </a>
{% endfor %}
</div>
28 changes: 28 additions & 0 deletions _layouts/sidebar-filter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
layout: default
---
<div id="content" class="container main" role="main">
<div class="row">
<!-- left pane -->
<div class="col-4">
<div class="row col-12">
<h3>OKF Training series</h3>
</div>
{% assign serieslist = site.pages | where: "layout", "series" | sort: "title" %}
{% for node in serieslist %}
<div class="serieslisting">
<div class="serieslisting-title animate-a-blue"><a href="{{ site.baseurl }}{{ node.permalink }}">{{ node.title
}}</a></div>
</div>
{% endfor %}
{% include tagslist.html %}
{% include langlist.html %}
{% include regionlist.html %}
{% include serieslist.html %}
</div>
<!-- right pane -->
<div class="col-8">
{{ content }}
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /open-geodata-programme/2021/05/philippines-01
series: Open Geodata Training Programme
serieslink: /series/open-geodata-programme/
date: 2021-05-20
tags: [QGIS, GeoData, Meta]
region: Asia
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vTHSTAQWaY31tCpA_3cRZ7NXXxLpP7ld6TfAPJpqx0AaF_XieqkwUkeEVPo6tvrae4rlkEJTzim2giK/pub?output=csv
lang: en
location: Online
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /open-geodata-programme/2021/06/mexico-01
series: Open Geodata Training Programme
serieslink: /series/open-geodata-programme/
date: 2021-06-24
tags: [QGIS, GeoData, Meta]
region: North America
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vTGBuMYo_ZfQSku7WWE_c2YEhE313WW8T6I0CUxi1DZikDFNckhsqVnx8IxbGmSgZUUguWCSYZdKFhb/pub?output=csv
lang: es
location: Online
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /open-geodata-programme/2021/10/brazil-01
series: Open Geodata Training Programme
serieslink: /series/open-geodata-programme/
date: 2021-10-19
tags: [QGIS, GeoData, Meta]
region: South America
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vR3xrFS3a1Tbe-R7PHGI0Q-fZyFRpx9X0pXdJyIpp5pLzrJaIJ8H0UeltCNe-VNnjssIJzjul-GXRNT/pub?output=csv
lang: pt
location: Online
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /open-geodata-programme/2021/10/mekong-river-commission-01
series: Open Geodata Training Programme
serieslink: /series/open-geodata-programme/
date: 2021-10-20
tags: [QGIS, GeoData, Meta]
region: Asia
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vSKmvsbUP8ImPWc9uph7ggWGuYxBpUfRFfBiMQCpBiBmzVaZFqo0uWx5xg6Z6nL8bRstwc4Yn5Br4Ai/pub?output=csv
lang: en
location: Online
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /open-geodata-programme/2021/10/south-africa-01
series: Open Geodata Training Programme
serieslink: /series/open-geodata-programme/
date: 2021-10-28
tags: [QGIS, GeoData, Meta]
region: Africa
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vQ9mk4vtYhBzAIHQGT7b4D7SM-CPoZkMhUl_Z4eHytRAEQcEelAjn-vN-cg0vcPMfDX_qBn_SkuupLt/pub?output=csv
lang: en
location: Online
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /open-geodata-programme/2021/11/kenya-01
series: Open Geodata Training Programme
serieslink: /series/open-geodata-programme/
date: 2021-11-04
tags: [QGIS, GeoData, Meta]
region: Africa
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vSyhEp9D47cj-33LNMwKjkHvW0DFpl_5SkzmSprk_t42uNncdrz7Oiw8jLMl71a0yExOAjJlUmOt5tv/pub?output=csv
lang: en
location: Online
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /open-geodata-programme/2021/11/ghana-01
series: Open Geodata Training Programme
serieslink: /series/open-geodata-programme/
date: 2021-11-04
tags: [QGIS, GeoData, Meta]
region: Africa
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vSPzCwiWNFnuE2rM72n_OzS8sss7-EMnMP6ybSdwp17ysWXja8jgNnnxa5ZZCPtEqd7wHxgPexWzaPQ/pub?output=csv
lang: en
location: Online
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /open-geodata-programme/2022/03/uae-01
series: Open Geodata Training Programme
serieslink: /series/open-geodata-programme/
date: 2022-03-21
tags: [QGIS, GeoData, Meta]
region: Asia
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vQ09BoICTVo5mGmNG2MF9cc-NiMepvd_steXmeX9ql1Q1WVj7yuXWTbulCAXC75gSYX587M2QVjIcwX/pub?output=csv
lang: en
location: Online
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /frictionless-data/2022/05/tu-delft-01
series: Frictionless Data
serieslink: /series/frictionless-data/
date: 2022-04-28
tags: [QGIS, GeoData, Meta]
region: Europe
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vSKFyZzSjHo5iZmvzo7QMHCMmq_DhAouq0IVS2jVD3MFZDfZaipnXOmzrxhVNhbSuj8UQpAUTjPvg3g/pub?output=csv
lang: en
location: Online
Expand Down
14 changes: 14 additions & 0 deletions _posts/2022-09-15-open-geodata-training-ngo-apac-01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: event
title: "Open Geodata Training for NGOs - Asia Pacific"
description: "This is a free training to help NGO staff learn how to source, analyse and visualise geographic data to support social impact project. The programme is split into two phases, both delivered remotely: two days of live sessions and five weeks of mentoring."
permalink: /open-geodata-programme/2022/09/ngo-apac-01
series: Open Geodata Training Programme
serieslink: /series/open-geodata-programme/
date: 2022-09-15
tags: [QGIS, GeoData, NGO]
region: Asia
publicSpreadsheetUrl: https://docs.google.com/spreadsheets/d/e/2PACX-1vQBSzALM4ZzHjdxjZu3vx2fW0pq9hAsejtUE87OMF-RQ2wJAiKQIT0_uCU_7i3ADc21T0rFG5K_zpKz/pub?gid=0&single=true&output=csv
lang: en
location: Online
---
Loading

0 comments on commit c5d1f5b

Please sign in to comment.