diff --git a/assets/sass/_code.scss b/assets/sass/_code.scss index a5c37b2..7d53c10 100644 --- a/assets/sass/_code.scss +++ b/assets/sass/_code.scss @@ -31,3 +31,39 @@ code > span > span { } } } + +.clipboard-button { + position: absolute; + right: 0; + margin: 5px; + font-size: 0.8em; + z-index: 1; + + opacity: 0.3; + transition: 0.1s; +} + +.clipboard-button svg { + fill: #c1c1c1; +} + +.clipboard-button:hover { + cursor: pointer; +} + +.clipboard-button:hover svg { + fill: #ffffff; +} + +.clipboard-button:focus { + outline: 0; +} + +.highlight { + position: relative; +} + +.highlight:hover .clipboard-button { + opacity: 1; + transition: 0.2s; +} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a465426..5bbc797 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -42,5 +42,9 @@ {{ block "footerJS" . }} {{ end }} + + {{ if (findRE "
+ {{ end }}