1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-19 14:14:17 +00:00

Normalized attribute name in HTML

Add prefix `data-` for following attributes:
- `topbar-visible`
- `mode`
- `label-text`
- `title-succeed`
This commit is contained in:
Cotes Chung
2022-01-13 00:23:08 +08:00
parent 96e7cd79af
commit f8f4dd889e
14 changed files with 43 additions and 40 deletions

View File

@@ -165,13 +165,13 @@
{% endif %}
{% capture _label %}
<span label-text="{{ _label_text | strip }}"><i class="{{ _label_icon }}"></i></span>
<span data-label-text="{{ _label_text | strip }}"><i class="{{ _label_icon }}"></i></span>
{% endcapture %}
{% assign _new_content = _new_content | append: _snippet
| append: '<div class="code-header">'
| append: _label
| append: '<button aria-label="copy" title-succeed="'
| append: '<button aria-label="copy" data-title-succeed="'
| append: site.data.locales[lang].post.button.copy_code.succeed
| append: '"><i class="far fa-clipboard"></i></button></div>'
| append: '<div class="highlight"><code>'