chulapa-jekyll 2.0.0 → 2.1.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 (172) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +154 -31
  3. data/README.md +96 -76
  4. data/_data/version.yml +2 -2
  5. data/_includes/components/breadcrumbdatesocial.html +15 -11
  6. data/_includes/components/headers.html +17 -10
  7. data/_includes/components/indexcards.html +2 -2
  8. data/_includes/components/navbeforeafter.html +2 -2
  9. data/_includes/components/random.html +103 -0
  10. data/_includes/components/related.html +84 -60
  11. data/_includes/components/simplelist.html +26 -0
  12. data/_includes/footer.html +53 -1
  13. data/_includes/head.html +237 -98
  14. data/_includes/search/fusejs.html +36 -0
  15. data/_includes/search/lunr.html +27 -7
  16. data/_includes/search/simplesearch.html +46 -0
  17. data/_includes/snippets/article-images.html +25 -0
  18. data/_includes/snippets/bootstrapdemo.html +1454 -1303
  19. data/_includes/snippets/breadcrumb-names.html +5 -0
  20. data/_includes/snippets/canonical-url.html +17 -0
  21. data/_includes/snippets/datetranslate.html +7 -1
  22. data/_includes/snippets/jsonld-string.html +16 -0
  23. data/_includes/snippets/og-locale.html +19 -0
  24. data/_includes/snippets/page-language.html +4 -0
  25. data/_includes/snippets/publisher.html +25 -0
  26. data/_includes/snippets/video-metadata.html +15 -0
  27. data/_includes/snippets/video.html +20 -17
  28. data/_includes/snippets/youtube.html +9 -4
  29. data/_includes/welcomments/template.html +1 -1
  30. data/_layouts/archive.html +1 -1
  31. data/_layouts/cloudcategory.html +34 -16
  32. data/_layouts/cloudcategory2.html +4 -85
  33. data/_layouts/cloudtag.html +39 -16
  34. data/_layouts/cloudtag2.html +4 -81
  35. data/_layouts/default.html +4 -4
  36. data/_layouts/landingpage.html +8 -5
  37. data/_layouts/minimal.html +10 -4
  38. data/_layouts/search.html +12 -13
  39. data/_sass/chulapa/_classes.scss +68 -58
  40. data/_sass/chulapa/_reboot.scss +31 -0
  41. data/_sass/chulapa/_variables.scss +8 -1
  42. data/_sass/highlight/README.md +176 -14
  43. data/_sass/highlight/abap.scss +62 -0
  44. data/_sass/highlight/algol.scss +46 -0
  45. data/_sass/highlight/algol_nu.scss +46 -0
  46. data/_sass/highlight/arduino.scss +63 -0
  47. data/_sass/highlight/autumn.scss +69 -58
  48. data/_sass/highlight/base16.scss +90 -0
  49. data/_sass/highlight/borland.scss +55 -46
  50. data/_sass/highlight/bw.scss +70 -34
  51. data/_sass/highlight/cobalt2.scss +197 -0
  52. data/_sass/highlight/coffee.scss +82 -0
  53. data/_sass/highlight/colorful.scss +178 -61
  54. data/_sass/highlight/cran.scss +185 -169
  55. data/_sass/highlight/default.scss +72 -61
  56. data/_sass/highlight/dracula.scss +93 -169
  57. data/_sass/highlight/emacs.scss +72 -61
  58. data/_sass/highlight/friendly.scss +72 -61
  59. data/_sass/highlight/friendly_grayscale.scss +72 -0
  60. data/_sass/highlight/fruity.scss +82 -70
  61. data/_sass/highlight/github.dark.scss +83 -0
  62. data/_sass/highlight/github.scss +116 -61
  63. data/_sass/highlight/gruvbox.dark.scss +83 -0
  64. data/_sass/highlight/gruvbox.light.scss +68 -84
  65. data/_sass/highlight/gruvbox.scss +97 -0
  66. data/_sass/highlight/igor.scss +36 -0
  67. data/_sass/highlight/igorpro.scss +45 -0
  68. data/_sass/highlight/inkpot.scss +78 -0
  69. data/_sass/highlight/lightbulb.scss +82 -0
  70. data/_sass/highlight/lilypond.scss +58 -0
  71. data/_sass/highlight/lovelace.scss +74 -0
  72. data/_sass/highlight/magritte.scss +175 -0
  73. data/_sass/highlight/manni.scss +72 -61
  74. data/_sass/highlight/material.scss +81 -0
  75. data/_sass/highlight/molokai.scss +211 -0
  76. data/_sass/highlight/monokai.scss +217 -65
  77. data/_sass/highlight/monokai.sublime.scss +203 -0
  78. data/_sass/highlight/murphy.scss +72 -61
  79. data/_sass/highlight/native.scss +82 -70
  80. data/_sass/highlight/night-owl.scss +201 -0
  81. data/_sass/highlight/nord.darker.scss +82 -0
  82. data/_sass/highlight/nord.scss +82 -0
  83. data/_sass/highlight/oksolar.dark.scss +175 -0
  84. data/_sass/highlight/oksolar.light.scss +175 -0
  85. data/_sass/highlight/one.dark.scss +82 -0
  86. data/_sass/highlight/panda.scss +195 -0
  87. data/_sass/highlight/paraiso.dark.scss +76 -0
  88. data/_sass/highlight/paraiso.light.scss +76 -0
  89. data/_sass/highlight/pastie.scss +154 -60
  90. data/_sass/highlight/perldoc.scss +69 -58
  91. data/_sass/highlight/rainbow_dash.scss +65 -0
  92. data/_sass/highlight/rrt.scss +82 -0
  93. data/_sass/highlight/sas.scss +63 -0
  94. data/_sass/highlight/selenized.black.scss +175 -0
  95. data/_sass/highlight/selenized.dark.scss +175 -0
  96. data/_sass/highlight/selenized.light.scss +175 -0
  97. data/_sass/highlight/selenized.white.scss +175 -0
  98. data/_sass/highlight/skeletor.scss +190 -140
  99. data/_sass/highlight/solarized.dark.scss +82 -0
  100. data/_sass/highlight/solarized.light.scss +82 -0
  101. data/_sass/highlight/stackoverflow.dark.scss +175 -0
  102. data/_sass/highlight/stackoverflow.light.scss +175 -0
  103. data/_sass/highlight/staroffice.scss +82 -0
  104. data/_sass/highlight/stata.dark.scss +82 -0
  105. data/_sass/highlight/stata.light.scss +49 -0
  106. data/_sass/highlight/tango.scss +81 -69
  107. data/_sass/highlight/template.scss +290 -0
  108. data/_sass/highlight/thankful_eyes.scss +180 -173
  109. data/_sass/highlight/trac.scss +70 -59
  110. data/_sass/highlight/tulip.scss +171 -0
  111. data/_sass/highlight/vim.scss +82 -70
  112. data/_sass/highlight/vs.scss +41 -33
  113. data/_sass/highlight/xcode.scss +65 -0
  114. data/_sass/highlight/zenburn.scss +82 -136
  115. data/_sass/reset-algolia.scss +27 -17
  116. data/_sass/skins/academia.scss +19 -10
  117. data/_sass/skins/auto.scss +5 -2
  118. data/_sass/skins/butterfly-dark.scss +54 -0
  119. data/_sass/skins/butterfly-dim.scss +54 -0
  120. data/_sass/skins/butterfly.scss +33 -0
  121. data/_sass/skins/chulapa.scss +10 -3
  122. data/_sass/skins/cyborg.scss +512 -0
  123. data/_sass/skins/dark-bg.scss +83 -49
  124. data/_sass/skins/darkly.scss +424 -0
  125. data/_sass/skins/deeply.scss +262 -63
  126. data/_sass/skins/electro.scss +24 -17
  127. data/_sass/skins/flatly.scss +386 -0
  128. data/_sass/skins/focal.scss +24 -18
  129. data/_sass/skins/gitdev-dark.scss +12 -20
  130. data/_sass/skins/gitdev.scss +20 -17
  131. data/_sass/skins/graymor.scss +22 -14
  132. data/_sass/skins/hootstrap.scss +17 -10
  133. data/_sass/skins/journal.scss +74 -86
  134. data/_sass/skins/listen.scss +51 -0
  135. data/_sass/skins/lux.scss +171 -237
  136. data/_sass/skins/lymcha.scss +14 -9
  137. data/_sass/skins/materia.scss +889 -0
  138. data/_sass/skins/media.scss +29 -11
  139. data/_sass/skins/mickie.scss +27 -11
  140. data/_sass/skins/minco.scss +30 -10
  141. data/_sass/skins/minty.scss +226 -85
  142. data/_sass/skins/monotone.scss +15 -1
  143. data/_sass/skins/navi.scss +26 -0
  144. data/_sass/skins/pear.scss +16 -5
  145. data/_sass/skins/preptor.scss +13 -12
  146. data/_sass/skins/skeeblu.scss +11 -11
  147. data/_sass/skins/sketchy.scss +366 -377
  148. data/_sass/skins/slate.scss +719 -0
  149. data/_sass/skins/solar.scss +425 -0
  150. data/_sass/skins/sunset.scss +27 -12
  151. data/_sass/skins/towards.scss +19 -5
  152. data/_sass/skins/twitter-dim.scss +20 -11
  153. data/_sass/skins/twitter-lights-out.scss +22 -11
  154. data/_sass/skins/twitter.scss +22 -10
  155. data/_sass/skins/united.scss +57 -0
  156. data/_sass/skins/universal.scss +29 -27
  157. data/_sass/skins/wandoo.scss +12 -11
  158. data/_sass/skins/yeti.scss +673 -0
  159. data/assets/atom.xml +10 -6
  160. data/assets/js/better404/better404.js +75 -0
  161. data/assets/js/ch_ytdefer/ch_ytdefer.js +0 -1
  162. data/assets/js/chulapa_script.js +2 -2
  163. data/assets/js/fusejs/fusejs-search.js +197 -0
  164. data/assets/js/fusejs/fusejs-search.min.js +4 -0
  165. data/assets/js/fusejs/fusejs-store.js +43 -0
  166. data/assets/js/lunr/lunr-search.js +249 -114
  167. data/assets/js/lunr/lunr-search.min.js +4 -0
  168. data/assets/js/lunr/lunr-store.js +31 -23
  169. data/assets/js/simplesearch/simplesearch-store.json +45 -0
  170. data/assets/rss.xml +4 -3
  171. metadata +81 -8
  172. 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 -%}
@@ -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' -}}
@@ -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,25 @@
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
+ {
8
+ "@type": "{{ publisher_type }}",
9
+ "name": {% include snippets/jsonld-string.html value=publisher_name %},
10
+ "url": {% include snippets/jsonld-string.html value=publisher_url decode_html=false %}
11
+ {%- if publisher_type == 'Person' -%}
12
+ {%- assign publisher_image = site.publisher.image | default: site.author.avatar | default: site.github.owner_gravatar_url -%}
13
+ {%- else -%}
14
+ {%- assign publisher_logo = site.publisher.logo | default: site.og_image | default: site.author.avatar | default: site.github.owner_gravatar_url | absolute_url -%},
15
+ "logo": {
16
+ "@type": "ImageObject",
17
+ "url": {% include snippets/jsonld-string.html value=publisher_logo decode_html=false %}
18
+ }
19
+ {%- assign publisher_image = site.publisher.image -%}
20
+ {%- endif -%}
21
+ {%- if publisher_image and publisher_image != empty -%}
22
+ {%- assign publisher_image = publisher_image | absolute_url -%},
23
+ "image": {% include snippets/jsonld-string.html value=publisher_image decode_html=false %}
24
+ {%- endif %}
25
+ }
@@ -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" 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">
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 %}
12
15
  <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
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="Video from {{ video_provider }}" 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="Video from {{ video_provider }}" 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="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>
35
+ {%- elsif video_provider == "dailymotion" -%}
36
+ <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>
37
+ {% endif %}
38
+ </div>
34
39
  {% endif %}
35
- </div>
36
- {% endif %}
@@ -2,14 +2,19 @@
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>
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 }}" 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;">
8
13
  <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>
9
14
  </div>
10
15
  </div>
11
16
  <!-- Load script only if needed -->
12
17
  <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");
18
+ if(null==(ch_defer_script=document.getElementById("ch_ytdeferScript"))){var e=document,t=e.createElement("script");t.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 %},t.id="ch_ytdeferScript",e.body.appendChild(t)}else console.log("Chulapa YouTube Defer already loaded");
14
19
  </script>
15
20
 
@@ -15,7 +15,7 @@
15
15
  data-comment-id="{{ id }}"
16
16
  data-author-name="{{ author_name }}"
17
17
  data-nesting-level="{{ nesting_level }}"
18
- itemprop="comment" itemscope itemtype="https://schema.org/Comment">
18
+ itemscope itemtype="https://schema.org/Comment">
19
19
  <div class="welcomments__comment-header">
20
20
  <div class="welcomments__author-avatar">
21
21
  <img class="welcomments__author-avatar-img" src="{{ avatar_url }}" alt="{{ author_name }}">
@@ -55,7 +55,7 @@ layout: default
55
55
  <div class="ml-2 my-1">
56
56
  <div class="row g-0">
57
57
  <article class="col">
58
- <h6 class="my-2"><a href="{{- document.url | absolute_url -}}" class="chulapa-text-body-color">{{ document.title }}</a></h6>
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
59
  <p class="small mb-1">
60
60
  {% if document.date %}
61
61
  {% assign dateformat = document.date | date: "%A, %d" %}
@@ -4,6 +4,7 @@ layout: default
4
4
 
5
5
  {{- content -}}
6
6
 
7
+ <!-- Compatible with Jekyll v3 and v4, pure Jekyll group by -->
7
8
 
8
9
  {%- if page.include_collection -%}
9
10
  {%- assign cols = page.include_collection | split: "," -%}
@@ -25,32 +26,49 @@ layout: default
25
26
  {% endif %}
26
27
 
27
28
  {% assign alldocs = alldocs | sort: 'date' | reverse %}
28
- {% assign groupcategory = alldocs | map: 'categories' | join: ',' | split: ',' | group_by: category | sort: 'size' | reverse %}
29
+ {% assign alltags = alldocs | map: 'categories' | join: ',' | split: ',' %}
29
30
 
31
+ {%- assign single_tags = alltags | uniq -%}
32
+ {% assign count_tags = '' | split: ',' %}
33
+ {% assign n_tags = single_tags | size | minus: 1 %}
30
34
 
31
- {%- for category in groupcategory -%}
32
- {%- if forloop.first -%}
33
- {%- assign sizemax = category.size -%}
34
- {%- elsif forloop.last -%}
35
- {% assign mid = category.size | plus: sizemax | divided_by: 2 %}
36
- {%- endif -%}
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 %}
37
38
  {%- endfor -%}
38
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 %}
39
57
 
40
58
  <div class="row g-0 pt-5" id="categories">
41
59
  <div class="col">
42
- {%- for category in groupcategory -%}
43
- <a href="#{{- category.name | replace: " ", "-" -}}" class="btn btn-secondary m-1" role="button" style="font-size: min(1.2rem , max(0.8rem , calc(1rem + 0.025*({{ category.size }}rem - {{ mid }}rem))));"><i class="far fa-folder-open mr-2" aria-hidden="true"></i>{{- category.name -}}<span class="badge rounded-pill chulapa-pill-bg-secondary ml-2">{{category.size}}</span></a>
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>
44
62
  {%- endfor -%}
45
63
  </div>
46
64
  </div>
47
65
 
48
66
  {% assign words_per_minute = site.words_per_minute | default: 200 %}
49
- {% for category in groupcategory %}
50
- <section id="{{- category.name | replace: " ", "-" -}}" class="py-3 chulapa-cloudcategory">
67
+ {% for i in (0..n_tags) %}
68
+ <section id="{{- sorted_tags[i] | replace: "demo", "dmo" | replace: " ", "-" -}}" class="py-3 chulapa-cloudcategory">
51
69
  <div class="d-flex align-items-center border-bottom border-chulapa mt-5">
52
- <h5 class="my-0"><i class="far fa-folder-open mr-1" aria-hidden="true"></i>{{- category.name -}} </h5>
53
- <div class="badge rounded-pill chulapa-pill-bg-secondary ml-2">{{category.size}}</div>
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>
54
72
  </div>
55
73
  {% for document in alldocs %}
56
74
  {% assign words = document.content | strip_html | number_of_words %}
@@ -58,11 +76,11 @@ layout: default
58
76
  {% if words > words_per_minute %}
59
77
  {% assign readtime = words | divided_by:words_per_minute | append: "’" %}
60
78
  {% endif %}
61
- {% if document.categories contains category.name %}
79
+ {% if document.categories contains sorted_tags[i] %}
62
80
  <article class="chulapa-links-hover-only my-1 mb-4 row g-0 h-entry">
63
81
  <div class="col">
64
- <h6><a href="{{ document.url | absolute_url }}" class="p-name u-url">{{ document.title }}</a></h6>
65
- {%- if document.subtitle -%}<p>{{- document.subtitle -}}</p> {%- endif -%}
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 -%}
66
84
  <div class="small">
67
85
  {% if document.date %}
68
86
  {% assign dateformat = document.date | date: "%B %d, %Y" %}
@@ -1,89 +1,8 @@
1
1
  ---
2
- layout: default
2
+ layout: cloudcategory
3
3
  ---
4
4
 
5
- {{- content -}}
6
-
7
-
8
- {%- if page.include_collection -%}
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
- {% assign cat_count = alldocs | map: 'categories' | count_by_item %}
29
-
5
+ <!--Layout cloudcategory2 deprecated. Migrate to layout: cloudcategory -->
6
+ <!--_plugins\grouptag.rb not needed any more, please delete -->
30
7
 
31
- {%- for category in cat_count -%}
32
- {%- if forloop.first -%}
33
- {%- assign sizemax = category[1] -%}
34
- {%- elsif forloop.last -%}
35
- {% assign mid = category[1] | plus: sizemax | divided_by: 2 %}
36
- {%- endif -%}
37
- {%- endfor -%}
38
-
39
-
40
- <div class="row g-0 pt-5" id="categories">
41
- <div class="col">
42
- {%- for category in cat_count -%}
43
- <a href="#{{- category[0] | replace: " ", "-" -}}" class="btn btn-secondary m-1" role="button" style="font-size: min(1.2rem , max(0.8rem , calc(1rem + 0.025*({{ category[1] }}rem - {{ mid }}rem))));"><i class="far fa-folder-open mr-2" aria-hidden="true"></i>{{- category[0] -}}<span class="badge rounded-pill chulapa-pill-bg-secondary ml-2">{{category[1]}}</span></a>
44
- {%- endfor -%}
45
- </div>
46
- </div>
47
-
48
- {% assign words_per_minute = site.words_per_minute | default: 200 %}
49
- {% for category in cat_count %}
50
- <section id="{{- category[0] | replace: " ", "-" -}}" class="py-3 chulapa-cloudcategory">
51
- <div class="d-flex align-items-center border-bottom border-chulapa mt-5">
52
- <h5 class="my-0"><i class="far fa-folder-open mr-1" aria-hidden="true"></i>{{- category[0] -}} </h5>
53
- <div class="badge rounded-pill chulapa-pill-bg-secondary ml-2">{{category[1]}}</div>
54
- </div>
55
- {% for document in alldocs %}
56
- {% assign words = document.content | strip_html | number_of_words %}
57
- {% assign readtime = "< 1’" | escape_once %}
58
- {% if words > words_per_minute %}
59
- {% assign readtime = words | divided_by:words_per_minute | append: "’" %}
60
- {% endif %}
61
- {% if document.categories contains category[0] %}
62
- <article class="chulapa-links-hover-only my-1 mb-4 row g-0 h-entry">
63
- <div class="col">
64
- <h6><a href="{{ document.url | absolute_url }}" class="p-name u-url">{{ document.title }}</a></h6>
65
- {%- if document.subtitle -%}<p>{{- document.subtitle -}}</p> {%- endif -%}
66
- <div class="small">
67
- {% if document.date %}
68
- {% assign dateformat = document.date | date: "%B %d, %Y" %}
69
- <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>
70
- {% if document.last_modified_at %} <i class="fa fa-redo" aria-hidden="true"></i>{% endif %} |
71
- {% endif %}
72
- <i class="far fa-clock" aria-hidden="true"></i> {{ readtime }}
73
- {%- if showcol -%}
74
- <span class="ml-2 badge chulapa-pill-bg-body p-category">{{ document.collection }}</span>
75
- {%- endif -%}
76
- </div>
77
- </div>
78
- {% if document.header_img or document.og_image %}
79
- <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 }}')">
80
- </a>
81
- {% endif %}
82
- </article>
83
- {% endif %}
84
- {% endfor %}
85
- <div class="text-right">
86
- <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>
87
- </div>
88
- </section>
89
- {% endfor %}
8
+ {{- content -}}
@@ -4,6 +4,9 @@ layout: default
4
4
 
5
5
  {{- content -}}
6
6
 
7
+ <!-- Compatible with Jekyll v3 and v4, pure Jekyll group by -->
8
+
9
+
7
10
  {%- if page.include_collection -%}
8
11
  {%- assign cols = page.include_collection | split: "," -%}
9
12
  {%- for col in cols -%}
@@ -25,29 +28,49 @@ layout: default
25
28
 
26
29
 
27
30
  {% assign alldocs = alldocs | sort: 'date' | reverse %}
28
- {% assign grouptag = alldocs | map: 'tags' | join: ',' | split: ',' | group_by: tag | sort: 'size' | reverse %}
29
- {%- for tag in grouptag -%}
30
- {%- if forloop.first -%}
31
- {%- assign sizemax = tag.size -%}
32
- {%- elsif forloop.last -%}
33
- {% assign mid = tag.size | plus: sizemax | divided_by: 2 %}
34
- {%- endif -%}
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 %}
35
40
  {%- endfor -%}
36
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
+
37
60
  <div class="row g-0 pt-5" id="tags">
38
61
  <div class="col">
39
- {%- for tag in grouptag -%}
40
- <a href="#{{- tag.name | replace: " ", "-" -}}" class="btn btn-primary m-1" role="button" style="font-size: min(1.2rem , max(0.8rem , calc(1rem + 0.025*({{ tag.size }}rem - {{ mid }}rem))));"><i class="fa fa-tag mr-2" aria-hidden="true"></i>{{- tag.name -}}<span class="badge rounded-pill chulapa-pill-bg-primary ml-2">{{tag.size}}</span></a>
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>
41
64
  {%- endfor -%}
42
65
  </div>
43
66
  </div>
44
67
 
45
68
  {% assign words_per_minute = site.words_per_minute | default: 200 %}
46
- {% for tag in grouptag %}
47
- <section id="{{- tag.name | replace: " ", "-" -}}" class="py-3 chulapa-cloudtag">
69
+ {% for i in (0..n_tags) %}
70
+ <section id="{{- sorted_tags[i] | replace: "demo", "dmo" | replace: " ", "-" -}}" class="py-3 chulapa-cloudtag">
48
71
  <div class="d-flex align-items-center border-bottom border-chulapa mt-5">
49
- <h5 class="my-0"><i class="fa fa-tag mr-1" aria-hidden="true"></i>{{- tag.name -}} </h5>
50
- <div class="badge rounded-pill chulapa-pill-bg-primary ml-2">{{tag.size}}</div>
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>
51
74
  </div>
52
75
  {% for document in alldocs %}
53
76
  {% assign words = document.content | strip_html | number_of_words %}
@@ -55,11 +78,11 @@ layout: default
55
78
  {% if words > words_per_minute %}
56
79
  {% assign readtime = words | divided_by:words_per_minute | append: "’" %}
57
80
  {% endif %}
58
- {% if document.tags contains tag.name %}
81
+ {% if document.tags contains sorted_tags[i] %}
59
82
  <article class="chulapa-links-hover-only my-1 mb-4 row g-0">
60
83
  <div class="col">
61
- <h6><a href="{{ document.url | absolute_url }}">{{ document.title }}</a></h6>
62
- {%- if document.subtitle -%}<p>{{- document.subtitle -}}</p> {%- endif -%}
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 -%}
63
86
  <div class="small">
64
87
  {% if document.date %}
65
88
  {% assign dateformat = document.date | date: "%B %d, %Y" %}
@@ -1,86 +1,9 @@
1
1
  ---
2
- layout: default
2
+ layout: cloudtag
3
3
  ---
4
4
 
5
- {{- content -}}
6
-
7
- {%- if page.include_collection -%}
8
- {%- assign cols = page.include_collection | split: "," -%}
9
- {%- for col in cols -%}
10
- {%- if forloop.first -%}
11
- {%- assign alldocs = site.documents |
12
- where_exp: "item", "item.collection == col" -%}
13
- {%- assign showcol = false -%}
14
- {%- else -%}
15
- {%- assign docloop = site.documents |
16
- where_exp: "item", "item.collection == col" -%}
17
- {%- assign alldocs = alldocs | concat: docloop %}
18
- {%- assign showcol = true -%}
19
- {%- endif -%}
20
- {%- endfor -%}
21
- {%- else -%}
22
- {%- assign alldocs = site.documents -%}
23
- {%- assign showcol = true -%}
24
- {% endif %}
25
-
5
+ <!--Layout cloudtag2 deprecated. Migrate to layout: cloudtag -->
6
+ <!--_plugins\grouptag.rb not needed any more, please delete -->
26
7
 
27
- {% assign alldocs = alldocs | sort: 'date' | reverse %}
28
- {% assign tag_count = alldocs | map: 'tags' | count_by_item %}
29
- {%- for tag in tag_count -%}
30
- {%- if forloop.first -%}
31
- {%- assign sizemax = tag[1] -%}
32
- {%- elsif forloop.last -%}
33
- {% assign mid = tag[1] | plus: sizemax | divided_by: 2 %}
34
- {%- endif -%}
35
- {%- endfor -%}
36
-
37
- <div class="row g-0 pt-5" id="tags">
38
- <div class="col">
39
- {%- for tag in tag_count -%}
40
- <a href="#{{- tag[0] | replace: " ", "-" -}}" class="btn btn-primary m-1" role="button" style="font-size: min(1.2rem , max(0.8rem , calc(1rem + 0.025*({{ tag[1] }}rem - {{ mid }}rem))));"><i class="fa fa-tag mr-2" aria-hidden="true"></i>{{- tag[0] -}}<span class="badge rounded-pill chulapa-pill-bg-primary ml-2">{{tag[1]}}</span></a>
41
- {%- endfor -%}
42
- </div>
43
- </div>
8
+ {{- content -}}
44
9
 
45
- {% assign words_per_minute = site.words_per_minute | default: 200 %}
46
- {% for tag in tag_count %}
47
- <section id="{{- tag[0] | replace: " ", "-" -}}" class="py-3 chulapa-cloudtag">
48
- <div class="d-flex align-items-center border-bottom border-chulapa mt-5">
49
- <h5 class="my-0"><i class="fa fa-tag mr-1" aria-hidden="true"></i>{{- tag[0] -}} </h5>
50
- <div class="badge rounded-pill chulapa-pill-bg-primary ml-2">{{tag[1]}}</div>
51
- </div>
52
- {% for document in alldocs %}
53
- {% assign words = document.content | strip_html | number_of_words %}
54
- {% assign readtime = "< 1’" | escape_once %}
55
- {% if words > words_per_minute %}
56
- {% assign readtime = words | divided_by:words_per_minute | append: "’" %}
57
- {% endif %}
58
- {% if document.tags contains tag[0] %}
59
- <article class="chulapa-links-hover-only my-1 mb-4 row g-0">
60
- <div class="col">
61
- <h6><a href="{{ document.url | absolute_url }}">{{ document.title }}</a></h6>
62
- {%- if document.subtitle -%}<p>{{- document.subtitle -}}</p> {%- endif -%}
63
- <div class="small">
64
- {% if document.date %}
65
- {% assign dateformat = document.date | date: "%B %d, %Y" %}
66
- <i class="far fa-calendar" aria-hidden="true"></i> <time datetime="{{- document.date | date_to_xmlschema -}}">{% include_cached snippets/datetranslate.html date=dateformat %}</time>
67
- {% if document.last_modified_at %} <i class="fa fa-redo" aria-hidden="true"></i>{% endif %} |
68
- {% endif %}
69
- <i class="far fa-clock" aria-hidden="true"></i> {{ readtime }}
70
- {%- if showcol -%}
71
- <span class="ml-2 badge chulapa-pill-bg-body">{{ document.collection }}</span>
72
- {%- endif -%}
73
- </div>
74
- </div>
75
- {% if document.header_img or document.og_image %}
76
- <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 }}')">
77
- </a>
78
- {% endif %}
79
- </article>
80
- {% endif %}
81
- {% endfor %}
82
- <div class="text-right">
83
- <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>
84
- </div>
85
- </section>
86
- {% endfor %}