1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Improve the clipboard UX

This commit is contained in:
Cotes Chung
2021-09-15 14:36:37 +08:00
parent 2877896b9e
commit 53b0329e5a
7 changed files with 66 additions and 19 deletions

View File

@@ -116,7 +116,7 @@
{% capture _tag_head %}<div class="language-{% endcapture %}
{% assign _replacement = '-rouge"><div class="code-header" data-lang="'
| append: _lang
| append: '"><button><i class="fa-fw far fa-clipboard"></i></button></div><div class="highlight">'
| append: '"><button><i class="far fa-clone"></i></button></div><div class="highlight">'
%}
{% capture _tag_tail %}{{ _snippet | replace: '-rouge"><div class="highlight">', _replacement }}{% endcapture %}
{% assign _new_content = _new_content | append: _tag_head | append: _tag_tail %}