From 5b9fdfe1e093f2b0019fc02b85a399cd9a9b1c92 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Fri, 13 Mar 2020 11:19:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A4=8D=E5=88=B6=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/_third-party/clipboard.ejs | 77 +++++++------------------- source/css/_third-party/clipboard.styl | 52 ++++++++--------- 2 files changed, 45 insertions(+), 84 deletions(-) diff --git a/layout/_third-party/clipboard.ejs b/layout/_third-party/clipboard.ejs index 8867978..5cb8cc9 100644 --- a/layout/_third-party/clipboard.ejs +++ b/layout/_third-party/clipboard.ejs @@ -1,10 +1,12 @@ diff --git a/source/css/_third-party/clipboard.styl b/source/css/_third-party/clipboard.styl index f3cf67c..5844ccd 100644 --- a/source/css/_third-party/clipboard.styl +++ b/source/css/_third-party/clipboard.styl @@ -1,33 +1,33 @@ //代码块复制按钮 if hexo-config('style.body.highlight.copy_btn') .highlight - //方便copy代码按钮(btn-copy)的定位 - position: relative + //方便copy代码按钮(btn-copy)的定位 + position: relative .btn-copy - display: inline-block - cursor: pointer - border: none - disable-user-select() - -webkit-appearance: none - font-size: "calc(%s - 1px)" % $fontsize-code - font-weight: bold - padding: $gap * 0.25 $gap * 0.5 - >i - margin-right: 4px - color: $color-meta - background: $color-card - border-bottom-left-radius: $border-codeblock - border-top-right-radius: $border-codeblock - box-shadow: $boxshadow-card - position: absolute - top: 0 - right: 0 - opacity: 0 - trans() - &:hover - color: $color-hover - background: bgcolor($color-hover) + display: inline-block + cursor: pointer + border: none + disable-user-select() + -webkit-appearance: none + font-size: "calc(%s - 1px)" % $fontsize-code + font-weight: bold + padding: $gap * 0.25 $gap * 0.5 + >i + margin-right: 4px + color: $color-meta + background: $color-card + border-bottom-left-radius: $border-codeblock + border-top-right-radius: $border-codeblock + box-shadow: $boxshadow-card + position: absolute + top: 0 + right: 0 + opacity: 0 + trans() + &:hover + color: $color-hover + background: bgcolor($color-hover) .highlight:hover .btn-copy - opacity: 1 + opacity: 1