chulapa-jekyll 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +116 -0
- data/README.md +189 -204
- data/_data/version.yml +2 -2
- data/_includes/components/archive-documents.html +56 -0
- data/_includes/components/author.html +6 -1
- data/_includes/components/breadcrumbdatesocial.html +1 -1
- data/_includes/components/cactus.html +2 -1
- data/_includes/components/cloud-entry.html +26 -0
- data/_includes/components/cloud.html +66 -0
- data/_includes/components/collection-documents.html +17 -0
- data/_includes/components/footer-content.html +34 -0
- data/_includes/components/headers.html +5 -5
- data/_includes/components/indexcards.html +13 -10
- data/_includes/components/indexcategory-documents.html +11 -0
- data/_includes/components/navbar-classic.html +58 -0
- data/_includes/components/navbeforeafter.html +7 -4
- data/_includes/components/navigation-fallback.html +19 -0
- data/_includes/components/random.html +1 -103
- data/_includes/components/recommendations.html +97 -0
- data/_includes/components/related.html +1 -96
- data/_includes/components/scripts.html +9 -0
- data/_includes/components/sidetoc.html +5 -4
- data/_includes/components/simplelist.html +6 -6
- data/_includes/components/skin-attribution.html +169 -0
- data/_includes/components/theme-selector.html +14 -0
- data/_includes/footer.html +14 -217
- data/_includes/head.html +265 -257
- data/_includes/navbar.html +33 -77
- data/_includes/search/fusejs.html +3 -19
- data/_includes/search/google.html +3 -3
- data/_includes/search/lunr.html +3 -11
- data/_includes/search/simplesearch.html +6 -6
- data/_includes/snippets/bootstrapdemo.html +28 -10
- data/_includes/snippets/carousel.html +16 -12
- data/_includes/snippets/dark-skin-enabled.html +14 -0
- data/_includes/snippets/masonry.html +6 -4
- data/_includes/snippets/microformats-url.html +2 -0
- data/_includes/snippets/publisher.html +15 -18
- data/_includes/snippets/video.html +6 -6
- data/_includes/snippets/youtube.html +10 -4
- data/_includes/theme-styles.html +201 -0
- data/_includes/welcomments/comment_form.html +5 -4
- data/_includes/welcomments/comments.html +5 -5
- data/_layouts/archive.html +2 -75
- data/_layouts/cloudcategory.html +2 -101
- data/_layouts/cloudtag.html +2 -103
- data/_layouts/compress.html +1 -1
- data/_layouts/default.html +17 -6
- data/_layouts/indexcategory.html +2 -30
- data/_layouts/landingpage.html +6 -4
- data/_layouts/minimal.html +12 -8
- data/_layouts/search.html +6 -5
- data/_sass/bootstrap/_variables.scss +1 -1
- data/_sass/bootstrap/mixins/_badge.scss +1 -1
- data/_sass/chulapa/_autothemer.scss +31 -0
- data/_sass/chulapa/_buttons.scss +101 -0
- data/_sass/chulapa/_classes.scss +137 -9
- data/_sass/chulapa/_mixins.scss +42 -1
- data/_sass/chulapa/_theme-selector.scss +1 -0
- data/_sass/chulapa/skins/_deeply.scss +229 -0
- data/_sass/chulapa/skins/_electro.scss +30 -0
- data/_sass/chulapa/skins/_graymor.scss +39 -0
- data/_sass/chulapa/skins/_hootstrap.scss +34 -0
- data/_sass/chulapa/skins/_lymcha.scss +27 -0
- data/_sass/chulapa/skins/_mickie.scss +38 -0
- data/_sass/chulapa/skins/_minco.scss +45 -0
- data/_sass/chulapa/skins/_monotone.scss +15 -0
- data/_sass/chulapa/skins/_preptor.scss +30 -0
- data/_sass/chulapa/skins/_skeeblu.scss +34 -0
- data/_sass/chulapa/skins/_sunset.scss +33 -0
- data/_sass/chulapa/skins/_wandoo.scss +22 -0
- data/_sass/chulapa/skins/bootswatch/_cyborg.scss +543 -0
- data/_sass/chulapa/skins/bootswatch/_darkly.scss +452 -0
- data/_sass/chulapa/skins/bootswatch/_flatly.scss +415 -0
- data/_sass/chulapa/skins/bootswatch/_journal.scss +163 -0
- data/_sass/chulapa/skins/bootswatch/_lux.scss +342 -0
- data/_sass/chulapa/skins/bootswatch/_materia.scss +914 -0
- data/_sass/chulapa/skins/bootswatch/_minty.scss +342 -0
- data/_sass/chulapa/skins/bootswatch/_sketchy.scss +757 -0
- data/_sass/chulapa/skins/bootswatch/_slate.scss +746 -0
- data/_sass/chulapa/skins/bootswatch/_solar.scss +454 -0
- data/_sass/chulapa/skins/bootswatch/_united.scss +85 -0
- data/_sass/chulapa/skins/bootswatch/_yeti.scss +699 -0
- data/_sass/chulapa/skins/bootswatch/cyborg.patch +301 -0
- data/_sass/chulapa/skins/bootswatch/darkly.patch +493 -0
- data/_sass/chulapa/skins/bootswatch/flatly.patch +325 -0
- data/_sass/chulapa/skins/bootswatch/journal.patch +71 -0
- data/_sass/chulapa/skins/bootswatch/lux.patch +97 -0
- data/_sass/chulapa/skins/bootswatch/materia.patch +250 -0
- data/_sass/chulapa/skins/bootswatch/minty.patch +400 -0
- data/_sass/chulapa/skins/bootswatch/sketchy.patch +863 -0
- data/_sass/chulapa/skins/bootswatch/slate.patch +537 -0
- data/_sass/chulapa/skins/bootswatch/solar.patch +307 -0
- data/_sass/chulapa/skins/bootswatch/united.patch +91 -0
- data/_sass/chulapa/skins/bootswatch/yeti.patch +552 -0
- data/_sass/chulapa-master.scss +10 -0
- data/_sass/skins/academia.scss +28 -0
- data/_sass/skins/auto.scss +23 -28
- data/_sass/skins/butterfly-dark.scss +22 -3
- data/_sass/skins/butterfly-dim.scss +32 -5
- data/_sass/skins/butterfly.scss +35 -3
- data/_sass/skins/cerulean.scss +120 -0
- data/_sass/skins/chulapa.scss +23 -3
- data/_sass/skins/cyborg.scss +3 -512
- data/_sass/skins/darkly.scss +3 -424
- data/_sass/skins/deeply.scss +10 -279
- data/_sass/skins/electro.scss +4 -25
- data/_sass/skins/flatly.scss +3 -386
- data/_sass/skins/focal.scss +33 -2
- data/_sass/skins/gitdev-dark.scss +19 -8
- data/_sass/skins/gitdev.scss +2 -2
- data/_sass/skins/graymor.scss +7 -30
- data/_sass/skins/hootstrap.scss +5 -19
- data/_sass/skins/journal.scss +3 -131
- data/_sass/skins/listen.scss +35 -3
- data/_sass/skins/litera.scss +281 -0
- data/_sass/skins/lux.scss +3 -310
- data/_sass/skins/lymcha.scss +4 -17
- data/_sass/skins/materia.scss +3 -889
- data/_sass/skins/media.scss +11 -1
- data/_sass/skins/mickie.scss +7 -26
- data/_sass/skins/minco.scss +10 -29
- data/_sass/skins/minty.scss +3 -309
- data/_sass/skins/monotone.scss +6 -24
- data/_sass/skins/navi.scss +29 -1
- data/_sass/skins/none.scss +24 -2
- data/_sass/skins/pear.scss +34 -1
- data/_sass/skins/preptor.scss +6 -16
- data/_sass/skins/pulse.scss +158 -0
- data/_sass/skins/skeeblu.scss +6 -17
- data/_sass/skins/sketchy.scss +3 -735
- data/_sass/skins/slate.scss +3 -719
- data/_sass/skins/solar.scss +3 -425
- data/_sass/skins/sunset.scss +6 -26
- data/_sass/skins/towards.scss +26 -1
- data/_sass/skins/twitter-dim.scss +43 -5
- data/_sass/skins/twitter-lights-out.scss +25 -3
- data/_sass/skins/twitter.scss +32 -3
- data/_sass/skins/united.scss +3 -57
- data/_sass/skins/universal.scss +17 -0
- data/_sass/skins/wandoo.scss +6 -12
- data/_sass/skins/yeti.scss +3 -673
- data/_sass/vendor/bootswatch/LICENSE +21 -0
- data/_sass/vendor/bootswatch/LICENSE-4.5.0 +21 -0
- data/_sass/vendor/bootswatch/README.md +57 -0
- data/_sass/vendor/bootswatch/cerulean/_bootswatch.scss +102 -0
- data/_sass/vendor/bootswatch/cerulean/_variables.scss +57 -0
- data/_sass/vendor/bootswatch/cyborg/_bootswatch.scss +330 -0
- data/_sass/vendor/bootswatch/cyborg/_variables.scss +169 -0
- data/_sass/vendor/bootswatch/darkly/_bootswatch.scss +247 -0
- data/_sass/vendor/bootswatch/darkly/_variables.scss +164 -0
- data/_sass/vendor/bootswatch/flatly/_bootswatch.scss +274 -0
- data/_sass/vendor/bootswatch/flatly/_variables.scss +106 -0
- data/_sass/vendor/bootswatch/journal/_bootswatch.scss +62 -0
- data/_sass/vendor/bootswatch/journal/_variables.scss +60 -0
- data/_sass/vendor/bootswatch/litera/_bootswatch.scss +268 -0
- data/_sass/vendor/bootswatch/litera/_variables.scss +96 -0
- data/_sass/vendor/bootswatch/lux/_bootswatch.scss +191 -0
- data/_sass/vendor/bootswatch/lux/_variables.scss +103 -0
- data/_sass/vendor/bootswatch/materia/_bootswatch.scss +747 -0
- data/_sass/vendor/bootswatch/materia/_variables.scss +129 -0
- data/_sass/vendor/bootswatch/minty/_bootswatch.scss +380 -0
- data/_sass/vendor/bootswatch/minty/_variables.scss +94 -0
- data/_sass/vendor/bootswatch/pulse/_bootswatch.scss +145 -0
- data/_sass/vendor/bootswatch/pulse/_variables.scss +96 -0
- data/_sass/vendor/bootswatch/sketchy/_bootswatch.scss +492 -0
- data/_sass/vendor/bootswatch/sketchy/_variables.scss +172 -0
- data/_sass/vendor/bootswatch/slate/_bootswatch.scss +531 -0
- data/_sass/vendor/bootswatch/slate/_variables.scss +163 -0
- data/_sass/vendor/bootswatch/solar/_bootswatch.scss +243 -0
- data/_sass/vendor/bootswatch/solar/_variables.scss +171 -0
- data/_sass/vendor/bootswatch/source.json +86 -0
- data/_sass/vendor/bootswatch/united/_bootswatch.scss +10 -0
- data/_sass/vendor/bootswatch/united/_variables.scss +54 -0
- data/_sass/vendor/bootswatch/yeti/_bootswatch.scss +586 -0
- data/_sass/vendor/bootswatch/yeti/_variables.scss +110 -0
- data/_sass/vendor/tophat/LICENSE +21 -0
- data/_sass/vendor/tophat/README.md +38 -0
- data/_sass/vendor/tophat/deeply/_styles.scss +6 -0
- data/_sass/vendor/tophat/deeply/_variables.scss +73 -0
- data/_sass/vendor/tophat/deeply/theme.scss +77 -0
- data/_sass/vendor/tophat/electro/_styles.scss +5 -0
- data/_sass/vendor/tophat/electro/_variables.scss +23 -0
- data/_sass/vendor/tophat/electro/theme.scss +28 -0
- data/_sass/vendor/tophat/graymor/_styles.scss +5 -0
- data/_sass/vendor/tophat/graymor/_variables.scss +18 -0
- data/_sass/vendor/tophat/graymor/theme.scss +24 -0
- data/_sass/vendor/tophat/hootstrap/_styles.scss +5 -0
- data/_sass/vendor/tophat/hootstrap/_variables.scss +14 -0
- data/_sass/vendor/tophat/hootstrap/theme.scss +18 -0
- data/_sass/vendor/tophat/lymcha/_styles.scss +5 -0
- data/_sass/vendor/tophat/lymcha/_variables.scss +13 -0
- data/_sass/vendor/tophat/lymcha/theme.scss +16 -0
- data/_sass/vendor/tophat/mickie/_styles.scss +5 -0
- data/_sass/vendor/tophat/mickie/_variables.scss +13 -0
- data/_sass/vendor/tophat/mickie/theme.scss +17 -0
- data/_sass/vendor/tophat/minco/_styles.scss +5 -0
- data/_sass/vendor/tophat/minco/_variables.scss +14 -0
- data/_sass/vendor/tophat/minco/theme.scss +18 -0
- data/_sass/vendor/tophat/monotone/_styles.scss +5 -0
- data/_sass/vendor/tophat/monotone/_variables.scss +14 -0
- data/_sass/vendor/tophat/monotone/theme.scss +18 -0
- data/_sass/vendor/tophat/preptor/_styles.scss +5 -0
- data/_sass/vendor/tophat/preptor/_variables.scss +14 -0
- data/_sass/vendor/tophat/preptor/theme.scss +18 -0
- data/_sass/vendor/tophat/skeeblu/_styles.scss +5 -0
- data/_sass/vendor/tophat/skeeblu/_variables.scss +17 -0
- data/_sass/vendor/tophat/skeeblu/theme.scss +22 -0
- data/_sass/vendor/tophat/source.json +57 -0
- data/_sass/vendor/tophat/sunset/_styles.scss +5 -0
- data/_sass/vendor/tophat/sunset/_variables.scss +13 -0
- data/_sass/vendor/tophat/sunset/theme.scss +16 -0
- data/_sass/vendor/tophat/wandoo/_styles.scss +5 -0
- data/_sass/vendor/tophat/wandoo/_variables.scss +18 -0
- data/_sass/vendor/tophat/wandoo/theme.scss +24 -0
- data/assets/css/dark/highlighter.scss +10 -0
- data/assets/css/dark/main.scss +43 -0
- data/assets/css/highlighter.scss +6 -1
- data/assets/css/main.scss +12 -3
- data/assets/css/search-fusejs.css +14 -0
- data/assets/css/search-lunr.css +7 -0
- data/assets/js/better404/better404.js +31 -38
- data/assets/js/ch_ytdefer/ch_ytdefer.js +27 -82
- data/assets/js/chulapa_carousel.js +115 -0
- data/assets/js/chulapa_mermaid.js +31 -0
- data/assets/js/chulapa_navigation.js +71 -0
- data/assets/js/chulapa_photoswipe.js +106 -0
- data/assets/js/chulapa_script.js +198 -76
- data/assets/js/chulapa_search.js +89 -0
- data/assets/js/clipboard/chulapa_clipboard.js +17 -108
- data/assets/js/cusdis/chulapa_cusdis.js +1 -1
- data/assets/js/fusejs/fusejs-search.js +5 -140
- data/assets/js/fusejs/fusejs-search.min.js +4 -4
- data/assets/js/lunr/lunr-search.js +7 -130
- data/assets/js/lunr/lunr-search.min.js +1 -1
- metadata +141 -2
|
@@ -9,12 +9,18 @@
|
|
|
9
9
|
<link itemprop="thumbnailUrl" href="https://img.youtube.com/vi/{{ video_id | escape }}/{{ video_res | escape }}.jpg">
|
|
10
10
|
{%- endif -%}
|
|
11
11
|
<link itemprop="embedUrl" href="https://www.youtube-nocookie.com/embed/{{ video_id | escape }}">
|
|
12
|
-
<div data-src="{{ video_id }}" class="ch_ytdefer embed-responsive embed-responsive-16by9 my-2 chulapa-rounded-lg" style="background-image: url(https://img.youtube.com/vi/{{ video_id }}/{{ video_res }}.jpg); background-position: center; background-size: cover;">
|
|
13
|
-
<button class="ch_ytdefer_btn" aria-label="Play" style="background-image: url("data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMCUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDY4IDQ4IiB3aWR0aD0iMTAwJSI+PHBhdGggY2xhc3M9Inl0cC1sYXJnZS1wbGF5LWJ1dHRvbi1iZyIgZD0iTTY2LjUyLDcuNzRjLTAuNzgtMi45My0yLjQ5LTUuNDEtNS40Mi02LjE5QzU1Ljc5LC4xMywzNCwwLDM0LDBTMTIuMjEsLjEzLDYuOSwxLjU1IEMzLjk3LDIuMzMsMi4yNyw0LjgxLDEuNDgsNy43NEMwLjA2LDEzLjA1LDAsMjQsMCwyNHMwLjA2LDEwLjk1LDEuNDgsMTYuMjZjMC43OCwyLjkzLDIuNDksNS40MSw1LjQyLDYuMTkgQzEyLjIxLDQ3Ljg3LDM0LDQ4LDM0LDQ4czIxLjc5LTAuMTMsMjcuMS0xLjU1YzIuOTMtMC43OCw0LjY0LTMuMjYsNS40Mi02LjE5QzY3Ljk0LDM0Ljk1LDY4LDI0LDY4LDI0UzY3Ljk0LDEzLjA1LDY2LjUyLDcuNzR6IiBmaWxsPSIjMjEyMTIxIiBmaWxsLW9wYWNpdHk9IjAuOCI+PC9wYXRoPjxwYXRoIGQ9Ik0gNDUsMjQgMjcsMTQgMjcsMzQiIGZpbGw9IiNmZmYiPjwvcGF0aD48L3N2Zz4="); position: absolute; border: 0px; background-color: transparent; left: calc(50% - 73px/2); top: calc(50% - 52px/2); width: 73px; height: 52px; pointer-events: none;"></button>
|
|
12
|
+
<div data-src="{{ video_id | escape }}" data-title="{{ include.name | default: '' | strip | default: 'YouTube video' | escape }}" class="ch_ytdefer embed-responsive embed-responsive-16by9 my-2 chulapa-rounded-lg" style="background-image: url(https://img.youtube.com/vi/{{ video_id }}/{{ video_res }}.jpg); background-position: center; background-size: cover;">
|
|
13
|
+
<button type="button" class="ch_ytdefer_btn" aria-label="Play {{ include.name | default: '' | strip | default: 'YouTube video' | escape }}" style="background-image: url("data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMCUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDY4IDQ4IiB3aWR0aD0iMTAwJSI+PHBhdGggY2xhc3M9Inl0cC1sYXJnZS1wbGF5LWJ1dHRvbi1iZyIgZD0iTTY2LjUyLDcuNzRjLTAuNzgtMi45My0yLjQ5LTUuNDEtNS40Mi02LjE5QzU1Ljc5LC4xMywzNCwwLDM0LDBTMTIuMjEsLjEzLDYuOSwxLjU1IEMzLjk3LDIuMzMsMi4yNyw0LjgxLDEuNDgsNy43NEMwLjA2LDEzLjA1LDAsMjQsMCwyNHMwLjA2LDEwLjk1LDEuNDgsMTYuMjZjMC43OCwyLjkzLDIuNDksNS40MSw1LjQyLDYuMTkgQzEyLjIxLDQ3Ljg3LDM0LDQ4LDM0LDQ4czIxLjc5LTAuMTMsMjcuMS0xLjU1YzIuOTMtMC43OCw0LjY0LTMuMjYsNS40Mi02LjE5QzY3Ljk0LDM0Ljk1LDY4LDI0LDY4LDI0UzY3Ljk0LDEzLjA1LDY2LjUyLDcuNzR6IiBmaWxsPSIjMjEyMTIxIiBmaWxsLW9wYWNpdHk9IjAuOCI+PC9wYXRoPjxwYXRoIGQ9Ik0gNDUsMjQgMjcsMTQgMjcsMzQiIGZpbGw9IiNmZmYiPjwvcGF0aD48L3N2Zz4="); position: absolute; border: 0px; background-color: transparent; left: calc(50% - 73px/2); top: calc(50% - 52px/2); width: 73px; height: 52px; pointer-events: none;"></button>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
|
+
<noscript><a href="https://www.youtube.com/watch?v={{ video_id | escape }}">Watch this video on YouTube</a></noscript>
|
|
16
17
|
<!-- Load script only if needed -->
|
|
17
18
|
<script>
|
|
18
|
-
|
|
19
|
+
(function () {
|
|
20
|
+
if (document.getElementById("ch_ytdeferScript")) return;
|
|
21
|
+
var script = document.createElement("script");
|
|
22
|
+
script.src = {%- assign defer_script_url = '/assets/js/ch_ytdefer/ch_ytdefer.js' | absolute_url -%}{% include snippets/jsonld-string.html value=defer_script_url decode_html=false %};
|
|
23
|
+
script.id = "ch_ytdeferScript";
|
|
24
|
+
document.body.appendChild(script);
|
|
25
|
+
})();
|
|
19
26
|
</script>
|
|
20
|
-
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
{%- include snippets/dark-skin-enabled.html -%}
|
|
2
|
+
{% if dark_skin_enabled %}
|
|
3
|
+
<link rel="stylesheet" id="maincss" href="{{ '/assets/css/main.css' | relative_url }}">
|
|
4
|
+
<link rel="stylesheet" id="csshigh" href="{{ '/assets/css/highlighter.css' | relative_url }}">
|
|
5
|
+
<script>
|
|
6
|
+
(function () {
|
|
7
|
+
'use strict';
|
|
8
|
+
var paths = {
|
|
9
|
+
light: [{{ '/assets/css/main.css' | relative_url | jsonify }}, {{ '/assets/css/highlighter.css' | relative_url | jsonify }}],
|
|
10
|
+
dark: [{{ '/assets/css/dark/main.css' | relative_url | jsonify }}, {{ '/assets/css/dark/highlighter.css' | relative_url | jsonify }}]
|
|
11
|
+
};
|
|
12
|
+
var themeColors = {
|
|
13
|
+
light: {{ site.chulapa-skin.vars.primary | default: '' | jsonify }},
|
|
14
|
+
dark: {{ site.chulapa-skin-dark.vars.primary | default: '' | jsonify }}
|
|
15
|
+
};
|
|
16
|
+
function updateThemeColor(theme) {
|
|
17
|
+
var meta = document.querySelector('meta[data-chulapa-theme-color]');
|
|
18
|
+
var color = themeColors[theme];
|
|
19
|
+
if (!color) { if (meta) meta.remove(); return; }
|
|
20
|
+
if (!meta) {
|
|
21
|
+
meta = document.createElement('meta');
|
|
22
|
+
meta.name = 'theme-color';
|
|
23
|
+
meta.setAttribute('data-chulapa-theme-color', '');
|
|
24
|
+
document.head.appendChild(meta);
|
|
25
|
+
}
|
|
26
|
+
meta.content = color;
|
|
27
|
+
}
|
|
28
|
+
var key = 'chulapa-theme';
|
|
29
|
+
var mode = 'light';
|
|
30
|
+
var scheme = window.matchMedia ? window.matchMedia('(prefers-color-scheme: dark)') : null;
|
|
31
|
+
var root = document.documentElement;
|
|
32
|
+
var request = 0;
|
|
33
|
+
function valid(value) { return ['light', 'dark', 'auto'].indexOf(value) !== -1; }
|
|
34
|
+
function resolved(value) { return value === 'dark' || (value === 'auto' && scheme && scheme.matches) ? 'dark' : 'light'; }
|
|
35
|
+
try { var stored = localStorage.getItem(key); if (valid(stored)) mode = stored; } catch (error) {}
|
|
36
|
+
var theme = resolved(mode);
|
|
37
|
+
root.dataset.theme = theme;
|
|
38
|
+
root.dataset.themeMode = mode;
|
|
39
|
+
root.style.colorScheme = theme;
|
|
40
|
+
updateThemeColor(theme);
|
|
41
|
+
/* A link error can come from an optional font import. Verify the end of
|
|
42
|
+
this exact generated sheet, never an imported or currently active sheet.
|
|
43
|
+
Unknown imports and inaccessible CSSOM keep the normal safe fallback. */
|
|
44
|
+
function usable(link, target, index, failed) {
|
|
45
|
+
try {
|
|
46
|
+
var rules = link.sheet.cssRules;
|
|
47
|
+
if (rules.length < 2) return false;
|
|
48
|
+
var last = rules[rules.length - 1];
|
|
49
|
+
var expected = (index === 0 ? 'main-' : 'highlighter-') + target;
|
|
50
|
+
if (!last || last.selectorText !== ':root' ||
|
|
51
|
+
last.style.getPropertyValue('--chulapa-css-ready').trim() !== expected) return false;
|
|
52
|
+
if (!failed) return true;
|
|
53
|
+
if (index !== 0) return false;
|
|
54
|
+
var imports = 0;
|
|
55
|
+
for (var i = 0; i < rules.length; i++) {
|
|
56
|
+
if (rules[i].type !== 3) continue; /* CSSImportRule */
|
|
57
|
+
var url = new URL(rules[i].href, document.baseURI);
|
|
58
|
+
if (url.origin !== 'https://fonts.googleapis.com' ||
|
|
59
|
+
(url.pathname !== '/css' && url.pathname !== '/css2')) return false;
|
|
60
|
+
imports++;
|
|
61
|
+
}
|
|
62
|
+
return imports > 0;
|
|
63
|
+
} catch (error) { return false; }
|
|
64
|
+
}
|
|
65
|
+
/* Recover initial dark CSS failures without discarding the saved choice. */
|
|
66
|
+
if (theme === 'dark') {
|
|
67
|
+
var initialPending = ['maincss', 'csshigh'];
|
|
68
|
+
function stopInitialListeners() {
|
|
69
|
+
document.removeEventListener('error', initialFinished, true);
|
|
70
|
+
document.removeEventListener('load', initialFinished, true);
|
|
71
|
+
}
|
|
72
|
+
function initialFinished(event) {
|
|
73
|
+
var ids = ['maincss', 'csshigh'];
|
|
74
|
+
var link = event.target;
|
|
75
|
+
if (link !== document.getElementById(link.id)) return;
|
|
76
|
+
var index = initialPending.indexOf(link.id);
|
|
77
|
+
if (index === -1) return;
|
|
78
|
+
if (usable(link, 'dark', ids.indexOf(link.id), event.type === 'error')) {
|
|
79
|
+
initialPending.splice(index, 1);
|
|
80
|
+
if (!initialPending.length) stopInitialListeners();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
stopInitialListeners();
|
|
84
|
+
++request;
|
|
85
|
+
ids.forEach(function (id, index) {
|
|
86
|
+
var current = document.getElementById(id);
|
|
87
|
+
if (current) current.href = paths.light[index];
|
|
88
|
+
});
|
|
89
|
+
root.dataset.theme = 'light';
|
|
90
|
+
root.style.colorScheme = 'light';
|
|
91
|
+
updateThemeColor('light');
|
|
92
|
+
controls();
|
|
93
|
+
}
|
|
94
|
+
document.addEventListener('error', initialFinished, true);
|
|
95
|
+
document.addEventListener('load', initialFinished, true);
|
|
96
|
+
}
|
|
97
|
+
/* Static light links also work when CSP blocks this script. Replace them
|
|
98
|
+
with parser-blocking dark links before body content can be painted. */
|
|
99
|
+
if (theme === 'dark') {
|
|
100
|
+
['maincss', 'csshigh'].forEach(function (id, index) {
|
|
101
|
+
document.getElementById(id).remove();
|
|
102
|
+
document.write('<link rel="stylesheet" id="' + id + '" href="' + paths.dark[index] + '">');
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function controls() {
|
|
106
|
+
var names = {light: 'Light', dark: 'Dark', auto: 'Auto'};
|
|
107
|
+
var icons = {light: 'fas fa-sun', dark: 'fas fa-moon', auto: 'fa fa-adjust'};
|
|
108
|
+
document.querySelectorAll('.chulapa-theme-selector').forEach(function (selector) {
|
|
109
|
+
var button = selector.querySelector('.chulapa-theme-toggle');
|
|
110
|
+
if (!button) { selector.hidden = true; return; }
|
|
111
|
+
button.setAttribute('aria-label', 'Color theme: ' + names[mode]);
|
|
112
|
+
button.title = 'Color theme: ' + names[mode];
|
|
113
|
+
var icon = button.querySelector('i');
|
|
114
|
+
var label = button.querySelector('.chulapa-theme-label');
|
|
115
|
+
if (icon) icon.className = icons[mode];
|
|
116
|
+
if (label) label.textContent = names[mode];
|
|
117
|
+
selector.querySelectorAll('[data-theme-mode]').forEach(function (option) {
|
|
118
|
+
var selected = option.dataset.themeMode === mode;
|
|
119
|
+
option.classList.toggle('active', selected);
|
|
120
|
+
option.setAttribute('aria-pressed', String(selected));
|
|
121
|
+
});
|
|
122
|
+
selector.hidden = false;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function apply(value) {
|
|
126
|
+
var ids = ['maincss', 'csshigh'];
|
|
127
|
+
var previous = ids.map(function (id) { return document.getElementById(id); });
|
|
128
|
+
/* Custom head overrides may remove the managed stylesheet pair. */
|
|
129
|
+
if (previous.some(function (link) { return !link || link.tagName !== 'LINK'; })) return false;
|
|
130
|
+
var target = resolved(value);
|
|
131
|
+
var currentRequest = ++request;
|
|
132
|
+
mode = value;
|
|
133
|
+
root.dataset.themeMode = mode;
|
|
134
|
+
controls();
|
|
135
|
+
if (target === root.dataset.theme) return true;
|
|
136
|
+
var links = paths[target].map(function (url) {
|
|
137
|
+
var link = document.createElement('link');
|
|
138
|
+
link.rel = 'stylesheet';
|
|
139
|
+
link.media = 'not all';
|
|
140
|
+
link.href = url;
|
|
141
|
+
return link;
|
|
142
|
+
});
|
|
143
|
+
var loaded = 0;
|
|
144
|
+
function discard() { links.forEach(function (link) { link.remove(); }); }
|
|
145
|
+
function failed() {
|
|
146
|
+
discard();
|
|
147
|
+
if (currentRequest === request) {
|
|
148
|
+
++request;
|
|
149
|
+
controls();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
links.forEach(function (link, index) {
|
|
153
|
+
var settled = false;
|
|
154
|
+
function finished(event) {
|
|
155
|
+
if (settled) return;
|
|
156
|
+
settled = true;
|
|
157
|
+
if (!usable(link, target, index, event.type === 'error')) { failed(); return; }
|
|
158
|
+
if (++loaded !== 2) return;
|
|
159
|
+
if (currentRequest !== request) { discard(); return; }
|
|
160
|
+
/* Do not overwrite stylesheets replaced by custom scripts while loading. */
|
|
161
|
+
if (previous.some(function (old, index) { return document.getElementById(ids[index]) !== old; })) { failed(); return; }
|
|
162
|
+
ids.forEach(function (id, index) {
|
|
163
|
+
previous[index].remove();
|
|
164
|
+
links[index].id = id;
|
|
165
|
+
links[index].media = 'all';
|
|
166
|
+
});
|
|
167
|
+
root.dataset.theme = target;
|
|
168
|
+
root.style.colorScheme = target;
|
|
169
|
+
updateThemeColor(target);
|
|
170
|
+
}
|
|
171
|
+
link.onerror = finished;
|
|
172
|
+
link.onload = finished;
|
|
173
|
+
/* Keep the custom stylesheet last in the cascade. */
|
|
174
|
+
document.head.insertBefore(link, previous[0]);
|
|
175
|
+
});
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
/* Preserve the prototype's entry point for custom controls, with one initialization read. */
|
|
179
|
+
window.chulapaSetThemeMode = function (value) {
|
|
180
|
+
if (!valid(value) || !apply(value)) return;
|
|
181
|
+
try { localStorage.setItem(key, mode); } catch (error) {}
|
|
182
|
+
};
|
|
183
|
+
document.addEventListener('DOMContentLoaded', controls);
|
|
184
|
+
document.addEventListener('click', function (event) {
|
|
185
|
+
var option = event.target.closest && event.target.closest('.chulapa-theme-selector [data-theme-mode]');
|
|
186
|
+
if (!option || !valid(option.dataset.themeMode)) return;
|
|
187
|
+
window.chulapaSetThemeMode(option.dataset.themeMode);
|
|
188
|
+
var button = option.closest('.chulapa-theme-selector').querySelector('.chulapa-theme-toggle');
|
|
189
|
+
if (button) button.focus();
|
|
190
|
+
});
|
|
191
|
+
window.addEventListener('storage', function (event) {
|
|
192
|
+
if (event.key === key || event.key === null) apply(valid(event.newValue) ? event.newValue : 'light');
|
|
193
|
+
});
|
|
194
|
+
if (scheme) {
|
|
195
|
+
var changed = function () { if (mode === 'auto') apply('auto'); };
|
|
196
|
+
if (scheme.addEventListener) scheme.addEventListener('change', changed);
|
|
197
|
+
else if (scheme.addListener) scheme.addListener(changed);
|
|
198
|
+
}
|
|
199
|
+
})();
|
|
200
|
+
</script>
|
|
201
|
+
{% endif %}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<form id="welcomments__form" class="welcomments__comment-form" autocomplete="on" action="{{ include.api_url }}/comments" method="post">
|
|
2
2
|
<input type="hidden" name="website-id" id="website-id" value="{{ include.website_id }}" >
|
|
3
3
|
<input type="hidden" name="replying-to" id="replying-to" >
|
|
4
|
-
<input type="hidden" name="permalink" id="permalink" value="{{
|
|
5
|
-
<input type="hidden" name="page-slug" id="page-slug" value="{{ page.slug }}"
|
|
4
|
+
<input type="hidden" name="permalink" id="permalink" value="{{ page.url | absolute_url | escape }}" >
|
|
5
|
+
<input type="hidden" name="page-slug" id="page-slug" value="{{ page.slug }}">
|
|
6
6
|
<div class="welcomments__form-group">
|
|
7
|
-
<
|
|
8
|
-
<
|
|
7
|
+
<label for="message">Comment</label>
|
|
8
|
+
<textarea aria-describedby="welcomments__markdown-notice" rows="5" name="message" id="message" required spellcheck="true" placeholder="Type here..."></textarea>
|
|
9
|
+
<p id="welcomments__markdown-notice" class="welcomments__markdown-notice"><a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" target="_blank">GitHub-flavored Markdown</a> & a sane subset of HTML is supported.</p>
|
|
9
10
|
</div>
|
|
10
11
|
<div class="welcomments__form-group">
|
|
11
12
|
<label for="author-name">Name</label>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
{%- if include.website_id == "YOUR-WEBSITE-ID-HERE" -%}
|
|
8
8
|
<div style="color: #ff0000;">
|
|
9
|
-
<h1>Website id not configured!</
|
|
9
|
+
<p class="h1">Website id not configured!</p>
|
|
10
10
|
<p>Please replace <code>YOUR-WEBSITE-ID-HERE</code> with the website id from Welcomments console.</p>
|
|
11
11
|
</div>
|
|
12
12
|
{%- endif -%}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<h3 id="welcomments__comment-count-title" class="welcomments__comments-title">No comments yet!</h3>
|
|
27
27
|
{%- endif -%}
|
|
28
28
|
|
|
29
|
-
<
|
|
29
|
+
<div id="welcomments__comment-container" class="welcomments__comment-container">
|
|
30
30
|
{%- if all_comments.size > 0 -%}
|
|
31
31
|
{%- assign parent_comments = all_comments | where_exp: "c", "c.replying_to == nil" | sort: 'id' -%}
|
|
32
32
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
website_id = include.website_id -%}
|
|
41
41
|
{%- endfor -%}
|
|
42
42
|
{%- endif -%}
|
|
43
|
-
</
|
|
43
|
+
</div>
|
|
44
44
|
|
|
45
45
|
{%- include welcomments/comment_form.html
|
|
46
46
|
api_url = api_url
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
Contains some basic comment section styling, so that you can get started quickly
|
|
52
52
|
without having to come up with your own CSS if you don't want to.
|
|
53
53
|
-->
|
|
54
|
-
<link rel="stylesheet" href="{{'/assets/css/welcomments.css' | absolute_url }}"
|
|
54
|
+
<link rel="stylesheet" href="{{'/assets/css/welcomments.css' | absolute_url }}" >
|
|
55
55
|
|
|
56
56
|
<!--
|
|
57
57
|
Includes the optional Welcomments Javascript file. It enhances the user experience
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
and your comment form works just fine but is a bit less interactive! :-)
|
|
67
67
|
-->
|
|
68
68
|
<script defer id="welcomments__script" src="https://cdn.welcomments.io/welcomments.js" ></script>
|
|
69
|
-
<script
|
|
69
|
+
<script>
|
|
70
70
|
welcomments = {
|
|
71
71
|
apiUrl: "{{ api_url }}",
|
|
72
72
|
|
data/_layouts/archive.html
CHANGED
|
@@ -1,82 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
layout: default
|
|
3
|
+
chulapa_microformats_feed: true
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
{{- content -}}
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
{%-
|
|
9
|
-
{%- assign cols = page.include_collection | split: "," -%}
|
|
10
|
-
{%- for col in cols -%}
|
|
11
|
-
{%- if forloop.first -%}
|
|
12
|
-
{%- assign alldocs = site.documents |
|
|
13
|
-
where_exp: "item", "item.collection == col" -%}
|
|
14
|
-
{%- assign showcol = false -%}
|
|
15
|
-
{%- else -%}
|
|
16
|
-
{%- assign docloop = site.documents |
|
|
17
|
-
where_exp: "item", "item.collection == col" -%}
|
|
18
|
-
{%- assign alldocs = alldocs | concat: docloop %}
|
|
19
|
-
{%- assign showcol = true -%}
|
|
20
|
-
{%- endif -%}
|
|
21
|
-
{%- endfor -%}
|
|
22
|
-
{%- else -%}
|
|
23
|
-
{%- assign alldocs = site.documents -%}
|
|
24
|
-
{%- assign showcol = true -%}
|
|
25
|
-
{% endif %}
|
|
26
|
-
|
|
27
|
-
{%- assign alldocs = alldocs | sort: 'date' | reverse -%}
|
|
28
|
-
{%- if page.include_missdates -%}
|
|
29
|
-
{%- else -%}
|
|
30
|
-
{%- assign alldocs = alldocs | where_exp: "item", "item.date != nil" -%}
|
|
31
|
-
{%- endif -%}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{%- assign postsInYear = alldocs | group_by_exp: 'post', 'post.date | date: "%Y"' -%}
|
|
35
|
-
<div class="row row-cols-1 row-cols-sm-2 pt-5 mx-n1" id="years">
|
|
36
|
-
{%- for year in postsInYear -%}
|
|
37
|
-
<div class="col-sm-6 chulapa-links-hover-only py-2">
|
|
38
|
-
<a href="#{{ year.name | default: "-" }}" class="d-flex justify-content-between align-items-center border-bottom ">
|
|
39
|
-
{{ year.name | default: "NA" }} <span class="badge rounded-pill chulapa-pill-bg-primary">{{ year.items | size }}</span>
|
|
40
|
-
</a>
|
|
41
|
-
</div>
|
|
42
|
-
{%- endfor -%}
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
{%- for year in postsInYear -%}
|
|
46
|
-
<section id="{{ year.name | default: "NA" }}" class="mt-2 chulapa-archive">
|
|
47
|
-
<h2 class="border-bottom border-chulapa">{{ year.name | default: "NA" }}</h2>
|
|
48
|
-
{%- assign postsInMonth = year.items | group_by_exp: 'post', 'post.date | date: "%B"' -%}
|
|
49
|
-
{%- for month in postsInMonth -%}
|
|
50
|
-
{%- assign dateformat = month.name -%}
|
|
51
|
-
{% if dateformat %}
|
|
52
|
-
<h5 class="font-weight-light">{% include_cached snippets/datetranslate.html date=dateformat %}</h5>
|
|
53
|
-
{% endif %}
|
|
54
|
-
{%- for document in month.items -%}
|
|
55
|
-
<div class="ml-2 my-1">
|
|
56
|
-
<div class="row g-0">
|
|
57
|
-
<article class="col">
|
|
58
|
-
<h6 class="my-2"><a href="{{- document.url | absolute_url -}}" class="chulapa-text-body-color">{{ document.title | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines | strip }}</a></h6>
|
|
59
|
-
<p class="small mb-1">
|
|
60
|
-
{% if document.date %}
|
|
61
|
-
{% assign dateformat = document.date | date: "%A, %d" %}
|
|
62
|
-
<time datetime="{{- document.date | date_to_xmlschema -}}">{% include_cached snippets/datetranslate.html date=dateformat %}</time>
|
|
63
|
-
{% if document.last_modified_at %} <i class="fa fa-redo fa-sm" aria-hidden="true"></i>{% endif %}
|
|
64
|
-
{% endif %}
|
|
65
|
-
{%- if showcol -%}
|
|
66
|
-
<span class="mx-1 my-1 badge chulapa-pill-bg-body">{{ document.collection }}</span>
|
|
67
|
-
{%- endif -%}
|
|
68
|
-
</p>
|
|
69
|
-
</article>
|
|
70
|
-
{%- if document.header_img or document.og_image -%}
|
|
71
|
-
<a href="{{- document.url | absolute_url -}}" class="col-2 ml-2 btn chulapa-overlay-img chulapa-gradient" style="background-image: url('{{ document.og_image | default: document.header_img | absolute_url }}')"></a>
|
|
72
|
-
{%- endif -%}
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
{% endfor %}
|
|
76
|
-
<hr class="w-50 bg-light">
|
|
77
|
-
{% endfor %}
|
|
78
|
-
<div class="text-right">
|
|
79
|
-
<a href="#years" class="btn btn-lg border-0 chulapa-text-body-color"><i class="fa fa-chevron-up fa-lg" aria-hidden="true"></i><span class="sr-only">Top</span></a>
|
|
80
|
-
</div>
|
|
81
|
-
</section>
|
|
82
|
-
{% endfor %}
|
|
9
|
+
{%- include components/collection-documents.html renderer='components/archive-documents.html' -%}
|
data/_layouts/cloudcategory.html
CHANGED
|
@@ -1,107 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
layout: default
|
|
3
|
+
chulapa_microformats_feed: true
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
{{- content -}}
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{%- if page.include_collection -%}
|
|
10
|
-
{%- assign cols = page.include_collection | split: "," -%}
|
|
11
|
-
{%- for col in cols -%}
|
|
12
|
-
{%- if forloop.first -%}
|
|
13
|
-
{%- assign alldocs = site.documents |
|
|
14
|
-
where_exp: "item", "item.collection == col" -%}
|
|
15
|
-
{%- assign showcol = false -%}
|
|
16
|
-
{%- else -%}
|
|
17
|
-
{%- assign docloop = site.documents |
|
|
18
|
-
where_exp: "item", "item.collection == col" -%}
|
|
19
|
-
{%- assign alldocs = alldocs | concat: docloop %}
|
|
20
|
-
{%- assign showcol = true -%}
|
|
21
|
-
{%- endif -%}
|
|
22
|
-
{%- endfor -%}
|
|
23
|
-
{%- else -%}
|
|
24
|
-
{%- assign alldocs = site.documents -%}
|
|
25
|
-
{%- assign showcol = true -%}
|
|
26
|
-
{% endif %}
|
|
27
|
-
|
|
28
|
-
{% assign alldocs = alldocs | sort: 'date' | reverse %}
|
|
29
|
-
{% assign alltags = alldocs | map: 'categories' | join: ',' | split: ',' %}
|
|
30
|
-
|
|
31
|
-
{%- assign single_tags = alltags | uniq -%}
|
|
32
|
-
{% assign count_tags = '' | split: ',' %}
|
|
33
|
-
{% assign n_tags = single_tags | size | minus: 1 %}
|
|
34
|
-
|
|
35
|
-
{%- for i in (0..n_tags) %}
|
|
36
|
-
{% assign count_this_tag = alltags | where_exp:"item", "item == single_tags[i]" | size %}
|
|
37
|
-
{% assign count_tags = count_tags | push: count_this_tag %}
|
|
38
|
-
{%- endfor -%}
|
|
39
|
-
|
|
40
|
-
{% assign items_max = count_tags | sort | last %}
|
|
41
|
-
{% assign sorted_tags = '' | split: ',' %}
|
|
42
|
-
{% assign sorted_count_tags = '' | split: ',' %}
|
|
43
|
-
|
|
44
|
-
{% for i in (1..items_max) reversed %}
|
|
45
|
-
{% for j in (0..n_tags) %}
|
|
46
|
-
{% if count_tags[j] == i %}
|
|
47
|
-
{% assign sorted_tags = sorted_tags | push: single_tags[j] %}
|
|
48
|
-
{% assign sorted_count_tags = sorted_count_tags | push: i %}
|
|
49
|
-
{% endif %}
|
|
50
|
-
{% endfor %}
|
|
51
|
-
{% endfor %}
|
|
52
|
-
|
|
53
|
-
{% assign sorted_tags= sorted_tags | uniq %}
|
|
54
|
-
|
|
55
|
-
{%- assign sizemax = sorted_count_tags | first -%}
|
|
56
|
-
{% assign mid = sorted_count_tags | last | plus: sizemax | divided_by: 2 %}
|
|
57
|
-
|
|
58
|
-
<div class="row g-0 pt-5" id="categories">
|
|
59
|
-
<div class="col">
|
|
60
|
-
{%- for i in (0..n_tags)-%}
|
|
61
|
-
<a href="#{{- sorted_tags[i] | replace: "demo", "dmo" | replace: " ", "-" -}}" class="btn btn-secondary m-1" role="button" style="font-size: min(1.2rem , max(0.8rem , calc(1rem + 0.025*({{ sorted_count_tags[i] }}rem - {{ mid }}rem))));"><i class="far fa-folder-open mr-2" aria-hidden="true"></i>{{- sorted_tags[i] -}}<span class="badge rounded-pill chulapa-pill-bg-secondary ml-2">{{ sorted_count_tags[i]}}</span></a>
|
|
62
|
-
{%- endfor -%}
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
{% assign words_per_minute = site.words_per_minute | default: 200 %}
|
|
67
|
-
{% for i in (0..n_tags) %}
|
|
68
|
-
<section id="{{- sorted_tags[i] | replace: "demo", "dmo" | replace: " ", "-" -}}" class="py-3 chulapa-cloudcategory">
|
|
69
|
-
<div class="d-flex align-items-center border-bottom border-chulapa mt-5">
|
|
70
|
-
<h5 class="my-0"><i class="far fa-folder-open mr-1" aria-hidden="true"></i>{{- sorted_tags[i] -}} </h5>
|
|
71
|
-
<div class="badge rounded-pill chulapa-pill-bg-secondary ml-2">{{ sorted_count_tags[i]}}</div>
|
|
72
|
-
</div>
|
|
73
|
-
{% for document in alldocs %}
|
|
74
|
-
{% assign words = document.content | strip_html | number_of_words %}
|
|
75
|
-
{% assign readtime = "< 1’" | escape_once %}
|
|
76
|
-
{% if words > words_per_minute %}
|
|
77
|
-
{% assign readtime = words | divided_by:words_per_minute | append: "’" %}
|
|
78
|
-
{% endif %}
|
|
79
|
-
{% if document.categories contains sorted_tags[i] %}
|
|
80
|
-
<article class="chulapa-links-hover-only my-1 mb-4 row g-0 h-entry">
|
|
81
|
-
<div class="col">
|
|
82
|
-
<h6><a href="{{ document.url | absolute_url }}" class="p-name u-url">{{ document.title | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines | strip }}</a></h6>
|
|
83
|
-
{%- if document.subtitle -%}<p>{{- document.subtitle | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines | strip -}}</p> {%- endif -%}
|
|
84
|
-
<div class="small">
|
|
85
|
-
{% if document.date %}
|
|
86
|
-
{% assign dateformat = document.date | date: "%B %d, %Y" %}
|
|
87
|
-
<i class="far fa-calendar" aria-hidden="true"></i> <time class="dt-published" datetime="{{- document.date | date_to_xmlschema -}}">{% include_cached snippets/datetranslate.html date=dateformat %}</time>
|
|
88
|
-
{% if document.last_modified_at %} <i class="fa fa-redo" aria-hidden="true"></i>{% endif %} |
|
|
89
|
-
{% endif %}
|
|
90
|
-
<i class="far fa-clock" aria-hidden="true"></i> {{ readtime }}
|
|
91
|
-
{%- if showcol -%}
|
|
92
|
-
<span class="ml-2 badge chulapa-pill-bg-body p-category">{{ document.collection }}</span>
|
|
93
|
-
{%- endif -%}
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
{% if document.header_img or document.og_image %}
|
|
97
|
-
<a href="{{ document.url | absolute_url }}" class="col-2 btn chulapa-overlay-img chulapa-gradient" style="background-image: url('{{ document.og_image | default: document.header_img | absolute_url }}')">
|
|
98
|
-
</a>
|
|
99
|
-
{% endif %}
|
|
100
|
-
</article>
|
|
101
|
-
{% endif %}
|
|
102
|
-
{% endfor %}
|
|
103
|
-
<div class="text-right">
|
|
104
|
-
<a href="#categories" class="btn btn-lg border-0 chulapa-text-body-color"><i class="fa fa-chevron-up fa-lg" aria-hidden="true"></i><span class="sr-only">Top</span></a>
|
|
105
|
-
</div>
|
|
106
|
-
</section>
|
|
107
|
-
{% endfor %}
|
|
8
|
+
{%- include components/collection-documents.html renderer='components/cloud.html' field='categories' -%}
|
data/_layouts/cloudtag.html
CHANGED
|
@@ -1,109 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
layout: default
|
|
3
|
+
chulapa_microformats_feed: true
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
{{- content -}}
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{%- if page.include_collection -%}
|
|
11
|
-
{%- assign cols = page.include_collection | split: "," -%}
|
|
12
|
-
{%- for col in cols -%}
|
|
13
|
-
{%- if forloop.first -%}
|
|
14
|
-
{%- assign alldocs = site.documents |
|
|
15
|
-
where_exp: "item", "item.collection == col" -%}
|
|
16
|
-
{%- assign showcol = false -%}
|
|
17
|
-
{%- else -%}
|
|
18
|
-
{%- assign docloop = site.documents |
|
|
19
|
-
where_exp: "item", "item.collection == col" -%}
|
|
20
|
-
{%- assign alldocs = alldocs | concat: docloop %}
|
|
21
|
-
{%- assign showcol = true -%}
|
|
22
|
-
{%- endif -%}
|
|
23
|
-
{%- endfor -%}
|
|
24
|
-
{%- else -%}
|
|
25
|
-
{%- assign alldocs = site.documents -%}
|
|
26
|
-
{%- assign showcol = true -%}
|
|
27
|
-
{% endif %}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
{% assign alldocs = alldocs | sort: 'date' | reverse %}
|
|
31
|
-
{% assign alltags = alldocs | map: 'tags' | join: ',' | split: ',' %}
|
|
32
|
-
|
|
33
|
-
{%- assign single_tags = alltags | uniq -%}
|
|
34
|
-
{% assign count_tags = '' | split: ',' %}
|
|
35
|
-
{% assign n_tags = single_tags | size | minus: 1 %}
|
|
36
|
-
|
|
37
|
-
{%- for i in (0..n_tags) %}
|
|
38
|
-
{% assign count_this_tag = alltags | where_exp:"item", "item == single_tags[i]" | size %}
|
|
39
|
-
{% assign count_tags = count_tags | push: count_this_tag %}
|
|
40
|
-
{%- endfor -%}
|
|
41
|
-
|
|
42
|
-
{% assign items_max = count_tags | sort | last %}
|
|
43
|
-
{% assign sorted_tags = '' | split: ',' %}
|
|
44
|
-
{% assign sorted_count_tags = '' | split: ',' %}
|
|
45
|
-
|
|
46
|
-
{% for i in (1..items_max) reversed %}
|
|
47
|
-
{% for j in (0..n_tags) %}
|
|
48
|
-
{% if count_tags[j] == i %}
|
|
49
|
-
{% assign sorted_tags = sorted_tags | push: single_tags[j] %}
|
|
50
|
-
{% assign sorted_count_tags = sorted_count_tags | push: i %}
|
|
51
|
-
{% endif %}
|
|
52
|
-
{% endfor %}
|
|
53
|
-
{% endfor %}
|
|
54
|
-
|
|
55
|
-
{% assign sorted_tags= sorted_tags | uniq %}
|
|
56
|
-
|
|
57
|
-
{%- assign sizemax = sorted_count_tags | first -%}
|
|
58
|
-
{% assign mid = sorted_count_tags | last | plus: sizemax | divided_by: 2 %}
|
|
59
|
-
|
|
60
|
-
<div class="row g-0 pt-5" id="tags">
|
|
61
|
-
<div class="col">
|
|
62
|
-
{%- for i in (0..n_tags)-%}
|
|
63
|
-
<a href="#{{- sorted_tags[i] | replace: "demo", "dmo" | replace: " ", "-" -}}" class="btn btn-primary m-1" role="button" style="font-size: min(1.2rem , max(0.8rem , calc(1rem + 0.025*({{ sorted_count_tags[i] }}rem - {{ mid }}rem))));"><i class="fa fa-tag mr-2" aria-hidden="true"></i>{{- sorted_tags[i] -}}<span class="badge rounded-pill chulapa-pill-bg-primary ml-2">{{ sorted_count_tags[i]}}</span></a>
|
|
64
|
-
{%- endfor -%}
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
{% assign words_per_minute = site.words_per_minute | default: 200 %}
|
|
69
|
-
{% for i in (0..n_tags) %}
|
|
70
|
-
<section id="{{- sorted_tags[i] | replace: "demo", "dmo" | replace: " ", "-" -}}" class="py-3 chulapa-cloudtag">
|
|
71
|
-
<div class="d-flex align-items-center border-bottom border-chulapa mt-5">
|
|
72
|
-
<h5 class="my-0"><i class="fa fa-tag mr-1" aria-hidden="true"></i>{{- sorted_tags[i]-}} </h5>
|
|
73
|
-
<div class="badge rounded-pill chulapa-pill-bg-primary ml-2">{{sorted_count_tags[i]}}</div>
|
|
74
|
-
</div>
|
|
75
|
-
{% for document in alldocs %}
|
|
76
|
-
{% assign words = document.content | strip_html | number_of_words %}
|
|
77
|
-
{% assign readtime = "< 1’" | escape_once %}
|
|
78
|
-
{% if words > words_per_minute %}
|
|
79
|
-
{% assign readtime = words | divided_by:words_per_minute | append: "’" %}
|
|
80
|
-
{% endif %}
|
|
81
|
-
{% if document.tags contains sorted_tags[i] %}
|
|
82
|
-
<article class="chulapa-links-hover-only my-1 mb-4 row g-0">
|
|
83
|
-
<div class="col">
|
|
84
|
-
<h6><a href="{{ document.url | absolute_url }}">{{ document.title | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines | strip }}</a></h6>
|
|
85
|
-
{%- if document.subtitle -%}<p>{{- document.subtitle | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines | strip -}}</p> {%- endif -%}
|
|
86
|
-
<div class="small">
|
|
87
|
-
{% if document.date %}
|
|
88
|
-
{% assign dateformat = document.date | date: "%B %d, %Y" %}
|
|
89
|
-
<i class="far fa-calendar" aria-hidden="true"></i> <time datetime="{{- document.date | date_to_xmlschema -}}">{% include_cached snippets/datetranslate.html date=dateformat %}</time>
|
|
90
|
-
{% if document.last_modified_at %} <i class="fa fa-redo" aria-hidden="true"></i>{% endif %} |
|
|
91
|
-
{% endif %}
|
|
92
|
-
<i class="far fa-clock" aria-hidden="true"></i> {{ readtime }}
|
|
93
|
-
{%- if showcol -%}
|
|
94
|
-
<span class="ml-2 badge chulapa-pill-bg-body">{{ document.collection }}</span>
|
|
95
|
-
{%- endif -%}
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
{% if document.header_img or document.og_image %}
|
|
99
|
-
<a href="{{ document.url | absolute_url }}" class="col-2 btn chulapa-overlay-img chulapa-gradient" style="background-image: url('{{ document.og_image | default: document.header_img | absolute_url }}')">
|
|
100
|
-
</a>
|
|
101
|
-
{% endif %}
|
|
102
|
-
</article>
|
|
103
|
-
{% endif %}
|
|
104
|
-
{% endfor %}
|
|
105
|
-
<div class="text-right">
|
|
106
|
-
<a href="#tags" class="btn btn-lg border-0 chulapa-text-body-color"><i class="fa fa-chevron-up fa-lg" aria-hidden="true"></i><span class="sr-only">Top</span></a>
|
|
107
|
-
</div>
|
|
108
|
-
</section>
|
|
109
|
-
{% endfor %}
|
|
8
|
+
{%- include components/collection-documents.html renderer='components/cloud.html' field='tags' -%}
|
data/_layouts/compress.html
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
{% capture _LINE_FEED %}
|
|
10
|
-
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{%
|
|
10
|
+
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% assign _content = content %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% assign _preserve_head_indentation = false %}{% if site.compress_html.blanklines and _content contains "<head>" and _content contains "</head>" %}{% assign _head_prefix = _content | split: "</head>" | first %}{% assign _preserve_head_indentation = true %}{% endif %}{% assign _preserve_footer_indentation = false %}{% if site.compress_html.blanklines and _content contains '<footer class="footer-chulapa' and _content contains "</footer>" %}{% assign _footer_indent = _content | split: '<footer class="footer-chulapa' | first | split: _LINE_FEED | last %}{% assign _footer_indent_text = _footer_indent | strip %}{% if _footer_indent_text != empty %}{% assign _footer_indent = "" %}{% endif %}{% assign _footer_content = _content | split: '<footer class="footer-chulapa' | last | split: "</footer>" | first %}{% assign _preserve_footer_indentation = true %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _preserve_head_indentation %}{% assign _clipped_head_prefix = _content | split: "</head>" | first %}{% assign _content = _content | replace_first: _clipped_head_prefix, _head_prefix %}{% endif %}{% if _preserve_footer_indentation %}{% assign _clipped_footer_content = _content | split: '<footer class="footer-chulapa' | last | split: "</footer>" | first %}{% assign _clipped_footer_indent = _content | split: '<footer class="footer-chulapa' | first | split: _LINE_FEED | last %}{% assign _clipped_footer_indent_text = _clipped_footer_indent | strip %}{% if _clipped_footer_indent_text != empty %}{% assign _clipped_footer_indent = "" %}{% endif %}{% capture _original_footer %}{{ _footer_indent }}<footer class="footer-chulapa{{ _footer_content }}</footer>{% endcapture %}{% capture _clipped_footer %}{{ _clipped_footer_indent }}<footer class="footer-chulapa{{ _clipped_footer_content }}</footer>{% endcapture %}{% assign _content = _content | replace_first: _clipped_footer, _original_footer %}{% endif %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
|