jekyll-theme-centos 2.52.0.beta.78 → 2.52.0.beta.80
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 307b746f3f409b32c9b9657080fbf0e738078d3b5c43cfb6847091524aa2fffe
|
|
4
|
+
data.tar.gz: e753c11b15275b7e27cea245e701b6ab7eaff01912ed00bfea18a399b935b14a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6404a468cabfd94a178ee29548e7346d59875426313641541816486b1075e163602705d9ec17642da10201abbf82badf95fa87836ce8055b7d16a4ac4be7d5d6
|
|
7
|
+
data.tar.gz: 96f76da0458659ccccc7ccc671844dd6c639554944382e8e766d72875fba67731760dea823ab0a78017b01280abe907f089ebf6263d643e7fbe6ce5bbb478f6b
|
|
@@ -18,13 +18,16 @@
|
|
|
18
18
|
{%- else %}
|
|
19
19
|
{%- assign _item_name = item.name %}
|
|
20
20
|
{%- endif %}
|
|
21
|
+
{%- assign _webaim_fcolor = item.text_color_hex | remove: '#' | upcase %}
|
|
22
|
+
{%- assign _webaim_bcolor = item.hex | remove: '#' | upcase %}
|
|
23
|
+
{%- capture _webaim_link %}https://webaim.org/resources/contrastchecker/?fcolor={{ _webaim_fcolor }}&bcolor={{ _webaim_bcolor }}{%- endcapture %}
|
|
21
24
|
<tr>
|
|
22
25
|
<td class="text-nowrap">{{ _item_name }}</td>
|
|
23
26
|
<td class="text-nowrap"><i class="fas fa-circle fa-xl" style="color: {{ item.hex }}"></i><span role="button" class="copy-btn" data-bs-toggle="tooltip" data-bs-title="Copy hex value" data-copy-value="{{ item.hex }}" aria-label="Copy hex value {{ item.hex }}"><code>{{ item.hex }}</code> <span class="fa-regular fa-copy"></span></span></td>
|
|
24
27
|
<td class="text-nowrap"><span role="button" class="copy-btn" data-bs-toggle="tooltip" data-bs-title="Copy RGB value" data-copy-value="{{ item.rgb }}" aria-label="Copy RGB value {{ item.rgb }}"><code>{{ item.rgb }}</code> <span class="fa-regular fa-copy"></span></span></td>
|
|
25
28
|
<td class="text-nowrap"><span role="button" class="copy-btn" data-bs-toggle="tooltip" data-bs-title="Copy HSV value" data-copy-value="{{ item.hsv }}" aria-label="Copy HSV value {{ item.hsv }}"><code>{{ item.hsv }}</code> <span class="fa-regular fa-copy"></span></span></td>
|
|
26
29
|
<td><span class="badge {{ item.text_badge }}">{{ item.text_color }}</span></td>
|
|
27
|
-
<td class="text-nowrap"><code>{{ item.contrast_ratio | remove: '`' }}</code>
|
|
30
|
+
<td class="text-nowrap"><code>{{ item.contrast_ratio | remove: '`' }}</code> {% include base/link.html.liquid link=_webaim_link target="_blank" class="text-decoration-none" icon="fas fa-external-link-alt" data_bs_toggle="tooltip" data_bs_title="Verify with WebAIM" aria_label="Verify contrast ratio with WebAIM" %}</td>
|
|
28
31
|
<td class="text-nowrap">{% if item.wcag_2_2_aa %}<span class="d-inline-block" data-bs-toggle="tooltip" title="Exceeds WCAG 2.2 AA standard (4.5:1 minimum)"><i class="fas fa-circle-check text-success"></i></span>{% else %}<span class="d-inline-block" data-bs-toggle="tooltip" title="Underperforms WCAG 2.2 AA standard (4.5:1 minimum)"><i class="fas fa-circle-xmark text-danger"></i></span>{% endif %} <code>{{ item.wcag_2_2_aa_margin | remove: '`' }}</code></td>
|
|
29
32
|
<td class="text-nowrap">{% if item.wcag_2_2_aaa %}<span class="d-inline-block" data-bs-toggle="tooltip" title="Exceeds WCAG 2.2 AAA standard (7.0:1 minimum)"><i class="fas fa-circle-check text-success"></i></span>{% else %}<span class="d-inline-block" data-bs-toggle="tooltip" title="Underperforms WCAG 2.2 AAA standard (7.0:1 minimum)"><i class="fas fa-circle-xmark text-danger"></i></span>{% endif %} <code>{{ item.wcag_2_2_aaa_margin | remove: '`' }}</code></td>
|
|
30
33
|
</tr>
|
|
@@ -2,18 +2,29 @@
|
|
|
2
2
|
================================================================================
|
|
3
3
|
Template: Copy Value Component
|
|
4
4
|
Purpose: Copy to clipboard with visual feedback (checkmark + tooltip).
|
|
5
|
-
|
|
5
|
+
Decodes HTML-entity-escaped values back to plain text before copying.
|
|
6
6
|
================================================================================
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Required Usage (in template):
|
|
9
9
|
<span role="button" class="copy-btn" data-copy-value="{{ command | escape }}"
|
|
10
10
|
data-bs-toggle="tooltip" data-bs-title="Copy command">
|
|
11
11
|
<span class="fa-regular fa-copy"></span>
|
|
12
12
|
</span>
|
|
13
13
|
|
|
14
|
+
SECURITY — `data-copy-value` MUST always go through Liquid's `| escape` (or
|
|
15
|
+
equivalent HTML-attribute encoding) at the point where it is written, with no
|
|
16
|
+
exception for values that "look safe". The JS below decodes HTML entities
|
|
17
|
+
(", &, ', …) back to plain text before copying so the clipboard
|
|
18
|
+
receives the original string rather than its escaped form — this decoding is
|
|
19
|
+
a UX convenience, not sanitization, and provides no protection if the value
|
|
20
|
+
was interpolated unescaped in the first place. An unescaped, attacker-
|
|
21
|
+
influenced value (a query parameter, CMS field, etc.) placed directly in
|
|
22
|
+
data-copy-value breaks out of the HTML attribute at render time, before this
|
|
23
|
+
script ever runs.
|
|
24
|
+
|
|
14
25
|
Strategic Design Logic:
|
|
15
|
-
-
|
|
16
|
-
|
|
26
|
+
- HTML entity decoding: reverses ", &, ' encoding so the
|
|
27
|
+
clipboard receives plain text, independent of how the value was escaped
|
|
17
28
|
- Visual feedback: checkmark icon + success tooltip
|
|
18
29
|
- Auto-reset: returns to original state after delay
|
|
19
30
|
- Clipboard API: native browser copy functionality
|
data/assets/js/base/backtotop.js
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
// Reads configuration from data attributes on this script tag
|
|
3
3
|
// Applied via backtotop.html.liquid template with data attributes
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// This script tag lives in <head>, before <body> exists. defer normally
|
|
6
|
+
// delays execution until after parsing, but consumers that inline this
|
|
7
|
+
// file (e.g. monolith bundling) drop the src that defer depends on, so the
|
|
8
|
+
// wait for DOMContentLoaded is done explicitly instead of relying on it.
|
|
9
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
6
10
|
const scriptTag = document.getElementById('centos-backtop')
|
|
7
11
|
|
|
8
12
|
if (!scriptTag) {
|
|
@@ -17,4 +21,4 @@
|
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
addBackToTop(config)
|
|
20
|
-
})
|
|
24
|
+
})
|
data/assets/js/base/highlight.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// Highlight.js Initialization
|
|
2
2
|
// Initializes syntax highlighting on all code blocks with 'hljs' class
|
|
3
3
|
// Enables copy-to-clipboard functionality via highlightjs-copy plugin
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
// This script tag lives in <head>, before <body> exists. defer normally
|
|
6
|
+
// delays execution until after parsing, but consumers that inline this
|
|
7
|
+
// file (e.g. monolith bundling) drop the src that defer depends on, so the
|
|
8
|
+
// wait for DOMContentLoaded is done explicitly instead of relying on it.
|
|
9
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
5
10
|
if (typeof hljs === 'undefined' || typeof CopyButtonPlugin === 'undefined') {
|
|
6
11
|
console.warn('highlight: hljs or CopyButtonPlugin not available')
|
|
7
12
|
return
|
|
@@ -9,4 +14,4 @@
|
|
|
9
14
|
document.querySelectorAll('.content code').forEach(el => el.classList.add('hljs'))
|
|
10
15
|
hljs.addPlugin(new CopyButtonPlugin())
|
|
11
16
|
hljs.highlightAll()
|
|
12
|
-
})
|
|
17
|
+
})
|