Skip to content

Commit

Permalink
edit box copy to clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
EnigmaCurry committed May 29, 2024
1 parent 252050c commit 36f5b76
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions hugo/layouts/shortcodes/edit.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="box notices cstyle tip edit">
<div class="box notices cstyle edit">
<div class="box-label"><i class="fa-fw fas fa-keyboard"></i>Edit this file: {{ (.Get "file") }}</div>
<div class="box-content">
<pre>{{ .Inner }}</pre>
<code><pre>{{ .Inner }}</pre></code>
</div>
</div>
24 changes: 16 additions & 8 deletions hugo/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,29 @@ h1 {
padding: 0 !important;
}

.box.run pre {
.run pre,
.edit pre {
margin: 0 !important;
}

.box.run .box-content span,
.box.run .box-content code {
.run .box-content span,
.run .box-content code,
.edit .box-content span,
.edit .box-content code {
display: block;
border: none;
padding: 0;
}

.box.run .box-content pre {
.run .box-content pre,
.edit .box-content pre {
display: block;
border: none;
background-color: #111;
}

.box.run .copy-to-clipboard-button {
.run .copy-to-clipboard-button,
.edit .copy-to-clipboard-button {
position: relative;
scale: 2;
float:right;
Expand All @@ -52,16 +57,19 @@ h1 {
background: none;
}

.box.run:hover .copy-to-clipboard-button i {
.run:hover .copy-to-clipboard-button i,
.edit:hover .copy-to-clipboard-button i {
display: initial;
}

.box.run .copy-to-clipboard-button i {
.run .copy-to-clipboard-button i,
.edit .copy-to-clipboard-button i {
opacity: 0.5;
display: none;
}

.box.run .copy-to-clipboard-button i:hover {
.run .copy-to-clipboard-button i:hover,
.edit .copy-to-clipboard-button i:hover {
font-weight: 800;
color: rgba( 130, 229, 80, 1 );
}
Expand Down

0 comments on commit 36f5b76

Please sign in to comment.