jekyll-theme-centos 2.52.0.beta.56 → 2.52.0.beta.58
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 +1 -1
- data/_data/base/backtotop_schema.yml +6 -0
- data/_data/base/breadcrumb_schema.yml +13 -0
- data/_data/base/datatable_schema.yml +3 -3
- data/_data/base/head_schema.yml +19 -0
- data/_data/base/heading_anchor.yml +1 -3
- data/_data/base/heading_anchor_schema.yml +1 -1
- data/_data/base/highlight_schema.yml +30 -0
- data/_data/base/ogp.yml +24 -0
- data/_data/base/ogp_schema.yml +28 -22
- data/_includes/base/backtotop.html.liquid +10 -2
- data/_includes/base/breadcrumb.html.liquid +15 -4
- data/_includes/base/copyvalue.html.liquid +10 -1
- data/_includes/base/datatable.html.liquid +8 -3
- data/_includes/base/fontawesome.html.liquid +2 -2
- data/_includes/base/{partials/footer.html.liquid → footer.html.liquid} +2 -2
- data/_includes/base/{partials/head.html.liquid → head.html.liquid} +54 -14
- data/_includes/base/heading_anchor.html.liquid +8 -3
- data/_includes/base/highlight.html.liquid +14 -9
- data/_includes/base/{partials/navbar.html.liquid → navbar.html.liquid} +3 -3
- data/_includes/base/navindex.html.liquid +2 -2
- data/_includes/base/ogp.html.liquid +68 -56
- data/_includes/base/toc.html.liquid +21 -19
- data/_layouts/base/default.html +7 -10
- data/_sass/base/_customization.scss +27 -13
- data/assets/img/base/example-ogp-image.png +0 -0
- data/assets/img/base/example-ogp-image.svg +297 -0
- data/assets/img/base/page-layout-default.png +0 -0
- data/assets/img/base/page-layout-default.svg +4 -4
- data/assets/img/base/page-with-ogp.png +0 -0
- data/assets/img/base/page-with-ogp.svg +333 -300
- data/assets/img/centos-social-share.png +0 -0
- data/assets/js/base/backtotop.js +7 -10
- data/assets/js/base/copyvalue.js +96 -94
- data/assets/js/base/datatable.js +28 -42
- data/assets/js/base/heading-anchor.js +53 -53
- data/assets/js/base/highlight.js +9 -3
- data/assets/js/base/init-tooltips.js +10 -4
- metadata +15 -13
- data/_data/base/partials/head_schema.yml +0 -47
- data/_includes/base/partials/script.html.liquid +0 -47
- /data/_data/base/{partials/content.yml → content.yml} +0 -0
- /data/_data/base/{partials/content_schema.yml → content_schema.yml} +0 -0
- /data/_data/base/{partials/footer.yml → footer.yml} +0 -0
- /data/_data/base/{partials/footer_schema.yml → footer_schema.yml} +0 -0
- /data/_data/base/{partials/navbar.yml → navbar.yml} +0 -0
- /data/_data/base/{partials/navbar_schema.yml → navbar_schema.yml} +0 -0
- /data/_data/base/{partials/script_schema.yml → script_schema.yml} +0 -0
|
@@ -166,14 +166,14 @@ Data Object Properties:
|
|
|
166
166
|
{%- for item in data %}
|
|
167
167
|
{% comment %} Get component status from site configuration file {% endcomment %}
|
|
168
168
|
{%- assign status_name = "with_" | append: item.component.name %}
|
|
169
|
-
{%- assign status = site.defaults[
|
|
169
|
+
{%- assign status = site.defaults[1].values[status_name] %}
|
|
170
170
|
{% comment %} Render component status {% endcomment %}
|
|
171
171
|
{%- if status == true %}
|
|
172
172
|
{%- 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-circle-check text-success"></i> Enabled</span>' %}
|
|
173
173
|
{%- elsif status == false %}
|
|
174
174
|
{%- assign status_icon = '<span data-bs-toggle="tooltip" data-bs-title="This component is disabled globally and cannot be used in site pages. It can be enabled either globally or at a page level."><i class="fa-solid fa-circle-minus text-danger"></i> Disabled</span>' %}
|
|
175
175
|
{%- else %}
|
|
176
|
-
{%- 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-
|
|
176
|
+
{%- 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-gear"></i> Internal</span>' %}
|
|
177
177
|
{%- endif %}
|
|
178
178
|
{% comment %} Render table rows {% endcomment %}
|
|
179
179
|
<tr>
|
|
@@ -21,11 +21,21 @@ Optional Inputs:
|
|
|
21
21
|
- with_ogp_data.og.*, with_ogp_data.twitter.*: OG/Twitter property overrides
|
|
22
22
|
- page.excerpt, page.title_lead: Fallback for description
|
|
23
23
|
- site.description: Site-level description fallback
|
|
24
|
+
- page.locale: BCP 47 locale code set by jekyll-l10n on localized pages
|
|
24
25
|
|
|
25
26
|
Data Source Hierarchy:
|
|
26
|
-
- with_ogp_data
|
|
27
|
-
-
|
|
28
|
-
-
|
|
27
|
+
- og:type: with_ogp_data.og.type → schema default → 'website'
|
|
28
|
+
- og:site_name: with_ogp_data.og.site_name → site.title
|
|
29
|
+
- og:logo: with_ogp_data.og.logo → schema default → '/assets/icons/apple-touch-icon.png'
|
|
30
|
+
- og:locale: page.locale (jekyll-l10n) → with_ogp_data.locale → schema default → 'en_US'
|
|
31
|
+
- og:image:type: with_ogp_data.og.image.type → schema default → 'image/png'
|
|
32
|
+
- og:image:width: with_ogp_data.og.image.width → schema default → 1200
|
|
33
|
+
- og:image:height: with_ogp_data.og.image.height → schema default → 630
|
|
34
|
+
- og:image:alt: with_ogp_data[property].image.alt → schema default → 'The CentOS Project'
|
|
35
|
+
- twitter:card: with_ogp_data.twitter.card → schema default → 'summary_large_image'
|
|
36
|
+
- twitter:site: with_ogp_data.twitter.site → schema default → '@CentOS'
|
|
37
|
+
- twitter:creator: with_ogp_data.twitter.creator → schema default → '@CentOS'
|
|
38
|
+
- Default image path: /assets/img/centos-social-share.png
|
|
29
39
|
================================================================================
|
|
30
40
|
{% endcomment %}
|
|
31
41
|
|
|
@@ -44,89 +54,91 @@ Data Source Hierarchy:
|
|
|
44
54
|
{%- if with_ogp %}
|
|
45
55
|
|
|
46
56
|
{%- comment %} === Presentation === {% endcomment %}
|
|
57
|
+
{%- comment %} --- Schema shorthands --- {% endcomment %}
|
|
58
|
+
{%- assign with_ogp_og_image_schema = with_ogp_schema.og.properties.image.properties %}
|
|
59
|
+
{%- assign with_ogp_twitter_schema = with_ogp_schema.twitter.properties %}
|
|
60
|
+
|
|
61
|
+
{%- comment %} --- Shared image metadata (og and twitter use the same image) --- {% endcomment %}
|
|
62
|
+
{%- assign ogp_image_type = with_ogp_data.og.image.type | default: with_ogp_og_image_schema.type.default | default: 'image/png' %}
|
|
63
|
+
{%- assign ogp_image_width = with_ogp_data.og.image.width | default: with_ogp_og_image_schema.width.default | default: 1200 %}
|
|
64
|
+
{%- assign ogp_image_height = with_ogp_data.og.image.height | default: with_ogp_og_image_schema.height.default | default: 630 %}
|
|
65
|
+
|
|
47
66
|
{%- comment %} --- Defaults --- {% endcomment %}
|
|
48
67
|
{%- assign ogp_og_type = with_ogp_data.og.type | default: with_ogp_schema.og.properties.type.default %}
|
|
68
|
+
{%- assign ogp_locale = page.locale | default: with_ogp_data.locale | default: with_ogp_schema.locale.default | default: 'en_US' %}
|
|
69
|
+
{%- assign ogp_twitter_card = with_ogp_data.twitter.card
|
|
70
|
+
| default: with_ogp_twitter_schema.card.default
|
|
71
|
+
| default: 'summary_large_image' %}
|
|
72
|
+
{%- assign ogp_twitter_site = with_ogp_data.twitter.site
|
|
73
|
+
| default: with_ogp_twitter_schema.site.default
|
|
74
|
+
| default: '@CentOS' %}
|
|
75
|
+
{%- assign ogp_twitter_creator = with_ogp_data.twitter.creator
|
|
76
|
+
| default: with_ogp_twitter_schema.creator.default
|
|
77
|
+
| default: '@CentOS' %}
|
|
49
78
|
|
|
50
79
|
{%- comment %} --- Common attributes for both `og` and `twitter` properties --- {% endcomment %}
|
|
51
80
|
{%- assign properties = "og,twitter" | split: "," %}
|
|
52
81
|
{%- for property in properties %}
|
|
82
|
+
{%- if property == "twitter" %}{%- assign meta_attr = "name" %}{%- else %}{%- assign meta_attr = "property" %}{%- endif %}
|
|
83
|
+
|
|
84
|
+
{%- comment %} --- Twitter Card: required first --- {% endcomment %}
|
|
85
|
+
{%- if property == "twitter" %}
|
|
86
|
+
<meta name="twitter:card" content="{{ ogp_twitter_card }}" />
|
|
87
|
+
<meta name="twitter:site" content="{{ ogp_twitter_site }}" />
|
|
88
|
+
<meta name="twitter:creator" content="{{ ogp_twitter_creator }}" />
|
|
89
|
+
{%- endif %}
|
|
53
90
|
|
|
54
91
|
{%- comment %} --- Title --- {% endcomment %}
|
|
55
92
|
{%- if with_ogp_data[property].title %}
|
|
56
|
-
<meta
|
|
57
|
-
{%-
|
|
93
|
+
<meta {{ meta_attr }}="{{ property }}:title" content="{{ page.title }}" />
|
|
94
|
+
{%- endif %}
|
|
95
|
+
|
|
96
|
+
{%- comment %} --- OG type and logo (after title, before url) --- {% endcomment %}
|
|
97
|
+
{%- if property == "og" %}
|
|
98
|
+
<meta property="og:type" content="{{ ogp_og_type }}" />
|
|
99
|
+
{%- assign ogp_logo = with_ogp_data.og.logo | default: with_ogp_schema.og.properties.logo.default %}
|
|
100
|
+
{%- if ogp_logo %}
|
|
101
|
+
<meta property="og:logo" content="{{ site.url }}{{ site.baseurl }}{{ ogp_logo }}" />
|
|
102
|
+
{%- endif %}
|
|
58
103
|
{%- endif %}
|
|
59
104
|
|
|
60
105
|
{%- comment %} --- URL --- {% endcomment %}
|
|
61
106
|
{%- if with_ogp_data[property].url %}
|
|
62
|
-
<meta
|
|
107
|
+
<meta {{ meta_attr }}="{{ property }}:url" content="{{ site.url }}{{ site.baseurl }}{{ page.url }}" />
|
|
63
108
|
{%- endif %}
|
|
64
109
|
|
|
65
110
|
{%- comment %} --- Description --- {% endcomment %}
|
|
66
111
|
{%- if with_ogp_data[property].description %}
|
|
67
|
-
{%- if page.
|
|
68
|
-
<meta
|
|
112
|
+
{%- if page.excerpt %}
|
|
113
|
+
<meta {{ meta_attr }}="{{ property }}:description" content="{{ page.excerpt }}" />
|
|
69
114
|
{%- elsif page.title_lead %}
|
|
70
|
-
<meta
|
|
115
|
+
<meta {{ meta_attr }}="{{ property }}:description" content="{{ page.title_lead }}" />
|
|
71
116
|
{%- else %}
|
|
72
|
-
<meta
|
|
117
|
+
<meta {{ meta_attr }}="{{ property }}:description" content="{{ site.description }}" />
|
|
73
118
|
{%- endif %}
|
|
74
119
|
{%- endif %}
|
|
75
120
|
|
|
76
121
|
{%- comment %} --- Image --- {% endcomment %}
|
|
77
122
|
{%- if with_ogp_data[property].image %}
|
|
78
|
-
<meta
|
|
123
|
+
<meta {{ meta_attr }}="{{ property }}:image" content="{{ site.url }}{{ site.baseurl }}/assets/img/centos-social-share.png" />
|
|
79
124
|
{%- if property == "og" %}
|
|
80
|
-
<meta
|
|
81
|
-
<meta
|
|
82
|
-
<meta
|
|
83
|
-
<meta
|
|
125
|
+
<meta {{ meta_attr }}="{{ property }}:image:secure_url" content="{{ site.url }}{{ site.baseurl }}/assets/img/centos-social-share.png" />
|
|
126
|
+
<meta {{ meta_attr }}="{{ property }}:image:type" content="{{ ogp_image_type }}" />
|
|
127
|
+
<meta {{ meta_attr }}="{{ property }}:image:width" content="{{ ogp_image_width }}" />
|
|
128
|
+
<meta {{ meta_attr }}="{{ property }}:image:height" content="{{ ogp_image_height }}" />
|
|
84
129
|
{%- endif %}
|
|
130
|
+
<meta {{ meta_attr }}="{{ property }}:image:alt" content="{{ with_ogp_data[property].image.alt | default: with_ogp_og_image_schema.alt.default | default: 'The CentOS Project' }}" />
|
|
85
131
|
{%- endif %}
|
|
86
132
|
|
|
87
|
-
{%- comment %} ---
|
|
88
|
-
{%- if
|
|
89
|
-
|
|
133
|
+
{%- comment %} --- OG site_name and locale (after image) --- {% endcomment %}
|
|
134
|
+
{%- if property == "og" %}
|
|
135
|
+
{%- assign ogp_site_name = with_ogp_data.og.site_name | default: site.title %}
|
|
136
|
+
{%- if ogp_site_name %}
|
|
137
|
+
<meta property="og:site_name" content="{{ ogp_site_name }}" />
|
|
138
|
+
{%- endif %}
|
|
139
|
+
<meta property="og:locale" content="{{ ogp_locale }}" />
|
|
90
140
|
{%- endif %}
|
|
91
141
|
|
|
92
|
-
{%- comment %} --- Override common attributes in both `og` and `twitter` properties --- {% endcomment %}
|
|
93
|
-
{%- if property[0] == "og" %}
|
|
94
|
-
{%- for attribute in property[1] %}
|
|
95
|
-
{%- if attribute[0] == "image" or attribute[0] == "audio" or attribute[0] == "video" %}
|
|
96
|
-
{%- for item in attribute[1] %}
|
|
97
|
-
<meta property="{{ property[0] }}:{{ attribute[0] }}:{{ item[0] }}" content="{{ item[1] }}" />
|
|
98
|
-
{%- endfor %}
|
|
99
|
-
{%- else %}
|
|
100
|
-
<meta property="{{ property[0] }}:{{ attribute[0] }}" content="{{ attribute[1] }}" />
|
|
101
|
-
{%- endif %}
|
|
102
|
-
{%- endfor %}
|
|
103
|
-
{%- elsif property[0] == "twitter" %}
|
|
104
|
-
{%- for attribute in property[1] %}
|
|
105
|
-
{%- if attribute[0] == "image" or attribute[0] == "site" or attribute[0] == "creator" %}
|
|
106
|
-
{%- for item in attribute[1] %}
|
|
107
|
-
<meta property="{{ property[0] }}:{{ attribute[0] }}:{{ item[0] }}" content="{{ item[1] }}" />
|
|
108
|
-
{%- endfor %}
|
|
109
|
-
{%- else %}
|
|
110
|
-
<meta property="{{ property[0] }}:{{ attribute[0] }}" content="{{ attribute[1] }}" />
|
|
111
|
-
{%- endif %}
|
|
112
|
-
{%- endfor %}
|
|
113
|
-
{%- endif %}
|
|
114
142
|
{%- endfor %}
|
|
115
143
|
|
|
116
|
-
{%- comment %} --- Specific attributes for `og` property --- {% endcomment %}
|
|
117
|
-
{%- if ogp_og_type == nil %}
|
|
118
|
-
<meta property="og:type" content="website" />
|
|
119
|
-
{%- endif %}
|
|
120
|
-
|
|
121
|
-
{%- comment %} --- Specific attributes for `twitter` property --- {% endcomment %}
|
|
122
|
-
{%- if with_ogp_data.twitter.card == nil %}
|
|
123
|
-
<meta property="twitter:card" content="summary_large_image" />
|
|
124
|
-
{%- endif %}
|
|
125
|
-
{%- if with_ogp_data.twitter.site.id == nil %}
|
|
126
|
-
<meta property="twitter:site:id" content="@CentOS" />
|
|
127
|
-
{%- endif %}
|
|
128
|
-
{%- if with_ogp_data.twitter.creator.id == nil %}
|
|
129
|
-
<meta property="twitter:creator:id" content="@CentOS" />
|
|
130
|
-
{%- endif %}
|
|
131
|
-
|
|
132
144
|
{% endif %}
|
|
@@ -33,30 +33,32 @@ Optional Inputs (from include):
|
|
|
33
33
|
- data: TOC configuration object
|
|
34
34
|
|
|
35
35
|
Data Source Hierarchy (in priority order):
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
3. site.data.toc - Site configuration
|
|
39
|
-
4. site.data.base.toc - Theme defaults
|
|
36
|
+
- with_toc: include.with_toc → page.with_toc
|
|
37
|
+
- with_toc_data: include.data → page.with_toc_data → site.data.toc → site.data.base.toc
|
|
40
38
|
================================================================================
|
|
41
39
|
{% endcomment %}
|
|
42
40
|
|
|
43
|
-
{%-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
{%- assign with_toc = include.with_toc
|
|
42
|
+
| default: page.with_toc
|
|
43
|
+
%}
|
|
44
|
+
|
|
45
|
+
{%- if with_toc -%}
|
|
46
|
+
{%- assign with_toc_data = include.data | default: page.with_toc_data | default: site.data.toc | default: site.data.base.toc %}
|
|
47
|
+
{%- assign with_toc_schema = site.data.base.toc_schema.properties["with_toc_data"].properties %}
|
|
46
48
|
|
|
47
49
|
{%- comment %} === Configuration properties === {% endcomment %}
|
|
48
|
-
{%- assign class =
|
|
49
|
-
{%- assign id =
|
|
50
|
-
{%- assign item_class =
|
|
51
|
-
{%- assign anchor_class =
|
|
52
|
-
{%- assign h_min =
|
|
53
|
-
{%- assign h_max =
|
|
54
|
-
{%- assign ordered =
|
|
55
|
-
{%- assign submenu_class =
|
|
56
|
-
{%- assign base_url =
|
|
57
|
-
{%- assign sanitize =
|
|
58
|
-
{%- assign skip_no_ids =
|
|
59
|
-
{%- assign flat_toc =
|
|
50
|
+
{%- assign class = with_toc_data.class | default: with_toc_schema["class"].default %}
|
|
51
|
+
{%- assign id = with_toc_data.id | default: with_toc_schema["id"].default | default: "page-toc" %}
|
|
52
|
+
{%- assign item_class = with_toc_data.item_class | default: with_toc_schema["item_class"].default | default: "my-2" %}
|
|
53
|
+
{%- assign anchor_class = with_toc_data.anchor_class | default: with_toc_schema["anchor_class"].default | default: site.with_link_decorator_data.default_link_classes %}
|
|
54
|
+
{%- assign h_min = with_toc_data.h_min | default: with_toc_schema["h_min"].default %}
|
|
55
|
+
{%- assign h_max = with_toc_data.h_max | default: with_toc_schema["h_max"].default %}
|
|
56
|
+
{%- assign ordered = with_toc_data.ordered | default: with_toc_schema["ordered"].default %}
|
|
57
|
+
{%- assign submenu_class = with_toc_data.submenu_class | default: with_toc_schema["submenu_class"].default %}
|
|
58
|
+
{%- assign base_url = with_toc_data.base_url | default: with_toc_schema["base_url"].default %}
|
|
59
|
+
{%- assign sanitize = with_toc_data.sanitize | default: with_toc_schema["sanitize"].default %}
|
|
60
|
+
{%- assign skip_no_ids = with_toc_data.skip_no_ids | default: with_toc_schema["skip_no_ids"].default %}
|
|
61
|
+
{%- assign flat_toc = with_toc_data.flat_toc | default: with_toc_schema["flat_toc"].default %}
|
|
60
62
|
|
|
61
63
|
{%- comment %} === Presentation === {% endcomment %}
|
|
62
64
|
|
data/_layouts/base/default.html
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="{{ page.lang | default: 'en' }}"{% if page.with_ogp %} prefix="og: https://ogp.me/ns#"{% endif %}>
|
|
3
|
-
{% include base/
|
|
3
|
+
{% include base/head.html.liquid -%}
|
|
4
4
|
<body id="top" class="bg-body">
|
|
5
5
|
|
|
6
|
-
{% include base/
|
|
6
|
+
{% include base/navbar.html.liquid -%}
|
|
7
7
|
|
|
8
8
|
{% include base/project.html.liquid %}
|
|
9
9
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
{% if page.with_title %}
|
|
29
29
|
<div class="row mb-3">
|
|
30
|
-
<div class="{{ site.data.base.
|
|
30
|
+
<div class="{{ site.data.base.content.class | default: 'col' }}">
|
|
31
31
|
{% include base/title.html.liquid %}
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
{% if page.with_artwork %}
|
|
37
37
|
<div class="row mb-3">
|
|
38
|
-
<div class="{{ site.data.base.
|
|
38
|
+
<div class="{{ site.data.base.content.class | default: 'col' }}">
|
|
39
39
|
{% include base/artwork.html.liquid %}
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
{% if page.with_toc %}
|
|
45
45
|
<div class="row mb-3">
|
|
46
|
-
<div class="{{ site.data.base.
|
|
46
|
+
<div class="{{ site.data.base.content.class | default: 'col' }}">
|
|
47
47
|
{% include base/toc.html.liquid %}
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
{% if page.with_content %}
|
|
53
53
|
<div class="row mb-3">
|
|
54
|
-
<div class="{{ site.data.base.
|
|
54
|
+
<div class="{{ site.data.base.content.class | default: 'col' }} content">
|
|
55
55
|
{{ content }}
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
|
@@ -61,11 +61,8 @@
|
|
|
61
61
|
|
|
62
62
|
{% if page.with_footer %}
|
|
63
63
|
<footer class="footer small bg-dark text-centos-purple-100 pt-5">
|
|
64
|
-
{% include base/
|
|
64
|
+
{% include base/footer.html.liquid -%}
|
|
65
65
|
</footer>
|
|
66
66
|
{% endif %}
|
|
67
|
-
|
|
68
|
-
{% include base/partials/script.html.liquid -%}
|
|
69
|
-
|
|
70
67
|
</body>
|
|
71
68
|
</html>
|
|
@@ -75,14 +75,12 @@ body {
|
|
|
75
75
|
li {
|
|
76
76
|
list-style: none;
|
|
77
77
|
}
|
|
78
|
-
li
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
color: $body-color;
|
|
78
|
+
li::before {
|
|
79
|
+
content: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='6' height='6'><circle cx='256' cy='256' r='256' fill='rgba(#{to-rgb($body-color)},1)'/></svg>");
|
|
80
|
+
vertical-align: middle;
|
|
82
81
|
position: relative;
|
|
83
82
|
left: -0.5rem;
|
|
84
83
|
top: -0.2rem;
|
|
85
|
-
content:"\f111";
|
|
86
84
|
}
|
|
87
85
|
}
|
|
88
86
|
|
|
@@ -179,8 +177,8 @@ main {
|
|
|
179
177
|
// -------------------------------------------------------------------------------
|
|
180
178
|
// Heading Anchor Component
|
|
181
179
|
// -------------------------------------------------------------------------------
|
|
182
|
-
// :has() guard: position context
|
|
183
|
-
// padding
|
|
180
|
+
// :has() guard: position context for the anchor icon.
|
|
181
|
+
// No padding change — the icon translates left of the text start to preserve heading alignment.
|
|
184
182
|
.content > h1:has(.heading-anchor),
|
|
185
183
|
.content > h2:has(.heading-anchor),
|
|
186
184
|
.content > h3:has(.heading-anchor),
|
|
@@ -188,7 +186,6 @@ main {
|
|
|
188
186
|
.content > h5:has(.heading-anchor),
|
|
189
187
|
.content > h6:has(.heading-anchor) {
|
|
190
188
|
position: relative;
|
|
191
|
-
padding-right: 1.5rem;
|
|
192
189
|
}
|
|
193
190
|
.content > h1 .heading-anchor,
|
|
194
191
|
.content > h2 .heading-anchor,
|
|
@@ -197,16 +194,33 @@ main {
|
|
|
197
194
|
.content > h5 .heading-anchor,
|
|
198
195
|
.content > h6 .heading-anchor {
|
|
199
196
|
position: absolute;
|
|
200
|
-
|
|
201
|
-
top:
|
|
202
|
-
|
|
203
|
-
|
|
197
|
+
left: 0;
|
|
198
|
+
top: 0;
|
|
199
|
+
height: 1lh;
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
transform: translateX(-100%);
|
|
203
|
+
font-size: 1em;
|
|
204
204
|
margin-left: 0 !important;
|
|
205
205
|
margin-right: 0 !important;
|
|
206
|
-
opacity: 0
|
|
206
|
+
opacity: 0;
|
|
207
207
|
pointer-events: auto;
|
|
208
208
|
text-decoration: none;
|
|
209
209
|
}
|
|
210
|
+
.content > h1 .heading-anchor > i,
|
|
211
|
+
.content > h1 .heading-anchor > svg,
|
|
212
|
+
.content > h2 .heading-anchor > i,
|
|
213
|
+
.content > h2 .heading-anchor > svg,
|
|
214
|
+
.content > h3 .heading-anchor > i,
|
|
215
|
+
.content > h3 .heading-anchor > svg,
|
|
216
|
+
.content > h4 .heading-anchor > i,
|
|
217
|
+
.content > h4 .heading-anchor > svg,
|
|
218
|
+
.content > h5 .heading-anchor > i,
|
|
219
|
+
.content > h5 .heading-anchor > svg,
|
|
220
|
+
.content > h6 .heading-anchor > i,
|
|
221
|
+
.content > h6 .heading-anchor > svg {
|
|
222
|
+
font-size: 0.5em;
|
|
223
|
+
}
|
|
210
224
|
.content > h1:hover .heading-anchor,
|
|
211
225
|
.content > h2:hover .heading-anchor,
|
|
212
226
|
.content > h3:hover .heading-anchor,
|
|
Binary file
|