mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-08 01:22:29 +00:00
Re-enable pygments and add copy-code button
This commit is contained in:
1
public/css/copy-code-button.min.css
vendored
Normal file
1
public/css/copy-code-button.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.highlight-wrapper{display:block}.highlight-wrapper .lntd pre{padding:0}.chroma .lntd pre{border:0 solid #ccc}.chroma .lntd:first-child{padding:7px 7px 7px 10px;margin:0}.chroma .lntd:last-child{padding:7px 10px 7px 7px;margin:0}.highlight{position:relative;z-index:0;padding:0;margin:40px 0 10px;border-radius:4px}.highlight>.chroma{position:static;z-index:1;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px}.copy-code-button{position:absolute;z-index:2;right:0;top:-29px;font-size:13px;font-weight:700;line-height:14px;letter-spacing:.5px;width:65px;color:#fff;background-color:#000;border:1.25px solid #232326;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0;white-space:nowrap;padding:6px 6px 7px;margin:0 0 0 1px;cursor:pointer;opacity:.6}.copy-code-button:hover,.copy-code-button:focus,.copy-code-button:active,.copy-code-button:active:hover{color:#222225;background-color:#b3b3b3;opacity:.8}.copyable-text-area{position:absolute;height:0;z-index:-1;opacity:.01}.chroma [data-lang]:before{position:absolute;z-index:0;top:-29px;left:0;content:attr(data-lang);font-size:13px;font-weight:700;color:#fff;background-color:#000;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:6px 6px 7px;line-height:14px;opacity:.6;position:absolute;letter-spacing:.5px;border:1.25px solid #232326;margin:0 0 0 1px}
|
@@ -7,7 +7,9 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
h2:hover a, h3:hover a, h4:hover a {
|
||||
h2:hover a,
|
||||
h3:hover a,
|
||||
h4:hover a {
|
||||
visibility: visible;
|
||||
text-decoration: none;
|
||||
}
|
@@ -111,49 +111,49 @@ a:hover {
|
||||
color: var(--darkMaincolor);
|
||||
background-color: blue;
|
||||
}
|
||||
.highlight pre code[class=language-javaScript]::before,
|
||||
.highlight pre code[class="language-javaScript"]::before,
|
||||
.highlight pre code[class="language-js"]::before {
|
||||
content: "js";
|
||||
background: #f7df1e;
|
||||
color: black;
|
||||
}
|
||||
.highlight pre code[class*='language-yml']::before,
|
||||
.highlight pre code[class*='language-yaml']::before {
|
||||
content: 'yaml';
|
||||
.highlight pre code[class*="language-yml"]::before,
|
||||
.highlight pre code[class*="language-yaml"]::before {
|
||||
content: "yaml";
|
||||
background: #f71e6a;
|
||||
color: white;
|
||||
}
|
||||
.highlight pre code[class*='language-shell']::before,
|
||||
.highlight pre code[class*='language-bash']::before,
|
||||
.highlight pre code[class*='language-sh']::before {
|
||||
content: 'shell';
|
||||
.highlight pre code[class*="language-shell"]::before,
|
||||
.highlight pre code[class*="language-bash"]::before,
|
||||
.highlight pre code[class*="language-sh"]::before {
|
||||
content: "shell";
|
||||
background: rgb(118, 137, 118);
|
||||
color:white
|
||||
color: white;
|
||||
}
|
||||
.highlight pre code[class*='language-json']::before{
|
||||
content: 'json';
|
||||
.highlight pre code[class*="language-json"]::before {
|
||||
content: "json";
|
||||
background: dodgerblue;
|
||||
color: #000000
|
||||
color: #000000;
|
||||
}
|
||||
.highlight pre code[class*='language-python']::before,
|
||||
.highlight pre code[class*='language-py']::before {
|
||||
content: 'py';
|
||||
.highlight pre code[class*="language-python"]::before,
|
||||
.highlight pre code[class*="language-py"]::before {
|
||||
content: "py";
|
||||
background: blue;
|
||||
color: yellow ;
|
||||
color: yellow;
|
||||
}
|
||||
.highlight pre code[class*='language-css']::before{
|
||||
content: 'css';
|
||||
.highlight pre code[class*="language-css"]::before {
|
||||
content: "css";
|
||||
background: cyan;
|
||||
color: black ;
|
||||
color: black;
|
||||
}
|
||||
.highlight pre code[class*='language-go']::before{
|
||||
content: 'Go';
|
||||
.highlight pre code[class*="language-go"]::before {
|
||||
content: "Go";
|
||||
background: cyan;
|
||||
color: royalblue ;
|
||||
color: royalblue;
|
||||
}
|
||||
.highlight pre code[class*='language-md']::before,
|
||||
.highlight pre code[class*='language-md']::before{
|
||||
content: 'Markdown';
|
||||
.highlight pre code[class*="language-md"]::before,
|
||||
.highlight pre code[class*="language-md"]::before {
|
||||
content: "Markdown";
|
||||
background: royalblue;
|
||||
color: whitesmoke ;
|
||||
color: whitesmoke;
|
||||
}
|
@@ -1,18 +1,18 @@
|
||||
/* Markdown */
|
||||
:root{
|
||||
--maincolor: #a15bc2;
|
||||
--bordercl: #a15bc2;
|
||||
--callouctcolor:dodgerblue;
|
||||
--hovercolor: #a15bc2;
|
||||
--darkMaincolor: #a15bc2;
|
||||
:root {
|
||||
--maincolor: #a15bc2;
|
||||
--bordercl: #a15bc2;
|
||||
--callouctcolor: dodgerblue;
|
||||
--hovercolor: #a15bc2;
|
||||
--darkMaincolor: #a15bc2;
|
||||
}
|
||||
html {
|
||||
color: #232333;
|
||||
font-family: 'Roboto Mono', monospace;
|
||||
font-family: "Roboto Mono", monospace;
|
||||
font-size: 18px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
body{
|
||||
body {
|
||||
display: block;
|
||||
background-color: #f8f8f8;
|
||||
margin: 8px;
|
||||
@@ -27,7 +27,7 @@ body{
|
||||
}
|
||||
|
||||
p {
|
||||
font-family: 'Roboto Light', sans-serif;
|
||||
font-family: "Roboto Light", sans-serif;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
background-color: var(--hovercolor);
|
||||
color: #fff;
|
||||
background-color: var(--hovercolor);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul {
|
||||
@@ -62,7 +62,7 @@ ul li {
|
||||
text-indent: -2ch;
|
||||
}
|
||||
ul > li::before {
|
||||
content: '* ';
|
||||
content: "* ";
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -95,13 +95,13 @@ figure h4 {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
figure h4::before {
|
||||
content: '↳ ';
|
||||
content: "↳ ";
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
code {
|
||||
background-color: #f1f1f1;
|
||||
padding: 0em .0.1em;
|
||||
padding: 0em 0.1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
@@ -145,17 +145,40 @@ header {
|
||||
header .main {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: 1.2rem;
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
h1::before { color: var(--maincolor); content: '# '; }
|
||||
h2::before { color: var(--maincolor); content: '## '; }
|
||||
h3::before { color: var(--maincolor); content: '### '; }
|
||||
h4::before { color: var(--maincolor); content: '#### '; }
|
||||
h5::before { color: var(--maincolor); content: '##### '; }
|
||||
h6::before { color: var(--maincolor); content: '###### '; }
|
||||
h1::before {
|
||||
color: var(--maincolor);
|
||||
content: "# ";
|
||||
}
|
||||
h2::before {
|
||||
color: var(--maincolor);
|
||||
content: "## ";
|
||||
}
|
||||
h3::before {
|
||||
color: var(--maincolor);
|
||||
content: "### ";
|
||||
}
|
||||
h4::before {
|
||||
color: var(--maincolor);
|
||||
content: "#### ";
|
||||
}
|
||||
h5::before {
|
||||
color: var(--maincolor);
|
||||
content: "##### ";
|
||||
}
|
||||
h6::before {
|
||||
color: var(--maincolor);
|
||||
content: "###### ";
|
||||
}
|
||||
|
||||
.meta {
|
||||
color: #999;
|
||||
@@ -198,7 +221,6 @@ article .title {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
|
||||
/* Callout */
|
||||
.callout {
|
||||
background-color: var(--callouctcolor);
|
||||
@@ -207,7 +229,7 @@ article .title {
|
||||
}
|
||||
|
||||
.callout p {
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
font-family: "IBM Plex Mono", monospace;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -221,32 +243,32 @@ article .title {
|
||||
}
|
||||
|
||||
.site-description {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.tags li::before{
|
||||
.tags li::before {
|
||||
content: "- ";
|
||||
}
|
||||
.tags a{
|
||||
border-bottom: 3px solid var(--maincolor);
|
||||
.tags a {
|
||||
border-bottom: 3px solid var(--maincolor);
|
||||
}
|
||||
.tags a:hover{
|
||||
color:white;
|
||||
background-color: var(--hovercolor);
|
||||
.tags a:hover {
|
||||
color: white;
|
||||
background-color: var(--hovercolor);
|
||||
}
|
||||
svg{
|
||||
svg {
|
||||
max-height: 15px;
|
||||
}
|
||||
.soc:hover{
|
||||
.soc:hover {
|
||||
color: white;
|
||||
}
|
||||
.draft-label{
|
||||
color: var(--bordercl);
|
||||
text-decoration: none;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px;
|
||||
margin-left: 6px;
|
||||
background-color: #f9f2f4;
|
||||
.draft-label {
|
||||
color: var(--bordercl);
|
||||
text-decoration: none;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px;
|
||||
margin-left: 6px;
|
||||
background-color: #f9f2f4;
|
||||
}
|
||||
.highlight {
|
||||
position: relative;
|
||||
@@ -269,51 +291,51 @@ svg{
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.highlight pre code[class=language-javaScript]::before,
|
||||
.highlight pre code[class="language-javaScript"]::before,
|
||||
.highlight pre code[class="language-js"]::before {
|
||||
content: "js";
|
||||
background: #f7df1e;
|
||||
color: black;
|
||||
content: "js";
|
||||
background: #f7df1e;
|
||||
color: black;
|
||||
}
|
||||
.highlight pre code[class*='language-yml']::before,
|
||||
.highlight pre code[class*='language-yaml']::before {
|
||||
content: 'yaml';
|
||||
background: #f71e6a;
|
||||
color: white;
|
||||
.highlight pre code[class*="language-yml"]::before,
|
||||
.highlight pre code[class*="language-yaml"]::before {
|
||||
content: "yaml";
|
||||
background: #f71e6a;
|
||||
color: white;
|
||||
}
|
||||
.highlight pre code[class*='language-shell']::before,
|
||||
.highlight pre code[class*='language-bash']::before,
|
||||
.highlight pre code[class*='language-sh']::before {
|
||||
content: 'shell';
|
||||
background: green;
|
||||
color:white
|
||||
.highlight pre code[class*="language-shell"]::before,
|
||||
.highlight pre code[class*="language-bash"]::before,
|
||||
.highlight pre code[class*="language-sh"]::before {
|
||||
content: "shell";
|
||||
background: green;
|
||||
color: white;
|
||||
}
|
||||
.highlight pre code[class*='language-json']::before{
|
||||
content: 'json';
|
||||
background: dodgerblue;
|
||||
color: #000000
|
||||
.highlight pre code[class*="language-json"]::before {
|
||||
content: "json";
|
||||
background: dodgerblue;
|
||||
color: #000000;
|
||||
}
|
||||
.highlight pre code[class*='language-python']::before,
|
||||
.highlight pre code[class*='language-py']::before {
|
||||
content: 'py';
|
||||
background: blue;
|
||||
color: yellow ;
|
||||
.highlight pre code[class*="language-python"]::before,
|
||||
.highlight pre code[class*="language-py"]::before {
|
||||
content: "py";
|
||||
background: blue;
|
||||
color: yellow;
|
||||
}
|
||||
.highlight pre code[class*='language-css']::before{
|
||||
content: 'css';
|
||||
background: cyan;
|
||||
color: black ;
|
||||
.highlight pre code[class*="language-css"]::before {
|
||||
content: "css";
|
||||
background: cyan;
|
||||
color: black;
|
||||
}
|
||||
.highlight pre code[class*='language-go']::before{
|
||||
content: 'Go';
|
||||
background: cyan;
|
||||
color: royalblue ;
|
||||
.highlight pre code[class*="language-go"]::before {
|
||||
content: "Go";
|
||||
background: cyan;
|
||||
color: royalblue;
|
||||
}
|
||||
.highlight pre code[class*='language-md']::before,
|
||||
.highlight pre code[class*='language-md']::before{
|
||||
content: 'Markdown';
|
||||
background: royalblue;
|
||||
color: whitesmoke ;
|
||||
.highlight pre code[class*="language-md"]::before,
|
||||
.highlight pre code[class*="language-md"]::before {
|
||||
content: "Markdown";
|
||||
background: royalblue;
|
||||
color: whitesmoke;
|
||||
}
|
||||
|
||||
/* table */
|
||||
@@ -322,13 +344,13 @@ table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table th{
|
||||
table th {
|
||||
padding: 6px 13px;
|
||||
border: 1px solid #dfe2e5;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
table td{
|
||||
table td {
|
||||
padding: 6px 13px;
|
||||
border: 1px solid #dfe2e5;
|
||||
}
|
Reference in New Issue
Block a user