jekyll-theme-modootoday 1.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +65 -1
- data/README.ja.md +150 -0
- data/README.ko.md +17 -16
- data/README.md +16 -15
- data/RULES.md +5 -1
- data/_includes/modootoday/assets/build.html +6 -0
- data/_includes/modootoday/assets/registry.html +14 -6
- data/_includes/modootoday/assets/scripts.html +2 -0
- data/_includes/modootoday/assets/sheets.html +6 -3
- data/_includes/modootoday/blog/subscribe.html +5 -0
- data/_includes/modootoday/brand/icon.html +2 -1
- data/_includes/modootoday/chrome/banner-text.html +16 -0
- data/_includes/modootoday/chrome/banner.html +5 -0
- data/_includes/modootoday/config.html +2 -1
- data/_includes/modootoday/detail/cta.html +1 -1
- data/_includes/modootoday/detail/facts.html +1 -0
- data/_includes/modootoday/detail/jsonld.html +6 -1
- data/_includes/modootoday/detail/page.html +1 -0
- data/_includes/modootoday/detail/tickets.html +6 -0
- data/_includes/modootoday/docs-extra/feed-entries.html +24 -0
- data/_includes/modootoday/docs-extra/head.html +7 -1
- data/_includes/modootoday/head-meta.html +17 -9
- data/_includes/modootoday/i18n/ar.html +1 -1
- data/_includes/modootoday/i18n/de.html +1 -1
- data/_includes/modootoday/i18n/el.html +1 -1
- data/_includes/modootoday/i18n/es.html +1 -1
- data/_includes/modootoday/i18n/fa.html +1 -1
- data/_includes/modootoday/i18n/fr.html +1 -1
- data/_includes/modootoday/i18n/id.html +1 -1
- data/_includes/modootoday/i18n/it.html +1 -1
- data/_includes/modootoday/i18n/ja.html +1 -1
- data/_includes/modootoday/i18n/ko.html +1 -1
- data/_includes/modootoday/i18n/ml.html +1 -1
- data/_includes/modootoday/i18n/pl.html +1 -1
- data/_includes/modootoday/i18n/pt-BR.html +1 -1
- data/_includes/modootoday/i18n/ro.html +1 -1
- data/_includes/modootoday/i18n/ru.html +1 -1
- data/_includes/modootoday/i18n/th.html +1 -1
- data/_includes/modootoday/i18n/tr.html +1 -1
- data/_includes/modootoday/i18n/uk.html +1 -1
- data/_includes/modootoday/i18n/ur-Latn.html +1 -1
- data/_includes/modootoday/i18n/vi.html +1 -1
- data/_includes/modootoday/i18n/zh-CN.html +1 -1
- data/_includes/modootoday/i18n/zh-TW.html +1 -1
- data/_includes/modootoday/i18n.html +176 -152
- data/_includes/modootoday/jsonld/graph.html +1 -1
- data/_includes/modootoday/markdown/anchors.html +26 -0
- data/_includes/modootoday/markdown/c/install.html +6 -0
- data/_includes/modootoday/markdown/figures/diagrams.html +3 -2
- data/_includes/modootoday/markdown/sections.html +9 -3
- data/_includes/modootoday/meta/feed-url.html +13 -0
- data/_includes/modootoday/meta/feedback.html +14 -0
- data/_includes/modootoday/meta/feeds.html +14 -0
- data/_includes/modootoday/meta/github.html +15 -0
- data/_includes/modootoday/meta/og-image.html +15 -0
- data/_includes/modootoday/meta/releases-feed.html +5 -0
- data/_includes/modootoday/page-meta.html +22 -4
- data/_includes/modootoday/pwa/head.html +7 -0
- data/_includes/modootoday/pwa/manifest.json +54 -0
- data/_includes/modootoday/pwa/offline-assets.html +10 -0
- data/_includes/modootoday/pwa/precache.html +21 -0
- data/_includes/modootoday/pwa/sw.js +36 -0
- data/_includes/modootoday/site/dir.html +5 -0
- data/_includes/modootoday/stylesheets.html +5 -1
- data/_includes/modootoday/t.html +1 -1
- data/_includes/modootoday/theme-color.html +1 -0
- data/_includes/modootoday/version.html +1 -1
- data/_layouts/archive.html +2 -1
- data/_layouts/author.html +1 -0
- data/_layouts/blog.html +1 -0
- data/_layouts/default.html +8 -8
- data/_layouts/doc.html +1 -0
- data/_layouts/feed.html +14 -5
- data/_layouts/pages/offline.html +14 -0
- data/_layouts/redirect.html +1 -2
- data/_sass/modootoday/components/content/_anchor.scss +9 -0
- data/_sass/modootoday/components/doc/_sidebar.scss +3 -1
- data/_sass/modootoday/components/doc/_toc.scss +4 -0
- data/_sass/modootoday/components/media/_diagram.scss +3 -1
- data/_sass/modootoday/components/section/showcase/_install.scss +14 -0
- data/_sass/modootoday/layout/_page-meta.scss +5 -1
- data/_sass/modootoday/print/_sheet.scss +17 -0
- data/_sass/modootoday/pwa/_toast.scss +16 -0
- data/_sass/modootoday.scss +1 -0
- data/assets/css/modootoday/chrome/print.scss +5 -0
- data/assets/css/modootoday/chrome/toast.scss +8 -0
- data/assets/css/modootoday/content/anchor.scss +7 -0
- data/assets/css/modootoday/showcase/install.scss +7 -0
- data/assets/js/modootoday/pwa/install.js +60 -0
- data/assets/js/modootoday/pwa/offline.js +33 -0
- data/assets/js/modootoday/pwa/register.js +79 -0
- data/assets/js/modootoday/pwa/update-toast.js +75 -0
- data/assets/js/modootoday/pwa/worker.js +150 -0
- data/assets/js/modootoday/structure/toc-spy.js +121 -0
- data/assets/modootoday/icon-192.png +0 -0
- data/assets/modootoday/icon-512.png +0 -0
- data/assets/modootoday/icon-maskable-512.png +0 -0
- data/i18n/ar.yml +19 -2
- data/i18n/de.yml +19 -2
- data/i18n/el.yml +19 -2
- data/i18n/en.yml +19 -2
- data/i18n/es.yml +19 -2
- data/i18n/fa.yml +19 -2
- data/i18n/fr.yml +19 -2
- data/i18n/glossary.yml +21 -3
- data/i18n/id.yml +19 -2
- data/i18n/it.yml +19 -2
- data/i18n/ja.yml +19 -2
- data/i18n/ko.yml +19 -2
- data/i18n/ml.yml +19 -2
- data/i18n/pl.yml +19 -2
- data/i18n/pt-BR.yml +19 -2
- data/i18n/ro.yml +19 -2
- data/i18n/ru.yml +19 -2
- data/i18n/th.yml +19 -2
- data/i18n/tr.yml +19 -2
- data/i18n/uk.yml +19 -2
- data/i18n/ur-Latn.yml +19 -2
- data/i18n/vi.yml +19 -2
- data/i18n/zh-CN.yml +19 -2
- data/i18n/zh-TW.yml +19 -2
- data/lib/modootoday/check/build/feeds.rb +63 -0
- data/lib/modootoday/check/build/links.rb +74 -0
- data/lib/modootoday/check/build/pwa/manifest.rb +61 -0
- data/lib/modootoday/check/build/pwa/precache.rb +38 -0
- data/lib/modootoday/check/build/pwa/worker.rb +55 -0
- data/lib/modootoday/check/build/pwa.rb +55 -0
- data/lib/modootoday/check/build/{aliases.rb → stubs/aliases.rb} +1 -1
- data/lib/modootoday/check/build/{records.rb → stubs/records.rb} +1 -1
- data/lib/modootoday/check/build/{twins.rb → stubs/twins.rb} +1 -1
- data/lib/modootoday/check/cli.rb +4 -3
- data/lib/modootoday/check/config/keys/appearance/brand.rb +28 -0
- data/lib/modootoday/check/config/keys/appearance/chrome.rb +11 -1
- data/lib/modootoday/check/config/keys/appearance/switches.rb +11 -1
- data/lib/modootoday/check/config/keys/figures/renderers.rb +10 -0
- data/lib/modootoday/check/config/keys/pages/blog.rb +11 -0
- data/lib/modootoday/check/config/keys/pages/content.rb +11 -0
- data/lib/modootoday/check/config/keys/pages/edit_url.rb +17 -2
- data/lib/modootoday/check/config/keys/pages/feedback.rb +24 -0
- data/lib/modootoday/check/config/keys/pages/languages.rb +2 -0
- data/lib/modootoday/check/config/keys/serving/pwa.rb +118 -0
- data/lib/modootoday/check/config/keys.rb +5 -0
- data/lib/modootoday/check/config/site_config.rb +2 -1
- data/lib/modootoday/check/config/validate.rb +4 -1
- data/lib/modootoday/check/layouts/detail.rb +24 -6
- data/lib/modootoday/check/layouts/directory.rb +1 -1
- data/lib/modootoday/check/page/a11y/new_window.rb +2 -1
- data/lib/modootoday/check/page/component_rules.rb +5 -1
- data/lib/modootoday/check/page/figures/diagrams.rb +10 -2
- data/lib/modootoday/check.rb +6 -3
- data/lib/modootoday/markdown.rb +3 -0
- data/lib/modootoday/stubs/cli.rb +5 -4
- data/lib/modootoday/stubs/pwa.rb +57 -0
- data/lib/modootoday/stubs.rb +3 -2
- metadata +56 -5
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
{%- comment -%}
|
|
2
2
|
Optional page footer line (needs modootoday/config.html first).
|
|
3
|
-
site.modootoday.edit_url prefix joined with page.path, e.g. https://github.com/OWNER/REPO/edit/main/docs
|
|
3
|
+
site.modootoday.edit_url prefix joined with page.path, e.g. https://github.com/OWNER/REPO/edit/main/docs/,
|
|
4
|
+
or auto: the repository and folder GitHub Pages builds from (modootoday/meta/github.html)
|
|
5
|
+
site.modootoday.build_link true adds "Built from <commit>", linked to that commit, when the repository and commit are known
|
|
4
6
|
page.last_modified_at date shown as "Last updated" (front matter, or a plugin that sets it)
|
|
5
7
|
page.edit: false hides the edit link on one page
|
|
8
|
+
site.modootoday.feedback a second row: Report an issue, Was this page helpful? and Discuss (modootoday/meta/feedback.html)
|
|
6
9
|
{%- endcomment -%}
|
|
7
10
|
{%- include modootoday/i18n.html lang=_lang -%}
|
|
8
|
-
{%-
|
|
9
|
-
{%-
|
|
10
|
-
{%-
|
|
11
|
+
{%- include modootoday/meta/github.html -%}
|
|
12
|
+
{%- assign _pm_edit = nil -%}{%- assign _pm_built = nil -%}
|
|
13
|
+
{%- assign _pm_prefix = site.modootoday.edit_url -%}{%- if _pm_prefix == "auto" -%}{%- assign _pm_prefix = mt_gh_edit -%}{%- endif -%}
|
|
14
|
+
{%- if _pm_prefix and _pm_prefix != "" and page.edit != false and page.path -%}{%- assign _pm_edit = _pm_prefix | append: page.path -%}{%- endif -%}
|
|
15
|
+
{%- if site.modootoday.build_link == true and mt_gh_repo != "" and mt_gh_rev != "" -%}{%- assign _pm_built = mt_gh_rev | slice: 0, 7 -%}{%- endif -%}
|
|
16
|
+
{%- if _pm_edit or _pm_built or page.last_modified_at %}
|
|
11
17
|
<p class="mt-page-meta">
|
|
12
18
|
{%- if page.last_modified_at -%}<span>{{ mt_t_page_updated }} <time datetime="{{ page.last_modified_at | date_to_xmlschema }}">{{ page.last_modified_at | date: "%Y-%m-%d" }}</time></span>{%- endif -%}
|
|
13
19
|
{%- if _pm_edit and page.last_modified_at %} · {% endif -%}
|
|
14
20
|
{%- if _pm_edit -%}<a href="{{ _pm_edit }}" rel="nofollow">{% include modootoday/brand/icon.html name="edit" size=14 %} {{ mt_t_page_edit }}</a>{%- endif -%}
|
|
21
|
+
{%- if _pm_built -%}{%- if _pm_edit or page.last_modified_at %} · {% endif -%}<a href="{{ mt_gh_repo }}/commit/{{ mt_gh_rev }}" rel="nofollow">{{ mt_t_page_built | replace: "[commit]", _pm_built }}</a>{%- endif -%}
|
|
22
|
+
</p>
|
|
23
|
+
{%- endif -%}
|
|
24
|
+
{%- include modootoday/meta/feedback.html -%}
|
|
25
|
+
{%- if mt_fb_on -%}
|
|
26
|
+
{%- assign _pf_url = page.url | absolute_url -%}{%- assign _pf_title = page.title | default: site.title | strip_html -%}
|
|
27
|
+
{%- capture _pf_body -%}Page: {{ _pf_url }}{%- endcapture -%}
|
|
28
|
+
{%- capture _pf_q -%}&body={{ _pf_body | url_encode }}{%- if mt_fb_labels != "" -%}&labels={{ mt_fb_labels | url_encode }}{%- endif -%}{%- endcapture %}
|
|
29
|
+
<p class="mt-page-feedback">
|
|
30
|
+
{%- if mt_fb_issues != "" -%}<a href="{{ mt_fb_issues }}/new?title={{ _pf_title | url_encode }}{{ _pf_q }}" rel="nofollow">{{ mt_t_page_issue }}</a>{%- endif -%}
|
|
31
|
+
{%- if mt_fb_helpful -%}{%- if mt_fb_issues != "" %} · {% endif -%}<span>{{ mt_t_page_helpful }} <a href="{{ mt_fb_issues }}/new?title={{ "Helpful: " | append: _pf_title | url_encode }}{{ _pf_q }}" rel="nofollow">{{ mt_t_page_helpful_yes }}</a> <a href="{{ mt_fb_issues }}/new?title={{ "Not helpful: " | append: _pf_title | url_encode }}{{ _pf_q }}" rel="nofollow">{{ mt_t_page_helpful_no }}</a></span>{%- endif -%}
|
|
32
|
+
{%- if mt_fb_discuss != "" -%}{%- if mt_fb_issues != "" %} · {% endif -%}<a href="{{ mt_fb_discuss }}" rel="nofollow">{{ mt_t_page_discuss }}</a>{%- endif -%}
|
|
15
33
|
</p>
|
|
16
34
|
{%- endif -%}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{%- comment -%}PWA head tags, only with modootoday.pwa.enabled: true. The manifest and worker URLs are the permalinks of the site's
|
|
2
|
+
stubs (modootoday-stubs --pwa); pwa/register.js reads data-mt-sw and data-mt-scope, pwa/update-toast.js its sheet and labels
|
|
3
|
+
(no inline script under csp: strict). The apple-touch-icon stays with favicon. Needs i18n.html.{%- endcomment -%}
|
|
4
|
+
{%- if site.modootoday.pwa.enabled == true -%}
|
|
5
|
+
{%- include modootoday/assets/url.html path="/assets/css/modootoday/chrome/toast.css" %}
|
|
6
|
+
<link rel="manifest" href="{{ '/manifest.webmanifest' | relative_url }}" data-mt-sw="{{ '/sw.js' | relative_url }}" data-mt-scope="{{ '/' | relative_url }}" data-mt-toast-css="{{ mt_asset_url }}" data-mt-update="{{ mt_t_pwa_update | escape }}" data-mt-reload="{{ mt_t_pwa_reload | escape }}" data-mt-later="{{ mt_t_pwa_later | escape }}" data-mt-offline-notice="{{ mt_t_pwa_offline_notice | escape }}" data-mt-close="{{ mt_t_pwa_close | escape }}">
|
|
7
|
+
{%- endif -%}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{%- comment -%}Web app manifest for the manifest.webmanifest stub (modootoday-stubs --pwa). Every field derives from a setting the site
|
|
2
|
+
already has, so nothing is named twice; the field table is in docs/recipes/pwa.md. scope is the site root; start_url carries no
|
|
3
|
+
query, so it is also the id. shortcuts and screenshots appear only when modootoday.pwa lists them.{%- endcomment -%}
|
|
4
|
+
{%- include modootoday/config.html -%}
|
|
5
|
+
{%- assign _pw = site.modootoday.pwa -%}{%- assign _pwl = site.lang | default: "en" -%}
|
|
6
|
+
{%- include modootoday/i18n.html lang=_pwl -%}{%- include modootoday/site/dir.html lang=_pwl -%}
|
|
7
|
+
{%- assign _tcl = nil -%}{%- assign _tcd = nil -%}{%- capture _pwx -%}{%- include modootoday/theme-color.html -%}{%- endcapture -%}
|
|
8
|
+
{%- if mt_color_scheme == "dark" -%}{%- assign _pwtc = _tcd -%}{%- assign _pwbg = "#0a0a0a" -%}
|
|
9
|
+
{%- else -%}{%- assign _pwtc = _tcl -%}{%- assign _pwbg = "#ffffff" -%}{%- endif -%}
|
|
10
|
+
{%- assign _pwn = _pw.name | default: site.title -%}{%- assign _pwd = _pw.description | default: site.description -%}
|
|
11
|
+
{%- assign _pws = _pw.start_url | default: "/" | relative_url -%}
|
|
12
|
+
{
|
|
13
|
+
"id": {{ _pws | jsonify }},
|
|
14
|
+
"name": {{ _pwn | jsonify }},
|
|
15
|
+
"short_name": {{ _pw.short_name | default: _pwn | jsonify }},
|
|
16
|
+
{%- if _pwd %}
|
|
17
|
+
"description": {{ _pwd | strip_html | normalize_whitespace | jsonify }},
|
|
18
|
+
{%- endif %}
|
|
19
|
+
"lang": {{ _pwl | jsonify }},
|
|
20
|
+
"dir": {{ mt_dir | default: "ltr" | jsonify }},
|
|
21
|
+
"start_url": {{ _pws | jsonify }},
|
|
22
|
+
"scope": {{ "/" | relative_url | jsonify }},
|
|
23
|
+
"display": {{ _pw.display | default: "standalone" | jsonify }},
|
|
24
|
+
"background_color": {{ _pw.background_color | default: _pwbg | jsonify }},
|
|
25
|
+
{%- if _pwtc %}
|
|
26
|
+
"theme_color": {{ _pwtc | jsonify }},
|
|
27
|
+
{%- endif -%}
|
|
28
|
+
{%- if _pw.shortcuts.first %}
|
|
29
|
+
"shortcuts": [
|
|
30
|
+
{%- for _s in _pw.shortcuts %}
|
|
31
|
+
{"name": {{ _s.name | jsonify }}{% if _s.short_name %}, "short_name": {{ _s.short_name | jsonify }}{% endif %}{% if _s.description %}, "description": {{ _s.description | jsonify }}{% endif %}, "url": {{ _s.url | relative_url | jsonify }}}{% unless forloop.last %},{% endunless %}
|
|
32
|
+
{%- endfor %}
|
|
33
|
+
],
|
|
34
|
+
{%- endif -%}
|
|
35
|
+
{%- if _pw.screenshots.first %}
|
|
36
|
+
"screenshots": [
|
|
37
|
+
{%- for _s in _pw.screenshots %}
|
|
38
|
+
{"src": {{ _s.src | relative_url | jsonify }}, "sizes": {{ _s.sizes | jsonify }}, "type": "image/png"{% if _s.form_factor %}, "form_factor": {{ _s.form_factor | jsonify }}{% endif %}{% if _s.label %}, "label": {{ _s.label | jsonify }}{% endif %}}{% unless forloop.last %},{% endunless %}
|
|
39
|
+
{%- endfor %}
|
|
40
|
+
],
|
|
41
|
+
{%- endif %}
|
|
42
|
+
"icons": [
|
|
43
|
+
{%- if _pw.icons == nil or _pw.icons == "brand" -%}
|
|
44
|
+
{%- assign _pwb = "192,512,maskable-512" | split: "," -%}
|
|
45
|
+
{%- for _b in _pwb -%}{%- assign _pwz = _b | remove: "maskable-" %}
|
|
46
|
+
{"src": {{ "/assets/modootoday/icon-" | append: _b | append: ".png" | relative_url | jsonify }}, "sizes": "{{ _pwz }}x{{ _pwz }}", "type": "image/png", "purpose": "{% if _b contains "maskable" %}maskable{% else %}any{% endif %}"}{% unless forloop.last %},{% endunless %}
|
|
47
|
+
{%- endfor -%}
|
|
48
|
+
{%- else -%}
|
|
49
|
+
{%- for _i in _pw.icons %}
|
|
50
|
+
{"src": {{ _i.src | relative_url | jsonify }}, "sizes": {{ _i.sizes | jsonify }}, "type": "image/png", "purpose": {{ _i.purpose | default: "any" | jsonify }}}{% unless forloop.last %},{% endunless %}
|
|
51
|
+
{%- endfor -%}
|
|
52
|
+
{%- endif %}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{%- comment -%}Sets mt_pwa_offline_assets: the theme files the offline page (layout pages/offline) links, for the worker to precache
|
|
2
|
+
(pwa/precache.html): core, the pages bundle, the hero sheet its actions row needs, the PWA modules and the theme toggle's
|
|
3
|
+
scripts. Needs config.html. test/theme/pwa/offline_test.rb compares it with built offline pages.{%- endcomment -%}
|
|
4
|
+
{%- assign _pwo = "/assets/css/modootoday.css /assets/css/modootoday/marketing/hero.css /assets/css/modootoday-pages.css" -%}
|
|
5
|
+
{%- if mt_components contains "theme-toggle" and mt_theme_toggle -%}
|
|
6
|
+
{%- if site.modootoday.csp == "strict" -%}{%- assign _pwo = _pwo | append: " /assets/js/modootoday/chrome/theme-init.js" -%}{%- endif -%}
|
|
7
|
+
{%- assign _pwo = _pwo | append: " /assets/js/modootoday/chrome/theme-toggle.js" -%}
|
|
8
|
+
{%- endif -%}
|
|
9
|
+
{%- assign _pwo = _pwo | append: " /assets/js/modootoday/pwa/register.js /assets/js/modootoday/pwa/offline.js" -%}
|
|
10
|
+
{%- assign mt_pwa_offline_assets = _pwo | split: " " -%}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{%- comment -%}Sets mt_pwa_precache (site URLs with the baseurl) and mt_pwa_offline (JSON: language prefix to its offline page): the
|
|
2
|
+
offline pages, the files they link (pwa/offline-assets.html), the notice's sheet and module (it shows offline too), start_url,
|
|
3
|
+
modootoday.pwa.precache and the pages with front matter pwa: precache. Needs config.html. Only pwa/sw.js reads it.{%- endcomment -%}
|
|
4
|
+
{%- include modootoday/pwa/offline-assets.html -%}
|
|
5
|
+
{%- assign _pcs = "/" | relative_url -%}{%- assign _pco = "/offline/" | relative_url -%}
|
|
6
|
+
{%- assign _pck = _pcs | jsonify -%}{%- assign _pcv = _pco | jsonify -%}
|
|
7
|
+
{%- assign _pcj = _pck | append: ":" | append: _pcv -%}{%- assign _pcl = _pco -%}
|
|
8
|
+
{%- for _l in site.modootoday.full_languages -%}
|
|
9
|
+
{%- assign _pclp = "/" | append: _l | append: "/" -%}{%- assign _pclo = _pclp | append: "offline/" | relative_url -%}
|
|
10
|
+
{%- assign _pck = _pclp | relative_url | jsonify -%}{%- assign _pcv = _pclo | jsonify -%}
|
|
11
|
+
{%- assign _pcj = _pcj | append: "," | append: _pck | append: ":" | append: _pcv -%}{%- assign _pcl = _pcl | append: " " | append: _pclo -%}
|
|
12
|
+
{%- endfor -%}
|
|
13
|
+
{%- assign mt_pwa_offline = "{" | append: _pcj | append: "}" -%}
|
|
14
|
+
{%- for _pca in mt_pwa_offline_assets -%}{%- include modootoday/assets/url.html path=_pca -%}{%- assign _pcl = _pcl | append: " " | append: mt_asset_url -%}{%- endfor -%}
|
|
15
|
+
{%- include modootoday/assets/url.html path="/assets/css/modootoday/chrome/toast.css" -%}{%- assign _pcl = _pcl | append: " " | append: mt_asset_url -%}
|
|
16
|
+
{%- include modootoday/assets/url.html path="/assets/js/modootoday/pwa/update-toast.js" version=false -%}{%- assign _pcl = _pcl | append: " " | append: mt_asset_url -%}
|
|
17
|
+
{%- assign _pcu = site.modootoday.pwa.start_url | default: "/" | relative_url -%}{%- assign _pcl = _pcl | append: " " | append: _pcu -%}
|
|
18
|
+
{%- for _pcp in site.modootoday.pwa.precache -%}{%- assign _pcu = _pcp | relative_url -%}{%- assign _pcl = _pcl | append: " " | append: _pcu -%}{%- endfor -%}
|
|
19
|
+
{%- assign _pcf = site.pages | where: "pwa", "precache" -%}{%- assign _pcd = site.documents | where: "pwa", "precache" -%}{%- assign _pcf = _pcf | concat: _pcd -%}
|
|
20
|
+
{%- for _pcp in _pcf -%}{%- assign _pcu = _pcp.url | relative_url -%}{%- assign _pcl = _pcl | append: " " | append: _pcu -%}{%- endfor -%}
|
|
21
|
+
{%- assign mt_pwa_precache = _pcl | split: " " | uniq -%}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{%- comment -%}The service worker, rendered by the site's sw.js stub (modootoday-stubs --pwa). With modootoday.pwa.enabled: true it
|
|
2
|
+
holds constants and imports the strategies (assets/js/modootoday/pwa/worker.js); otherwise it deletes this scope's caches
|
|
3
|
+
and unregisters itself, inline, so a broken worker.js can never block the rollback.{%- endcomment -%}
|
|
4
|
+
{%- include modootoday/config.html -%}
|
|
5
|
+
{%- assign _sws = "/" | relative_url -%}
|
|
6
|
+
{%- if site.modootoday.pwa.enabled == true -%}
|
|
7
|
+
{%- include modootoday/assets/build.html -%}{%- include modootoday/pwa/precache.html -%}
|
|
8
|
+
{%- comment -%}assets follows the ?v= contract: the theme version unless asset_version is build or false.{%- endcomment -%}
|
|
9
|
+
{%- assign _swa = mt_asset_v -%}{%- if _swa != mt_version -%}{%- assign _swa = mt_build_v -%}{%- endif -%}
|
|
10
|
+
{%- include modootoday/assets/url.html path="/assets/js/modootoday/pwa/worker.js" -%}
|
|
11
|
+
self.MT_PWA = {"scope": {{ _sws | jsonify }}, "build": {{ mt_build_v | jsonify }}, "assets": {{ _swa | jsonify }}, "precache": {{ mt_pwa_precache | jsonify }}, "offline": {{ mt_pwa_offline }}};
|
|
12
|
+
importScripts({{ mt_asset_url | jsonify }});
|
|
13
|
+
{% else -%}
|
|
14
|
+
// modootoday.pwa is off: remove this scope's caches and the worker itself, then reload open pages without it.
|
|
15
|
+
self.addEventListener("install", function () {
|
|
16
|
+
self.skipWaiting();
|
|
17
|
+
});
|
|
18
|
+
self.addEventListener("activate", function (event) {
|
|
19
|
+
var prefix = {{ "mt:" | append: _sws | append: ":" | jsonify }};
|
|
20
|
+
event.waitUntil(caches.keys().then(function (names) {
|
|
21
|
+
return Promise.all(names.filter(function (name) {
|
|
22
|
+
return name.indexOf(prefix) === 0;
|
|
23
|
+
}).map(function (name) {
|
|
24
|
+
return caches.delete(name);
|
|
25
|
+
}));
|
|
26
|
+
}).then(function () {
|
|
27
|
+
return self.registration.unregister();
|
|
28
|
+
}).then(function () {
|
|
29
|
+
return self.clients.matchAll({ type: "window" });
|
|
30
|
+
}).then(function (clients) {
|
|
31
|
+
clients.forEach(function (client) {
|
|
32
|
+
client.navigate(client.url).catch(function () {});
|
|
33
|
+
});
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
{% endif -%}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{%- comment -%}Sets mt_dir for include.lang: the direction its catalog gives (mt_t_direction, so include modootoday/i18n.html for
|
|
2
|
+
that language first), else rtl for a right-to-left base subtag, else nil. Read by the layouts' dir attribute and the manifest.{%- endcomment -%}
|
|
3
|
+
{%- assign _drtl = "ar fa he ur yi ps sd ug dv ckb" | split: " " -%}{%- assign _db = include.lang | split: "-" | first -%}
|
|
4
|
+
{%- if _drtl contains _db -%}{%- assign mt_dir = "rtl" -%}{%- else -%}{%- assign mt_dir = nil -%}{%- endif -%}
|
|
5
|
+
{%- assign mt_dir = mt_t_direction | default: mt_dir -%}
|
|
@@ -3,7 +3,8 @@ Stylesheet links (needs modootoday/config.html first). Sets mt_page_c ("|tabs|fa
|
|
|
3
3
|
split (default): the core sheet and its component sheets, then the context sheets of assets/sheets.html (front matter mt_sheets, body probes),
|
|
4
4
|
and one sheet per section component the page's sections: use. Page front matter css: [c, ...] adds more.
|
|
5
5
|
modootoday.css: bundle — only the core sheet, which then holds everything.
|
|
6
|
-
Both modes: preload hints first (assets/preload.html), the site's own sheets
|
|
6
|
+
Both modes: preload hints first (assets/preload.html), the site's own sheets (assets/site-sheets.html, site_css), the print sheet
|
|
7
|
+
last with modootoday.print: true (media="print"), then the
|
|
7
8
|
site's module scripts the page names with script: (assets/site-scripts.html, modootoday.scripts).
|
|
8
9
|
{%- endcomment -%}
|
|
9
10
|
{%- assign mt_page_c = "|" -%}
|
|
@@ -41,4 +42,7 @@ Both modes: preload hints first (assets/preload.html), the site's own sheets las
|
|
|
41
42
|
{%- endif -%}{%- endfor -%}
|
|
42
43
|
{%- endunless -%}
|
|
43
44
|
{%- include modootoday/assets/site-sheets.html -%}
|
|
45
|
+
{%- if site.modootoday.print == true -%}{%- include modootoday/assets/url.html path="/assets/css/modootoday/chrome/print.css" %}
|
|
46
|
+
<link rel="stylesheet" href="{{ mt_asset_url }}" media="print">
|
|
47
|
+
{%- endif -%}
|
|
44
48
|
{%- include modootoday/assets/site-scripts.html -%}
|
data/_includes/modootoday/t.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{%- comment -%}Theme string by key: {% include modootoday/t.html key="nav.label" %} (optional n= / name= fill %{n} / %{name}).
|
|
2
2
|
Resolution: site _data/i18n/<lang>.yml, then the theme catalog for the language, then English. Generated by script/i18n-build.{%- endcomment -%}
|
|
3
3
|
{%- include modootoday/i18n.html -%}
|
|
4
|
-
{%- case include.key -%}{%- when "direction" -%}{%- assign _tv = mt_t_direction -%}{%- when "skip" -%}{%- assign _tv = mt_t_skip -%}{%- when "new_window.hint" -%}{%- assign _tv = mt_t_new_window_hint -%}{%- when "new_window.open" -%}{%- assign _tv = mt_t_new_window_open -%}{%- when "callout.note" -%}{%- assign _tv = mt_t_callout_note -%}{%- when "callout.tip" -%}{%- assign _tv = mt_t_callout_tip -%}{%- when "callout.important" -%}{%- assign _tv = mt_t_callout_important -%}{%- when "callout.warning" -%}{%- assign _tv = mt_t_callout_warning -%}{%- when "callout.caution" -%}{%- assign _tv = mt_t_callout_caution -%}{%- when "status.available" -%}{%- assign _tv = mt_t_status_available -%}{%- when "status.partial" -%}{%- assign _tv = mt_t_status_partial -%}{%- when "status.planned" -%}{%- assign _tv = mt_t_status_planned -%}{%- when "task.done" -%}{%- assign _tv = mt_t_task_done -%}{%- when "task.open" -%}{%- assign _tv = mt_t_task_open -%}{%- when "tabs.label" -%}{%- assign _tv = mt_t_tabs_label -%}{%- when "toc.label" -%}{%- assign _tv = mt_t_toc_label -%}{%- when "theme.toggle" -%}{%- assign _tv = mt_t_theme_toggle -%}{%- when "sidebar.label" -%}{%- assign _tv = mt_t_sidebar_label -%}{%- when "page_actions.label" -%}{%- assign _tv = mt_t_page_actions_label -%}{%- when "page_actions.copy" -%}{%- assign _tv = mt_t_page_actions_copy -%}{%- when "page_actions.copy_ai" -%}{%- assign _tv = mt_t_page_actions_copy_ai -%}{%- when "page_actions.view" -%}{%- assign _tv = mt_t_page_actions_view -%}{%- when "page_actions.source" -%}{%- assign _tv = mt_t_page_actions_source -%}{%- when "breadcrumb.label" -%}{%- assign _tv = mt_t_breadcrumb_label -%}{%- when "nav.label" -%}{%- assign _tv = mt_t_nav_label -%}{%- when "nav.back_to_top" -%}{%- assign _tv = mt_t_nav_back_to_top -%}{%- when "nav.menu" -%}{%- assign _tv = mt_t_nav_menu -%}{%- when "pagination.label" -%}{%- assign _tv = mt_t_pagination_label -%}{%- when "pagination.prev" -%}{%- assign _tv = mt_t_pagination_prev -%}{%- when "pagination.next" -%}{%- assign _tv = mt_t_pagination_next -%}{%- when "code.copy" -%}{%- assign _tv = mt_t_code_copy -%}{%- when "code.copied" -%}{%- assign _tv = mt_t_code_copied -%}{%- when "code.label" -%}{%- assign _tv = mt_t_code_label -%}{%- when "code.file" -%}{%- assign _tv = mt_t_code_file -%}{%- when "table.label" -%}{%- assign _tv = mt_t_table_label -%}{%- when "diagram.label" -%}{%- assign _tv = mt_t_diagram_label -%}{%- when "diagram.source" -%}{%- assign _tv = mt_t_diagram_source -%}{%- when "math.label" -%}{%- assign _tv = mt_t_math_label -%}{%- when "search.label" -%}{%- assign _tv = mt_t_search_label -%}{%- when "filter.label" -%}{%- assign _tv = mt_t_filter_label -%}{%- when "filter.count" -%}{%- assign _tv = mt_t_filter_count -%}{%- when "page.edit" -%}{%- assign _tv = mt_t_page_edit -%}{%- when "page.updated" -%}{%- assign _tv = mt_t_page_updated -%}{%- when "languages.label" -%}{%- assign _tv = mt_t_languages_label -%}{%- when "post.date_format" -%}{%- assign _tv = mt_t_post_date_format -%}{%- when "post.author" -%}{%- assign _tv = mt_t_post_author -%}{%- when "post.related" -%}{%- assign _tv = mt_t_post_related -%}{%- when "post.share" -%}{%- assign _tv = mt_t_post_share -%}{%- when "fallback.notice" -%}{%- assign _tv = mt_t_fallback_notice -%}{%- when "archive.years" -%}{%- assign _tv = mt_t_archive_years -%}{%- when "archive.tags" -%}{%- assign _tv = mt_t_archive_tags -%}{%- when "archive.categories" -%}{%- assign _tv = mt_t_archive_categories -%}{%- when "archive.posts" -%}{%- assign _tv = mt_t_archive_posts -%}{%- when "archive.empty" -%}{%- assign _tv = mt_t_archive_empty -%}{%- when "blog.featured" -%}{%- assign _tv = mt_t_blog_featured -%}{%- when "blog.read_more" -%}{%- assign _tv = mt_t_blog_read_more -%}{%- when "blog.reading_time" -%}{%- assign _tv = mt_t_blog_reading_time -%}{%- when "blog.by" -%}{%- assign _tv = mt_t_blog_by -%}{%- when "blog.updated" -%}{%- assign _tv = mt_t_blog_updated -%}{%- when "blog.newer" -%}{%- assign _tv = mt_t_blog_newer -%}{%- when "blog.older" -%}{%- assign _tv = mt_t_blog_older -%}{%- when "blog.related" -%}{%- assign _tv = mt_t_blog_related -%}{%- when "blog.series" -%}{%- assign _tv = mt_t_blog_series -%}{%- when "blog.series_part" -%}{%- assign _tv = mt_t_blog_series_part -%}{%- when "blog.share" -%}{%- assign _tv = mt_t_blog_share -%}{%- when "blog.copied" -%}{%- assign _tv = mt_t_blog_copied -%}{%- when "blog.feed" -%}{%- assign _tv = mt_t_blog_feed -%}{%- when "blog.latest" -%}{%- assign _tv = mt_t_blog_latest -%}{%- when "blog.breaking" -%}{%- assign _tv = mt_t_blog_breaking -%}{%- when "blog.live" -%}{%- assign _tv = mt_t_blog_live -%}{%- when "blog.correction" -%}{%- assign _tv = mt_t_blog_correction -%}{%- when "blog.sources" -%}{%- assign _tv = mt_t_blog_sources -%}{%- when "blog.more" -%}{%- assign _tv = mt_t_blog_more -%}{%- when "blog.authors" -%}{%- assign _tv = mt_t_blog_authors -%}{%- when "filetree.label" -%}{%- assign _tv = mt_t_filetree_label -%}{%- when "gallery.close" -%}{%- assign _tv = mt_t_gallery_close -%}{%- when "embed.title" -%}{%- assign _tv = mt_t_embed_title -%}{%- when "pricing.recommended" -%}{%- assign _tv = mt_t_pricing_recommended -%}{%- when "banner.label" -%}{%- assign _tv = mt_t_banner_label -%}{%- when "footnote.back" -%}{%- assign _tv = mt_t_footnote_back -%}{%- when "progress.label" -%}{%- assign _tv = mt_t_progress_label -%}{%- when "subscribe.email" -%}{%- assign _tv = mt_t_subscribe_email -%}{%- when "subscribe.submit" -%}{%- assign _tv = mt_t_subscribe_submit -%}{%- when "params.required" -%}{%- assign _tv = mt_t_params_required -%}{%- when "chart.data" -%}{%- assign _tv = mt_t_chart_data -%}{%- when "widget.fallback" -%}{%- assign _tv = mt_t_widget_fallback -%}{%- when "region.named" -%}{%- assign _tv = mt_t_region_named -%}{%- when "region.nth" -%}{%- assign _tv = mt_t_region_nth -%}{%- when "loading.label" -%}{%- assign _tv = mt_t_loading_label -%}{%- when "pages.not_found" -%}{%- assign _tv = mt_t_pages_not_found -%}{%- when "pages.not_found_text" -%}{%- assign _tv = mt_t_pages_not_found_text -%}{%- when "pages.gone" -%}{%- assign _tv = mt_t_pages_gone -%}{%- when "pages.gone_text" -%}{%- assign _tv = mt_t_pages_gone_text -%}{%- when "pages.error" -%}{%- assign _tv = mt_t_pages_error -%}{%- when "pages.error_text" -%}{%- assign _tv = mt_t_pages_error_text -%}{%- when "pages.home" -%}{%- assign _tv = mt_t_pages_home -%}{%- when "pages.moved" -%}{%- assign _tv = mt_t_pages_moved -%}{%- when "pages.moved_link" -%}{%- assign _tv = mt_t_pages_moved_link -%}{%- when "pages.search_hint" -%}{%- assign _tv = mt_t_pages_search_hint -%}{%- when "layouts.all" -%}{%- assign _tv = mt_t_layouts_all -%}{%- when "layouts.filter" -%}{%- assign _tv = mt_t_layouts_filter -%}{%- when "layouts.role" -%}{%- assign _tv = mt_t_layouts_role -%}{%- when "layouts.client" -%}{%- assign _tv = mt_t_layouts_client -%}{%- when "layouts.year" -%}{%- assign _tv = mt_t_layouts_year -%}{%- when "layouts.stack" -%}{%- assign _tv = mt_t_layouts_stack -%}{%- when "layouts.links" -%}{%- assign _tv = mt_t_layouts_links -%}{%- when "layouts.location" -%}{%- assign _tv = mt_t_layouts_location -%}{%- when "layouts.employment" -%}{%- assign _tv = mt_t_layouts_employment -%}{%- when "layouts.salary" -%}{%- assign _tv = mt_t_layouts_salary -%}{%- when "layouts.posted" -%}{%- assign _tv = mt_t_layouts_posted -%}{%- when "layouts.deadline" -%}{%- assign _tv = mt_t_layouts_deadline -%}{%- when "layouts.apply" -%}{%- assign _tv = mt_t_layouts_apply -%}{%- when "layouts.starts" -%}{%- assign _tv = mt_t_layouts_starts -%}{%- when "layouts.ends" -%}{%- assign _tv = mt_t_layouts_ends -%}{%- when "layouts.venue" -%}{%- assign _tv = mt_t_layouts_venue -%}{%- when "layouts.online" -%}{%- assign _tv = mt_t_layouts_online -%}{%- when "layouts.agenda" -%}{%- assign _tv = mt_t_layouts_agenda -%}{%- when "layouts.tickets" -%}{%- assign _tv = mt_t_layouts_tickets -%}{%- when "layouts.calendar" -%}{%- assign _tv = mt_t_layouts_calendar -%}{%- when "layouts.episode" -%}{%- assign _tv = mt_t_layouts_episode -%}{%- when "layouts.season" -%}{%- assign _tv = mt_t_layouts_season -%}{%- when "layouts.duration" -%}{%- assign _tv = mt_t_layouts_duration -%}{%- when "layouts.listen" -%}{%- assign _tv = mt_t_layouts_listen -%}{%- when "layouts.transcript" -%}{%- assign _tv = mt_t_layouts_transcript -%}{%- when "layouts.monthly" -%}{%- assign _tv = mt_t_layouts_monthly -%}{%- when "layouts.yearly" -%}{%- assign _tv = mt_t_layouts_yearly -%}{%- when "layouts.billing" -%}{%- assign _tv = mt_t_layouts_billing -%}{%- when "layouts.popular" -%}{%- assign _tv = mt_t_layouts_popular -%}{%- when "layouts.download" -%}{%- assign _tv = mt_t_layouts_download -%}{%- when "layouts.version" -%}{%- assign _tv = mt_t_layouts_version -%}{%- when "layouts.colors" -%}{%- assign _tv = mt_t_layouts_colors -%}{%- when "layouts.assets" -%}{%- assign _tv = mt_t_layouts_assets -%}{%- when "layouts.send" -%}{%- assign _tv = mt_t_layouts_send -%}{%- when "layouts.name" -%}{%- assign _tv = mt_t_layouts_name -%}{%- when "layouts.email" -%}{%- assign _tv = mt_t_layouts_email -%}{%- when "layouts.message" -%}{%- assign _tv = mt_t_layouts_message -%}{%- when "layouts.contact" -%}{%- assign _tv = mt_t_layouts_contact -%}{%- when "layouts.added" -%}{%- assign _tv = mt_t_layouts_added -%}{%- when "layouts.changed" -%}{%- assign _tv = mt_t_layouts_changed -%}{%- when "layouts.fixed" -%}{%- assign _tv = mt_t_layouts_fixed -%}{%- when "layouts.removed" -%}{%- assign _tv = mt_t_layouts_removed -%}{%- when "layouts.security" -%}{%- assign _tv = mt_t_layouts_security -%}{%- when "layouts.now" -%}{%- assign _tv = mt_t_layouts_now -%}{%- when "layouts.next" -%}{%- assign _tv = mt_t_layouts_next -%}{%- when "layouts.later" -%}{%- assign _tv = mt_t_layouts_later -%}{%- when "layouts.letters" -%}{%- assign _tv = mt_t_layouts_letters -%}{%- when "layouts.lessons" -%}{%- assign _tv = mt_t_layouts_lessons -%}{%- when "layouts.minutes" -%}{%- assign _tv = mt_t_layouts_minutes -%}{%- when "layouts.module" -%}{%- assign _tv = mt_t_layouts_module -%}{%- when "layouts.chapter" -%}{%- assign _tv = mt_t_layouts_chapter -%}{%- when "layouts.effective" -%}{%- assign _tv = mt_t_layouts_effective -%}{%- when "layouts.experience" -%}{%- assign _tv = mt_t_layouts_experience -%}{%- when "layouts.education" -%}{%- assign _tv = mt_t_layouts_education -%}{%- when "layouts.skills" -%}{%- assign _tv = mt_t_layouts_skills -%}{%- when "layouts.present" -%}{%- assign _tv = mt_t_layouts_present -%}{%- when "layouts.loading" -%}{%- assign _tv = mt_t_layouts_loading -%}{%- when "layouts.contents" -%}{%- assign _tv = mt_t_layouts_contents -%}{%- when "showcase.region" -%}{%- assign _tv = mt_t_showcase_region -%}{%- when "showcase.theme" -%}{%- assign _tv = mt_t_showcase_theme -%}{%- when "showcase.demo" -%}{%- assign _tv = mt_t_showcase_demo -%}{%- when "showcase.docs" -%}{%- assign _tv = mt_t_showcase_docs -%}{%- when "showcase.docs_short" -%}{%- assign _tv = mt_t_showcase_docs_short -%}{%- when "showcase.use" -%}{%- assign _tv = mt_t_showcase_use -%}{%- when "showcase.dismiss" -%}{%- assign _tv = mt_t_showcase_dismiss -%}{%- when "showcase.starters.docs" -%}{%- assign _tv = mt_t_showcase_starters_docs -%}{%- when "showcase.starters.blog" -%}{%- assign _tv = mt_t_showcase_starters_blog -%}{%- when "showcase.starters.landing" -%}{%- assign _tv = mt_t_showcase_starters_landing -%}{%- when "language" -%}{%- capture _tv -%}{%- include modootoday/i18n/name.html code=mt_t_lang -%}{%- endcapture -%}{%- assign _tv = site.data.i18n[mt_t_lang].language | default: _tv -%}{%- else -%}{%- assign _tv = include.key -%}{%- endcase -%}
|
|
4
|
+
{%- case include.key -%}{%- when "direction" -%}{%- assign _tv = mt_t_direction -%}{%- when "skip" -%}{%- assign _tv = mt_t_skip -%}{%- when "new_window.hint" -%}{%- assign _tv = mt_t_new_window_hint -%}{%- when "new_window.open" -%}{%- assign _tv = mt_t_new_window_open -%}{%- when "callout.note" -%}{%- assign _tv = mt_t_callout_note -%}{%- when "callout.tip" -%}{%- assign _tv = mt_t_callout_tip -%}{%- when "callout.important" -%}{%- assign _tv = mt_t_callout_important -%}{%- when "callout.warning" -%}{%- assign _tv = mt_t_callout_warning -%}{%- when "callout.caution" -%}{%- assign _tv = mt_t_callout_caution -%}{%- when "status.available" -%}{%- assign _tv = mt_t_status_available -%}{%- when "status.partial" -%}{%- assign _tv = mt_t_status_partial -%}{%- when "status.planned" -%}{%- assign _tv = mt_t_status_planned -%}{%- when "task.done" -%}{%- assign _tv = mt_t_task_done -%}{%- when "task.open" -%}{%- assign _tv = mt_t_task_open -%}{%- when "tabs.label" -%}{%- assign _tv = mt_t_tabs_label -%}{%- when "toc.label" -%}{%- assign _tv = mt_t_toc_label -%}{%- when "anchor.label" -%}{%- assign _tv = mt_t_anchor_label -%}{%- when "theme.toggle" -%}{%- assign _tv = mt_t_theme_toggle -%}{%- when "sidebar.label" -%}{%- assign _tv = mt_t_sidebar_label -%}{%- when "page_actions.label" -%}{%- assign _tv = mt_t_page_actions_label -%}{%- when "page_actions.copy" -%}{%- assign _tv = mt_t_page_actions_copy -%}{%- when "page_actions.copy_ai" -%}{%- assign _tv = mt_t_page_actions_copy_ai -%}{%- when "page_actions.view" -%}{%- assign _tv = mt_t_page_actions_view -%}{%- when "page_actions.source" -%}{%- assign _tv = mt_t_page_actions_source -%}{%- when "breadcrumb.label" -%}{%- assign _tv = mt_t_breadcrumb_label -%}{%- when "nav.label" -%}{%- assign _tv = mt_t_nav_label -%}{%- when "nav.back_to_top" -%}{%- assign _tv = mt_t_nav_back_to_top -%}{%- when "nav.menu" -%}{%- assign _tv = mt_t_nav_menu -%}{%- when "pagination.label" -%}{%- assign _tv = mt_t_pagination_label -%}{%- when "pagination.prev" -%}{%- assign _tv = mt_t_pagination_prev -%}{%- when "pagination.next" -%}{%- assign _tv = mt_t_pagination_next -%}{%- when "code.copy" -%}{%- assign _tv = mt_t_code_copy -%}{%- when "code.copied" -%}{%- assign _tv = mt_t_code_copied -%}{%- when "code.label" -%}{%- assign _tv = mt_t_code_label -%}{%- when "code.file" -%}{%- assign _tv = mt_t_code_file -%}{%- when "table.label" -%}{%- assign _tv = mt_t_table_label -%}{%- when "diagram.label" -%}{%- assign _tv = mt_t_diagram_label -%}{%- when "diagram.source" -%}{%- assign _tv = mt_t_diagram_source -%}{%- when "math.label" -%}{%- assign _tv = mt_t_math_label -%}{%- when "search.label" -%}{%- assign _tv = mt_t_search_label -%}{%- when "filter.label" -%}{%- assign _tv = mt_t_filter_label -%}{%- when "filter.count" -%}{%- assign _tv = mt_t_filter_count -%}{%- when "page.edit" -%}{%- assign _tv = mt_t_page_edit -%}{%- when "page.updated" -%}{%- assign _tv = mt_t_page_updated -%}{%- when "page.built" -%}{%- assign _tv = mt_t_page_built -%}{%- when "page.issue" -%}{%- assign _tv = mt_t_page_issue -%}{%- when "page.helpful" -%}{%- assign _tv = mt_t_page_helpful -%}{%- when "page.helpful_yes" -%}{%- assign _tv = mt_t_page_helpful_yes -%}{%- when "page.helpful_no" -%}{%- assign _tv = mt_t_page_helpful_no -%}{%- when "page.discuss" -%}{%- assign _tv = mt_t_page_discuss -%}{%- when "languages.label" -%}{%- assign _tv = mt_t_languages_label -%}{%- when "post.date_format" -%}{%- assign _tv = mt_t_post_date_format -%}{%- when "post.author" -%}{%- assign _tv = mt_t_post_author -%}{%- when "post.related" -%}{%- assign _tv = mt_t_post_related -%}{%- when "post.share" -%}{%- assign _tv = mt_t_post_share -%}{%- when "fallback.notice" -%}{%- assign _tv = mt_t_fallback_notice -%}{%- when "archive.years" -%}{%- assign _tv = mt_t_archive_years -%}{%- when "archive.tags" -%}{%- assign _tv = mt_t_archive_tags -%}{%- when "archive.categories" -%}{%- assign _tv = mt_t_archive_categories -%}{%- when "archive.posts" -%}{%- assign _tv = mt_t_archive_posts -%}{%- when "archive.empty" -%}{%- assign _tv = mt_t_archive_empty -%}{%- when "blog.featured" -%}{%- assign _tv = mt_t_blog_featured -%}{%- when "blog.read_more" -%}{%- assign _tv = mt_t_blog_read_more -%}{%- when "blog.reading_time" -%}{%- assign _tv = mt_t_blog_reading_time -%}{%- when "blog.by" -%}{%- assign _tv = mt_t_blog_by -%}{%- when "blog.updated" -%}{%- assign _tv = mt_t_blog_updated -%}{%- when "blog.newer" -%}{%- assign _tv = mt_t_blog_newer -%}{%- when "blog.older" -%}{%- assign _tv = mt_t_blog_older -%}{%- when "blog.related" -%}{%- assign _tv = mt_t_blog_related -%}{%- when "blog.series" -%}{%- assign _tv = mt_t_blog_series -%}{%- when "blog.series_part" -%}{%- assign _tv = mt_t_blog_series_part -%}{%- when "blog.share" -%}{%- assign _tv = mt_t_blog_share -%}{%- when "blog.copied" -%}{%- assign _tv = mt_t_blog_copied -%}{%- when "blog.feed" -%}{%- assign _tv = mt_t_blog_feed -%}{%- when "blog.subscribe" -%}{%- assign _tv = mt_t_blog_subscribe -%}{%- when "blog.latest" -%}{%- assign _tv = mt_t_blog_latest -%}{%- when "blog.breaking" -%}{%- assign _tv = mt_t_blog_breaking -%}{%- when "blog.live" -%}{%- assign _tv = mt_t_blog_live -%}{%- when "blog.correction" -%}{%- assign _tv = mt_t_blog_correction -%}{%- when "blog.sources" -%}{%- assign _tv = mt_t_blog_sources -%}{%- when "blog.more" -%}{%- assign _tv = mt_t_blog_more -%}{%- when "blog.authors" -%}{%- assign _tv = mt_t_blog_authors -%}{%- when "filetree.label" -%}{%- assign _tv = mt_t_filetree_label -%}{%- when "gallery.close" -%}{%- assign _tv = mt_t_gallery_close -%}{%- when "embed.title" -%}{%- assign _tv = mt_t_embed_title -%}{%- when "pricing.recommended" -%}{%- assign _tv = mt_t_pricing_recommended -%}{%- when "banner.label" -%}{%- assign _tv = mt_t_banner_label -%}{%- when "banner.release" -%}{%- assign _tv = mt_t_banner_release -%}{%- when "banner.release_link" -%}{%- assign _tv = mt_t_banner_release_link -%}{%- when "footnote.back" -%}{%- assign _tv = mt_t_footnote_back -%}{%- when "progress.label" -%}{%- assign _tv = mt_t_progress_label -%}{%- when "subscribe.email" -%}{%- assign _tv = mt_t_subscribe_email -%}{%- when "subscribe.submit" -%}{%- assign _tv = mt_t_subscribe_submit -%}{%- when "params.required" -%}{%- assign _tv = mt_t_params_required -%}{%- when "chart.data" -%}{%- assign _tv = mt_t_chart_data -%}{%- when "widget.fallback" -%}{%- assign _tv = mt_t_widget_fallback -%}{%- when "region.named" -%}{%- assign _tv = mt_t_region_named -%}{%- when "region.nth" -%}{%- assign _tv = mt_t_region_nth -%}{%- when "loading.label" -%}{%- assign _tv = mt_t_loading_label -%}{%- when "pages.not_found" -%}{%- assign _tv = mt_t_pages_not_found -%}{%- when "pages.not_found_text" -%}{%- assign _tv = mt_t_pages_not_found_text -%}{%- when "pages.gone" -%}{%- assign _tv = mt_t_pages_gone -%}{%- when "pages.gone_text" -%}{%- assign _tv = mt_t_pages_gone_text -%}{%- when "pages.error" -%}{%- assign _tv = mt_t_pages_error -%}{%- when "pages.error_text" -%}{%- assign _tv = mt_t_pages_error_text -%}{%- when "pages.home" -%}{%- assign _tv = mt_t_pages_home -%}{%- when "pages.moved" -%}{%- assign _tv = mt_t_pages_moved -%}{%- when "pages.moved_link" -%}{%- assign _tv = mt_t_pages_moved_link -%}{%- when "pages.search_hint" -%}{%- assign _tv = mt_t_pages_search_hint -%}{%- when "layouts.all" -%}{%- assign _tv = mt_t_layouts_all -%}{%- when "layouts.filter" -%}{%- assign _tv = mt_t_layouts_filter -%}{%- when "layouts.role" -%}{%- assign _tv = mt_t_layouts_role -%}{%- when "layouts.client" -%}{%- assign _tv = mt_t_layouts_client -%}{%- when "layouts.year" -%}{%- assign _tv = mt_t_layouts_year -%}{%- when "layouts.stack" -%}{%- assign _tv = mt_t_layouts_stack -%}{%- when "layouts.links" -%}{%- assign _tv = mt_t_layouts_links -%}{%- when "layouts.location" -%}{%- assign _tv = mt_t_layouts_location -%}{%- when "layouts.employment" -%}{%- assign _tv = mt_t_layouts_employment -%}{%- when "layouts.salary" -%}{%- assign _tv = mt_t_layouts_salary -%}{%- when "layouts.posted" -%}{%- assign _tv = mt_t_layouts_posted -%}{%- when "layouts.deadline" -%}{%- assign _tv = mt_t_layouts_deadline -%}{%- when "layouts.apply" -%}{%- assign _tv = mt_t_layouts_apply -%}{%- when "layouts.starts" -%}{%- assign _tv = mt_t_layouts_starts -%}{%- when "layouts.ends" -%}{%- assign _tv = mt_t_layouts_ends -%}{%- when "layouts.venue" -%}{%- assign _tv = mt_t_layouts_venue -%}{%- when "layouts.online" -%}{%- assign _tv = mt_t_layouts_online -%}{%- when "layouts.agenda" -%}{%- assign _tv = mt_t_layouts_agenda -%}{%- when "layouts.tickets" -%}{%- assign _tv = mt_t_layouts_tickets -%}{%- when "layouts.price" -%}{%- assign _tv = mt_t_layouts_price -%}{%- when "layouts.free" -%}{%- assign _tv = mt_t_layouts_free -%}{%- when "layouts.releases_feed" -%}{%- assign _tv = mt_t_layouts_releases_feed -%}{%- when "layouts.calendar" -%}{%- assign _tv = mt_t_layouts_calendar -%}{%- when "layouts.episode" -%}{%- assign _tv = mt_t_layouts_episode -%}{%- when "layouts.season" -%}{%- assign _tv = mt_t_layouts_season -%}{%- when "layouts.duration" -%}{%- assign _tv = mt_t_layouts_duration -%}{%- when "layouts.listen" -%}{%- assign _tv = mt_t_layouts_listen -%}{%- when "layouts.transcript" -%}{%- assign _tv = mt_t_layouts_transcript -%}{%- when "layouts.monthly" -%}{%- assign _tv = mt_t_layouts_monthly -%}{%- when "layouts.yearly" -%}{%- assign _tv = mt_t_layouts_yearly -%}{%- when "layouts.billing" -%}{%- assign _tv = mt_t_layouts_billing -%}{%- when "layouts.popular" -%}{%- assign _tv = mt_t_layouts_popular -%}{%- when "layouts.download" -%}{%- assign _tv = mt_t_layouts_download -%}{%- when "layouts.version" -%}{%- assign _tv = mt_t_layouts_version -%}{%- when "layouts.colors" -%}{%- assign _tv = mt_t_layouts_colors -%}{%- when "layouts.assets" -%}{%- assign _tv = mt_t_layouts_assets -%}{%- when "layouts.send" -%}{%- assign _tv = mt_t_layouts_send -%}{%- when "layouts.name" -%}{%- assign _tv = mt_t_layouts_name -%}{%- when "layouts.email" -%}{%- assign _tv = mt_t_layouts_email -%}{%- when "layouts.message" -%}{%- assign _tv = mt_t_layouts_message -%}{%- when "layouts.contact" -%}{%- assign _tv = mt_t_layouts_contact -%}{%- when "layouts.added" -%}{%- assign _tv = mt_t_layouts_added -%}{%- when "layouts.changed" -%}{%- assign _tv = mt_t_layouts_changed -%}{%- when "layouts.fixed" -%}{%- assign _tv = mt_t_layouts_fixed -%}{%- when "layouts.removed" -%}{%- assign _tv = mt_t_layouts_removed -%}{%- when "layouts.security" -%}{%- assign _tv = mt_t_layouts_security -%}{%- when "layouts.now" -%}{%- assign _tv = mt_t_layouts_now -%}{%- when "layouts.next" -%}{%- assign _tv = mt_t_layouts_next -%}{%- when "layouts.later" -%}{%- assign _tv = mt_t_layouts_later -%}{%- when "layouts.letters" -%}{%- assign _tv = mt_t_layouts_letters -%}{%- when "layouts.lessons" -%}{%- assign _tv = mt_t_layouts_lessons -%}{%- when "layouts.minutes" -%}{%- assign _tv = mt_t_layouts_minutes -%}{%- when "layouts.module" -%}{%- assign _tv = mt_t_layouts_module -%}{%- when "layouts.chapter" -%}{%- assign _tv = mt_t_layouts_chapter -%}{%- when "layouts.effective" -%}{%- assign _tv = mt_t_layouts_effective -%}{%- when "layouts.experience" -%}{%- assign _tv = mt_t_layouts_experience -%}{%- when "layouts.education" -%}{%- assign _tv = mt_t_layouts_education -%}{%- when "layouts.skills" -%}{%- assign _tv = mt_t_layouts_skills -%}{%- when "layouts.present" -%}{%- assign _tv = mt_t_layouts_present -%}{%- when "layouts.loading" -%}{%- assign _tv = mt_t_layouts_loading -%}{%- when "layouts.contents" -%}{%- assign _tv = mt_t_layouts_contents -%}{%- when "showcase.region" -%}{%- assign _tv = mt_t_showcase_region -%}{%- when "showcase.theme" -%}{%- assign _tv = mt_t_showcase_theme -%}{%- when "showcase.demo" -%}{%- assign _tv = mt_t_showcase_demo -%}{%- when "showcase.docs" -%}{%- assign _tv = mt_t_showcase_docs -%}{%- when "showcase.docs_short" -%}{%- assign _tv = mt_t_showcase_docs_short -%}{%- when "showcase.use" -%}{%- assign _tv = mt_t_showcase_use -%}{%- when "showcase.dismiss" -%}{%- assign _tv = mt_t_showcase_dismiss -%}{%- when "showcase.starters.docs" -%}{%- assign _tv = mt_t_showcase_starters_docs -%}{%- when "showcase.starters.blog" -%}{%- assign _tv = mt_t_showcase_starters_blog -%}{%- when "showcase.starters.landing" -%}{%- assign _tv = mt_t_showcase_starters_landing -%}{%- when "pwa.offline_title" -%}{%- assign _tv = mt_t_pwa_offline_title -%}{%- when "pwa.offline_text" -%}{%- assign _tv = mt_t_pwa_offline_text -%}{%- when "pwa.offline_pages" -%}{%- assign _tv = mt_t_pwa_offline_pages -%}{%- when "pwa.retry" -%}{%- assign _tv = mt_t_pwa_retry -%}{%- when "pwa.update" -%}{%- assign _tv = mt_t_pwa_update -%}{%- when "pwa.reload" -%}{%- assign _tv = mt_t_pwa_reload -%}{%- when "pwa.later" -%}{%- assign _tv = mt_t_pwa_later -%}{%- when "pwa.offline_notice" -%}{%- assign _tv = mt_t_pwa_offline_notice -%}{%- when "pwa.close" -%}{%- assign _tv = mt_t_pwa_close -%}{%- when "pwa.install" -%}{%- assign _tv = mt_t_pwa_install -%}{%- when "pwa.install_hint" -%}{%- assign _tv = mt_t_pwa_install_hint -%}{%- when "language" -%}{%- capture _tv -%}{%- include modootoday/i18n/name.html code=mt_t_lang -%}{%- endcapture -%}{%- assign _tv = site.data.i18n[mt_t_lang].language | default: _tv -%}{%- else -%}{%- assign _tv = include.key -%}{%- endcase -%}
|
|
5
5
|
{%- if include.n -%}{%- assign _tv = _tv | replace: "%{n}", include.n -%}{%- endif -%}
|
|
6
6
|
{%- if include.name -%}{%- assign _tv = _tv | replace: "%{name}", include.name -%}{%- endif -%}
|
|
7
7
|
{{- _tv -}}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Browser UI colour (iOS Safari, Android Chrome address bar) matching the page background tokens.
|
|
3
3
|
site.modootoday.theme_color false drops the tags; {light: "#hex", dark: "#hex"} or one "#hex" replaces the defaults
|
|
4
4
|
Defaults follow --mt-background: #ffffff light, #0a0a0a dark. With color_scheme light/dark only that colour is emitted.
|
|
5
|
+
Leaves _tcl and _tcd set (unset with theme_color: false); pwa/manifest.json reads them.
|
|
5
6
|
{%- endcomment -%}
|
|
6
7
|
{%- assign _tc = site.modootoday.theme_color -%}
|
|
7
8
|
{%- unless _tc == false -%}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
{%- comment -%}Generated by script/version-include from the gemspec; do not edit. Sets mt_version.{%- endcomment -%}
|
|
2
|
-
{%- assign mt_version = "1.
|
|
2
|
+
{%- assign mt_version = "1.7.0" -%}
|
data/_layouts/archive.html
CHANGED
|
@@ -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)
|
|
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 -%}
|
data/_layouts/default.html
CHANGED
|
@@ -8,10 +8,8 @@
|
|
|
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
|
-
{%-
|
|
12
|
-
{%- assign
|
|
13
|
-
{%- if _rtl contains _base %}{% assign _dir = "rtl" %}{% else %}{% assign _dir = nil %}{% endif -%}
|
|
14
|
-
{%- assign _dir = page.direction | default: mt_t_direction | default: _dir -%}
|
|
11
|
+
{%- include modootoday/site/dir.html lang=_lang -%}
|
|
12
|
+
{%- assign _dir = page.direction | default: mt_dir -%}
|
|
15
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">
|
|
@@ -27,6 +25,8 @@
|
|
|
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,15 +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
47
|
{%- if mt_showcase %}
|
|
46
48
|
{% include modootoday/chrome/showcase.html %}
|
|
47
49
|
{%- endif %}
|
|
48
|
-
{%-
|
|
49
|
-
<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>
|
|
50
|
-
{%- endif %}
|
|
50
|
+
{%- include modootoday/chrome/banner.html -%}
|
|
51
51
|
{%- assign _chrome = true -%}{%- if layout.mt_chrome == false or page.chrome == false -%}{%- assign _chrome = false -%}{%- endif -%}
|
|
52
52
|
{%- if site.title and _chrome %}
|
|
53
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
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.
|
|
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>
|
data/_layouts/redirect.html
CHANGED
|
@@ -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
|
-
{%-
|
|
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 -%}
|
|
@@ -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
|
+
}
|
|
@@ -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; }
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Static diagrams (figure.mt-diagram, markdown/figures/diagrams.html): a committed light and dark SVG pair, each kept as
|
|
2
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.
|
|
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).
|
|
4
5
|
@include mt-layer(components) {
|
|
5
6
|
.mt-diagram .mt-diagram-dark { display: none; }
|
|
6
7
|
@media (prefers-color-scheme: dark) {
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
}
|
|
10
11
|
:root[data-theme="dark"] .mt-diagram .mt-diagram-dark { display: block; }
|
|
11
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; } }
|
|
12
14
|
.mt-diagram-source { margin: -.75rem 0 1.5rem; }
|
|
13
15
|
.mt-diagram-source > summary { width: fit-content; color: mt(muted-foreground); font-size: mt-size(sm); line-height: mt-leading(sm); cursor: pointer; }
|
|
14
16
|
}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
// Page meta line
|
|
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
|
+
}
|
data/_sass/modootoday.scss
CHANGED
|
@@ -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
|
+
# 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";
|