From 36f5b76c5fd14f31402cc3ece12c1e31d61df337 Mon Sep 17 00:00:00 2001 From: EnigmaCurry Date: Tue, 28 May 2024 23:42:35 -0400 Subject: [PATCH] edit box copy to clipboard --- hugo/layouts/shortcodes/edit.html | 4 ++-- hugo/static/css/custom.css | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/hugo/layouts/shortcodes/edit.html b/hugo/layouts/shortcodes/edit.html index 554d3fb14..acba4c1f5 100644 --- a/hugo/layouts/shortcodes/edit.html +++ b/hugo/layouts/shortcodes/edit.html @@ -1,6 +1,6 @@ -
+
Edit this file: {{ (.Get "file") }}
-
{{ .Inner }}
+
{{ .Inner }}
diff --git a/hugo/static/css/custom.css b/hugo/static/css/custom.css index c20b66380..130f0b13d 100644 --- a/hugo/static/css/custom.css +++ b/hugo/static/css/custom.css @@ -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; @@ -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 ); }