jekyll-theme-modootoday 1.5.0 → 1.7.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 (203) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +103 -1
  3. data/README.ja.md +150 -0
  4. data/README.ko.md +20 -17
  5. data/README.md +19 -16
  6. data/RULES.md +8 -2
  7. data/_includes/modootoday/assets/build.html +6 -0
  8. data/_includes/modootoday/assets/registry.html +21 -7
  9. data/_includes/modootoday/assets/scripts.html +5 -0
  10. data/_includes/modootoday/assets/sheets.html +9 -3
  11. data/_includes/modootoday/assets/site-scripts.html +8 -3
  12. data/_includes/modootoday/blog/subscribe.html +5 -0
  13. data/_includes/modootoday/brand/icon.html +2 -1
  14. data/_includes/modootoday/chart/figure.html +4 -0
  15. data/_includes/modootoday/chart/table.html +14 -0
  16. data/_includes/modootoday/chrome/banner-text.html +16 -0
  17. data/_includes/modootoday/chrome/banner.html +5 -0
  18. data/_includes/modootoday/chrome/showcase.html +13 -0
  19. data/_includes/modootoday/config.html +9 -5
  20. data/_includes/modootoday/detail/cta.html +1 -1
  21. data/_includes/modootoday/detail/facts.html +1 -0
  22. data/_includes/modootoday/detail/jsonld.html +6 -1
  23. data/_includes/modootoday/detail/page.html +1 -0
  24. data/_includes/modootoday/detail/tickets.html +6 -0
  25. data/_includes/modootoday/docs-extra/feed-entries.html +24 -0
  26. data/_includes/modootoday/docs-extra/head.html +7 -1
  27. data/_includes/modootoday/head-meta.html +25 -14
  28. data/_includes/modootoday/i18n/ar.html +1 -1
  29. data/_includes/modootoday/i18n/de.html +1 -1
  30. data/_includes/modootoday/i18n/el.html +1 -1
  31. data/_includes/modootoday/i18n/es.html +1 -1
  32. data/_includes/modootoday/i18n/fa.html +1 -1
  33. data/_includes/modootoday/i18n/fr.html +1 -1
  34. data/_includes/modootoday/i18n/id.html +1 -1
  35. data/_includes/modootoday/i18n/it.html +1 -1
  36. data/_includes/modootoday/i18n/ja.html +1 -1
  37. data/_includes/modootoday/i18n/ko.html +1 -1
  38. data/_includes/modootoday/i18n/ml.html +1 -1
  39. data/_includes/modootoday/i18n/pl.html +1 -1
  40. data/_includes/modootoday/i18n/pt-BR.html +1 -1
  41. data/_includes/modootoday/i18n/ro.html +1 -1
  42. data/_includes/modootoday/i18n/ru.html +1 -1
  43. data/_includes/modootoday/i18n/th.html +1 -1
  44. data/_includes/modootoday/i18n/tr.html +1 -1
  45. data/_includes/modootoday/i18n/uk.html +1 -1
  46. data/_includes/modootoday/i18n/ur-Latn.html +1 -1
  47. data/_includes/modootoday/i18n/vi.html +1 -1
  48. data/_includes/modootoday/i18n/zh-CN.html +1 -1
  49. data/_includes/modootoday/i18n/zh-TW.html +1 -1
  50. data/_includes/modootoday/i18n.html +176 -136
  51. data/_includes/modootoday/jsonld/graph.html +1 -1
  52. data/_includes/modootoday/links/content.html +6 -2
  53. data/_includes/modootoday/markdown/anchors.html +26 -0
  54. data/_includes/modootoday/markdown/c/chart.html +24 -0
  55. data/_includes/modootoday/markdown/c/install.html +6 -0
  56. data/_includes/modootoday/markdown/c/widget.html +22 -0
  57. data/_includes/modootoday/markdown/components.html +4 -2
  58. data/_includes/modootoday/markdown/figures/diagrams.html +32 -0
  59. data/_includes/modootoday/markdown/figures/math.html +34 -0
  60. data/_includes/modootoday/markdown/figures.html +8 -0
  61. data/_includes/modootoday/markdown/inline/chart.html +30 -0
  62. data/_includes/modootoday/markdown/inline/widget.html +19 -0
  63. data/_includes/modootoday/markdown/inline.html +5 -1
  64. data/_includes/modootoday/markdown/sections.html +10 -4
  65. data/_includes/modootoday/meta/feed-url.html +13 -0
  66. data/_includes/modootoday/meta/feedback.html +14 -0
  67. data/_includes/modootoday/meta/feeds.html +14 -0
  68. data/_includes/modootoday/meta/github.html +15 -0
  69. data/_includes/modootoday/meta/og-image.html +15 -0
  70. data/_includes/modootoday/meta/releases-feed.html +5 -0
  71. data/_includes/modootoday/page-meta.html +22 -4
  72. data/_includes/modootoday/pwa/head.html +7 -0
  73. data/_includes/modootoday/pwa/manifest.json +54 -0
  74. data/_includes/modootoday/pwa/offline-assets.html +10 -0
  75. data/_includes/modootoday/pwa/precache.html +21 -0
  76. data/_includes/modootoday/pwa/sw.js +36 -0
  77. data/_includes/modootoday/render/chart.html +15 -0
  78. data/_includes/modootoday/render/math.html +21 -5
  79. data/_includes/modootoday/render/mermaid.html +4 -3
  80. data/_includes/modootoday/site/dir.html +5 -0
  81. data/_includes/modootoday/stylesheets.html +5 -1
  82. data/_includes/modootoday/t.html +1 -1
  83. data/_includes/modootoday/theme-color.html +1 -0
  84. data/_includes/modootoday/version.html +1 -1
  85. data/_layouts/archive.html +2 -1
  86. data/_layouts/author.html +1 -0
  87. data/_layouts/blog.html +1 -0
  88. data/_layouts/default.html +12 -9
  89. data/_layouts/doc.html +1 -0
  90. data/_layouts/feed.html +14 -5
  91. data/_layouts/pages/offline.html +14 -0
  92. data/_layouts/redirect.html +1 -2
  93. data/_sass/modootoday/blog/_cards.scss +2 -1
  94. data/_sass/modootoday/components/chrome/_showcase.scss +40 -0
  95. data/_sass/modootoday/components/content/_anchor.scss +9 -0
  96. data/_sass/modootoday/components/data/_chart.scss +25 -0
  97. data/_sass/modootoday/components/doc/_sidebar.scss +3 -1
  98. data/_sass/modootoday/components/doc/_toc.scss +4 -0
  99. data/_sass/modootoday/components/figure/_figure-svg.scss +2 -0
  100. data/_sass/modootoday/components/media/_diagram.scss +16 -0
  101. data/_sass/modootoday/components/media/_widget.scss +7 -0
  102. data/_sass/modootoday/components/section/showcase/_install.scss +14 -0
  103. data/_sass/modootoday/components/section/structure/_timeline.scss +7 -3
  104. data/_sass/modootoday/layout/_page-meta.scss +5 -1
  105. data/_sass/modootoday/print/_sheet.scss +17 -0
  106. data/_sass/modootoday/pwa/_toast.scss +16 -0
  107. data/_sass/modootoday.scss +1 -0
  108. data/assets/css/modootoday/chrome/print.scss +5 -0
  109. data/assets/css/modootoday/chrome/showcase.scss +8 -0
  110. data/assets/css/modootoday/chrome/toast.scss +8 -0
  111. data/assets/css/modootoday/content/anchor.scss +7 -0
  112. data/assets/css/modootoday/data/chart.scss +7 -0
  113. data/assets/css/modootoday/media/widget.scss +7 -0
  114. data/assets/css/modootoday/showcase/install.scss +7 -0
  115. data/assets/js/modootoday/chrome/showcase.js +15 -0
  116. data/assets/js/modootoday/chrome/theme-init.js +3 -2
  117. data/assets/js/modootoday/content/scroll-region.js +68 -11
  118. data/assets/js/modootoday/data/chart-table.js +16 -0
  119. data/assets/js/modootoday/data/chart.js +106 -0
  120. data/assets/js/modootoday/pwa/install.js +60 -0
  121. data/assets/js/modootoday/pwa/offline.js +33 -0
  122. data/assets/js/modootoday/pwa/register.js +79 -0
  123. data/assets/js/modootoday/pwa/update-toast.js +75 -0
  124. data/assets/js/modootoday/pwa/worker.js +150 -0
  125. data/assets/js/modootoday/structure/toc-spy.js +121 -0
  126. data/assets/modootoday/icon-192.png +0 -0
  127. data/assets/modootoday/icon-512.png +0 -0
  128. data/assets/modootoday/icon-maskable-512.png +0 -0
  129. data/i18n/ar.yml +33 -3
  130. data/i18n/de.yml +33 -3
  131. data/i18n/el.yml +33 -3
  132. data/i18n/en.yml +33 -3
  133. data/i18n/es.yml +33 -3
  134. data/i18n/fa.yml +33 -3
  135. data/i18n/fr.yml +33 -3
  136. data/i18n/glossary.yml +21 -3
  137. data/i18n/id.yml +33 -3
  138. data/i18n/it.yml +33 -3
  139. data/i18n/ja.yml +33 -3
  140. data/i18n/ko.yml +33 -3
  141. data/i18n/ml.yml +33 -3
  142. data/i18n/pl.yml +33 -3
  143. data/i18n/pt-BR.yml +33 -3
  144. data/i18n/ro.yml +33 -3
  145. data/i18n/ru.yml +33 -3
  146. data/i18n/th.yml +33 -3
  147. data/i18n/tr.yml +33 -3
  148. data/i18n/uk.yml +33 -3
  149. data/i18n/ur-Latn.yml +33 -3
  150. data/i18n/vi.yml +33 -3
  151. data/i18n/zh-CN.yml +33 -3
  152. data/i18n/zh-TW.yml +33 -3
  153. data/lib/modootoday/check/build/build_output.rb +13 -4
  154. data/lib/modootoday/check/build/feeds.rb +63 -0
  155. data/lib/modootoday/check/build/links.rb +74 -0
  156. data/lib/modootoday/check/build/pwa/manifest.rb +61 -0
  157. data/lib/modootoday/check/build/pwa/precache.rb +38 -0
  158. data/lib/modootoday/check/build/pwa/worker.rb +55 -0
  159. data/lib/modootoday/check/build/pwa.rb +55 -0
  160. data/lib/modootoday/check/build/showcase.rb +27 -0
  161. data/lib/modootoday/check/build/structured_data/nested.rb +29 -0
  162. data/lib/modootoday/check/build/structured_data.rb +6 -3
  163. data/lib/modootoday/check/build/{aliases.rb → stubs/aliases.rb} +1 -1
  164. data/lib/modootoday/check/build/{records.rb → stubs/records.rb} +1 -1
  165. data/lib/modootoday/check/build/{twins.rb → stubs/twins.rb} +1 -1
  166. data/lib/modootoday/check/build/third_party.rb +1 -1
  167. data/lib/modootoday/check/cli.rb +9 -3
  168. data/lib/modootoday/check/config/keys/appearance/brand.rb +28 -0
  169. data/lib/modootoday/check/config/keys/appearance/chrome.rb +11 -1
  170. data/lib/modootoday/check/config/keys/appearance/showcase.rb +57 -0
  171. data/lib/modootoday/check/config/keys/appearance/switches.rb +11 -1
  172. data/lib/modootoday/check/config/keys/figures/chart.rb +16 -0
  173. data/lib/modootoday/check/config/keys/figures/diagrams.rb +31 -0
  174. data/lib/modootoday/check/config/keys/figures/renderers.rb +10 -0
  175. data/lib/modootoday/check/config/keys/pages/blog.rb +11 -0
  176. data/lib/modootoday/check/config/keys/pages/content.rb +11 -0
  177. data/lib/modootoday/check/config/keys/pages/edit_url.rb +17 -2
  178. data/lib/modootoday/check/config/keys/pages/feedback.rb +24 -0
  179. data/lib/modootoday/check/config/keys/pages/languages.rb +2 -0
  180. data/lib/modootoday/check/config/keys/serving/delivery.rb +8 -1
  181. data/lib/modootoday/check/config/keys/serving/pwa.rb +118 -0
  182. data/lib/modootoday/check/config/keys.rb +9 -1
  183. data/lib/modootoday/check/config/renderers.rb +36 -12
  184. data/lib/modootoday/check/config/site_config.rb +2 -1
  185. data/lib/modootoday/check/config/validate.rb +4 -1
  186. data/lib/modootoday/check/layouts/detail.rb +24 -6
  187. data/lib/modootoday/check/layouts/directory.rb +1 -1
  188. data/lib/modootoday/check/page/a11y/new_window.rb +4 -2
  189. data/lib/modootoday/check/page/chart.rb +91 -0
  190. data/lib/modootoday/check/page/component_rules.rb +5 -1
  191. data/lib/modootoday/check/page/figures/diagrams.rb +72 -0
  192. data/lib/modootoday/check/page/figures/freshness.rb +55 -0
  193. data/lib/modootoday/check/page/figures/math_static.rb +88 -0
  194. data/lib/modootoday/check/page/math_notation.rb +1 -1
  195. data/lib/modootoday/check/page/pages.rb +22 -0
  196. data/lib/modootoday/check/page/widget.rb +66 -0
  197. data/lib/modootoday/check.rb +7 -3
  198. data/lib/modootoday/figures.rb +88 -0
  199. data/lib/modootoday/markdown.rb +3 -0
  200. data/lib/modootoday/stubs/cli.rb +5 -4
  201. data/lib/modootoday/stubs/pwa.rb +57 -0
  202. data/lib/modootoday/stubs.rb +3 -2
  203. metadata +88 -5
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  layout: doc
3
3
  ---
4
- {%- comment -%}md-components v1 — archive layout: page body, then the tag or category archive (front matter archive: tags | categories | years; default tags).{%- endcomment -%}
4
+ {%- comment -%}md-components v1 — archive layout: page body, then the tag or category archive (front matter archive: tags | categories | years; default tags), and a Subscribe link with feed:.{%- endcomment -%}
5
5
  {{ content }}
6
6
  {% if page.archive == "years" %}{% include modootoday/archive-years.html lang=page.archive_lang %}{% else %}{% include modootoday/archive.html by=page.archive lang=page.archive_lang %}{% endif %}
7
+ {%- include modootoday/blog/subscribe.html -%}
data/_layouts/author.html CHANGED
@@ -13,6 +13,7 @@ layout: default
13
13
  {%- if _au.bio %}<p>{{ _au.bio }}</p>{% endif -%}
14
14
  {%- if _au.url %}<p><a href="{{ _au.url }}" rel="me">{{ _au.url | remove: "https://" | remove: "http://" }}</a></p>{% endif %}</div>
15
15
  </header>
16
+ {%- include modootoday/blog/subscribe.html -%}
16
17
  {%- if content != "" %}<div class="mt-doc">{{ content }}</div>{% endif -%}
17
18
  {%- include modootoday/blog/select.html author=page.author lang=page.posts_lang -%}
18
19
  {% include modootoday/blog/list.html posts=mt_posts variant=page.variant %}
data/_layouts/blog.html CHANGED
@@ -14,6 +14,7 @@ layout: default
14
14
  {%- if content != "" %}
15
15
  <header class="mt-blog-intro mt-doc">{{ content }}</header>
16
16
  {%- endif -%}
17
+ {%- include modootoday/blog/subscribe.html -%}
17
18
  {%- if paginator.posts -%}{%- assign _bp = paginator.posts -%}{%- assign _bmore = false -%}
18
19
  {%- else -%}
19
20
  {%- include modootoday/blog/select.html lang=page.posts_lang category=page.category tag=page.tag -%}
@@ -8,11 +8,9 @@
8
8
  {%- comment -%}mt_home: this language's home (/<lang>/ when that page exists), else the site root; used by the brand link and footers.{%- endcomment -%}
9
9
  {%- assign mt_home = "/" -%}{%- assign _def_lang = site.lang | default: "en" -%}
10
10
  {%- if _lang != _def_lang -%}{%- assign _lh = "/" | append: _lang | append: "/" -%}{%- include modootoday/lookup/urls.html -%}{%- assign _lhk = "|" | append: _lh | append: "|" -%}{%- if mt_page_urls contains _lhk -%}{%- assign mt_home = _lh -%}{%- endif -%}{%- endif -%}
11
- {%- assign _rtl = "ar fa he ur yi ps sd ug dv ckb" | split: " " -%}
12
- {%- assign _base = _lang | split: "-" | first -%}
13
- {%- if _rtl contains _base %}{% assign _dir = "rtl" %}{% else %}{% assign _dir = nil %}{% endif -%}
14
- {%- assign _dir = page.direction | default: mt_t_direction | default: _dir -%}
15
- <html lang="{{ _lang }}"{% if _dir %} dir="{{ _dir }}"{% endif %}{% if mt_theme_start %} data-theme="{{ mt_theme_start }}"{% endif %} data-mt-copy="{{ mt_t_code_copy }}" data-mt-copied="{{ mt_t_code_copied }}" data-mt-code="{{ mt_t_code_label }}" data-mt-table="{{ mt_t_table_label }}" data-mt-diagram="{{ mt_t_diagram_label }}">
11
+ {%- include modootoday/site/dir.html lang=_lang -%}
12
+ {%- assign _dir = page.direction | default: mt_dir -%}
13
+ <html lang="{{ _lang }}"{% if _dir %} dir="{{ _dir }}"{% endif %}{% if mt_theme_start %} data-theme="{{ mt_theme_start }}"{% endif %}{% if mt_showcase %} data-mt-showcase="{{ mt_showcase_style }}"{% endif %} data-mt-copy="{{ mt_t_code_copy }}" data-mt-copied="{{ mt_t_code_copied }}" data-mt-code="{{ mt_t_code_label }}" data-mt-table="{{ mt_t_table_label }}" data-mt-region-named="{{ mt_t_region_named }}" data-mt-region-nth="{{ mt_t_region_nth }}" data-mt-diagram="{{ mt_t_diagram_label }}">
16
14
  <head>
17
15
  <meta charset="utf-8">
18
16
  <meta name="viewport" content="width=device-width, initial-scale=1{% unless site.modootoday.viewport_fit == "auto" %}, viewport-fit=cover{% endunless %}">
@@ -20,13 +18,15 @@
20
18
  {%- if page.description or site.description %}
21
19
  <meta name="description" content="{{ page.description | default: site.description | strip_html | normalize_whitespace | escape }}">
22
20
  {%- endif %}
23
- {%- if page.noindex or layout.mt_noindex %}
21
+ {%- if page.noindex or layout.mt_noindex or mt_showcase %}
24
22
  <meta name="robots" content="noindex">
25
23
  {%- endif %}
26
24
  <meta name="color-scheme" content="{% if mt_color_scheme == "auto" or mt_color_scheme == "auto-light" %}light dark{% elsif mt_color_scheme == "auto-dark" %}dark light{% else %}{{ mt_color_scheme }}{% endif %}">
27
25
  {%- include modootoday/theme-color.html %}
28
26
  {%- include modootoday/head-meta.html %}
29
27
  {%- include modootoday/stylesheets.html %}
28
+ {%- comment -%}With cached sheets a slow page would paint a half-parsed header; Chromium holds the first frame until main starts.{%- endcomment %}
29
+ <link rel="expect" href="#mt-main" blocking="render">
30
30
  {%- include modootoday/tokens.html %}
31
31
  {%- include modootoday/doc/twin.html -%}
32
32
  {%- if mt_twin %}
@@ -39,12 +39,15 @@
39
39
  <link rel="describedby" type="text/plain" href="{{ _ll | relative_url }}">
40
40
  {%- endif %}
41
41
  {%- include head-custom.html %}
42
+ {%- comment -%}mt-body-sidebar: a layout with mt_sidebar (doc) on a site with a sidebar widens the shell. It sits on body, before
43
+ the header, so the header has its width in the first frame even when the HTML streams in slowly.{%- endcomment %}
42
44
  </head>
43
- <body class="mt-body"{% unless site.modootoday.external_links.icon == false %} data-mt-nw-icon{% endunless %}>
45
+ <body class="mt-body{% if layout.mt_sidebar and mt_sidebar %} mt-body-sidebar{% endif %}"{% unless site.modootoday.external_links.icon == false %} data-mt-nw-icon{% endunless %}>
44
46
  <a class="mt-skip" href="#{% if content contains 'id="mt-content"' %}mt-content{% else %}mt-main{% endif %}">{{ mt_t_skip }}</a>
45
- {%- assign _bn = site.modootoday.banner -%}{%- if mt_components contains "banner" and _bn.text %}
46
- <div class="mt-banner" role="region" aria-label="{{ mt_t_banner_label }}"><p>{{ _bn.text }}{% if _bn.url %} <a href="{% include modootoday/link.html url=_bn.url %}"{% include modootoday/links/attrs.html on=_bn.new_window target=_bn.target url=_bn.url %}>{{ _bn.link | default: _bn.url }}</a>{% endif %}</p></div>
47
+ {%- if mt_showcase %}
48
+ {% include modootoday/chrome/showcase.html %}
47
49
  {%- endif %}
50
+ {%- include modootoday/chrome/banner.html -%}
48
51
  {%- assign _chrome = true -%}{%- if layout.mt_chrome == false or page.chrome == false -%}{%- assign _chrome = false -%}{%- endif -%}
49
52
  {%- if site.title and _chrome %}
50
53
  <header class="mt-header"><div class="mt-header-inner"><a class="mt-site-title{% if site.modootoday.logo %} mt-has-logo{% unless site.modootoday.header.compact_title == false %} mt-compact-title{% endunless %}{% endif %}" href="{{ mt_home | relative_url }}">{% include modootoday/brand/logo.html %}<span class="mt-site-name">{{ mt_site_title | replace: ".", ".<wbr>" }}</span></a>{% include modootoday/nav.html %}{% if mt_components contains "search" and mt_search_index %}<div class="mt-search" role="search" data-index="{{ '/search.json' | relative_url }}" data-lang="{{ site.lang | default: 'en' }}"{% if site.modootoday.search.match %} data-match="{{ site.modootoday.search.match }}"{% endif %}{% if site.modootoday.search.compact == true %} data-compact{% endif %}{% if site.modootoday.search.results %} data-results="{{ site.modootoday.search.results }}"{% endif %} hidden>{% include modootoday/brand/icon.html name="search" size=16 %}<input type="search" aria-keyshortcuts="/ Control+K Meta+K" aria-controls="mt-search-results" aria-label="{{ mt_t_search_label }}" placeholder="{{ mt_t_search_label }}"><ul class="mt-search-results" id="mt-search-results" aria-live="polite"></ul></div>{% endif %}{% if site.modootoday.language_switcher == "header" %}{% include modootoday/lang-switch.html style="menu" %}{% endif %}{% if mt_components contains "theme-toggle" and mt_theme_toggle %}<button class="mt-theme-toggle" type="button" aria-pressed="false" aria-label="{{ mt_t_theme_toggle }}" title="{{ mt_t_theme_toggle }}" hidden>{% include modootoday/brand/icon.html name="moon" %}{% include modootoday/brand/icon.html name="sun" %}</button>{% endif %}</div></header>
data/_layouts/doc.html CHANGED
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  mt_sheets: [doc]
3
+ mt_sidebar: true
3
4
  layout: default
4
5
  ---
5
6
  {%- comment -%}md-components v1 — doc layout: alerts/badges, then optional sections.{%- endcomment -%}
data/_layouts/feed.html CHANGED
@@ -2,20 +2,29 @@
2
2
  ---
3
3
  layout: feed
4
4
  ---
5
- Front matter: feed_lang (default page.lang or site.lang; "all" mixes), limit (default 20), category / tag (filtered feed).
6
- Content is the post's excerpt unless feed_content: full. Authors: site/author.html.{%- endcomment -%}
5
+ Front matter: feed_lang (default page.lang or site.lang; "all" mixes), limit (default 20), category / tag / author (filtered feed).
6
+ Content is the post's excerpt unless feed_content: full. Authors: site/author.html.
7
+ feed_source: a changelog instead of posts: "data" (the generated _data/releases.yml) or the URL of a layout: changelog
8
+ page; one entry per release (docs-extra/feed-entries.html), linking to home: (default the source page).{%- endcomment -%}
7
9
  {%- assign _fl = page.feed_lang | default: page.lang | default: site.lang | default: "en" -%}
8
- {%- include modootoday/blog/select.html lang=_fl category=page.category tag=page.tag -%}
10
+ {%- include modootoday/blog/select.html lang=_fl category=page.category tag=page.tag author=page.author -%}
9
11
  {%- assign _flim = page.limit | default: 20 -%}
12
+ {%- if page.feed_source -%}
13
+ {%- assign _frel = nil -%}{%- assign _fhome = page.home -%}
14
+ {%- if page.feed_source == "data" -%}{%- assign _frel = site.data.releases -%}
15
+ {%- else -%}{%- include modootoday/lookup/page.html url=page.feed_source -%}{%- assign _frel = mt_lookup_page.releases -%}{%- assign _fhome = _fhome | default: page.feed_source -%}{%- endif -%}
16
+ {%- unless _frel -%}{%- assign _frel = "" | split: "" -%}{%- endunless -%}
17
+ {%- endif -%}
10
18
  <?xml version="1.0" encoding="utf-8"?>
11
19
  <feed xmlns="http://www.w3.org/2005/Atom"{% unless _fl == "all" %} xml:lang="{{ _fl }}"{% endunless %}>
12
20
  <title>{{ page.feed_title | default: site.title | xml_escape }}</title>
13
21
  {%- if site.description %}<subtitle>{{ site.description | xml_escape }}</subtitle>{% endif %}
14
22
  <link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml"/>
15
- <link href="{{ page.home | default: '/' | absolute_url }}" rel="alternate" type="text/html"/>
23
+ <link href="{{ _fhome | default: page.home | default: '/' | absolute_url }}" rel="alternate" type="text/html"/>
16
24
  <id>{{ page.url | absolute_url | xml_escape }}</id>
17
- <updated>{% if mt_posts.size > 0 %}{{ mt_posts.first.last_modified_at | default: mt_posts.first.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}</updated>
25
+ <updated>{% if page.feed_source %}{% if _frel.size > 0 %}{{ _frel.first.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}{% elsif mt_posts.size > 0 %}{{ mt_posts.first.last_modified_at | default: mt_posts.first.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}</updated>
18
26
  <generator uri="https://github.com/modootoday/jekyll-theme-modootoday">jekyll-theme-modootoday</generator>
27
+ {%- if page.feed_source -%}{%- include modootoday/docs-extra/feed-entries.html releases=_frel home=_fhome limit=_flim -%}{%- assign mt_posts = "" | split: "" -%}{%- endif -%}
19
28
  {%- for _p in mt_posts limit: _flim %}
20
29
  <entry>
21
30
  <title type="html">{{ _p.title | strip_html | xml_escape }}</title>
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: minimal
3
+ mt_main: mt-shell-minimal mt-error
4
+ mt_noindex: true
5
+ ---
6
+ {%- comment -%}pages/offline: what the service worker shows for a page it has no copy of (modootoday.pwa; stubs offline.md and
7
+ offline.<lang>.md). Try again reloads the requested URL with no script; pwa/offline.js fills the list of cached pages. The
8
+ files it links are precached (pwa/offline-assets.html).{%- endcomment -%}
9
+ {%- include modootoday/i18n.html -%}{%- include modootoday/home-url.html -%}
10
+ <h1>{{ page.heading | default: mt_t_pwa_offline_title }}</h1>
11
+ <p>{{ mt_t_pwa_offline_text }}</p>
12
+ {{ content }}
13
+ <p class="mt-actions"><a href="">{{ mt_t_pwa_retry }}</a> <a href="{{ mt_home | relative_url }}">{{ mt_t_pages_home }}</a></p>
14
+ <section data-mt-offline aria-labelledby="mt-offline-pages" hidden><h2 id="mt-offline-pages">{{ mt_t_pwa_offline_pages }}</h2><ul></ul></section>
@@ -2,8 +2,7 @@
2
2
  works under a strict CSP), with a canonical link for search engines and a visible link for everyone else.{%- endcomment -%}
3
3
  {%- assign _lang = page.lang | default: site.lang | default: "en" -%}
4
4
  {%- include modootoday/i18n.html lang=_lang -%}
5
- {%- assign _rtl = "ar fa he ur yi ps sd ug dv ckb" | split: " " -%}{%- assign _b = _lang | split: "-" | first -%}
6
- {%- if _rtl contains _b %}{% assign _dir = "rtl" %}{% else %}{% assign _dir = nil %}{% endif %}{%- assign _dir = mt_t_direction | default: _dir -%}
5
+ {%- include modootoday/site/dir.html lang=_lang -%}{%- assign _dir = mt_dir -%}
7
6
  {%- comment -%}jekyll-redirect-from gives page.redirect.to already resolved (site.url + baseurl); a hand-written
8
7
  redirect_to is a site path or a full URL. The refresh, canonical and link all use the same target.{%- endcomment -%}
9
8
  {%- if page.redirect.to -%}{%- assign _to = page.redirect.to -%}{%- assign _abs = _to -%}
@@ -22,7 +22,8 @@
22
22
  @media (min-width: 48rem) {
23
23
  .mt-post-list[data-variant="list"] > .mt-card-post:has(.mt-card-post-cover) { flex-direction: row; gap: 1.5rem; }
24
24
  .mt-post-list[data-variant="list"] .mt-card-post-cover { display: block; flex: 0 0 14rem; }
25
- .mt-post-list[data-variant="list"] .mt-card-post-cover img { block-size: 100%; aspect-ratio: auto; }
25
+ // The 16 / 9 ratio stays so the row has its height before the cover loads (no layout shift).
26
+ .mt-post-list[data-variant="list"] .mt-card-post-cover img { block-size: 100%; }
26
27
  .mt-post-list[data-variant="magazine"] > .mt-card-post-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 3fr 2fr; }
27
28
  .mt-post-list[data-variant="magazine"] > .mt-card-post-featured .mt-card-post-body { justify-content: center; padding: 0; padding-inline-start: 2rem; }
28
29
  .mt-card-post-featured .mt-card-post-title { font-size: 1.875rem; }
@@ -0,0 +1,40 @@
1
+ // Showcase bar and pill of a demo build (modootoday.showcase, chrome/showcase.html). Colours invert the page's and the
2
+ // brand colour stays on the mark. <html data-mt-showcase> is bar, pill or off; the bar moves the sticky header and the
3
+ // anchor offset down by its height, the pill pads the page bottom. Transparent borders show in forced colors.
4
+ $mt-sc-clear: unquote("1px solid transparent");
5
+ @include mt-layer(components) {
6
+ .mt-showcase-region { z-index: 25; display: flex; align-items: center; gap: .5rem; border: $mt-sc-clear; background: mt(foreground);
7
+ color: mt(background); font-size: .8125rem; line-height: 1.25; }
8
+ .mt-showcase-bar { position: sticky; top: 0; height: calc(2.75rem + var(--mt-safe-top)); border-width: 0 0 1px;
9
+ padding: var(--mt-safe-top) calc(var(--mt-gutter) + var(--mt-safe-right)) 0 calc(var(--mt-gutter) + var(--mt-safe-left)); }
10
+ .mt-showcase-pill { position: fixed; inset-inline: 0; bottom: calc(1rem + var(--mt-safe-bottom)); width: max-content;
11
+ max-width: calc(100% - 2rem); margin-inline: auto; padding: .375rem; padding-inline-start: 1rem; border-radius: 99rem;
12
+ box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
13
+ .mt-showcase-mark { flex: none; width: 1.25rem; height: 1.25rem; border-radius: .3rem; background: mt(brand); }
14
+ .mt-showcase-label { min-width: 0; margin: 0; margin-inline-end: auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
15
+ .mt-showcase-label span { opacity: .75; }
16
+ .mt-showcase-region :is(a, button) { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 2rem;
17
+ min-height: 2rem; padding: 0 .75rem; border: $mt-sc-clear; border-radius: 99rem; background: none; color: inherit; font: inherit;
18
+ font-weight: 500; text-decoration: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 35%, transparent); }
19
+ .mt-showcase-region button { padding: 0; box-shadow: none; cursor: pointer; }
20
+ .mt-showcase-region .mt-showcase-solid { box-shadow: none; background: mt(background); color: mt(foreground); }
21
+ .mt-showcase-region :focus-visible { outline: 2px solid mt(background); outline-offset: 2px; }
22
+ .mt-showcase-less, [data-mt-showcase="off"] .mt-showcase-region { display: none; }
23
+ @media (max-width: 39.99rem) {
24
+ .mt-showcase-region .mt-showcase-more { display: none; }
25
+ .mt-showcase-less { display: inline; }
26
+ }
27
+ // --mt-showcase-top: where the header sticks (the bar takes the top safe-area inset in its place).
28
+ [data-mt-showcase="bar"] { --mt-showcase-top: calc(2.75rem + var(--mt-safe-top));
29
+ scroll-padding-top: calc(#{mt(header-height)} + var(--mt-showcase-top) + 1rem); }
30
+ [data-mt-showcase="bar"] .mt-header { top: var(--mt-showcase-top); padding-top: 0; }
31
+ [data-mt-showcase="bar"] .mt-menu > ul { max-height: calc(100dvh - #{mt(header-height)} - var(--mt-showcase-top) - 1rem); }
32
+ [data-mt-showcase="bar"] :is(.mt-doc-aside .mt-toc, .mt-doc-nav .mt-sidebar) { top: calc(#{mt(header-height)} + var(--mt-showcase-top) + 2rem); }
33
+ // A short viewport (landscape phone, 200% zoom) lets the bar scroll away so the header and content keep the height.
34
+ @media (max-height: 30rem) {
35
+ .mt-showcase-bar { position: static; }
36
+ [data-mt-showcase="bar"] { --mt-showcase-top: var(--mt-safe-top); }
37
+ [data-mt-showcase="bar"] .mt-header { top: 0; padding-top: var(--mt-safe-top); }
38
+ }
39
+ [data-mt-showcase="pill"] body { padding-bottom: calc(4.75rem + var(--mt-safe-bottom)); }
40
+ }
@@ -0,0 +1,9 @@
1
+ // Heading anchor links (anchor sheet; modootoday.heading_anchors): the link at the end of an h2 or h3 shows while the
2
+ // heading is hovered or the link has keyboard focus, and always on touch screens, which cannot hover.
3
+ @include mt-layer(components) {
4
+ .mt-anchor { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; min-height: 1.5rem; margin-inline-start: .25rem; vertical-align: middle; border-radius: mt(radius); color: mt(muted-foreground); text-decoration: none; opacity: 0; }
5
+ :is(h2, h3):hover > .mt-anchor, .mt-anchor:focus-visible { opacity: 1; }
6
+ .mt-anchor:hover { color: mt(primary); }
7
+ @media (pointer: coarse) { .mt-anchor { opacity: 1; } }
8
+ @media (forced-colors: active) { .mt-anchor { color: LinkText; } }
9
+ }
@@ -0,0 +1,25 @@
1
+ // Charts (figure.mt-chart from a chart: code span or a c: chart section): the table is the chart until a script draws
2
+ // div.mt-chart-canvas. Colour hooks --mt-chart-1..8, --mt-chart-grid and --mt-chart-text are never set by the theme;
3
+ // .mt-chart resolves them per scheme into --mt-chart-s1..s8, -sg and -st (series 3:1 or more on the page background).
4
+ $mt-chart-light: #2563eb, #c2410c, #047857, #7c3aed, #a16207, #be185d, #0e7490, #57534e;
5
+ $mt-chart-dark: #60a5fa, #fb923c, #34d399, #a78bfa, #facc15, #f472b6, #22d3ee, #a8a29e;
6
+ @mixin mt-chart-series($colors) {
7
+ @for $i from 1 through 8 { --mt-chart-s#{$i}: var(--mt-chart-#{$i}, #{nth($colors, $i)}); }
8
+ }
9
+ @include mt-layer(components) {
10
+ .mt-chart { margin: 0 0 1.5rem; @include mt-chart-series($mt-chart-light);
11
+ --mt-chart-sg: var(--mt-chart-grid, #{mt(border)}); --mt-chart-st: var(--mt-chart-text, #{mt(muted-foreground)}); }
12
+ @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mt-chart { @include mt-chart-series($mt-chart-dark); } }
13
+ [data-theme="dark"] .mt-chart { @include mt-chart-series($mt-chart-dark); }
14
+ .mt-chart .mt-table { margin: 0; }
15
+ // Values line up by their last digit; the row labels read as text.
16
+ .mt-chart :is(th, td):not(:first-child) { text-align: end; }
17
+ .mt-chart tbody th { font-weight: 400; color: mt(foreground); text-align: start; }
18
+ @media (max-width: 39.99rem) { .mt-chart table[data-mt-labelled] :is(th, td) { text-align: start; } }
19
+ // The chart script (data/chart.js) shows the canvas box and folds the table into details; Chart.js fills the box.
20
+ .mt-chart-canvas { position: relative; height: 18rem; margin-bottom: .75rem; }
21
+ @media (forced-colors: active) { .mt-chart-canvas { display: none; } }
22
+ .mt-chart-data > details > summary { width: fit-content; min-height: 1.5rem; color: mt(muted-foreground); font-size: mt-size(sm); line-height: 1.5rem; cursor: pointer; }
23
+ .mt-chart-data > details[open] > summary { margin-bottom: .5rem; }
24
+ .mt-chart > figcaption { margin-top: .5rem; font-size: mt-size(sm); line-height: mt-leading(sm); color: mt(muted-foreground); }
25
+ }
@@ -27,7 +27,9 @@
27
27
  .mt-sidebar-mobile { margin: 0 0 1rem; border: 1px solid mt(border); border-radius: mt(radius); background: mt(muted); font-size: .875rem; }
28
28
  .mt-sidebar-mobile > summary { cursor: pointer; padding: .55rem .85rem; font-weight: 600; }
29
29
  .mt-sidebar-mobile > .mt-sidebar { padding: 0 .5rem .6rem; max-height: 60vh; overflow-y: auto; }
30
- // A page with a sidebar widens header, main and footer to doc-container.
30
+ // A page with a sidebar widens header, main and footer to doc-container. The class is on body (layouts/default.html),
31
+ // so the header is wide in the first frame while the HTML still streams; :has() keeps overridden default layouts wide.
32
+ .mt-body.mt-body-sidebar :is(.mt-header-inner,.mt-main,.mt-footer-inner) { max-width: mt-hook(doc-container); }
31
33
  .mt-body:has(.mt-has-sidebar) :is(.mt-header-inner,.mt-main,.mt-footer-inner) { max-width: mt-hook(doc-container); }
32
34
  @media (min-width: 64rem) {
33
35
  .mt-sidebar-mobile, .mt-has-sidebar .mt-doc-aside { display: none; }
@@ -9,6 +9,10 @@
9
9
  .mt-toc a, .mt-toc-mobile a { display: block; padding: .25rem 0 .25rem .85rem; line-height: mt-leading(sm); color: mt(muted-foreground); text-decoration: none; }
10
10
  .mt-toc a { margin-inline-start: -1px; border-inline-start: 1px solid transparent; }
11
11
  .mt-toc a:hover, .mt-toc-mobile a:hover { color: mt(foreground); border-inline-start-color: mt(muted-foreground); }
12
+ // The section being read (structure/toc-spy.js); after :hover, which has the same specificity.
13
+ .mt-toc a[aria-current], .mt-toc-mobile a[aria-current] { color: mt(foreground); font-weight: 500; }
14
+ .mt-toc a[aria-current] { border-inline-start-color: mt(primary); }
15
+ @media (forced-colors: active) { .mt-toc a[aria-current] { border-inline-start-color: Highlight; } }
12
16
  // The column scrolls (overflow-y: auto), which would clip an outer ring.
13
17
  .mt-toc a:focus-visible { outline-offset: -2px; }
14
18
  .mt-toc-mobile { margin: 0 0 1.5rem; border: 1px solid mt(border); border-radius: mt(radius); background: mt(muted); font-size: .875rem; }
@@ -6,6 +6,8 @@
6
6
  @include mt-layer(components) {
7
7
  :where(:root) { --mt-img-filter-dark: brightness(.85) contrast(1.05) saturate(.9); --mt-diagram-filter-dark: invert(.9) hue-rotate(180deg) var(--mt-img-filter-dark); --mt-figure-min-width: 32rem; }
8
8
  .mt-figure-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border-radius: mt(radius); }
9
+ // Static math: a math font's ink can pass the <math> box, which the region would clip and scroll by a few pixels.
10
+ .mt-math > .mt-figure-scroll { padding-block: .5em; }
9
11
  .mt-figure-svg img { width: 100%; max-width: none; min-width: var(--mt-figure-min-width); height: auto; }
10
12
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mt-figure-svg img:not(.mt-no-filter):not([src$="#light"]) { filter: var(--mt-diagram-filter-dark); } }
11
13
  [data-theme="dark"] .mt-figure-svg img:not(.mt-no-filter):not([src$="#light"]) { filter: var(--mt-diagram-filter-dark); }
@@ -0,0 +1,16 @@
1
+ // Static diagrams (figure.mt-diagram, markdown/figures/diagrams.html): a committed light and dark SVG pair, each kept as
2
+ // drawn (.mt-no-filter). The pair swaps with the token emit's selectors, so it follows the system scheme and the toggle;
3
+ // a lone light image (diagrams.dark: false) stays and takes the figure-svg dark filter. An entry's min_width picks a
4
+ // step below which the figure scrolls sideways (the checker owns the list of steps).
5
+ @include mt-layer(components) {
6
+ .mt-diagram .mt-diagram-dark { display: none; }
7
+ @media (prefers-color-scheme: dark) {
8
+ :root:not([data-theme="light"]) .mt-diagram .mt-diagram-dark { display: block; }
9
+ :root:not([data-theme="light"]) .mt-diagram .mt-diagram-light:not(:only-child) { display: none; }
10
+ }
11
+ :root[data-theme="dark"] .mt-diagram .mt-diagram-dark { display: block; }
12
+ :root[data-theme="dark"] .mt-diagram .mt-diagram-light:not(:only-child) { display: none; }
13
+ @each $rem in (24, 32, 40, 48) { .mt-figure-min-#{$rem} { --mt-figure-min-width: #{$rem}rem; } }
14
+ .mt-diagram-source { margin: -.75rem 0 1.5rem; }
15
+ .mt-diagram-source > summary { width: fit-content; color: mt(muted-foreground); font-size: mt-size(sm); line-height: mt-leading(sm); cursor: pointer; }
16
+ }
@@ -0,0 +1,7 @@
1
+ // Widgets (a site custom element with class mt-widget, from c: widget or a widget: code span): a block whose light-DOM
2
+ // div.mt-widget-fallback is the content until the element is defined; a script that fails or never loads leaves it shown.
3
+ @include mt-layer(components) {
4
+ .mt-widget { display: block; margin: 0 0 1.5rem; }
5
+ .mt-widget:defined > .mt-widget-fallback { display: none; }
6
+ .mt-widget-fallback > :last-child { margin-bottom: 0; }
7
+ }
@@ -0,0 +1,14 @@
1
+ // Install: c: install; the button pwa/install.js shows while the browser offers installing, and the hint. Inside the
2
+ // installed app the section hides (the module does the same where display-mode cannot be emulated). A transparent
3
+ // border keeps the button's edge in forced colors.
4
+ @include mt-layer(components) {
5
+ .mt-install { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: 1rem; padding: 0 1.25rem;
6
+ border: 1px solid transparent; border-radius: mt(radius); background: mt(primary); color: mt(primary-foreground);
7
+ font: inherit; font-weight: 600; cursor: pointer; }
8
+ .mt-install[hidden] { display: none; }
9
+ .mt-install:focus-visible { outline: 2px solid mt(ring); outline-offset: 2px; }
10
+ .mt-install-hint { margin: 1rem 0 0; color: mt(muted-foreground); font-size: .875rem; }
11
+ @media (display-mode: standalone), (display-mode: minimal-ui) {
12
+ .mt-c-install { display: none; }
13
+ }
14
+ }
@@ -1,16 +1,20 @@
1
- // Timeline: sections with `c: timeline`; each ### heading is a date/milestone, content follows.
1
+ // Timeline: sections with `c: timeline`; each ### heading (or each item of an ordered list) is a point on the line.
2
2
  @include mt-layer(components) {
3
3
  .mt-c-timeline { --mt-timeline-line: #{mt(border)}; --mt-timeline-dot: #{mt(primary)}; }
4
4
  .mt-c-timeline > h3, .mt-c-timeline > h3 ~ * { position: relative; margin-inline-start: .5rem; padding-inline-start: 1.5rem; border-inline-start: 2px solid var(--mt-timeline-line); }
5
5
  .mt-c-timeline > h3 { margin-bottom: 0; padding-top: 1.25rem; margin-top: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: mt(muted-foreground); font-family: mt(font-mono); }
6
6
  .mt-c-timeline > h2 + h3 { margin-top: 1rem; }
7
7
  .mt-c-timeline > h3 ~ * { margin-top: 0; margin-bottom: 0; padding-bottom: .5rem; }
8
- .mt-c-timeline > h3::before { content: ""; position: absolute; inset-inline-start: -.45rem; top: 1.55rem;
8
+ .mt-c-timeline > h3::before, .mt-c-timeline > ol > li::before { content: ""; position: absolute; inset-inline-start: -.45rem; top: 1.55rem;
9
9
  width: .75rem; height: .75rem; border-radius: 50%; background: var(--mt-timeline-dot); box-shadow: 0 0 0 3px #{mt(background)}; }
10
+ // The list form: the ordered list carries the line and each item a dot on it, centred on the item's first line.
11
+ .mt-c-timeline > ol { list-style: none; margin: 1rem 0 0; margin-inline-start: .5rem; padding: 0; border-inline-start: 2px solid var(--mt-timeline-line); }
12
+ .mt-c-timeline > ol > li { position: relative; margin: 0; padding: .25rem 0 .75rem; padding-inline-start: 1.5rem; }
13
+ .mt-c-timeline > ol > li::before { top: calc(.8em - .125rem); }
10
14
  }
11
15
  // Forced colours drop backgrounds: the dot is drawn in CanvasText instead.
12
16
  @include mt-layer(components) {
13
17
  @media (forced-colors: active) {
14
- .mt-c-timeline > h3::before { forced-color-adjust: none; background: CanvasText; box-shadow: none; }
18
+ .mt-c-timeline > h3::before, .mt-c-timeline > ol > li::before { forced-color-adjust: none; background: CanvasText; box-shadow: none; }
15
19
  }
16
20
  }
@@ -1,4 +1,4 @@
1
- // Page meta line: last updated date and "Edit this page" link (modootoday/page-meta.html).
1
+ // Page meta line (last updated, Edit this page, Built from) and the feedback row (modootoday/page-meta.html).
2
2
  @include mt-layer(layout) {
3
3
  .mt-page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin: mt(space-section) 0 0; padding-top: 1.25rem;
4
4
  border-top: 1px solid mt(border); font-size: .875rem; color: mt(muted-foreground); }
@@ -6,4 +6,8 @@
6
6
  .mt-page-meta a { color: mt(muted-foreground); text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; border-radius: mt(radius); }
7
7
  .mt-page-meta a:hover { color: mt(primary); text-decoration: underline; text-underline-offset: .2em; }
8
8
  .mt-page-meta + .mt-pagination { margin-top: 1.25rem; padding-top: 0; border-top: 0; }
9
+ // The feedback row (meta/feedback.html) sits under the meta row, or alone with its own rule.
10
+ .mt-page-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin: 1rem 0 0; font-size: .875rem; color: mt(muted-foreground); }
11
+ .mt-page-feedback a { color: mt(muted-foreground); }
12
+ .mt-page-feedback a:hover { color: mt(primary); }
9
13
  }
@@ -0,0 +1,17 @@
1
+ // Print sheet (modootoday.print: true), linked with media="print" after every other sheet. Unlayered, so it wins over
2
+ // the layered theme. The page prints black on white whatever the theme; site chrome, the update notice and the install
3
+ // section are left out; tab panels all print with their titles. details and FAQ items print only their summary (no script).
4
+ @page { margin: 1.5cm; }
5
+ html, body { background: #fff !important; color: #000 !important; color-scheme: light; }
6
+ .mt-skip, .mt-header, .mt-banner, .mt-back-to-top, .mt-showcase, .mt-sidebar, .mt-sidebar-mobile, .mt-doc-aside, .mt-toc-mobile, .mt-page-actions,
7
+ .mt-nav-sheet, .mt-toast, .mt-c-install, .mt-anchor, .mt-page-feedback, .mt-pagination, .mt-search, .mt-footer,
8
+ [role="tablist"] { display: none !important; }
9
+ [role="tabpanel"][hidden], section[data-tabs] > h3[hidden] { display: block !important; }
10
+ main, .mt-main, .mt-doc-layout, .mt-doc-main { display: block !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
11
+ a { color: #000 !important; text-decoration: underline; }
12
+ .mt-actions > a { background: none !important; border: 1px solid #000 !important; }
13
+ // Link addresses print after the link text; legal pages print their own (pages/_legal.scss), and in-page links are left alone.
14
+ :is(.mt-prose, .mt-doc) a[href^="http"]:not(:is(.mt-legal-body *))::after { content: " (" attr(href) ")"; font-size: .85em; word-break: break-all; }
15
+ pre, code, .mt-table, figure, .mt-callout, blockquote, img, tr { break-inside: avoid; }
16
+ h1, h2, h3, h4 { break-after: avoid; }
17
+ pre { white-space: pre-wrap; }
@@ -0,0 +1,16 @@
1
+ // The PWA notice (pwa/update-toast.js): a status line with its buttons above the bottom safe area, colours inverted like
2
+ // the showcase. The region is in the page before its text arrives, so empty it has no size. Transparent borders show in
3
+ // forced colors; buttons are at least 24px. It does not move, so reduced motion needs nothing.
4
+ @include mt-layer(components) {
5
+ .mt-toast { position: fixed; z-index: 30; inset-inline: 1rem; bottom: calc(1rem + var(--mt-safe-bottom)); display: flex;
6
+ flex-wrap: wrap; align-items: center; gap: .5rem 1rem; width: max-content; max-width: calc(100% - 2rem);
7
+ margin-inline: auto; padding: .75rem 1rem; border: 1px solid transparent; border-radius: .75rem; background: mt(foreground);
8
+ color: mt(background); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); font-size: .875rem; }
9
+ .mt-toast:empty { padding: 0; border: 0; box-shadow: none; }
10
+ .mt-toast p { max-width: 34rem; margin: 0; }
11
+ .mt-toast-actions { display: flex; gap: .5rem; margin-inline-start: auto; }
12
+ .mt-toast button { min-width: 1.5rem; min-height: 1.5rem; padding: .25rem .75rem; border: 1px solid; border-radius: .5rem;
13
+ background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
14
+ .mt-toast button:first-child { border-color: transparent; background: mt(background); color: mt(foreground); }
15
+ .mt-toast :focus-visible { outline: 2px solid mt(background); outline-offset: 2px; }
16
+ }
@@ -34,6 +34,7 @@
34
34
  @import "modootoday/components/section/showcase/gallery";
35
35
  @import "modootoday/components/section/showcase/pricing";
36
36
  @import "modootoday/components/section/showcase/subscribe";
37
+ @import "modootoday/components/section/showcase/install";
37
38
  @import "modootoday/components/section/structure/tabs";
38
39
  @import "modootoday/components/section/structure/accordion";
39
40
  @import "modootoday/components/section/structure/steps";
@@ -0,0 +1,5 @@
1
+ ---
2
+ # md-components v1 — jekyll-theme-modootoday print sheet (modootoday.print: true). Linked with media="print" after every
3
+ # other sheet, so it never blocks rendering on screen. Its rules are in _sass/modootoday/print/_sheet.scss.
4
+ ---
5
+ @import "modootoday/print/sheet";
@@ -0,0 +1,8 @@
1
+ ---
2
+ # md-components v1 — jekyll-theme-modootoday component sheet (the showcase bar or pill of a demo build (modootoday.showcase)).
3
+ # Linked right after the core sheet, only when the showcase is enabled. Its partials are the parts of its row in assets/registry.html.
4
+ ---
5
+ {%- include modootoday/config.html -%}
6
+ $mt-css-layers: {{ mt_css_layers }};
7
+ @import "modootoday/sheet";
8
+ {% include modootoday/assets/imports.html row="showcase" %}
@@ -0,0 +1,8 @@
1
+ ---
2
+ # jekyll-theme-modootoday PWA notice sheet (modootoday.pwa): linked by pwa/update-toast.js only when a notice shows, never by
3
+ # a layout. Its partial is modootoday/pwa/_toast.scss.
4
+ ---
5
+ {%- include modootoday/config.html -%}
6
+ $mt-css-layers: {{ mt_css_layers }};
7
+ @import "modootoday/sheet";
8
+ @import "modootoday/pwa/toast";
@@ -0,0 +1,7 @@
1
+ ---
2
+ # md-components v1 — jekyll-theme-modootoday optional sheet (heading anchor links). Linked only by pages that use it.
3
+ ---
4
+ {%- include modootoday/config.html -%}
5
+ $mt-css-layers: {{ mt_css_layers }};
6
+ @import "modootoday/sheet";
7
+ {% include modootoday/assets/imports.html row="anchor" %}
@@ -0,0 +1,7 @@
1
+ ---
2
+ # md-components v1 — jekyll-theme-modootoday optional sheet (charts: figure.mt-chart around its table). Linked only by pages that use it.
3
+ ---
4
+ {%- include modootoday/config.html -%}
5
+ $mt-css-layers: {{ mt_css_layers }};
6
+ @import "modootoday/sheet";
7
+ {% include modootoday/assets/imports.html row="chart" %}
@@ -0,0 +1,7 @@
1
+ ---
2
+ # md-components v1 — jekyll-theme-modootoday optional sheet (widgets: a site custom element and its light-DOM fallback). Linked only by pages that use it.
3
+ ---
4
+ {%- include modootoday/config.html -%}
5
+ $mt-css-layers: {{ mt_css_layers }};
6
+ @import "modootoday/sheet";
7
+ {% include modootoday/assets/imports.html row="widget" %}
@@ -0,0 +1,7 @@
1
+ ---
2
+ # md-components v1 — jekyll-theme-modootoday section sheet (c: install). Linked only by pages that use it.
3
+ ---
4
+ {%- include modootoday/config.html -%}
5
+ $mt-css-layers: {{ mt_css_layers }};
6
+ @import "modootoday/sheet";
7
+ @import "modootoday/components/section/showcase/install";
@@ -0,0 +1,15 @@
1
+ // Showcase dismiss: hidden for the visit in this tab (theme-init.js reads the flag before the next paint).
2
+ export function init(root) {
3
+ const doc = root.ownerDocument || root;
4
+ for (const b of root.querySelectorAll(".mt-showcase-dismiss")) {
5
+ b.addEventListener("click", () => {
6
+ doc.documentElement.dataset.mtShowcase = "off";
7
+ try {
8
+ doc.defaultView.sessionStorage.setItem("mt-showcase", "off");
9
+ } catch (e) {}
10
+ doc.querySelector(".mt-skip")?.focus();
11
+ });
12
+ }
13
+ }
14
+
15
+ init(document);
@@ -1,2 +1,3 @@
1
- // Pre-paint theme from localStorage (modootoday.csp: strict). Loaded without defer in <head>.
2
- try{var t=localStorage.getItem("mt-theme");if(t==="light"||t==="dark")document.documentElement.dataset.theme=t}catch(e){}
1
+ // Pre-paint theme and showcase dismissal (modootoday.csp: strict), blocking in <head>.
2
+ try{var d=document.documentElement,t=localStorage.getItem("mt-theme");if((t=="light"||t=="dark")&&document.currentScript.dataset.mtNoTheme==null)d.dataset.theme=t}catch(e){}
3
+ try{if(d.dataset.mtShowcase&&sessionStorage.getItem("mt-showcase"))d.dataset.mtShowcase="off"}catch(e){}
@@ -1,27 +1,84 @@
1
- // Overflowing code blocks and table wrappers become labelled focusable regions.
1
+ // Overflowing code blocks, table wrappers and figure scrollers become focusable regions, each named uniquely (axe
2
+ // landmark-unique): the label with a code title, caption or language, else the nearest heading; a figure keeps the name
3
+ // the page gave it. Regions that share a name at the moment are numbered.
2
4
  const ATTRS = ["tabindex", "role", "aria-label", "data-mt-scroll"];
5
+ const fill = (s, v) => s.replace(/\[(\w+)\]/g, (m, k) => v[k] ?? m);
6
+ const text = (el) => (el ? el.textContent.replace(/\s+/g, " ").trim() : "");
7
+ const stem = (s) => s.toLowerCase().replace(/s$/, "");
8
+
9
+ function detail(el) {
10
+ const title = el.closest(".mt-code")?.querySelector(".mt-code-title");
11
+ const lang = el.closest("[class*='language-']")?.className.match(/language-(\S+)/)?.[1];
12
+ return text(title?.lastChild) || text(el.querySelector("caption") || el.closest("figure")?.querySelector("figcaption")) || (lang != "plaintext" && lang);
13
+ }
14
+
15
+ export function names(root, ds) {
16
+ const out = new Map();
17
+ let heading = "";
18
+ for (const el of root.querySelectorAll(".mt-main h2, .mt-main h3, .mt-main h4, .mt-main pre, .mt-main .mt-table, .mt-main .mt-figure-scroll")) {
19
+ if (el.tagName[0] == "H") {
20
+ heading = text(el);
21
+ continue;
22
+ }
23
+ const label = el.tagName == "PRE" ? ds.mtCode || "Code" : ds.mtTable || "Table";
24
+ let name = detail(el) || heading;
25
+ // A heading that only repeats the label ("Tables" over a table) adds nothing to the name.
26
+ if (stem(name || "") == stem(label)) {
27
+ name = "";
28
+ }
29
+ out.set(el, el.getAttribute("aria-label") || (name ? fill(ds.mtRegionNamed || "[label], [name]", { label, name }) : label));
30
+ }
31
+ return out;
32
+ }
33
+
34
+ // The names of the live regions, numbered in page order among those that share one.
35
+ export function numbered(named, live, ds) {
36
+ const out = new Map();
37
+ const seen = Object.create(null);
38
+ const count = Object.create(null);
39
+ named.forEach((name, el) => live.has(el) && (count[name] = (count[name] || 0) + 1));
40
+ named.forEach((name, el) => {
41
+ if (live.has(el)) {
42
+ seen[name] = (seen[name] || 0) + 1;
43
+ out.set(el, count[name] > 1 ? fill(ds.mtRegionNth || "[name] [n]", { name, n: seen[name] }) : name);
44
+ }
45
+ });
46
+ return out;
47
+ }
3
48
 
4
49
  export function init(root) {
5
50
  const doc = root.ownerDocument || root;
6
51
  const win = doc.defaultView;
7
52
  const ds = doc.documentElement.dataset;
8
- const sync = (el) => {
9
- const over = el.scrollWidth > el.clientWidth + 1;
53
+ const named = names(root, ds);
54
+ // A figure scroller arrives as a region, so readers without this script can still scroll it from the keyboard.
55
+ const live = new Set([...named.keys()].filter((el) => el.hasAttribute("role")));
56
+ const wide = (el) => el.scrollWidth > el.clientWidth + 1;
57
+ const sync = (el, over) => {
10
58
  const panel = el.closest("[role=tabpanel]");
11
- if (over && !el.hasAttribute("aria-label")) {
59
+ if (panel) {
60
+ panel.tabIndex = over ? -1 : 0;
61
+ }
62
+ if (over && !live.has(el)) {
63
+ live.add(el);
12
64
  el.tabIndex = 0;
13
65
  el.dataset.mtScroll = "";
14
66
  el.setAttribute("role", "region");
15
- el.setAttribute("aria-label", el.tagName == "PRE" ? ds.mtCode || "Code" : ds.mtTable || "Table");
16
- } else if (!over && el.hasAttribute("data-mt-scroll")) {
67
+ } else if (!over && live.has(el)) {
68
+ live.delete(el);
17
69
  ATTRS.forEach((a) => el.removeAttribute(a));
18
70
  }
19
- if (panel) {
20
- panel.tabIndex = over ? -1 : 0;
21
- }
22
71
  };
23
- const ro = win.ResizeObserver && new win.ResizeObserver((es) => es.forEach((e) => sync(e.target)));
24
- root.querySelectorAll(".mt-main pre, .mt-main .mt-table").forEach((el) => (ro ? ro.observe(el) : sync(el)));
72
+ const label = () => numbered(named, live, ds).forEach((name, el) => el.setAttribute("aria-label", name));
73
+ // Every width is read before any attribute is written, so one layout serves the whole batch.
74
+ const ro = win.ResizeObserver && new win.ResizeObserver((es) => {
75
+ es.map((e) => [e.target, wide(e.target)]).forEach(([el, over]) => sync(el, over));
76
+ label();
77
+ });
78
+ named.forEach((name, el) => (ro ? ro.observe(el) : sync(el, wide(el))));
79
+ if (!ro) {
80
+ label();
81
+ }
25
82
  }
26
83
 
27
84
  init(document);