diff --git a/source/css/_layout/tag-plugins/folding.styl b/source/css/_layout/tag-plugins/folding.styl index 3a47090..3ee8179 100644 --- a/source/css/_layout/tag-plugins/folding.styl +++ b/source/css/_layout/tag-plugins/folding.styl @@ -60,6 +60,8 @@ details.folding[child=codeblock]>div.body margin: 0 figcaption display: none + span + background: var(--theme-block) .code:before content: none .highlight+.highlight diff --git a/source/css/_layout/tag-plugins/note.styl b/source/css/_layout/tag-plugins/note.styl index e0e8a46..37cfc76 100644 --- a/source/css/_layout/tag-plugins/note.styl +++ b/source/css/_layout/tag-plugins/note.styl @@ -40,6 +40,9 @@ margin: 0 border: none background: none + figcaption + span + background: var(--theme-block) .highlight+.highlight border-top: 1px dashed var(--theme-border) border-top-left-radius: 0 diff --git a/source/css/_plugins/copycode.styl b/source/css/_plugins/copycode.styl index fc76b82..bb49207 100644 --- a/source/css/_plugins/copycode.styl +++ b/source/css/_plugins/copycode.styl @@ -5,35 +5,36 @@ position: absolute top: 0 right: 0 - padding: 4px 0.5rem - opacity: 0 + padding: 0px 0.5rem font-weight: 700 - color: var(--text-p2) + visibility: hidden border-bottom-left-radius: $border-bar border-bottom-right-radius: $border-bar - background: var(--block-hover) + background: var(--card) display: block cursor: pointer - margin-right: 0.5rem + margin-right: 4px + margin-top: 4px + border-radius: 'calc(%s - 4px)' % $border-block .highlight:hover .code:before - opacity: 0 + visibility: hidden .copy-btn - opacity: 0.75 - -.highlight .code .copy-btn:hover - opacity: 1 + visibility: visible .highlight .code .copy-btn.success - color: $c-green - opacity: 0.75 + background: $c-green + color: white + visibility: visible .highlight .code .copy-btn.warning - color: $c-orange - opacity: 0.75 + background: $c-orange + color: white + visibility: visible .md-text .folding[child=codeblock] - .highlight .code .copy-btn - margin-top: 1rem + .code .copy-btn + z-index 1 + margin-right: 1rem border-radius: $border-bar \ No newline at end of file diff --git a/source/js/plugins/copycode.js b/source/js/plugins/copycode.js index e473327..8c298ea 100644 --- a/source/js/plugins/copycode.js +++ b/source/js/plugins/copycode.js @@ -13,7 +13,7 @@ codeElementArr.forEach(code => { codeCopyBtn.innerText = stellar.plugins.copycode.success_text codeCopyBtn.classList.add('success') - hud.toast(stellar.plugins.copycode.toast) + hud.toast(stellar.plugins.copycode.toast, 2500) setTimeout(() => { codeCopyBtn.innerText = stellar.plugins.copycode.default_text codeCopyBtn.classList.remove('success')