mirror of
https://github.com/panr/hugo-theme-terminal.git
synced 2025-03-14 18:29:03 +03:00
separate terminal theme styles from terminal.css
Terminal.css styles only can change the color scheme.
This commit is contained in:
parent
9a21912416
commit
7dc8e16a58
2 changed files with 385 additions and 414 deletions
assets/css
|
@ -1,3 +1,12 @@
|
|||
:root {
|
||||
--background: #1a170f;
|
||||
--foreground: #eceae5;
|
||||
--accent: #eec35e;
|
||||
--font-size: 1rem;
|
||||
--line-height: 1.54em;
|
||||
--radius: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
@ -12,9 +21,8 @@ body {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: "Fira Code", Monaco, Consolas, "Ubuntu Mono", monospace;
|
||||
font-size: 1rem;
|
||||
line-height: 1.54;
|
||||
letter-spacing: -0.02em;
|
||||
font-size: var(--font-size);
|
||||
line-height: var(--line-height);
|
||||
background-color: var(--background);
|
||||
color: var(--foreground);
|
||||
text-rendering: optimizelegibility;
|
||||
|
@ -23,6 +31,378 @@ body {
|
|||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(var(--font-size) * 1.45);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(var(--font-size) * 1.35);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(var(--font-size) * 1.15);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: calc(var(--font-size) * 1);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
img,
|
||||
figure,
|
||||
video,
|
||||
table {
|
||||
margin: calc(var(--line-height) * 1.2) 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
button {
|
||||
position: relative;
|
||||
font: inherit;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
padding: 5px 18px;
|
||||
border: 4px solid var(--accent);
|
||||
border-radius: var(--radius);
|
||||
transition: background 0.15s linear;
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: color-mix(in srgb, var(--accent) 15%, transparent);
|
||||
}
|
||||
|
||||
button:focus-visible,
|
||||
a:focus-visible {
|
||||
outline: 1px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
display: inline-block;
|
||||
border: 2px solid var(--foreground);
|
||||
border-radius: calc(var(--radius) * 1.6);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
fieldset *:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
fieldset input,
|
||||
fieldset select,
|
||||
fieldset textarea,
|
||||
fieldset label,
|
||||
fieldset button {
|
||||
margin-top: calc(var(--line-height) * 0.5);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
label input {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
background: transparent;
|
||||
color: var(--foreground);
|
||||
border: 1px solid var(--foreground);
|
||||
border-radius: var(--radius);
|
||||
padding: 10px;
|
||||
font: inherit;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
input:focus-visible,
|
||||
input:active,
|
||||
textarea:focus-visible,
|
||||
textarea:active,
|
||||
select:focus-visible,
|
||||
select:active {
|
||||
border-color: var(--accent);
|
||||
outline: 1px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
input:active,
|
||||
textarea:active,
|
||||
select:active {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
select {
|
||||
background-image: linear-gradient(
|
||||
45deg,
|
||||
transparent 50%,
|
||||
var(--foreground) 50%
|
||||
),
|
||||
linear-gradient(135deg, var(--foreground) 50%, transparent 50%);
|
||||
background-position: calc(100% - 20px), calc(100% - 1em);
|
||||
background-size:
|
||||
5px 5px,
|
||||
5px 5px;
|
||||
background-repeat: no-repeat;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
select option {
|
||||
background: var(--background);
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
vertical-align: middle;
|
||||
padding: 10px;
|
||||
box-shadow: inset 0 0 0 3px var(--background);
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
border: 8px solid var(--accent);
|
||||
border-radius: var(--radius);
|
||||
padding: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
img.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
figure {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
figure.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
figure.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
figure.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
figure img,
|
||||
figure video {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
figure figcaption {
|
||||
background: var(--accent);
|
||||
color: var(--background);
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
margin-top: -8px;
|
||||
border-radius: 0 0 var(--radius) var(--radius);
|
||||
}
|
||||
|
||||
figure figcaption.left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
figure figcaption.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure figcaption.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin-left: 4ch;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul ul,
|
||||
ul ol,
|
||||
ol ul,
|
||||
ol ol {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
li::marker {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
ul li,
|
||||
ol li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
code,
|
||||
kbd {
|
||||
font-family:
|
||||
"Fira Code",
|
||||
Monaco,
|
||||
Consolas,
|
||||
"Ubuntu Mono",
|
||||
monospace !important;
|
||||
font-feature-settings: normal;
|
||||
background: color-mix(in srgb, var(--foreground) 5%, transparent);
|
||||
border: 1px solid var(--code-border);
|
||||
padding: 1px 6px;
|
||||
margin: 0 2px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
kbd {
|
||||
border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
|
||||
border-left: 1px solid var(--accent);
|
||||
border-right: 1px solid var(--accent);
|
||||
border-bottom: 4px solid var(--accent);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
code code {
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
tab-size: 4;
|
||||
background: color-mix(in srgb, var(--foreground) 5%, transparent) !important;
|
||||
color: var(--foreground);
|
||||
padding: 20px 10px;
|
||||
font-size: 0.95rem !important;
|
||||
overflow: auto;
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
|
||||
}
|
||||
|
||||
pre code {
|
||||
background: none !important;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: inherit;
|
||||
border: none;
|
||||
}
|
||||
|
||||
sup {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
abbr {
|
||||
position: relative;
|
||||
text-decoration-style: wavy;
|
||||
text-decoration-color: var(--accent);
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.25em;
|
||||
}
|
||||
|
||||
mark {
|
||||
background: color-mix(in srgb, var(--accent) 45%, transparent);
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
position: relative;
|
||||
border-top: 1px solid var(--accent);
|
||||
border-bottom: 1px solid var(--accent);
|
||||
margin: 0;
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
blockquote::before {
|
||||
content: ">";
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
blockquote p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
blockquote p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
table-layout: auto;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
border: 2px solid var(--foreground);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
th {
|
||||
border-style: solid;
|
||||
color: var(--foreground);
|
||||
text-align: left;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
hr {
|
||||
width: 100%;
|
||||
border: none;
|
||||
background: var(--accent);
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
/* One Heading Size */
|
||||
.headings--one-size h1,
|
||||
.headings--one-size h2,
|
||||
.headings--one-size h3,
|
||||
|
@ -43,43 +423,7 @@ body {
|
|||
margin-top: 20px;
|
||||
}
|
||||
|
||||
img.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
figure.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
figure.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
figure.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
figure figcaption.left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
figure figcaption.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure figcaption.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
blockquote.twitter-tweet {
|
||||
position: relative;
|
||||
|
|
|
@ -1,375 +1,2 @@
|
|||
:root {
|
||||
--background: #1a170f;
|
||||
--foreground: #eceae5;
|
||||
--accent: #eec35e;
|
||||
--font-size: 1rem;
|
||||
--line-height: 1.54rem;
|
||||
--radius: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: inherit;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family:
|
||||
"Fira Code",
|
||||
Monaco,
|
||||
Consolas,
|
||||
"Ubuntu Mono",
|
||||
monospace;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: var(--line-height);
|
||||
letter-spacing: -0.02em;
|
||||
background-color: var(--background);
|
||||
color: var(--foreground);
|
||||
text-rendering: optimizelegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: color-mix(in srgb var(--foreground) 50%, black);
|
||||
}
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
font-size: calc(var(--font-size) * 1.1);
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 2px;
|
||||
text-underline-offset: calc(var(--font-size) * 0.2);
|
||||
}
|
||||
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: calc(var(--font-size) * 1.1);
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
img,
|
||||
figure,
|
||||
video,
|
||||
table {
|
||||
margin: calc(var(--line-height) * 1.2) 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
button {
|
||||
position: relative;
|
||||
font: inherit;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
padding: 5px 18px;
|
||||
border: 4px solid var(--accent);
|
||||
border-radius: var(--radius);
|
||||
transition: background 0.15s linear;
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: color-mix(in srgb, var(--accent) 15%, transparent);
|
||||
}
|
||||
|
||||
button:focus-visible,
|
||||
a:focus-visible {
|
||||
outline: 1px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
display: inline-block;
|
||||
border: 2px solid var(--foreground);
|
||||
border-radius: calc(var(--radius) * 1.6);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
fieldset *:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
fieldset input,
|
||||
fieldset select,
|
||||
fieldset textarea,
|
||||
fieldset label,
|
||||
fieldset button {
|
||||
margin-top: calc(var(--line-height) * 0.5);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
label input {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
background: transparent;
|
||||
color: var(--foreground);
|
||||
border: 1px solid var(--foreground);
|
||||
border-radius: var(--radius);
|
||||
padding: 10px;
|
||||
font: inherit;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
input:focus-visible,
|
||||
input:active,
|
||||
textarea:focus-visible,
|
||||
textarea:active,
|
||||
select:focus-visible,
|
||||
select:active {
|
||||
border-color: var(--accent);
|
||||
outline: 1px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
input:active,
|
||||
textarea:active,
|
||||
select:active {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
select {
|
||||
background-image: linear-gradient(
|
||||
45deg,
|
||||
transparent 50%,
|
||||
var(--foreground) 50%
|
||||
),
|
||||
linear-gradient(135deg, var(--foreground) 50%, transparent 50%);
|
||||
background-position: calc(100% - 20px), calc(100% - 1em);
|
||||
background-size:
|
||||
5px 5px,
|
||||
5px 5px;
|
||||
background-repeat: no-repeat;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
select option {
|
||||
background: var(--background);
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
vertical-align: middle;
|
||||
padding: 10px;
|
||||
box-shadow: inset 0 0 0 3px var(--background);
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
border: 8px solid var(--accent);
|
||||
border-radius: var(--radius);
|
||||
padding: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
figure {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
figure img,
|
||||
figure video {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
figure figcaption {
|
||||
background: var(--accent);
|
||||
color: var(--background);
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
margin-top: -8px;
|
||||
border-radius: 0 0 var(--radius) var(--radius);
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin-left: 4ch;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul ul,
|
||||
ul ol,
|
||||
ol ul,
|
||||
ol ol {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
li::marker {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
ul li,
|
||||
ol li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
code,
|
||||
kbd {
|
||||
font-family:
|
||||
"Fira Code",
|
||||
Monaco,
|
||||
Consolas,
|
||||
"Ubuntu Mono",
|
||||
monospace !important;
|
||||
font-feature-settings: normal;
|
||||
background: color-mix(in srgb, var(--foreground) 5%, transparent);
|
||||
padding: 1px 6px;
|
||||
margin: 0 2px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
kbd {
|
||||
border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
|
||||
border-left: 1px solid var(--accent);
|
||||
border-right: 1px solid var(--accent);
|
||||
border-bottom: 4px solid var(--accent);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
code code {
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
tab-size: 4;
|
||||
background: color-mix(in srgb, var(--foreground) 5%, transparent) !important;
|
||||
color: var(--foreground);
|
||||
padding: 20px 10px;
|
||||
font-size: 0.95rem !important;
|
||||
overflow: auto;
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
|
||||
}
|
||||
|
||||
pre code {
|
||||
background: none !important;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: inherit;
|
||||
border: none;
|
||||
}
|
||||
|
||||
sup {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
abbr {
|
||||
position: relative;
|
||||
text-decoration-style: wavy;
|
||||
text-decoration-color: var(--accent);
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.25em;
|
||||
}
|
||||
|
||||
mark {
|
||||
background: color-mix(in srgb, var(--accent) 45%, transparent);
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
position: relative;
|
||||
border-top: 1px solid var(--accent);
|
||||
border-bottom: 1px solid var(--accent);
|
||||
margin: 0;
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
blockquote::before {
|
||||
content: ">";
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
blockquote p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
blockquote p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
table-layout: auto;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
border: 2px solid var(--foreground);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
th {
|
||||
border-style: solid;
|
||||
color: var(--foreground);
|
||||
text-align: left;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
hr {
|
||||
width: 100%;
|
||||
border: none;
|
||||
background: var(--accent);
|
||||
height: 2px;
|
||||
}
|
||||
/* Placeholder file for your custom settings. */
|
||||
/* You can get the color scheme variables from https://panr.github.io/terminal-css/ */
|
||||
|
|
Loading…
Add table
Reference in a new issue