css
This commit is contained in:
parent
bc3a170415
commit
cbc2a8189d
|
@ -32,19 +32,17 @@ hexo.extend.tag.register('copy', function(args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var el = '';
|
var el = '';
|
||||||
el += '<div class="tag-plugin copy">';
|
el += '<div class="tag-plugin copy"';
|
||||||
|
|
||||||
el += '<div class="link-box"';
|
|
||||||
if (args.width) {
|
if (args.width) {
|
||||||
el += ' width="' + args.width + '"';
|
el += ' width="' + args.width + '"';
|
||||||
}
|
}
|
||||||
el += '>';
|
el += '>';
|
||||||
|
|
||||||
el += '<input class="copy-area" readonly id="' + generate_id(text) + '"';
|
el += '<input class="copy-area" readonly id="' + generate_id(text) + '"';
|
||||||
el += ' value="' + text + '">';
|
el += ' value="' + text + '">';
|
||||||
el += '<button class="copy-btn" onclick="util.copy("' + generate_id(text) + '","Copied!")">';
|
el += '<button class="copy-btn" onclick="util.copy("' + generate_id(text) + '","Copied!")">';
|
||||||
el += '<svg class="icon copy-btn" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z"></path></svg>';
|
el += '<svg class="icon copy-btn" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z"></path></svg>';
|
||||||
el += '</button>';
|
el += '</button>';
|
||||||
el += '</div>';
|
|
||||||
|
|
||||||
el += '</div>';
|
el += '</div>';
|
||||||
return el;
|
return el;
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
.md .tag-plugin.copy
|
.md .tag-plugin.copy
|
||||||
display: flex
|
display: flex
|
||||||
.link-box
|
justify-content: space-between
|
||||||
background: var(--block)
|
box-sizing: border-box
|
||||||
border-radius: $border-block
|
background: var(--block)
|
||||||
border: 1px solid var(--block-border)
|
border-radius: $border-block
|
||||||
overflow: hidden
|
border: 1px solid var(--block-border)
|
||||||
max-width: 100%
|
overflow: hidden
|
||||||
display: flex
|
width: 320px
|
||||||
width: 320px
|
max-width: 100%
|
||||||
&[width='max']
|
&[width='max']
|
||||||
width: 100%
|
width: 100%
|
||||||
@media screen and (max-width: $device-mobile-425)
|
@media screen and (max-width: $device-mobile-425)
|
||||||
min-width: 100%
|
min-width: 100%
|
||||||
|
|
||||||
input.copy-area
|
input.copy-area
|
||||||
display: inline-block
|
display: inline-block
|
||||||
padding: 1em
|
padding: 1em
|
||||||
|
@ -23,7 +24,6 @@
|
||||||
display: inline-block
|
display: inline-block
|
||||||
background: var(--block-hover)
|
background: var(--block-hover)
|
||||||
line-height: 0
|
line-height: 0
|
||||||
height: 100%
|
|
||||||
font-size: 1rem
|
font-size: 1rem
|
||||||
padding: 0.5rem 1rem
|
padding: 0.5rem 1rem
|
||||||
color: var(--text-p2)
|
color: var(--text-p2)
|
||||||
|
|
|
@ -66,3 +66,5 @@
|
||||||
display: none
|
display: none
|
||||||
p,.highlight,ol,ul,.tag-plugin
|
p,.highlight,ol,ul,.tag-plugin
|
||||||
margin: .5rem 0
|
margin: .5rem 0
|
||||||
|
.tag-plugin.copy
|
||||||
|
width: 240px
|
||||||
|
|
Loading…
Reference in New Issue