mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-06-25 18:20:31 +00:00
theme: adjust copy-to-clipboard #29
Copy to clipboard has a lot of smaller issues: - contrast for inline code is bad in notice boxes - bordering the icon does not work well with bordering of inline code - hover color on inline code icon is blurred - hover color on block code is statically set to link color of standard theme And related to that: - tooltip misses outline border, especially when displayed over dark background (like block code) - inline code font size is sized by factor of parent font size, which is a hassle if you want to replicate the size for other elements
This commit is contained in:
parent
798ae66da8
commit
541a634f6e
2 changed files with 31 additions and 30 deletions
static/js
|
@ -337,6 +337,7 @@ jQuery(function() {
|
|||
clipInit = true;
|
||||
}
|
||||
|
||||
code.addClass('copy-to-clipboard-inline');
|
||||
code.after('<span class="copy-to-clipboard" title="Copy to clipboard" />');
|
||||
code.next('.copy-to-clipboard').on('mouseleave', function() {
|
||||
$(this).attr('aria-label', null).removeClass('tooltipped tooltipped-s tooltipped-w');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue