pidgin/nest

Merged in default (pull request #45)

2019-08-22, Gary Kramlich
d070f265250b
Merged in default (pull request #45)

Prettify inline code styles

Approved-by: Gary Kramlich
--- a/hugo/themes/learn/static/css/theme.css Wed Aug 21 00:33:22 2019 -0400
+++ b/hugo/themes/learn/static/css/theme.css Thu Aug 22 05:13:40 2019 +0000
@@ -622,9 +622,13 @@
code {
border-radius: 2px;
white-space: nowrap;
- color: whitesmoke;
- background: #8451a1;
- padding: 0px 6px;
+ color: #8451a1;
+ background: #e2e2fd;
+ padding: 1px 3px;
+}
+code.with-copy {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
}
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code, h7 code {
border-radius: 6px;
@@ -633,15 +637,6 @@
background: #e2e2fd;
padding: 0px 2px;
}
-code + .copy-to-clipboard {
- margin-left: -6px;
- margin-top: -1px;
- border-left: 0 !important;
- font-size: inherit !important;
- height: 18px;
- top: 0;
- background-color: #8451a1;
-}
pre {
padding: 1rem;
margin: 2rem 0;
@@ -905,6 +900,9 @@
overflow: auto;
position: relative;
}
+.hljs {
+ padding:0;
+}
.hljs::selection, .hljs span::selection {
background: #b7b7b7;
}
@@ -1050,22 +1048,12 @@
}
}
.copy-to-clipboard {
- background-image: url(../images/clippy.svg);
- background-position: 50% 50%;
- background-size: 16px 16px;
- background-repeat: no-repeat;
- width: 27px;
- height: 1.45rem;
- top: -1px;
display: inline-block;
- vertical-align: middle;
- position: relative;
- color: #5e5e5e;
- background-color: #FFF7DD;
- margin-left: -.2rem;
+ color: #8451a1;
+ background-color: #e2e2fd;
cursor: pointer;
- border-radius: 0 2px 2px 0;
- margin-bottom: 1px;
+ border-radius: 2px 2px 2px 0;
+ padding: 2px;
}
.copy-to-clipboard:hover {
background-color: #E8E2CD;
--- a/hugo/themes/learn/static/images/clippy.svg Wed Aug 21 00:33:22 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<svg height="1024" width="896" xmlns="http://www.w3.org/2000/svg">
- <path
- stroke="white"
- fill="white"
- d="M128 768h256v64H128v-64zm320-384H128v64h320v-64zm128 192V448L384 640l192 192V704h320V576H576zm-288-64H128v64h160v-64zM128 704h160v-64H128v64zm576 64h64v128c-1 18-7 33-19 45s-27 18-45 19H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h192C256 57 313 0 384 0s128 57 128 128h192c35 0 64 29 64 64v320h-64V320H64v576h640V768zM128 256h512c0-35-29-64-64-64h-64c-35 0-64-29-64-64s-29-64-64-64-64 29-64 64-29 64-64 64h-64c-35 0-64 29-64 64z"/>
-</svg>
--- a/hugo/themes/learn/static/js/learn.js Wed Aug 21 00:33:22 2019 -0400
+++ b/hugo/themes/learn/static/js/learn.js Thu Aug 22 05:13:40 2019 +0000
@@ -199,7 +199,8 @@
const isTooShort = code.text().length < 5
if (!isInHeading && !isInToc && !isTooShort) {
- code.after('<span class="copy-to-clipboard" title="Copy to clipboard" />');
+ code.addClass('with-copy');
+ code.after('<i class="copy-to-clipboard far fa-copy" title="Copy to clipboard"></i>');
code.next('.copy-to-clipboard').on('mouseleave', removeTooltip);
}
});