initial
This commit is contained in:
47
themes/next/source/css/_common/components/third-party/copy-code.styl
vendored
Normal file
47
themes/next/source/css/_common/components/third-party/copy-code.styl
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
.copy-btn {
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
line-height: 20px;
|
||||
color: #333;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
if hexo-config('codeblock.copy_button.style') == 'flat' {
|
||||
background-color: #fff;
|
||||
border: none;
|
||||
}
|
||||
else {
|
||||
background-color: #eee;
|
||||
background-image: linear-gradient(#fcfcfc, #eee);
|
||||
border: 1px solid #d5d5d5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
user-select: none;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.highlight-wrap .copy-btn {
|
||||
transition: opacity .3s ease-in-out;
|
||||
opacity: 0;
|
||||
padding: 2px 6px;
|
||||
position: absolute;
|
||||
if hexo-config('codeblock.copy_button.style') == 'flat' {
|
||||
right: 0px;
|
||||
height: 42px;
|
||||
}
|
||||
else {
|
||||
right: 4px;
|
||||
top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.highlight-wrap:hover .copy-btn,
|
||||
.highlight-wrap .copy-btn:focus {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.highlight-wrap {
|
||||
position: relative;
|
||||
}
|
Reference in New Issue
Block a user