jekyll-theme-centos 2.52.0.beta.104 → 2.52.0.beta.106
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/_config.yml +2 -2
- data/_data/base/accordion_schema.yml +6 -0
- data/_data/base/announcement_schema.yml +1 -1
- data/_data/base/artwork_schema.yml +17 -3
- data/_data/base/bits_schema.yml +9 -4
- data/_data/base/breadcrumb_schema.yml +14 -0
- data/_data/base/breakingnews_schema.yml +1 -1
- data/_data/base/calendar_schema.yml +17 -2
- data/_data/base/card_schema.yml +2 -2
- data/_data/base/copyright_schema.yml +7 -17
- data/_data/base/copyvalue_schema.yml +4 -1
- data/_data/base/datatable_schema.yml +3 -3
- data/_data/base/download_schema.yml +42 -16
- data/_data/base/event_schema.yml +1 -1
- data/_data/base/footer_schema.yml +7 -6
- data/_data/base/highlight_schema.yml +7 -5
- data/_data/base/image_schema.yml +1 -1
- data/_data/base/link_schema.yml +13 -19
- data/_data/base/navbar_schema.yml +6 -0
- data/_data/base/preview_schema.yml +8 -4
- data/_data/base/project_schema.yml +4 -2
- data/_data/base/script_schema.yml +4 -4
- data/_data/base/shortcut_schema.yml +2 -2
- data/_data/base/social_schema.yml +2 -2
- data/_data/base/sponsors.yml +3 -2
- data/_data/base/sponsors_schema.yml +20 -0
- data/_data/base/title_schema.yml +14 -0
- data/_data/base/toc_schema.yml +16 -2
- data/_includes/base/accordion-item.html.liquid +11 -32
- data/_includes/base/accordion.html.liquid +3 -29
- data/_includes/base/announcement.html.liquid +8 -35
- data/_includes/base/artwork.html.liquid +5 -38
- data/_includes/base/backtotop.html.liquid +3 -42
- data/_includes/base/bits.html.liquid +26 -74
- data/_includes/base/breadcrumb.html.liquid +15 -49
- data/_includes/base/breakingnews.html.liquid +6 -43
- data/_includes/base/calendar-events.html.liquid +3 -37
- data/_includes/base/calendar-init.html.liquid +7 -63
- data/_includes/base/calendar.html.liquid +3 -34
- data/_includes/base/card.html.liquid +4 -44
- data/_includes/base/color-table.html.liquid +18 -4
- data/_includes/base/configuration_variables-default-cell.html.liquid +6 -50
- data/_includes/base/configuration_variables-nested.html.liquid +6 -7
- data/_includes/base/configuration_variables.html.liquid +9 -11
- data/_includes/base/content.html.liquid +7 -4
- data/_includes/base/copyright.html.liquid +8 -39
- data/_includes/base/copyvalue.html.liquid +3 -70
- data/_includes/base/datatable.html.liquid +4 -40
- data/_includes/base/download.html.liquid +12 -66
- data/_includes/base/download_architecture.html.liquid +29 -117
- data/_includes/base/download_commands.html.liquid +2 -14
- data/_includes/base/download_documentation.html.liquid +13 -47
- data/_includes/base/download_eol.html.liquid +5 -15
- data/_includes/base/download_filevalue.html.liquid +9 -49
- data/_includes/base/download_screenshots.html.liquid +10 -65
- data/_includes/base/download_sections.html.liquid +2 -19
- data/_includes/base/event.html.liquid +8 -63
- data/_includes/base/fontawesome.html.liquid +4 -38
- data/_includes/base/footer.html.liquid +9 -2
- data/_includes/base/head.html.liquid +6 -47
- data/_includes/base/highlight.html.liquid +4 -37
- data/_includes/base/image.html.liquid +5 -22
- data/_includes/base/link.html.liquid +38 -57
- data/_includes/base/locales.html.liquid +6 -26
- data/_includes/base/navbar.html.liquid +16 -45
- data/_includes/base/navindex.html.liquid +40 -111
- data/_includes/base/ogp.html.liquid +17 -83
- data/_includes/base/preview.html.liquid +18 -57
- data/_includes/base/project.html.liquid +4 -29
- data/_includes/base/shortcut.html.liquid +7 -37
- data/_includes/base/social.html.liquid +4 -42
- data/_includes/base/sponsors-cards.html.liquid +4 -55
- data/_includes/base/sponsors-carousel.html.liquid +11 -59
- data/_includes/base/sponsors-data.html.liquid +32 -0
- data/_includes/base/title.html.liquid +5 -42
- data/_includes/base/toc-generator.html.liquid +4 -0
- data/_includes/base/toc.html.liquid +28 -81
- data/_sass/base/_customization.scss +18 -0
- data/_sass/base/_preview.scss +5 -9
- data/assets/icons/favicon.ico +0 -0
- data/assets/js/base/backtotop.js +3 -3
- data/assets/js/base/copyvalue.js +15 -11
- data/assets/js/base/datatable.js +6 -13
- data/assets/js/base/highlight.js +46 -31
- metadata +2 -1
|
@@ -1,31 +1,7 @@
|
|
|
1
1
|
{% comment %}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
This template only loads the JS library. It never loads a CSS theme file —
|
|
7
|
-
the colors come from this site's own theme, _highlight-theme.scss, already
|
|
8
|
-
part of the compiled stylesheet. It also doesn't add a copy button; that's
|
|
9
|
-
base/highlight.js's job, which wraps every code block (plain Markdown or
|
|
10
|
-
one built with base/preview.html.liquid) in the same toolbar, reusing the
|
|
11
|
-
site-wide `.copy-btn` handler (src/JS/copyvalue.js).
|
|
12
|
-
|
|
13
|
-
Cdnjs's default build covers about 40 common languages. A block whose
|
|
14
|
-
language isn't in that build renders as plain, uncolored text instead of
|
|
15
|
-
erroring. Load any other language by setting
|
|
16
|
-
with_highlight_data.languages.<id>: true in a page's front matter — see
|
|
17
|
-
src/YAML/highlight_schema.yml for the full list of language ids.
|
|
18
|
-
|
|
19
|
-
Optional Inputs:
|
|
20
|
-
- data: Highlight.js configuration object — version, script_integrity,
|
|
21
|
-
and languages (see above)
|
|
22
|
-
|
|
23
|
-
Data Source Hierarchy (priority):
|
|
24
|
-
1. include.data
|
|
25
|
-
2. page.with_highlight_data
|
|
26
|
-
3. site.data.highlight
|
|
27
|
-
4. site.data.base.highlight
|
|
28
|
-
================================================================================
|
|
2
|
+
highlight: loads Highlight.js, any enabled language modules, and the theme script that frames each code block.
|
|
3
|
+
Data: include.data > page.with_highlight_data > site.data.highlight > site.data.base.highlight
|
|
4
|
+
Schema: src/YAML/highlight_schema.yml
|
|
29
5
|
{% endcomment %}
|
|
30
6
|
|
|
31
7
|
{%- assign with_highlight = include.with_highlight
|
|
@@ -45,17 +21,9 @@ Data Source Hierarchy (priority):
|
|
|
45
21
|
{%- assign highlight_version = with_highlight_data.version | default: with_highlight_schema.version.default %}
|
|
46
22
|
{%- assign highlight_script_sri = with_highlight_data.script_integrity | default: with_highlight_schema.script_integrity.default %}
|
|
47
23
|
|
|
48
|
-
<!-- Highlight.js Library -->
|
|
49
24
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/{{ highlight_version }}/highlight.min.js" integrity="{{ highlight_script_sri }}" crossorigin="anonymous" referrerpolicy="no-referrer" defer></script>
|
|
50
25
|
|
|
51
|
-
{%- comment %}
|
|
52
|
-
Optional per-language modules. Each script tag must come after the core
|
|
53
|
-
library above, so its `hljs.registerLanguage` call has a global `hljs` to
|
|
54
|
-
register against. A language's toggle lives in with_highlight_data.languages,
|
|
55
|
-
set in a page's front matter. Its SRI hash comes from the schema's own
|
|
56
|
-
x_integrity map — a page only names the languages it wants, never their
|
|
57
|
-
hashes.
|
|
58
|
-
{%- endcomment %}
|
|
26
|
+
{%- comment %} Language modules load after the core library so hljs.registerLanguage finds a global hljs; their SRI hashes come from the schema's x_integrity map. {%- endcomment %}
|
|
59
27
|
{%- assign highlight_languages = with_highlight_data.languages %}
|
|
60
28
|
{%- assign language_integrity = with_highlight_schema.languages.properties.x_integrity.properties %}
|
|
61
29
|
{%- if highlight_languages %}
|
|
@@ -68,7 +36,6 @@ hashes.
|
|
|
68
36
|
{%- endfor %}
|
|
69
37
|
{%- endif %}
|
|
70
38
|
|
|
71
|
-
<!-- Initialize Highlight.js and wrap code blocks in the shared preview toolbar -->
|
|
72
39
|
<script src="{{ site.baseurl }}/assets/js/base/highlight.min.js" defer></script>
|
|
73
40
|
|
|
74
41
|
{%- endif %}
|
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
{% comment %}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Purpose: Renders responsive images in semantic HTML figure elements
|
|
5
|
-
with optional links and captions.
|
|
6
|
-
================================================================================
|
|
7
|
-
|
|
8
|
-
Required Inputs:
|
|
9
|
-
- file: Image filename (relative to /assets/img/)
|
|
10
|
-
- alt: Alt text for accessibility
|
|
11
|
-
|
|
12
|
-
Optional Inputs:
|
|
13
|
-
- link: URL to wrap image in a link
|
|
14
|
-
- caption: Caption text for <figcaption>
|
|
15
|
-
- extraclasses: Additional CSS classes for image element
|
|
16
|
-
|
|
17
|
-
Features:
|
|
18
|
-
- Semantic HTML with <figure> and <figcaption> elements
|
|
19
|
-
- Responsive images with img-fluid Bootstrap class
|
|
20
|
-
- Figure ID generated from alt text (slugified)
|
|
21
|
-
- Lazy loading enabled by default
|
|
22
|
-
================================================================================
|
|
2
|
+
image: renders an image in a figure, optionally linked and captioned.
|
|
3
|
+
Schema: src/YAML/image_schema.yml
|
|
23
4
|
{% endcomment %}
|
|
24
5
|
|
|
25
6
|
{% if include.alt %}
|
|
@@ -37,6 +18,8 @@ Features:
|
|
|
37
18
|
<img loading="lazy" src="{{ site.baseurl }}/assets/img/{{ include.file }}" class="figure-img img-fluid rounded{% if include.extraclasses %} {{ include.extraclasses }}{% endif %}" alt="{{ include.alt }}"/>
|
|
38
19
|
{% endif %}
|
|
39
20
|
{% if include.caption %}
|
|
40
|
-
|
|
21
|
+
{%- comment %} The pinned Liquid has no remove_last, so split/join drops the trailing "</p>" markdownify adds. {% endcomment %}
|
|
22
|
+
{%- assign image_caption_html = include.caption | markdownify | strip | remove_first: "<p>" | split: "</p>" | join: "</p>" | strip %}
|
|
23
|
+
<figcaption class="figure-caption text-center">{{ image_caption_html }}</figcaption>
|
|
41
24
|
{% endif %}
|
|
42
25
|
</figure>
|
|
@@ -1,56 +1,19 @@
|
|
|
1
1
|
{% comment %}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Purpose: Renders HTML anchor tags with icons, styling, and accessibility.
|
|
5
|
-
Handles internal/external links and anchor navigation.
|
|
6
|
-
================================================================================
|
|
7
|
-
|
|
8
|
-
Design Logic:
|
|
9
|
-
- Flexible link resolution for internal and external URLs
|
|
10
|
-
- Optional icon integration with positioning control
|
|
11
|
-
- Customizable styling through color schemes or CSS classes
|
|
12
|
-
- Built-in accessibility support via ARIA attributes
|
|
13
|
-
- Anchor generation from link name when no URL provided
|
|
14
|
-
|
|
15
|
-
Required Inputs:
|
|
16
|
-
- name: Display text for the link
|
|
17
|
-
|
|
18
|
-
Optional Inputs:
|
|
19
|
-
- link: URL (internal/external). Omit to generate anchor from name.
|
|
20
|
-
- target: Link target (default: unset). Use '_blank' for new window.
|
|
21
|
-
- color: Color scheme (default: 'primary')
|
|
22
|
-
- icon: Icon class (Font Awesome or similar)
|
|
23
|
-
- icon_position: Icon placement: 'start' (default) or 'end'
|
|
24
|
-
- class: Custom CSS classes to override default styling
|
|
25
|
-
- aria_label: Accessible label for screen readers
|
|
26
|
-
- role: ARIA role attribute
|
|
27
|
-
- data_bs_toggle: Bootstrap toggle ('tooltip' or 'popover')
|
|
28
|
-
- data_bs_title: Bootstrap tooltip/popover text content
|
|
29
|
-
- data_bs_content: Bootstrap popover body text (required when data_bs_toggle is 'popover')
|
|
30
|
-
- data_bs_placement: Bootstrap tooltip/popover placement ('top', 'bottom', 'start', 'end')
|
|
31
|
-
- data_bs_trigger: Bootstrap tooltip/popover trigger events
|
|
32
|
-
- data_bs_delay: Bootstrap tooltip/popover show/hide delay (number or JSON)
|
|
33
|
-
- data_bs_html: Allow HTML in tooltip/popover content ('true' or 'false')
|
|
34
|
-
- data_bs_custom_class: Custom CSS class for tooltip/popover element
|
|
35
|
-
- data_bs_offset: Tooltip/popover position offset (comma-separated pair)
|
|
36
|
-
|
|
37
|
-
Security & External Links:
|
|
38
|
-
- target="_blank" automatically adds rel="noopener noreferrer"
|
|
39
|
-
- External link icon injection is handled by jekyll-link-decorator
|
|
40
|
-
================================================================================
|
|
2
|
+
link: renders an anchor with an optional icon, resolving relative links against site.baseurl, and renders nothing unless page.with_link is true.
|
|
3
|
+
Schema: src/YAML/link_schema.yml
|
|
41
4
|
{% endcomment %}
|
|
42
5
|
|
|
43
6
|
{%- if page.with_link -%}
|
|
44
7
|
{%- capture html_link -%}
|
|
45
|
-
{%- comment %} === Data source selection === {% endcomment %}
|
|
46
8
|
{%- assign link_schema = site.data.base.link_schema.properties.with_link_data.properties %}
|
|
9
|
+
{%- comment %} default: nil also turns "" and false into nil, so the != nil checks below skip them. {% endcomment %}
|
|
47
10
|
{%- assign link = include.link | default: nil %}
|
|
48
11
|
{%- assign name = include.name | default: nil %}
|
|
49
12
|
{%- assign target = include.target | default: nil %}
|
|
50
13
|
{%- assign color = include.color | default: link_schema["color"].default %}
|
|
51
14
|
{%- assign role = include.role | default: nil %}
|
|
52
15
|
{%- assign icon = include.icon | default: nil %}
|
|
53
|
-
{%- assign icon_position = include.icon_position | default: "
|
|
16
|
+
{%- assign icon_position = include.icon_position | default: link_schema["icon_position"].default %}
|
|
54
17
|
{%- assign class = include.class | default: nil %}
|
|
55
18
|
{%- assign aria_label = include.aria_label | default: nil %}
|
|
56
19
|
{%- assign data_bs_toggle = include.data_bs_toggle | default: nil %}
|
|
@@ -64,16 +27,12 @@ Security & External Links:
|
|
|
64
27
|
{%- assign data_bs_offset = include.data_bs_offset | default: nil %}
|
|
65
28
|
{%- assign anchor = nil %}
|
|
66
29
|
{%- assign rel_attr = nil %}
|
|
67
|
-
|
|
68
|
-
{%- comment %} --- Security: neutralize dangerous URI schemes --- {% endcomment %}
|
|
69
30
|
{%- if link != nil -%}
|
|
70
31
|
{%- assign link_downcase = link | downcase -%}
|
|
71
32
|
{%- if link_downcase contains "javascript:" or link_downcase contains "data:" or link_downcase contains "vbscript:" -%}
|
|
72
33
|
{%- assign link = "#" -%}
|
|
73
34
|
{%- endif -%}
|
|
74
35
|
{%- endif -%}
|
|
75
|
-
|
|
76
|
-
{%- comment %} === Data processing === {% endcomment %}
|
|
77
36
|
{%- if link != nil -%}
|
|
78
37
|
{%- assign link_char1 = link | slice: 0, 1 -%}
|
|
79
38
|
{%- assign link_char2 = link | slice: 0, 2 -%}
|
|
@@ -89,32 +48,54 @@ Security & External Links:
|
|
|
89
48
|
|
|
90
49
|
{%- if class != nil -%}
|
|
91
50
|
{%- assign link_class = class %}
|
|
51
|
+
{%- elsif site.with_link_decorator_data.default_link_classes -%}
|
|
52
|
+
{%- comment %} Start from the site's Markdown link classes so both kinds of links look the same; `color` sets the text and underline color. {% endcomment %}
|
|
53
|
+
{%- assign link_class_tokens = site.with_link_decorator_data.default_link_classes | split: " " %}
|
|
54
|
+
{%- assign link_class = "" %}
|
|
55
|
+
{%- assign link_color_emitted = false %}
|
|
56
|
+
{%- assign link_underline_emitted = false %}
|
|
57
|
+
{%- for token in link_class_tokens -%}
|
|
58
|
+
{%- assign token_prefix_5 = token | slice: 0, 5 %}
|
|
59
|
+
{%- assign token_prefix_12 = token | slice: 0, 12 %}
|
|
60
|
+
{%- assign token_prefix_13 = token | slice: 0, 13 %}
|
|
61
|
+
{%- assign token_prefix_15 = token | slice: 0, 15 %}
|
|
62
|
+
{%- assign token_prefix_22 = token | slice: 0, 22 %}
|
|
63
|
+
{%- if token == "link" -%}
|
|
64
|
+
{%- assign link_class = link_class | append: " link link-" | append: color %}
|
|
65
|
+
{%- assign link_color_emitted = true %}
|
|
66
|
+
{%- elsif token_prefix_22 == "link-underline-opacity" or token_prefix_12 == "link-offset-" or token_prefix_13 == "link-opacity-" -%}
|
|
67
|
+
{%- assign link_class = link_class | append: " " | append: token %}
|
|
68
|
+
{%- elsif token == "link-underline" or token_prefix_15 == "link-underline-" -%}
|
|
69
|
+
{%- assign link_class = link_class | append: " link-underline-" | append: color %}
|
|
70
|
+
{%- assign link_underline_emitted = true %}
|
|
71
|
+
{%- elsif token_prefix_5 == "link-" -%}
|
|
72
|
+
{%- comment %} Drop the site's own link color class; `color` replaces it. {% endcomment %}
|
|
73
|
+
{%- else -%}
|
|
74
|
+
{%- assign link_class = link_class | append: " " | append: token %}
|
|
75
|
+
{%- endif -%}
|
|
76
|
+
{%- endfor -%}
|
|
77
|
+
{%- unless link_color_emitted %}{% assign link_class = "link-" | append: color | append: link_class %}{% endunless -%}
|
|
78
|
+
{%- unless link_underline_emitted %}{% assign link_class = link_class | append: " link-underline-" | append: color %}{% endunless -%}
|
|
79
|
+
{%- assign link_class = link_class | strip %}
|
|
92
80
|
{%- else -%}
|
|
93
81
|
{%- assign link_class = link_schema["class"].default | replace: '{color}', color %}
|
|
94
82
|
{%- endif -%}
|
|
95
|
-
|
|
96
|
-
{%- comment %} --- Security attributes for external links --- {% endcomment %}
|
|
97
83
|
{%- if target == "_blank" -%}
|
|
98
84
|
{%- assign rel_attr = "noopener noreferrer" %}
|
|
99
85
|
{%- endif -%}
|
|
100
|
-
|
|
101
|
-
{%- comment %} --- Link name with optional icon --- {% endcomment %}
|
|
102
|
-
{%- assign final_icon = icon %}
|
|
103
86
|
{%- capture link_name -%}
|
|
104
|
-
{%- if
|
|
87
|
+
{%- if icon != nil -%}
|
|
105
88
|
{%- if name != nil and icon_position == "end" -%}
|
|
106
|
-
{{ name }}<i class="{{
|
|
89
|
+
{{ name }}<i class="{{ icon }} ms-1" aria-hidden="true"></i>
|
|
107
90
|
{%- elsif name != nil and icon_position == "start" -%}
|
|
108
|
-
<i class="{{
|
|
91
|
+
<i class="{{ icon }} me-1" aria-hidden="true"></i>{{ name }}
|
|
109
92
|
{%- else -%}
|
|
110
|
-
<i class="{{
|
|
93
|
+
<i class="{{ icon }}" aria-hidden="true"></i>
|
|
111
94
|
{%- endif -%}
|
|
112
95
|
{%- else -%}
|
|
113
96
|
{{ name }}
|
|
114
97
|
{%- endif -%}
|
|
115
|
-
{%- endcapture
|
|
116
|
-
|
|
117
|
-
{%- comment %} --- HTML: Anchor tag with attributes --- {% endcomment %}
|
|
98
|
+
{%- endcapture %}
|
|
118
99
|
<a
|
|
119
100
|
href="{{ href_value }}{% if anchor != nil and anchor != "" %}#{{ anchor }}{% endif %}"
|
|
120
101
|
class="{{ link_class }}"
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
{% comment %}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
language detection and visual indicators. Generates links to same page in
|
|
6
|
-
different language versions.
|
|
7
|
-
================================================================================
|
|
8
|
-
|
|
9
|
-
Configuration: Reads from unified `with_locales_data` schema via Jekyll defaults.
|
|
10
|
-
- Enable with: with_locales: true in _config.yml defaults or page front matter
|
|
11
|
-
- Locales defined in: with_locales_data.locales
|
|
12
|
-
|
|
13
|
-
Menu data: All locale enumeration, current-locale detection, display-name
|
|
14
|
-
resolution, and switch-URL generation are delegated to the jekyll-l10n plugin's
|
|
15
|
-
`locale_menu` Liquid filter (Jekyll::L10n::UrlFilter#locale_menu). This template
|
|
16
|
-
only renders markup — it has no locale-specific logic of its own.
|
|
17
|
-
|
|
18
|
-
`{{ page.url | locale_menu }}` returns an array of hashes, one per locale
|
|
19
|
-
(always including English even if not explicitly configured):
|
|
20
|
-
{ "code" => "es_ES", "name" => "Spanish (Spain)", "url" => "/es-es/about/", "current" => true }
|
|
21
|
-
- code: canonical underscore form (matches with_locales_data.locales entries)
|
|
22
|
-
- name: ISO 639-1/3166-1 resolved display name (e.g. "Spanish (Spain)"),
|
|
23
|
-
correct for both language-only and country-subtag codes
|
|
24
|
-
- url: the switch-target URL for this locale, in BCP 47 hyphenated, lowercased form
|
|
25
|
-
- current: true for the single entry matching the page's own locale
|
|
26
|
-
================================================================================
|
|
2
|
+
locales: renders a language dropdown from the jekyll-l10n locale_menu filter.
|
|
3
|
+
Schema: src/YAML/locales_schema.yml
|
|
4
|
+
Requires: jekyll-l10n plugin (locale_menu filter)
|
|
27
5
|
{% endcomment %}
|
|
28
6
|
|
|
29
7
|
{%- assign with_locales = include.with_locales
|
|
@@ -32,12 +10,14 @@ only renders markup — it has no locale-specific logic of its own.
|
|
|
32
10
|
|
|
33
11
|
{%- if with_locales %}
|
|
34
12
|
|
|
13
|
+
{%- comment %} jekyll-l10n's locale_menu returns one {code, name, url, current} hash per locale. {% endcomment %}
|
|
35
14
|
{%- assign menu = page.url | locale_menu %}
|
|
36
15
|
{%- assign current_item = menu | where: "current", true | first %}
|
|
37
16
|
|
|
38
17
|
<p class="mb-2">Change page language:</p>
|
|
18
|
+
{%- comment %} text-light keeps the label readable; primary text is too dark on the footer background. {% endcomment %}
|
|
39
19
|
<div class="dropdown mb-4">
|
|
40
|
-
<button class="btn btn-sm btn-outline-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Languages">
|
|
20
|
+
<button class="btn btn-sm btn-outline-primary text-light dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Languages">
|
|
41
21
|
<i class="fa-solid fa-language me-1"></i> {{ current_item.name }}
|
|
42
22
|
</button>
|
|
43
23
|
<ul class="dropdown-menu">
|
|
@@ -1,34 +1,7 @@
|
|
|
1
1
|
{% comment %}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
and hierarchical menu items with dropdown support.
|
|
6
|
-
================================================================================
|
|
7
|
-
|
|
8
|
-
Design Logic:
|
|
9
|
-
- Fixed top positioning: always visible during scroll
|
|
10
|
-
- Responsive hamburger menu: collapses on mobile
|
|
11
|
-
- Dropdown menus: multi-level navigation
|
|
12
|
-
- Brand image and manifestation text support
|
|
13
|
-
- Filtered navitems by visible_on='navbar'; an item that omits visible_on
|
|
14
|
-
entirely falls back to being navbar-visible (schema default `["navbar"]`)
|
|
15
|
-
|
|
16
|
-
Required Inputs:
|
|
17
|
-
- brand_image: Logo image filename
|
|
18
|
-
- navitems: Array of navigation items
|
|
19
|
-
|
|
20
|
-
Optional Inputs:
|
|
21
|
-
- brand_image_class, brand_image_height: Logo styling
|
|
22
|
-
- brand_manifestation: Tagline/subtitle text
|
|
23
|
-
- class: Container CSS classes
|
|
24
|
-
- navitems[].menu: Submenu array for dropdowns
|
|
25
|
-
|
|
26
|
-
Data Source Hierarchy (priority):
|
|
27
|
-
1. include.data
|
|
28
|
-
2. page.with_navbar_data
|
|
29
|
-
3. site.data.navbar
|
|
30
|
-
4. site.data.base.navbar
|
|
31
|
-
================================================================================
|
|
2
|
+
navbar: renders the fixed-top navbar with the brand and the navbar-visible navitems as links or dropdowns.
|
|
3
|
+
Data: include.data > page.with_navbar_data > site.data.navbar > site.data.base.navbar
|
|
4
|
+
Schema: src/YAML/navbar_schema.yml
|
|
32
5
|
{% endcomment %}
|
|
33
6
|
|
|
34
7
|
{%- assign with_navbar = include.with_navbar
|
|
@@ -53,7 +26,7 @@ Data Source Hierarchy (priority):
|
|
|
53
26
|
{%- assign navbar_brand_manifestation_class = with_navbar_data.brand_manifestation_class | default: with_navbar_schema.brand_manifestation_class.default %}
|
|
54
27
|
{%- assign navbar_navitems = with_navbar_data.navitems | where_exp: "item", "item.visible_on == nil or item.visible_on contains 'navbar'" | default: with_navbar_schema.navitems.default %}
|
|
55
28
|
|
|
56
|
-
<nav class="navbar bg-dark fixed-top navbar-expand-lg shadow{% if navbar_class != "" %} {{ navbar_class }}{% endif %}" aria-label="{{ include.
|
|
29
|
+
<nav class="navbar bg-dark fixed-top navbar-expand-lg shadow{% if navbar_class != "" %} {{ navbar_class }}{% endif %}" aria-label="{{ include.arialabel | default: 'navbar'}}" data-bs-theme="dark">
|
|
57
30
|
<div class="container">
|
|
58
31
|
|
|
59
32
|
{%- if navbar_brand_image != "" %}
|
|
@@ -82,21 +55,11 @@ Data Source Hierarchy (priority):
|
|
|
82
55
|
<ul class="navbar-nav ms-auto">
|
|
83
56
|
{%- for navitem in navbar_navitems %}
|
|
84
57
|
{%- assign navitem_link = navitem.link | locale_url: page.locale %}
|
|
85
|
-
{%- if navitem.menu.size
|
|
86
|
-
<li class="nav-item">
|
|
87
|
-
{%- include base/link.html.liquid
|
|
88
|
-
class = "nav-link focus-ring"
|
|
89
|
-
name = navitem.name
|
|
90
|
-
link = navitem_link
|
|
91
|
-
role = "presentation"
|
|
92
|
-
icon = navitem.icon
|
|
93
|
-
%}
|
|
94
|
-
</li>
|
|
95
|
-
{%- else %}
|
|
58
|
+
{%- if navitem.menu.size > 0 %}
|
|
96
59
|
<li class="nav-item dropdown">
|
|
97
|
-
<
|
|
60
|
+
<button type="button" class="nav-link dropdown-toggle focus-ring w-100 text-start" id="navbarDropdown-{{ forloop.index }}" data-bs-toggle="dropdown" aria-expanded="false">
|
|
98
61
|
<i class="{{ navitem.icon }} me-1" aria-hidden="true"></i>{{ navitem.name }}
|
|
99
|
-
</
|
|
62
|
+
</button>
|
|
100
63
|
<ul class="dropdown-menu dropdown-menu-dark shadow">
|
|
101
64
|
{%- for dropdownitem in navitem.menu %}
|
|
102
65
|
{%- assign dropdownitem_link = dropdownitem.link | locale_url: page.locale %}
|
|
@@ -105,12 +68,20 @@ Data Source Hierarchy (priority):
|
|
|
105
68
|
class = "dropdown-item focus-ring"
|
|
106
69
|
name = dropdownitem.name
|
|
107
70
|
link = dropdownitem_link
|
|
108
|
-
role = "presentation"
|
|
109
71
|
%}
|
|
110
72
|
</li>
|
|
111
73
|
{%- endfor %}
|
|
112
74
|
</ul>
|
|
113
75
|
</li>
|
|
76
|
+
{%- else %}
|
|
77
|
+
<li class="nav-item">
|
|
78
|
+
{%- include base/link.html.liquid
|
|
79
|
+
class = "nav-link focus-ring"
|
|
80
|
+
name = navitem.name
|
|
81
|
+
link = navitem_link
|
|
82
|
+
icon = navitem.icon
|
|
83
|
+
%}
|
|
84
|
+
</li>
|
|
114
85
|
{%- endif %}
|
|
115
86
|
{%- endfor %}
|
|
116
87
|
</ul>
|
|
@@ -1,86 +1,52 @@
|
|
|
1
1
|
{% comment %}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Provides flexible list/card/table views for indexes and inventories.
|
|
6
|
-
Automatically filters data by current page locale to avoid duplicates.
|
|
7
|
-
================================================================================
|
|
8
|
-
|
|
9
|
-
Design Logic:
|
|
10
|
-
- Multi-format output: card, text, list, table, component_table (default: list)
|
|
11
|
-
- Filters data by locale: shows canonical pages for English, localized variants for other locales
|
|
12
|
-
- Filters out current page from results (prevents self-linking)
|
|
13
|
-
- Reusable link component for consistent styling
|
|
14
|
-
- Optional filename display using page name (with .md stripped)
|
|
15
|
-
- Component table with status indicators from site.defaults
|
|
16
|
-
- DataTables integration for searchable/sortable table output
|
|
17
|
-
|
|
18
|
-
Required Inputs:
|
|
19
|
-
- data: Array of page or component objects to display
|
|
20
|
-
|
|
21
|
-
Optional Inputs:
|
|
22
|
-
- format: Output format: 'card' | 'text' | 'list' | 'table' | 'component_table'
|
|
23
|
-
- show_page_filename: Display page filename instead of title (true/false)
|
|
24
|
-
|
|
25
|
-
Data Object Properties:
|
|
26
|
-
- name, title, url, title_lead: Common properties
|
|
27
|
-
- component.name: Component identifier (for component_table format)
|
|
28
|
-
- locale: Locale code for localized pages (set by localization plugin)
|
|
29
|
-
================================================================================
|
|
2
|
+
navindex: renders the given pages, minus the current page and other-locale variants, as a list, cards, text links, or a table.
|
|
3
|
+
Data: include.data
|
|
4
|
+
Schema: src/YAML/navindex_schema.yml
|
|
30
5
|
{% endcomment %}
|
|
31
6
|
|
|
32
|
-
{%- assign
|
|
33
|
-
| default: page.with_navindex
|
|
34
|
-
%}
|
|
35
|
-
|
|
36
|
-
{%- assign with_navindex_data = include.data
|
|
37
|
-
| default: page.with_navindex_data
|
|
38
|
-
| default: site.data.navindex
|
|
39
|
-
| default: site.data.base.navindex
|
|
40
|
-
%}
|
|
7
|
+
{%- assign navindex_schema = site.data.base.navindex_schema.properties %}
|
|
41
8
|
|
|
42
|
-
{
|
|
9
|
+
{% assign data = include.data | default: navindex_schema.data.default %}
|
|
10
|
+
{% assign format = include.format | default: navindex_schema.format.default %}
|
|
11
|
+
{% assign show_page_filename = include.show_page_filename | default: navindex_schema.show_page_filename.default %}
|
|
43
12
|
|
|
44
|
-
{%
|
|
45
|
-
{% assign format = include.format | default: with_navindex_schema.format.default %}
|
|
46
|
-
|
|
47
|
-
{%- comment %} Filter data by locale to show only matching language pages {%- endcomment %}
|
|
13
|
+
{%- comment %} English pages list only canonical pages; localized pages list only their own locale's variants. {%- endcomment %}
|
|
48
14
|
{%- assign current_locale = page.locale | default: 'en' %}
|
|
49
15
|
{%- assign filtered_data = '' | split: '' %}
|
|
16
|
+
{%- assign item_labels = '' | split: '' %}
|
|
50
17
|
|
|
51
18
|
{%- for item in data %}
|
|
52
19
|
{%- assign item_locale = item.locale | default: 'en' %}
|
|
20
|
+
{%- if show_page_filename == "true" %}
|
|
21
|
+
{%- assign item_label = item.name | remove: '.md' %}
|
|
22
|
+
{%- else %}
|
|
23
|
+
{%- assign item_label = item.title %}
|
|
24
|
+
{%- endif %}
|
|
53
25
|
|
|
54
26
|
{%- if current_locale == 'en' %}
|
|
55
|
-
{%- comment %} For English pages, show only canonical pages (not localized variants) {%- endcomment %}
|
|
56
27
|
{%- if item.localized != true %}
|
|
57
28
|
{%- assign filtered_data = filtered_data | push: item %}
|
|
29
|
+
{%- assign item_labels = item_labels | push: item_label %}
|
|
58
30
|
{%- endif %}
|
|
59
31
|
{%- else %}
|
|
60
|
-
{%- comment %} For localized pages, show only pages matching current locale {%- endcomment %}
|
|
61
32
|
{%- if item_locale == current_locale %}
|
|
62
33
|
{%- assign filtered_data = filtered_data | push: item %}
|
|
34
|
+
{%- assign item_labels = item_labels | push: item_label %}
|
|
63
35
|
{%- endif %}
|
|
64
36
|
{%- endif %}
|
|
65
37
|
{%- endfor %}
|
|
66
|
-
|
|
67
|
-
{%- comment %} Use filtered data for rendering {%- endcomment %}
|
|
68
38
|
{%- assign data = filtered_data %}
|
|
69
39
|
|
|
70
|
-
{%
|
|
71
|
-
{%
|
|
40
|
+
{% case format %}
|
|
41
|
+
{% when "card" %}
|
|
72
42
|
<div class="row g-3 mb-3 pt-1">
|
|
73
43
|
{%- for item in data %}
|
|
74
44
|
{%- if item.url != page.url %}
|
|
45
|
+
{%- assign item_label = item_labels[forloop.index0] %}
|
|
75
46
|
<div class="col-12 col-md-6">
|
|
76
47
|
<div class="p-3 pb-1 bg-light border rounded">
|
|
77
48
|
<div class="h5">
|
|
78
|
-
{%-
|
|
79
|
-
{%- assign item_name = item.name | remove: '.md' %}
|
|
80
|
-
{%- include base/link.html.liquid name=item_name link=item.url %}
|
|
81
|
-
{%- else %}
|
|
82
|
-
{%- include base/link.html.liquid name=item.title link=item.url %}
|
|
83
|
-
{%- endif %}
|
|
49
|
+
{%- include base/link.html.liquid name=item_label link=item.url %}
|
|
84
50
|
</div>
|
|
85
51
|
{%- if item.title_lead %}
|
|
86
52
|
{%- capture item_title_lead_source %}{{ item.title_lead | strip_newlines }}
|
|
@@ -92,44 +58,18 @@ Data Object Properties:
|
|
|
92
58
|
{%- endif %}
|
|
93
59
|
{%- endfor %}
|
|
94
60
|
</div>
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
{%- capture text %}
|
|
98
|
-
{% assign show_page_filename = include.show_page_filename | default: "false" %}
|
|
61
|
+
{% when "text" %}
|
|
99
62
|
<div class="row g-3 mb-3 pt-1">
|
|
100
63
|
{%- for item in data %}
|
|
101
64
|
{%- if item.url != page.url %}
|
|
65
|
+
{%- assign item_label = item_labels[forloop.index0] %}
|
|
102
66
|
<div class="col-12 col-md-6">
|
|
103
|
-
{%-
|
|
104
|
-
{%- assign item_name = item.name | remove: '.md' %}
|
|
105
|
-
{%- include base/link.html.liquid name=item_name link=item.url %}
|
|
106
|
-
{%- else %}
|
|
107
|
-
{%- include base/link.html.liquid name=item.title link=item.url %}
|
|
108
|
-
{%- endif %}
|
|
67
|
+
{%- include base/link.html.liquid name=item_label link=item.url %}
|
|
109
68
|
</div>
|
|
110
69
|
{%- endif %}
|
|
111
70
|
{%- endfor %}
|
|
112
71
|
</div>
|
|
113
|
-
{
|
|
114
|
-
|
|
115
|
-
{%- capture list %}
|
|
116
|
-
{% assign show_page_filename = include.show_page_filename | default: "false" %}
|
|
117
|
-
<ul>
|
|
118
|
-
{%- for item in data %}
|
|
119
|
-
{%- if item.url != page.url %}
|
|
120
|
-
{%- if show_page_filename == "true" %}
|
|
121
|
-
{%- assign item_name = item.name | remove: '.md' %}
|
|
122
|
-
<li>{% include base/link.html.liquid name=item_name link=item.url %}{% if item.title_lead != nil %} — {{ item.title_lead | strip_newlines | markdownify | remove: "<p>" | remove: "</p>" | strip }}{% endif %}</li>
|
|
123
|
-
{%- else %}
|
|
124
|
-
<li>{% include base/link.html.liquid name=item.title link=item.url %}{% if item.title_lead != nil %} — {{ item.title_lead | strip_newlines | markdownify | remove: "<p>" | remove: "</p>" | strip }}{% endif %}</li>
|
|
125
|
-
{%- endif %}
|
|
126
|
-
{%- endif %}
|
|
127
|
-
{%- endfor %}
|
|
128
|
-
</ul>
|
|
129
|
-
{%- endcapture %}
|
|
130
|
-
|
|
131
|
-
{% capture table %}
|
|
132
|
-
{% assign show_page_filename = include.show_page_filename | default: "false" %}
|
|
72
|
+
{% when "table" %}
|
|
133
73
|
<div class="table-responsive bg-light border rounded mb-3">
|
|
134
74
|
<table class="table dataTable">
|
|
135
75
|
<thead>
|
|
@@ -140,24 +80,18 @@ Data Object Properties:
|
|
|
140
80
|
</thead>
|
|
141
81
|
<tbody>
|
|
142
82
|
{%- for item in data %}
|
|
83
|
+
{%- if item.url != page.url %}
|
|
84
|
+
{%- assign item_label = item_labels[forloop.index0] %}
|
|
143
85
|
<tr>
|
|
144
|
-
{
|
|
145
|
-
{%- if show_page_filename == "true" %}
|
|
146
|
-
{%- assign item_name = item.name | remove: '.md' %}
|
|
147
|
-
<td>{% include base/link.html.liquid name=item_name link=item.url %}</td>
|
|
148
|
-
{%- else %}
|
|
149
|
-
<td>{% include base/link.html.liquid name=item.title link=item.url %}</td>
|
|
150
|
-
{%- endif %}
|
|
151
|
-
{%- endif %}
|
|
86
|
+
<td>{% include base/link.html.liquid name=item_label link=item.url %}</td>
|
|
152
87
|
<td>{{ item.title_lead | strip_newlines | markdownify | remove: "<p>" | remove: "</p>" | strip }}</td>
|
|
153
88
|
</tr>
|
|
89
|
+
{%- endif %}
|
|
154
90
|
{%- endfor %}
|
|
155
91
|
</tbody>
|
|
156
92
|
</table>
|
|
157
93
|
</div>
|
|
158
|
-
{
|
|
159
|
-
|
|
160
|
-
{% capture component_table %}
|
|
94
|
+
{% when "component_table" %}
|
|
161
95
|
<div class="table-responsive bg-light border rounded mb-3">
|
|
162
96
|
<table class="table dataTable">
|
|
163
97
|
<thead>
|
|
@@ -168,11 +102,11 @@ Data Object Properties:
|
|
|
168
102
|
</tr>
|
|
169
103
|
</thead>
|
|
170
104
|
<tbody>
|
|
105
|
+
{%- comment %} The _config.yml defaults entry scoped to pages holds every with_<component> gate. {% endcomment %}
|
|
106
|
+
{%- assign page_defaults = site.defaults | where_exp: "d", "d.scope.type == 'pages'" | first %}
|
|
171
107
|
{%- for item in data %}
|
|
172
|
-
{% comment %} Get component status from site configuration file {% endcomment %}
|
|
173
108
|
{%- assign status_name = "with_" | append: item.component.name %}
|
|
174
|
-
{%- assign status =
|
|
175
|
-
{% comment %} Render component status {% endcomment %}
|
|
109
|
+
{%- assign status = page_defaults.values[status_name] %}
|
|
176
110
|
{%- if status == true %}
|
|
177
111
|
{%- assign status_icon = '<span data-bs-toggle="tooltip" data-bs-title="This component is enabled globally and can be used on all site pages. It can be disabled either globally or at a page level."><i class="fa-solid fa-toggle-on text-success"></i> Enabled</span>' %}
|
|
178
112
|
{%- elsif status == false %}
|
|
@@ -180,7 +114,6 @@ Data Object Properties:
|
|
|
180
114
|
{%- else %}
|
|
181
115
|
{%- assign status_icon = '<span data-bs-toggle="tooltip" data-bs-title="This component is enabled globally and can be used on all site pages. It cannot be disabled."><i class="fa-solid fa-toggle-on text-light"></i> Internal</span>' %}
|
|
182
116
|
{%- endif %}
|
|
183
|
-
{% comment %} Render table rows {% endcomment %}
|
|
184
117
|
<tr>
|
|
185
118
|
<td>{% include base/link.html.liquid name=item.component.name link=item.url %}</td>
|
|
186
119
|
<td class="text-nowrap">{{ status_icon }}</td>
|
|
@@ -190,17 +123,13 @@ Data Object Properties:
|
|
|
190
123
|
</tbody>
|
|
191
124
|
</table>
|
|
192
125
|
</div>
|
|
193
|
-
{% endcapture %}
|
|
194
|
-
|
|
195
|
-
{% case format %}
|
|
196
|
-
{% when "card" %}
|
|
197
|
-
{{ card }}
|
|
198
|
-
{% when "text" %}
|
|
199
|
-
{{ text }}
|
|
200
|
-
{% when "table" %}
|
|
201
|
-
{{ table }}
|
|
202
|
-
{% when "component_table" %}
|
|
203
|
-
{{ component_table }}
|
|
204
126
|
{% else %}
|
|
205
|
-
|
|
127
|
+
<ul>
|
|
128
|
+
{%- for item in data %}
|
|
129
|
+
{%- if item.url != page.url %}
|
|
130
|
+
{%- assign item_label = item_labels[forloop.index0] %}
|
|
131
|
+
<li>{% include base/link.html.liquid name=item_label link=item.url %}{% if item.title_lead != nil %} — {{ item.title_lead | strip_newlines | markdownify | remove: "<p>" | remove: "</p>" | strip }}{% endif %}</li>
|
|
132
|
+
{%- endif %}
|
|
133
|
+
{%- endfor %}
|
|
134
|
+
</ul>
|
|
206
135
|
{% endcase %}
|