mirror of
https://github.com/panr/hugo-theme-terminal.git
synced 2025-03-14 18:29:03 +03:00
* revamp code highlighting * replace standard Fira Code with a variable version * change buttons arrows * redesign code blocks * make terminal logo more prominent * separate terminal theme styles from terminal.css Terminal.css styles only can change the color scheme. * update docs and version * remove USERS.md * fix header pattern * remove old prismjs shortcode * remove old rss template * remove old figure shortcode * [chore] update yarn LOL, I'm still using 1.22.x * [chore] update package-lock.json * fix pagination & boost meta visibility * fix code blocks on mobile & move some parts from CSS to JS
124 lines
2.2 KiB
CSS
124 lines
2.2 KiB
CSS
:root {
|
|
--code-border: color-mix(in srgb, var(--foreground) 10%, transparent);
|
|
}
|
|
|
|
pre:not(.chroma) {
|
|
margin: 20px 0;
|
|
padding: 10px;
|
|
}
|
|
|
|
pre.chroma {
|
|
margin: 0;
|
|
padding: 10px 0;
|
|
color: var(--foreground);
|
|
}
|
|
|
|
pre code {
|
|
color: var(--foreground);
|
|
border: none;
|
|
}
|
|
|
|
code {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.highlight {
|
|
position: relative;
|
|
margin: 20px 0;
|
|
border: 1px solid var(--code-border);
|
|
}
|
|
|
|
.highlight pre {
|
|
border: none;
|
|
}
|
|
|
|
.code-title {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background: color-mix(in srgb, var(--foreground) 5%, transparent);
|
|
border-bottom: 1px solid var(--code-border);
|
|
color: var(--comment);
|
|
text-transform:uppercase;
|
|
font-size: calc(var(--font-size) * 0.8);
|
|
padding: 6px 10px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.copy-button {
|
|
position: relative;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 3px 8px;
|
|
text-decoration: none;
|
|
text-align: center;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
|
|
appearance: none;
|
|
cursor: pointer;
|
|
outline: none;
|
|
}
|
|
|
|
.code-title .copy-button {
|
|
z-index: 1;
|
|
background: color-mix(in srgb, var(--foreground) 5%, var(--background));
|
|
}
|
|
|
|
.code-title:hover .copy-button {
|
|
display: inline-block;
|
|
}
|
|
|
|
.code-title .copy-button:hover {
|
|
background: color-mix(in srgb, var(--accent) 10%, var(--background));
|
|
}
|
|
|
|
.collapsable-code {
|
|
position: relative;
|
|
width: 100%;
|
|
margin: 20px 0;
|
|
border: 1px solid var(--accent);
|
|
|
|
.highlight {
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
.collapsable-code__title {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
flex: 1;
|
|
color: var(--accent);
|
|
padding: 3px 10px;
|
|
font-size: calc(var(--font-size) * 0.9);
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.collapsable-code__language {
|
|
color: var(--accent);
|
|
border: 1px solid var(--accent);
|
|
border-bottom: none;
|
|
text-transform: uppercase;
|
|
padding: 3px 10px;
|
|
}
|
|
|
|
.collapsable-code summary {
|
|
color: var(--accent);
|
|
padding: 0 10px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.collapsable-code summary:hover {
|
|
background: color-mix(in srgb, var(--accent) 10%, transparent);
|
|
}
|
|
|
|
.collapsable-code pre {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.collapsable-code pre::first-line {
|
|
line-height: 0;
|
|
}
|