chulapa-jekyll 2.0.1 → 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.
Files changed (329) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +264 -35
  3. data/README.md +189 -180
  4. data/_data/version.yml +2 -2
  5. data/_includes/components/archive-documents.html +56 -0
  6. data/_includes/components/author.html +6 -1
  7. data/_includes/components/breadcrumbdatesocial.html +16 -12
  8. data/_includes/components/cactus.html +2 -1
  9. data/_includes/components/cloud-entry.html +26 -0
  10. data/_includes/components/cloud.html +66 -0
  11. data/_includes/components/collection-documents.html +17 -0
  12. data/_includes/components/footer-content.html +34 -0
  13. data/_includes/components/headers.html +22 -15
  14. data/_includes/components/indexcards.html +13 -10
  15. data/_includes/components/indexcategory-documents.html +11 -0
  16. data/_includes/components/navbar-classic.html +58 -0
  17. data/_includes/components/navbeforeafter.html +9 -6
  18. data/_includes/components/navigation-fallback.html +19 -0
  19. data/_includes/components/random.html +1 -0
  20. data/_includes/components/recommendations.html +97 -0
  21. data/_includes/components/related.html +1 -104
  22. data/_includes/components/scripts.html +9 -0
  23. data/_includes/components/sidetoc.html +5 -4
  24. data/_includes/components/simplelist.html +26 -0
  25. data/_includes/components/skin-attribution.html +169 -0
  26. data/_includes/components/theme-selector.html +14 -0
  27. data/_includes/footer.html +14 -165
  28. data/_includes/head.html +389 -242
  29. data/_includes/navbar.html +33 -77
  30. data/_includes/search/fusejs.html +20 -0
  31. data/_includes/search/google.html +3 -3
  32. data/_includes/search/lunr.html +19 -7
  33. data/_includes/search/simplesearch.html +46 -0
  34. data/_includes/snippets/article-images.html +25 -0
  35. data/_includes/snippets/bootstrapdemo.html +1472 -1303
  36. data/_includes/snippets/breadcrumb-names.html +5 -0
  37. data/_includes/snippets/canonical-url.html +17 -0
  38. data/_includes/snippets/carousel.html +16 -12
  39. data/_includes/snippets/dark-skin-enabled.html +14 -0
  40. data/_includes/snippets/datetranslate.html +7 -1
  41. data/_includes/snippets/jsonld-string.html +16 -0
  42. data/_includes/snippets/masonry.html +6 -4
  43. data/_includes/snippets/microformats-url.html +2 -0
  44. data/_includes/snippets/og-locale.html +19 -0
  45. data/_includes/snippets/page-language.html +4 -0
  46. data/_includes/snippets/publisher.html +22 -0
  47. data/_includes/snippets/video-metadata.html +15 -0
  48. data/_includes/snippets/video.html +21 -18
  49. data/_includes/snippets/youtube.html +17 -6
  50. data/_includes/theme-styles.html +201 -0
  51. data/_includes/welcomments/comment_form.html +5 -4
  52. data/_includes/welcomments/comments.html +5 -5
  53. data/_includes/welcomments/template.html +1 -1
  54. data/_layouts/archive.html +2 -75
  55. data/_layouts/cloudcategory.html +2 -101
  56. data/_layouts/cloudtag.html +2 -103
  57. data/_layouts/compress.html +1 -1
  58. data/_layouts/default.html +20 -9
  59. data/_layouts/indexcategory.html +2 -30
  60. data/_layouts/landingpage.html +12 -7
  61. data/_layouts/minimal.html +19 -9
  62. data/_layouts/search.html +17 -17
  63. data/_sass/bootstrap/_variables.scss +1 -1
  64. data/_sass/bootstrap/mixins/_badge.scss +1 -1
  65. data/_sass/chulapa/_autothemer.scss +31 -0
  66. data/_sass/chulapa/_buttons.scss +101 -0
  67. data/_sass/chulapa/_classes.scss +197 -59
  68. data/_sass/chulapa/_mixins.scss +42 -1
  69. data/_sass/chulapa/_reboot.scss +31 -0
  70. data/_sass/chulapa/_theme-selector.scss +1 -0
  71. data/_sass/chulapa/_variables.scss +8 -1
  72. data/_sass/chulapa/skins/_deeply.scss +229 -0
  73. data/_sass/chulapa/skins/_electro.scss +30 -0
  74. data/_sass/chulapa/skins/_graymor.scss +39 -0
  75. data/_sass/chulapa/skins/_hootstrap.scss +34 -0
  76. data/_sass/chulapa/skins/_lymcha.scss +27 -0
  77. data/_sass/chulapa/skins/_mickie.scss +38 -0
  78. data/_sass/chulapa/skins/_minco.scss +45 -0
  79. data/_sass/chulapa/skins/_monotone.scss +15 -0
  80. data/_sass/chulapa/skins/_preptor.scss +30 -0
  81. data/_sass/chulapa/skins/_skeeblu.scss +34 -0
  82. data/_sass/chulapa/skins/_sunset.scss +33 -0
  83. data/_sass/chulapa/skins/_wandoo.scss +22 -0
  84. data/_sass/chulapa/skins/bootswatch/_cyborg.scss +543 -0
  85. data/_sass/chulapa/skins/bootswatch/_darkly.scss +452 -0
  86. data/_sass/chulapa/skins/bootswatch/_flatly.scss +415 -0
  87. data/_sass/chulapa/skins/bootswatch/_journal.scss +163 -0
  88. data/_sass/chulapa/skins/bootswatch/_lux.scss +342 -0
  89. data/_sass/chulapa/skins/bootswatch/_materia.scss +914 -0
  90. data/_sass/chulapa/skins/bootswatch/_minty.scss +342 -0
  91. data/_sass/chulapa/skins/bootswatch/_sketchy.scss +757 -0
  92. data/_sass/chulapa/skins/bootswatch/_slate.scss +746 -0
  93. data/_sass/chulapa/skins/bootswatch/_solar.scss +454 -0
  94. data/_sass/chulapa/skins/bootswatch/_united.scss +85 -0
  95. data/_sass/chulapa/skins/bootswatch/_yeti.scss +699 -0
  96. data/_sass/chulapa/skins/bootswatch/cyborg.patch +301 -0
  97. data/_sass/chulapa/skins/bootswatch/darkly.patch +493 -0
  98. data/_sass/chulapa/skins/bootswatch/flatly.patch +325 -0
  99. data/_sass/chulapa/skins/bootswatch/journal.patch +71 -0
  100. data/_sass/chulapa/skins/bootswatch/lux.patch +97 -0
  101. data/_sass/chulapa/skins/bootswatch/materia.patch +250 -0
  102. data/_sass/chulapa/skins/bootswatch/minty.patch +400 -0
  103. data/_sass/chulapa/skins/bootswatch/sketchy.patch +863 -0
  104. data/_sass/chulapa/skins/bootswatch/slate.patch +537 -0
  105. data/_sass/chulapa/skins/bootswatch/solar.patch +307 -0
  106. data/_sass/chulapa/skins/bootswatch/united.patch +91 -0
  107. data/_sass/chulapa/skins/bootswatch/yeti.patch +552 -0
  108. data/_sass/chulapa-master.scss +10 -0
  109. data/_sass/highlight/README.md +176 -14
  110. data/_sass/highlight/abap.scss +62 -0
  111. data/_sass/highlight/algol.scss +46 -0
  112. data/_sass/highlight/algol_nu.scss +46 -0
  113. data/_sass/highlight/arduino.scss +63 -0
  114. data/_sass/highlight/autumn.scss +69 -58
  115. data/_sass/highlight/base16.scss +90 -0
  116. data/_sass/highlight/borland.scss +55 -46
  117. data/_sass/highlight/bw.scss +70 -34
  118. data/_sass/highlight/cobalt2.scss +197 -0
  119. data/_sass/highlight/coffee.scss +82 -0
  120. data/_sass/highlight/colorful.scss +178 -61
  121. data/_sass/highlight/cran.scss +185 -169
  122. data/_sass/highlight/default.scss +72 -61
  123. data/_sass/highlight/dracula.scss +93 -169
  124. data/_sass/highlight/emacs.scss +72 -61
  125. data/_sass/highlight/friendly.scss +72 -61
  126. data/_sass/highlight/friendly_grayscale.scss +72 -0
  127. data/_sass/highlight/fruity.scss +82 -70
  128. data/_sass/highlight/github.dark.scss +83 -0
  129. data/_sass/highlight/github.scss +116 -61
  130. data/_sass/highlight/gruvbox.dark.scss +83 -0
  131. data/_sass/highlight/gruvbox.light.scss +68 -84
  132. data/_sass/highlight/gruvbox.scss +97 -0
  133. data/_sass/highlight/igor.scss +36 -0
  134. data/_sass/highlight/igorpro.scss +45 -0
  135. data/_sass/highlight/inkpot.scss +78 -0
  136. data/_sass/highlight/lightbulb.scss +82 -0
  137. data/_sass/highlight/lilypond.scss +58 -0
  138. data/_sass/highlight/lovelace.scss +74 -0
  139. data/_sass/highlight/magritte.scss +175 -0
  140. data/_sass/highlight/manni.scss +72 -61
  141. data/_sass/highlight/material.scss +81 -0
  142. data/_sass/highlight/molokai.scss +211 -0
  143. data/_sass/highlight/monokai.scss +217 -65
  144. data/_sass/highlight/monokai.sublime.scss +203 -0
  145. data/_sass/highlight/murphy.scss +72 -61
  146. data/_sass/highlight/native.scss +82 -70
  147. data/_sass/highlight/night-owl.scss +201 -0
  148. data/_sass/highlight/nord.darker.scss +82 -0
  149. data/_sass/highlight/nord.scss +82 -0
  150. data/_sass/highlight/oksolar.dark.scss +175 -0
  151. data/_sass/highlight/oksolar.light.scss +175 -0
  152. data/_sass/highlight/one.dark.scss +82 -0
  153. data/_sass/highlight/panda.scss +195 -0
  154. data/_sass/highlight/paraiso.dark.scss +76 -0
  155. data/_sass/highlight/paraiso.light.scss +76 -0
  156. data/_sass/highlight/pastie.scss +154 -60
  157. data/_sass/highlight/perldoc.scss +69 -58
  158. data/_sass/highlight/rainbow_dash.scss +65 -0
  159. data/_sass/highlight/rrt.scss +82 -0
  160. data/_sass/highlight/sas.scss +63 -0
  161. data/_sass/highlight/selenized.black.scss +175 -0
  162. data/_sass/highlight/selenized.dark.scss +175 -0
  163. data/_sass/highlight/selenized.light.scss +175 -0
  164. data/_sass/highlight/selenized.white.scss +175 -0
  165. data/_sass/highlight/skeletor.scss +190 -140
  166. data/_sass/highlight/solarized.dark.scss +82 -0
  167. data/_sass/highlight/solarized.light.scss +82 -0
  168. data/_sass/highlight/stackoverflow.dark.scss +175 -0
  169. data/_sass/highlight/stackoverflow.light.scss +175 -0
  170. data/_sass/highlight/staroffice.scss +82 -0
  171. data/_sass/highlight/stata.dark.scss +82 -0
  172. data/_sass/highlight/stata.light.scss +49 -0
  173. data/_sass/highlight/tango.scss +81 -69
  174. data/_sass/highlight/template.scss +290 -0
  175. data/_sass/highlight/thankful_eyes.scss +180 -173
  176. data/_sass/highlight/trac.scss +70 -59
  177. data/_sass/highlight/tulip.scss +171 -0
  178. data/_sass/highlight/vim.scss +82 -70
  179. data/_sass/highlight/vs.scss +41 -33
  180. data/_sass/highlight/xcode.scss +65 -0
  181. data/_sass/highlight/zenburn.scss +82 -136
  182. data/_sass/reset-algolia.scss +27 -17
  183. data/_sass/skins/academia.scss +47 -10
  184. data/_sass/skins/auto.scss +25 -27
  185. data/_sass/skins/butterfly-dark.scss +73 -0
  186. data/_sass/skins/butterfly-dim.scss +81 -0
  187. data/_sass/skins/butterfly.scss +65 -0
  188. data/_sass/skins/cerulean.scss +120 -0
  189. data/_sass/skins/chulapa.scss +33 -6
  190. data/_sass/skins/cyborg.scss +3 -0
  191. data/_sass/skins/dark-bg.scss +83 -49
  192. data/_sass/skins/darkly.scss +3 -0
  193. data/_sass/skins/deeply.scss +17 -87
  194. data/_sass/skins/electro.scss +5 -19
  195. data/_sass/skins/flatly.scss +3 -0
  196. data/_sass/skins/focal.scss +56 -19
  197. data/_sass/skins/gitdev-dark.scss +28 -25
  198. data/_sass/skins/gitdev.scss +22 -19
  199. data/_sass/skins/graymor.scss +7 -22
  200. data/_sass/skins/hootstrap.scss +6 -13
  201. data/_sass/skins/journal.scss +3 -143
  202. data/_sass/skins/listen.scss +83 -0
  203. data/_sass/skins/litera.scss +281 -0
  204. data/_sass/skins/lux.scss +3 -376
  205. data/_sass/skins/lymcha.scss +4 -12
  206. data/_sass/skins/materia.scss +3 -0
  207. data/_sass/skins/media.scss +40 -12
  208. data/_sass/skins/mickie.scss +8 -11
  209. data/_sass/skins/minco.scss +11 -10
  210. data/_sass/skins/minty.scss +3 -168
  211. data/_sass/skins/monotone.scss +7 -11
  212. data/_sass/skins/navi.scss +54 -0
  213. data/_sass/skins/none.scss +24 -2
  214. data/_sass/skins/pear.scss +50 -6
  215. data/_sass/skins/preptor.scss +6 -15
  216. data/_sass/skins/pulse.scss +158 -0
  217. data/_sass/skins/skeeblu.scss +6 -17
  218. data/_sass/skins/sketchy.scss +3 -746
  219. data/_sass/skins/slate.scss +3 -0
  220. data/_sass/skins/solar.scss +3 -0
  221. data/_sass/skins/sunset.scss +6 -11
  222. data/_sass/skins/towards.scss +44 -5
  223. data/_sass/skins/twitter-dim.scss +60 -13
  224. data/_sass/skins/twitter-lights-out.scss +44 -11
  225. data/_sass/skins/twitter.scss +51 -10
  226. data/_sass/skins/united.scss +3 -0
  227. data/_sass/skins/universal.scss +46 -27
  228. data/_sass/skins/wandoo.scss +7 -12
  229. data/_sass/skins/yeti.scss +3 -0
  230. data/_sass/vendor/bootswatch/LICENSE +21 -0
  231. data/_sass/vendor/bootswatch/LICENSE-4.5.0 +21 -0
  232. data/_sass/vendor/bootswatch/README.md +57 -0
  233. data/_sass/vendor/bootswatch/cerulean/_bootswatch.scss +102 -0
  234. data/_sass/vendor/bootswatch/cerulean/_variables.scss +57 -0
  235. data/_sass/vendor/bootswatch/cyborg/_bootswatch.scss +330 -0
  236. data/_sass/vendor/bootswatch/cyborg/_variables.scss +169 -0
  237. data/_sass/vendor/bootswatch/darkly/_bootswatch.scss +247 -0
  238. data/_sass/vendor/bootswatch/darkly/_variables.scss +164 -0
  239. data/_sass/vendor/bootswatch/flatly/_bootswatch.scss +274 -0
  240. data/_sass/vendor/bootswatch/flatly/_variables.scss +106 -0
  241. data/_sass/vendor/bootswatch/journal/_bootswatch.scss +62 -0
  242. data/_sass/vendor/bootswatch/journal/_variables.scss +60 -0
  243. data/_sass/vendor/bootswatch/litera/_bootswatch.scss +268 -0
  244. data/_sass/vendor/bootswatch/litera/_variables.scss +96 -0
  245. data/_sass/vendor/bootswatch/lux/_bootswatch.scss +191 -0
  246. data/_sass/vendor/bootswatch/lux/_variables.scss +103 -0
  247. data/_sass/vendor/bootswatch/materia/_bootswatch.scss +747 -0
  248. data/_sass/vendor/bootswatch/materia/_variables.scss +129 -0
  249. data/_sass/vendor/bootswatch/minty/_bootswatch.scss +380 -0
  250. data/_sass/vendor/bootswatch/minty/_variables.scss +94 -0
  251. data/_sass/vendor/bootswatch/pulse/_bootswatch.scss +145 -0
  252. data/_sass/vendor/bootswatch/pulse/_variables.scss +96 -0
  253. data/_sass/vendor/bootswatch/sketchy/_bootswatch.scss +492 -0
  254. data/_sass/vendor/bootswatch/sketchy/_variables.scss +172 -0
  255. data/_sass/vendor/bootswatch/slate/_bootswatch.scss +531 -0
  256. data/_sass/vendor/bootswatch/slate/_variables.scss +163 -0
  257. data/_sass/vendor/bootswatch/solar/_bootswatch.scss +243 -0
  258. data/_sass/vendor/bootswatch/solar/_variables.scss +171 -0
  259. data/_sass/vendor/bootswatch/source.json +86 -0
  260. data/_sass/vendor/bootswatch/united/_bootswatch.scss +10 -0
  261. data/_sass/vendor/bootswatch/united/_variables.scss +54 -0
  262. data/_sass/vendor/bootswatch/yeti/_bootswatch.scss +586 -0
  263. data/_sass/vendor/bootswatch/yeti/_variables.scss +110 -0
  264. data/_sass/vendor/tophat/LICENSE +21 -0
  265. data/_sass/vendor/tophat/README.md +38 -0
  266. data/_sass/vendor/tophat/deeply/_styles.scss +6 -0
  267. data/_sass/vendor/tophat/deeply/_variables.scss +73 -0
  268. data/_sass/vendor/tophat/deeply/theme.scss +77 -0
  269. data/_sass/vendor/tophat/electro/_styles.scss +5 -0
  270. data/_sass/vendor/tophat/electro/_variables.scss +23 -0
  271. data/_sass/vendor/tophat/electro/theme.scss +28 -0
  272. data/_sass/vendor/tophat/graymor/_styles.scss +5 -0
  273. data/_sass/vendor/tophat/graymor/_variables.scss +18 -0
  274. data/_sass/vendor/tophat/graymor/theme.scss +24 -0
  275. data/_sass/vendor/tophat/hootstrap/_styles.scss +5 -0
  276. data/_sass/vendor/tophat/hootstrap/_variables.scss +14 -0
  277. data/_sass/vendor/tophat/hootstrap/theme.scss +18 -0
  278. data/_sass/vendor/tophat/lymcha/_styles.scss +5 -0
  279. data/_sass/vendor/tophat/lymcha/_variables.scss +13 -0
  280. data/_sass/vendor/tophat/lymcha/theme.scss +16 -0
  281. data/_sass/vendor/tophat/mickie/_styles.scss +5 -0
  282. data/_sass/vendor/tophat/mickie/_variables.scss +13 -0
  283. data/_sass/vendor/tophat/mickie/theme.scss +17 -0
  284. data/_sass/vendor/tophat/minco/_styles.scss +5 -0
  285. data/_sass/vendor/tophat/minco/_variables.scss +14 -0
  286. data/_sass/vendor/tophat/minco/theme.scss +18 -0
  287. data/_sass/vendor/tophat/monotone/_styles.scss +5 -0
  288. data/_sass/vendor/tophat/monotone/_variables.scss +14 -0
  289. data/_sass/vendor/tophat/monotone/theme.scss +18 -0
  290. data/_sass/vendor/tophat/preptor/_styles.scss +5 -0
  291. data/_sass/vendor/tophat/preptor/_variables.scss +14 -0
  292. data/_sass/vendor/tophat/preptor/theme.scss +18 -0
  293. data/_sass/vendor/tophat/skeeblu/_styles.scss +5 -0
  294. data/_sass/vendor/tophat/skeeblu/_variables.scss +17 -0
  295. data/_sass/vendor/tophat/skeeblu/theme.scss +22 -0
  296. data/_sass/vendor/tophat/source.json +57 -0
  297. data/_sass/vendor/tophat/sunset/_styles.scss +5 -0
  298. data/_sass/vendor/tophat/sunset/_variables.scss +13 -0
  299. data/_sass/vendor/tophat/sunset/theme.scss +16 -0
  300. data/_sass/vendor/tophat/wandoo/_styles.scss +5 -0
  301. data/_sass/vendor/tophat/wandoo/_variables.scss +18 -0
  302. data/_sass/vendor/tophat/wandoo/theme.scss +24 -0
  303. data/assets/atom.xml +10 -6
  304. data/assets/css/dark/highlighter.scss +10 -0
  305. data/assets/css/dark/main.scss +43 -0
  306. data/assets/css/highlighter.scss +6 -1
  307. data/assets/css/main.scss +12 -3
  308. data/assets/css/search-fusejs.css +14 -0
  309. data/assets/css/search-lunr.css +7 -0
  310. data/assets/js/better404/better404.js +68 -0
  311. data/assets/js/ch_ytdefer/ch_ytdefer.js +27 -83
  312. data/assets/js/chulapa_carousel.js +115 -0
  313. data/assets/js/chulapa_mermaid.js +31 -0
  314. data/assets/js/chulapa_navigation.js +71 -0
  315. data/assets/js/chulapa_photoswipe.js +106 -0
  316. data/assets/js/chulapa_script.js +199 -77
  317. data/assets/js/chulapa_search.js +89 -0
  318. data/assets/js/clipboard/chulapa_clipboard.js +17 -108
  319. data/assets/js/cusdis/chulapa_cusdis.js +1 -1
  320. data/assets/js/fusejs/fusejs-search.js +62 -0
  321. data/assets/js/fusejs/fusejs-search.min.js +4 -0
  322. data/assets/js/fusejs/fusejs-store.js +43 -0
  323. data/assets/js/lunr/lunr-search.js +127 -115
  324. data/assets/js/lunr/lunr-search.min.js +4 -0
  325. data/assets/js/lunr/lunr-store.js +31 -23
  326. data/assets/js/simplesearch/simplesearch-store.json +45 -0
  327. data/assets/rss.xml +4 -3
  328. metadata +220 -8
  329. data/_sass/highlight/UNLICENSE.txt +0 -24
@@ -0,0 +1,5 @@
1
+ {%- assign breadcrumb_site_name = site.title | strip_html | strip -%}
2
+ {%- assign breadcrumb_repository_name = site.github.repository_name | strip_html | strip -%}
3
+ {%- assign breadcrumb_site_name = breadcrumb_site_name | default: breadcrumb_repository_name | default: 'Home' -%}
4
+ {%- assign breadcrumb_home_name = site.navbar.brand.title | strip_html | strip | default: breadcrumb_site_name -%}
5
+ {%- assign breadcrumb_page_name = page.title | markdownify | strip_html | strip | default: breadcrumb_site_name -%}
@@ -0,0 +1,17 @@
1
+ {%- assign canonical_path = include.url -%}
2
+ {%- assign canonical_suffix = canonical_path | slice: -11, 11 -%}
3
+ {%- if canonical_suffix == '/index.html' -%}
4
+ {%- assign canonical_path_size = canonical_path | size | minus: 10 -%}
5
+ {%- assign canonical_path = canonical_path | slice: 0, canonical_path_size -%}
6
+ {%- endif -%}
7
+ {%- assign canonical_url = canonical_path | absolute_url | uri_escape -%}
8
+ {%- assign canonical_override = include.canonical | strip | split: '#' | first | strip -%}
9
+ {%- assign canonical_scheme = canonical_override | slice: 0, 8 | downcase -%}
10
+ {%- assign canonical_http = canonical_override | slice: 0, 7 | downcase -%}
11
+ {%- assign canonical_prefix = canonical_override | slice: 0, 1 -%}
12
+ {%- assign canonical_double_slash = canonical_override | slice: 0, 2 -%}
13
+ {%- if canonical_scheme == 'https://' or canonical_http == 'http://' -%}
14
+ {%- assign canonical_url = canonical_override | uri_escape -%}
15
+ {%- elsif canonical_prefix == '/' and canonical_double_slash != '//' -%}
16
+ {%- assign canonical_url = canonical_override | absolute_url | uri_escape -%}
17
+ {%- endif -%}
@@ -2,9 +2,9 @@
2
2
  {% assign sort = include.index_sort | default: 'modified_time' %}
3
3
  {%- assign bricks = site.static_files | where: "image_col", include.internal -%}
4
4
  {% if include.index_sort_asc %}
5
- {%- assign bricks = bricks | sort: "{{sort}}" | map: "path" -%}
5
+ {%- assign bricks = bricks | sort: sort | map: "path" -%}
6
6
  {% else %}
7
- {%- assign bricks = bricks | sort: "{{sort}}" | reverse | map: "path" -%}
7
+ {%- assign bricks = bricks | sort: sort | reverse | map: "path" -%}
8
8
  {% endif %}
9
9
  {%- elsif include.external -%}
10
10
  {%- assign bricks = include.external | strip_newlines | replace: " " , "" |split: "," -%}
@@ -24,38 +24,42 @@
24
24
  {% assign id = id | times: 7 %}
25
25
  {% endif %}
26
26
  {% assign id = "Carousel" | append: id %}
27
- <div id="{{ id }}" class="carousel slide" data-ride="carousel" data-interval="{{- interval -}}">
27
+ <div id="{{ id }}" class="carousel slide" data-chulapa-carousel="true" role="region" aria-roledescription="carousel" aria-label="Images" data-interval="{{- interval -}}"{% if include.photoswipe == true %} data-photoswipe-gallery="carousel"{% endif %}>
28
28
  {% if include.indicators %}
29
29
  <ol class="carousel-indicators">
30
30
  {%- for brick in bricks limit: end -%}
31
31
  {% if forloop.first == true %}
32
- <li data-target="#{{ id }}" data-slide-to="{{ forloop.index0 }}" class="active"></li>
32
+ <li class="active"><button type="button" data-target="#{{ id }}" data-slide-to="{{ forloop.index0 }}" aria-label="Show image {{ forloop.index }}" aria-current="true"></button></li>
33
33
  {% else %}
34
- <li data-target="#{{ id }}" data-slide-to="{{ forloop.index0 }}"></li>
34
+ <li><button type="button" data-target="#{{ id }}" data-slide-to="{{ forloop.index0 }}" aria-label="Show image {{ forloop.index }}"></button></li>
35
35
  {% endif %}
36
36
  {%- endfor -%}
37
37
  </ol>
38
38
  {% endif %}
39
- <div class="carousel-inner">
39
+ <button type="button" class="chulapa-carousel-toggle" aria-label="Pause slideshow" hidden><span class="chulapa-carousel-symbol" aria-hidden="true"><i class="fa fas fa-pause"></i><span class="chulapa-carousel-fallback">Ⅱ</span></span></button>
40
+ <div class="carousel-inner" aria-live="polite" aria-atomic="false">
40
41
  {%- for brick in bricks limit: end -%}
41
42
  {% if forloop.first == true %}
42
- <div class="carousel-item active" itemscope itemtype="https://schema.org/ImageObject">
43
+ <div class="carousel-item active" role="group" aria-roledescription="slide" aria-label="Image {{ forloop.index }} of {{ forloop.length }}" itemscope itemtype="https://schema.org/ImageObject">
43
44
  {% else %}
44
- <div class="carousel-item" itemscope itemtype="https://schema.org/ImageObject">
45
+ <div class="carousel-item" role="group" aria-roledescription="slide" aria-label="Image {{ forloop.index }} of {{ forloop.length }}" itemscope itemtype="https://schema.org/ImageObject">
45
46
  {% endif %}
47
+ {% if include.photoswipe == true %}<a class="chulapa-photoswipe-item d-block" href="{{ brick | absolute_url | escape }}" aria-label="View image {{ forloop.index }}">{% endif %}
46
48
  <img class="d-block mw-100 chulapa-carousel" src="{{- brick | absolute_url -}}" alt="Carousel Item #{{- forloop.index -}}" itemprop="contentUrl" >
49
+ {% if include.photoswipe == true %}</a>{% endif %}
47
50
  </div>
48
51
  {%- endfor -%}
49
52
  </div>
50
53
  {% if include.controls %}
51
- <a class="carousel-control-prev" href="#{{ id }}" role="button" data-slide="prev">
54
+ <button type="button" class="carousel-control-prev" data-target="#{{ id }}" data-slide="prev">
52
55
  <span class="carousel-control-prev-icon" aria-hidden="true"></span>
53
56
  <span class="sr-only">Previous</span>
54
- </a>
55
- <a class="carousel-control-next" href="#{{ id }}" role="button" data-slide="next">
57
+ </button>
58
+ <button type="button" class="carousel-control-next" data-target="#{{ id }}" data-slide="next">
56
59
  <span class="carousel-control-next-icon" aria-hidden="true"></span>
57
60
  <span class="sr-only">Next</span>
58
- </a>
61
+ </button>
59
62
  {%- endif -%}
60
63
  </div>
64
+ <script type="module" src="{{ '/assets/js/chulapa_carousel.js' | relative_url }}"></script>
61
65
  {%- endif -%}
@@ -0,0 +1,14 @@
1
+ {%- assign dark_skin_enabled = false -%}
2
+ {%- assign dark_skin_name = site.chulapa-skin-dark.skin | default: '' | strip -%}
3
+ {%- assign dark_highlight_name = site.chulapa-skin-dark.highlight | default: '' | strip -%}
4
+ {%- if dark_skin_name != empty or dark_highlight_name != empty or site.chulapa-skin-dark.autothemer == true -%}
5
+ {%- assign dark_skin_enabled = true -%}
6
+ {%- else -%}
7
+ {%- for dark_var in site.chulapa-skin-dark.vars -%}
8
+ {%- assign dark_value = dark_var[1] | append: '' | strip -%}
9
+ {%- if dark_value != empty -%}
10
+ {%- assign dark_skin_enabled = true -%}
11
+ {%- break -%}
12
+ {%- endif -%}
13
+ {%- endfor -%}
14
+ {%- endif -%}
@@ -1,6 +1,6 @@
1
1
  {%- assign dateloc = include.date | downcase -%}
2
2
  {%- assign langlocale = include.lang | default: site.locale | default: "en" | downcase | slice: 0,2 -%}
3
- {%- assign supported = "es,fr,de" | split: "," -%}
3
+ {%- assign supported = "es,fr,de,it" | split: "," -%}
4
4
 
5
5
  {%- assign finallang = "en" -%}
6
6
  {%- for lang in supported -%}
@@ -32,6 +32,12 @@
32
32
  {%- assign months = 'januar,februar,märz,april,mai,juni,juli,august,september,oktober,november,dezember'
33
33
  | split:',' -%}
34
34
  {%- endif -%}
35
+ {%- if finallang == "it" -%}
36
+ {%- assign days = 'lunedì,martedì,mercoledì,giovedì,venerdì,sabato,domenica'
37
+ | split:',' -%}
38
+ {%- assign months = 'gennaio,febbraio,marzo,aprile,maggio,giugno,luglio,agosto,settembre,ottobre,novembre,dicembre'
39
+ | split:',' -%}
40
+ {%- endif -%}
35
41
 
36
42
  {%- for i in (0..11) -%}
37
43
  {%- assign sm = en-months[i] | slice: 0,3 -%}
@@ -0,0 +1,16 @@
1
+ {%- comment -%}
2
+ Serialize a string before decoding the HTML escapes retained by Markdown and
3
+ escape_once. JSON Unicode escapes decode once without breaking quotes or
4
+ allowing a literal </script> inside a JSON-LD script element.
5
+ {%- endcomment -%}
6
+ {%- assign jsonld_string = include.value | append: "" | jsonify -%}
7
+ {%- unless include.decode_html == false -%}
8
+ {%- assign jsonld_string = jsonld_string
9
+ | replace: '&amp;', '\u0026' | replace: '&#38;', '\u0026' | replace: '&#x26;', '\u0026' | replace: '&#X26;', '\u0026'
10
+ | replace: '&quot;', '\u0022' | replace: '&#34;', '\u0022' | replace: '&#x22;', '\u0022' | replace: '&#X22;', '\u0022'
11
+ | replace: '&apos;', '\u0027' | replace: '&#39;', '\u0027' | replace: '&#x27;', '\u0027' | replace: '&#X27;', '\u0027'
12
+ | replace: '&lt;', '\u003c' | replace: '&#60;', '\u003c' | replace: '&#x3c;', '\u003c' | replace: '&#x3C;', '\u003c' | replace: '&#X3c;', '\u003c' | replace: '&#X3C;', '\u003c'
13
+ | replace: '&gt;', '\u003e' | replace: '&#62;', '\u003e' | replace: '&#x3e;', '\u003e' | replace: '&#x3E;', '\u003e' | replace: '&#X3e;', '\u003e' | replace: '&#X3E;', '\u003e'
14
+ -%}
15
+ {%- endunless -%}
16
+ {{- jsonld_string | replace: '<', '\u003c' | replace: '>', '\u003e' -}}
@@ -2,9 +2,9 @@
2
2
  {% assign sort = include.index_sort | default: 'modified_time' %}
3
3
  {%- assign bricks = site.static_files | where: "image_col", include.internal -%}
4
4
  {% if include.index_sort_asc %}
5
- {%- assign bricks = bricks | sort: "{{sort}}" | map: "path" -%}
5
+ {%- assign bricks = bricks | sort: sort | map: "path" -%}
6
6
  {% else %}
7
- {%- assign bricks = bricks | sort: "{{sort}}" | reverse | map: "path" -%}
7
+ {%- assign bricks = bricks | sort: sort | reverse | map: "path" -%}
8
8
  {% endif %}
9
9
  {%- elsif include.external -%}
10
10
  {%- assign bricks =include.external | strip_newlines | replace: " " , "" |split: "," -%}
@@ -14,12 +14,14 @@
14
14
  {% if include.random %}
15
15
  {%- assign bricks = bricks | sample: bricks.size -%}
16
16
  {%- endif -%}
17
- <div class="chulapa-masonry mx-2 mt-2">
17
+ <div class="chulapa-masonry mx-2 mt-2"{% if include.photoswipe == true %} data-photoswipe-gallery="masonry"{% endif %}>
18
18
  {%- for brick in bricks limit: end -%}
19
19
  <div itemscope itemtype="https://schema.org/ImageObject">
20
+ {% if include.photoswipe == true %}<a class="chulapa-photoswipe-item d-block" href="{{ brick | absolute_url | escape }}" aria-label="View image {{ forloop.index }}">{% endif %}
20
21
  <img loading="lazy" class="chulapa-masonry-brick" src="{{- brick | absolute_url -}}"
21
22
  alt="Masonry Item #{{- forloop.index -}}" itemprop="contentUrl" >
23
+ {% if include.photoswipe == true %}</a>{% endif %}
22
24
  </div>
23
25
  {%- endfor -%}
24
26
  </div>
25
- {%- endif -%}
27
+ {%- endif -%}
@@ -0,0 +1,2 @@
1
+ {%- include snippets/canonical-url.html url=page.url canonical=page.canonical_url -%}
2
+ <a class="u-url d-none" href="{{ canonical_url | escape }}">Invisible link to canonical for Microformats</a>
@@ -0,0 +1,19 @@
1
+ {%- assign normalized_og_locale = nil -%}
2
+ {%- assign locale_parts = include.locale | strip | replace: '-', '_' | split: '_' -%}
3
+ {%- assign language_size = locale_parts[0] | size -%}
4
+ {%- assign territory_size = locale_parts[1] | size -%}
5
+ {%- if locale_parts.size == 2 and territory_size == 2 -%}
6
+ {%- if language_size == 2 or language_size == 3 -%}
7
+ {%- assign locale_letters = locale_parts | join: '' | downcase | split: '' -%}
8
+ {%- assign locale_valid = true -%}
9
+ {%- assign alphabet = 'abcdefghijklmnopqrstuvwxyz' -%}
10
+ {%- for letter in locale_letters -%}
11
+ {%- unless alphabet contains letter -%}{%- assign locale_valid = false -%}{%- endunless -%}
12
+ {%- endfor -%}
13
+ {%- if locale_valid -%}
14
+ {%- assign locale_language = locale_parts[0] | downcase -%}
15
+ {%- assign locale_territory = locale_parts[1] | upcase -%}
16
+ {%- assign normalized_og_locale = locale_language | append: '_' | append: locale_territory -%}
17
+ {%- endif -%}
18
+ {%- endif -%}
19
+ {%- endif -%}
@@ -0,0 +1,4 @@
1
+ {%- assign page_language = page.locale | strip -%}
2
+ {%- if page_language == empty -%}{%- assign page_language = site.locale | strip -%}{%- endif -%}
3
+ {%- if page_language == empty -%}{%- assign page_language = 'en-US' -%}{%- endif -%}
4
+ {%- assign page_language = page_language | replace: '_', '-' -%}
@@ -0,0 +1,22 @@
1
+ {%- assign publisher_type = 'Organization' -%}
2
+ {%- if site.publisher.type == 'Person' -%}
3
+ {%- assign publisher_type = 'Person' -%}
4
+ {%- endif -%}
5
+ {%- assign publisher_name = site.publisher.name | default: site.author.name | default: site.github.owner_name -%}
6
+ {%- assign publisher_url = site.publisher.url | default: home_url | absolute_url -%}
7
+ {%- if publisher_type == 'Person' -%}
8
+ {%- assign publisher_image = site.publisher.image | default: site.author.avatar | default: site.github.owner_gravatar_url -%}
9
+ {%- else -%}
10
+ {%- assign publisher_logo = site.publisher.logo | default: site.og_image | default: site.author.avatar | default: site.github.owner_gravatar_url | absolute_url -%}
11
+ {%- assign publisher_image = site.publisher.image -%}
12
+ {%- endif -%}
13
+ {
14
+ "@type": "{{ publisher_type }}",
15
+ "name": {% include snippets/jsonld-string.html value=publisher_name %},
16
+ "url": {% include snippets/jsonld-string.html value=publisher_url decode_html=false %}{% if publisher_type != 'Person' %},
17
+ "logo": {
18
+ "@type": "ImageObject",
19
+ "url": {% include snippets/jsonld-string.html value=publisher_logo decode_html=false %}
20
+ }{% endif %}{% if publisher_image and publisher_image != empty %},
21
+ "image": {% assign publisher_image = publisher_image | absolute_url %}{% include snippets/jsonld-string.html value=publisher_image decode_html=false %}{% endif %}
22
+ }
@@ -0,0 +1,15 @@
1
+ {%- assign metadata_keys = 'name,description,duration' | split: ',' -%}
2
+ {%- for metadata_key in metadata_keys -%}
3
+ {%- assign metadata_value = include[metadata_key] | strip -%}
4
+ {%- if metadata_value != empty -%}
5
+ <meta itemprop="{{ metadata_key }}" content="{{ metadata_value | escape }}">
6
+ {%- endif -%}
7
+ {%- endfor -%}
8
+ {%- assign metadata_date = include.upload_date | strip -%}
9
+ {%- if metadata_date != empty -%}
10
+ <meta itemprop="uploadDate" content="{{ metadata_date | escape }}">
11
+ {%- endif -%}
12
+ {%- assign metadata_thumbnail = include.thumbnail_url | strip -%}
13
+ {%- if metadata_thumbnail != empty -%}
14
+ <link itemprop="thumbnailUrl" href="{{ metadata_thumbnail | absolute_url | escape }}">
15
+ {%- endif -%}
@@ -1,6 +1,8 @@
1
1
  {%- if include.fileurl -%}
2
- <div class="embed-responsive embed-responsive-16by9 my-2 chulapa-rounded-lg" itemscope itemprop="VideoObject" itemtype="https://schema.org/VideoObject">
3
- <video src="{{ include.fileurl | absolute_url }}#t=0.1" class="embed-responsive-item u-video" controls itemprop="contentUrl" >
2
+ <div class="embed-responsive embed-responsive-16by9 my-2 chulapa-rounded-lg" itemscope itemtype="https://schema.org/VideoObject">
3
+ {% include snippets/video-metadata.html name=include.name thumbnail_url=include.thumbnail_url upload_date=include.upload_date description=include.description duration=include.duration %}
4
+ <link itemprop="contentUrl" href="{{ include.fileurl | absolute_url | escape }}">
5
+ <video src="{{ include.fileurl | absolute_url }}#t=0.1" class="embed-responsive-item u-video" aria-label="{{ include.name | default: '' | strip | default: 'Video' | escape }}" controls >
4
6
  Your browser does not support the video tag.
5
7
  </video>
6
8
  </div>
@@ -8,29 +10,30 @@
8
10
  {%- if include.nolazy -%}
9
11
  <!-- Thanks to Minimal Mistakes -->
10
12
  <!-- https://embedresponsively.com/ -->
11
- <div class="embed-responsive embed-responsive-16by9 my-2 chulapa-rounded-lg" itemscope itemprop="VideoObject" itemtype="https://schema.org/VideoObject">
12
- <iframe loading="lazy" title="Video from YouTube" class="embed-responsive-item" src="https://www.youtube-nocookie.com/embed/{{ include.id }}" allowfullscreen itemprop="embedUrl"></iframe>
13
+ <div class="embed-responsive embed-responsive-16by9 my-2 chulapa-rounded-lg" itemscope itemtype="https://schema.org/VideoObject">
14
+ {% include snippets/video-metadata.html name=include.name thumbnail_url=include.thumbnail_url upload_date=include.upload_date description=include.description duration=include.duration %}
15
+ <iframe loading="lazy" title="{{ include.name | default: '' | strip | default: 'Video from YouTube' | escape }}" class="embed-responsive-item" src="https://www.youtube-nocookie.com/embed/{{ include.id }}" allowfullscreen itemprop="embedUrl"></iframe>
13
16
 
14
17
  </div>
15
18
  {%- else -%}
16
- {% include snippets/youtube.html id=include.id video_res = include.video_res %}
19
+ {% include snippets/youtube.html id=include.id video_res=include.video_res name=include.name thumbnail_url=include.thumbnail_url upload_date=include.upload_date description=include.description duration=include.duration %}
17
20
  {%- endif %}
18
21
 
19
- {%- else -%
22
+ {%- else -%}
20
23
  {% assign video_id = include.id %}
21
24
  {% assign video_provider = include.provider %}
22
25
  <!-- Thanks to Minimal Mistakes -->
23
26
  <!-- https://embedresponsively.com/ -->
24
- <div class="embed-responsive embed-responsive-16by9 my-2 chulapa-rounded-lg" itemscope itemprop="VideoObject" itemtype="https://schema.org/VideoObject">
25
- {%- if video_provider == "vimeo" -%}
26
- <iframe loading="lazy" title="Video from {{ video_provider }}" class="embed-responsive-item" src="https://player.vimeo.com/video/{{ video_id }}?dnt=true" webkitAllowFullScreen mozallowfullscreen allowFullScreen itemprop="embedUrl"></iframe>
27
- {%- elsif video_provider == "google-drive" -%}
28
- <iframe loading="lazy" title="Video from {{ video_provider }}" class="embed-responsive-item" src="https://drive.google.com/file/d/{{ video_id }}/preview" allowfullscreen itemprop="embedUrl"></iframe>
29
- {%- elsif video_provider == "bilibili" -%}
30
- <iframe loading="lazy" title="Video from {{ video_provider }}" class="embed-responsive-item" src="https://player.bilibili.com/player.html?bvid={{ video_id }}&page=1&as_wide=1&high_quality=1&danmaku=0" scrolling="no" border="0" framespacing="0" allowfullscreen="true" itemprop="embedUrl"></iframe>
31
- {%- elsif video_provider == "dailymotion" -%}
32
- <iframe loading="lazy" title="Video from {{ video_provider }}" class="embed-responsive-item" src="https://www.dailymotion.com/embed/video/{{ video_id }}" webkitAllowFullScreen mozallowfullscreen allowFullScreen itemprop="embedUrl"></iframe>
33
-
27
+ <div class="embed-responsive embed-responsive-16by9 my-2 chulapa-rounded-lg" itemscope itemtype="https://schema.org/VideoObject">
28
+ {% include snippets/video-metadata.html name=include.name thumbnail_url=include.thumbnail_url upload_date=include.upload_date description=include.description duration=include.duration %}
29
+ {%- if video_provider == "vimeo" -%}
30
+ <iframe loading="lazy" title="{{ include.name | default: '' | strip | default: video_provider | prepend: 'Video: ' | escape }}" class="embed-responsive-item" src="https://player.vimeo.com/video/{{ video_id }}?dnt=true" webkitAllowFullScreen mozallowfullscreen allowFullScreen itemprop="embedUrl"></iframe>
31
+ {%- elsif video_provider == "google-drive" -%}
32
+ <iframe loading="lazy" title="{{ include.name | default: '' | strip | default: video_provider | prepend: 'Video: ' | escape }}" class="embed-responsive-item" src="https://drive.google.com/file/d/{{ video_id }}/preview" allowfullscreen itemprop="embedUrl"></iframe>
33
+ {%- elsif video_provider == "bilibili" -%}
34
+ <iframe loading="lazy" title="{{ include.name | default: '' | strip | default: video_provider | prepend: 'Video: ' | escape }}" class="embed-responsive-item" src="https://player.bilibili.com/player.html?bvid={{ video_id }}&page=1&as_wide=1&high_quality=1&danmaku=0" scrolling="no" border="0" framespacing="0" allowfullscreen="true" itemprop="embedUrl"></iframe>
35
+ {%- elsif video_provider == "dailymotion" -%}
36
+ <iframe loading="lazy" title="{{ include.name | default: '' | strip | default: video_provider | prepend: 'Video: ' | escape }}" class="embed-responsive-item" src="https://www.dailymotion.com/embed/video/{{ video_id }}" webkitAllowFullScreen mozallowfullscreen allowFullScreen itemprop="embedUrl"></iframe>
37
+ {% endif %}
38
+ </div>
34
39
  {% endif %}
35
- </div>
36
- {% endif %}
@@ -2,14 +2,25 @@
2
2
  {% assign video_res = include.video_res | default: "maxresdefault" %}
3
3
  <!-- Thanks to alfurka,groupboard -->
4
4
  <!-- Based on https://github.com/alfurka/jekyll-embed-youtube-lazy-load -->
5
- <div itemscope itemprop="VideoObject" itemtype="https://schema.org/VideoObject">
6
- <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;" itemprop="thumbnailUrl" content="https://img.youtube.com/vi/{{ video_id }}/{{ video_res }}.jpg">
7
- <div class="d-none" itemprop="embedUrl" content="https://www.youtube-nocookie.com/embed/{{ video_id }}"></div>
8
- <button class="ch_ytdefer_btn" aria-label="Play" style="background-image: url(&quot;data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMCUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDY4IDQ4IiB3aWR0aD0iMTAwJSI+PHBhdGggY2xhc3M9Inl0cC1sYXJnZS1wbGF5LWJ1dHRvbi1iZyIgZD0iTTY2LjUyLDcuNzRjLTAuNzgtMi45My0yLjQ5LTUuNDEtNS40Mi02LjE5QzU1Ljc5LC4xMywzNCwwLDM0LDBTMTIuMjEsLjEzLDYuOSwxLjU1IEMzLjk3LDIuMzMsMi4yNyw0LjgxLDEuNDgsNy43NEMwLjA2LDEzLjA1LDAsMjQsMCwyNHMwLjA2LDEwLjk1LDEuNDgsMTYuMjZjMC43OCwyLjkzLDIuNDksNS40MSw1LjQyLDYuMTkgQzEyLjIxLDQ3Ljg3LDM0LDQ4LDM0LDQ4czIxLjc5LTAuMTMsMjcuMS0xLjU1YzIuOTMtMC43OCw0LjY0LTMuMjYsNS40Mi02LjE5QzY3Ljk0LDM0Ljk1LDY4LDI0LDY4LDI0UzY3Ljk0LDEzLjA1LDY2LjUyLDcuNzR6IiBmaWxsPSIjMjEyMTIxIiBmaWxsLW9wYWNpdHk9IjAuOCI+PC9wYXRoPjxwYXRoIGQ9Ik0gNDUsMjQgMjcsMTQgMjcsMzQiIGZpbGw9IiNmZmYiPjwvcGF0aD48L3N2Zz4=&quot;); 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>
5
+ <div itemscope itemtype="https://schema.org/VideoObject">
6
+ {% include snippets/video-metadata.html name=include.name thumbnail_url=include.thumbnail_url upload_date=include.upload_date description=include.description duration=include.duration %}
7
+ {%- assign custom_thumbnail = include.thumbnail_url | strip -%}
8
+ {%- if custom_thumbnail == empty -%}
9
+ <link itemprop="thumbnailUrl" href="https://img.youtube.com/vi/{{ video_id | escape }}/{{ video_res | escape }}.jpg">
10
+ {%- endif -%}
11
+ <link itemprop="embedUrl" href="https://www.youtube-nocookie.com/embed/{{ video_id | escape }}">
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(&quot;data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMCUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDY4IDQ4IiB3aWR0aD0iMTAwJSI+PHBhdGggY2xhc3M9Inl0cC1sYXJnZS1wbGF5LWJ1dHRvbi1iZyIgZD0iTTY2LjUyLDcuNzRjLTAuNzgtMi45My0yLjQ5LTUuNDEtNS40Mi02LjE5QzU1Ljc5LC4xMywzNCwwLDM0LDBTMTIuMjEsLjEzLDYuOSwxLjU1IEMzLjk3LDIuMzMsMi4yNyw0LjgxLDEuNDgsNy43NEMwLjA2LDEzLjA1LDAsMjQsMCwyNHMwLjA2LDEwLjk1LDEuNDgsMTYuMjZjMC43OCwyLjkzLDIuNDksNS40MSw1LjQyLDYuMTkgQzEyLjIxLDQ3Ljg3LDM0LDQ4LDM0LDQ4czIxLjc5LTAuMTMsMjcuMS0xLjU1YzIuOTMtMC43OCw0LjY0LTMuMjYsNS40Mi02LjE5QzY3Ljk0LDM0Ljk1LDY4LDI0LDY4LDI0UzY3Ljk0LDEzLjA1LDY2LjUyLDcuNzR6IiBmaWxsPSIjMjEyMTIxIiBmaWxsLW9wYWNpdHk9IjAuOCI+PC9wYXRoPjxwYXRoIGQ9Ik0gNDUsMjQgMjcsMTQgMjcsMzQiIGZpbGw9IiNmZmYiPjwvcGF0aD48L3N2Zz4=&quot;); 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>
9
14
  </div>
10
15
  </div>
16
+ <noscript><a href="https://www.youtube.com/watch?v={{ video_id | escape }}">Watch this video on YouTube</a></noscript>
11
17
  <!-- Load script only if needed -->
12
18
  <script>
13
- if(null==(ch_defer_script=document.getElementById("ch_ytdeferScript"))){var e=document,t=e.createElement("script");t.src="https://cdn.jsdelivr.net/gh/dieghernan/chulapa@master/assets/js/ch_ytdefer/ch_ytdefer.min.js",t.id="ch_ytdeferScript",e.body.appendChild(t)}else console.log("Chulapa YouTube Defer already loaded");
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
+ })();
14
26
  </script>
15
-
@@ -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="{{ site.url }}{{ page.url }}" >
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
- <textarea rows="5" name="message" id="message" required spellcheck="true" placeholder="Type here..."></textarea>
8
- <p 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>
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!</h1>
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
- <section id="welcomments__comment-container" class="welcomments__comment-container">
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
- </section>
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 type="text/javascript">
69
+ <script>
70
70
  welcomments = {
71
71
  apiUrl: "{{ api_url }}",
72
72