Update theme stylesheet for Bear blogging platform

This commit is contained in:
Hao Tran 2025-01-06 01:35:45 -05:00
parent 2dccb628f7
commit a69b9f4c94
2 changed files with 57 additions and 28 deletions

View File

@ -0,0 +1,3 @@
<div class="logo">
<img style="float: right; margin-top: 4px;" src="https://bear-images.sfo2.cdn.digitaloceanspaces.com/haothitran/logo_white_square-626x626.webp" width=64 height=64" />
</div>

View File

@ -8,27 +8,24 @@
--text-100:#000000; --text-100:#000000;
--text-200:#2c2c2c; --text-200:#2c2c2c;
--accent-100:#666666; --accent-100:#666666;
--accent-200:#f7f7f7;
--primary-100:#1994ff; --primary-100:#1994ff;
--primary-200:#0079e0; --primary-200:#003e99;
--primary-300:#003e99; --contrast-100:#ff8419;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--bg-100:#1a1a1a; --bg-100: #191919;
--bg-200:#292929; --bg-200: #1f1f1f;
--bg-300:#404040; --bg-300: #3d3d3d;
--text-100:#ffffff; --text-100: #fdfdfd;
--text-200:#e0e0e0; --text-200: #e2e2e2;
--accent-100:#4d4d4d; --accent-100: #454545;
--accent-200:#d9d9d9; --primary-100: #008866;
--primary-100:#aad372; --primary-200: #00F0B4;
--primary-200:#8cb556; --contrast-100: #da0037;
--primary-300:#4a7315;
} }
} }
body { body {
margin: 0 auto; margin: 0 auto;
padding: 0 16px; padding: 0 16px;
@ -50,18 +47,29 @@ h1, h2, h3, h4, h5, h6 {
a { a {
color: var(--primary-200); color: var(--primary-200);
text-decoration: underline; text-decoration: underline;
text-decoration-color: var(--primary-300); text-underline-offset: 3px;
text-decoration-thickness: 1px;
text-decoration-style: dotted;
text-decoration-color: var(--primary-100);
} }
a:hover { a:hover {
color: var(--primary-200);
text-decoration: underline; text-decoration: underline;
text-decoration-color: var(--primary-100); text-decoration-style: solid;
text-decoration-color: var(--contrast-100);
} }
strong, b { strong, b {
color: var(--text-200); color: var(--text-200);
} }
code {
padding: 2px 8px;
border-radius: 3px;
background-color: var(--bg-300);
font-family: monospace;
color: var(--primary-200);
}
time { time {
font-family: monospace; font-family: monospace;
font-size: 15px; font-size: 15px;
@ -70,22 +78,28 @@ time {
} }
blockquote { blockquote {
padding: 2px 8px 2px 16px; padding: 2px 16px;
border-top: 1px solid var(--accent-100); border-left: 8px solid var(--contrast-100);
border-right: 1px solid var(--accent-100); background: linear-gradient(to left top, var(--bg-300), 5%, var(--bg-200));
border-bottom: 1px solid var(--accent-100);
border-left: 8px solid var(--primary-100);
background: linear-gradient(to left top, var(--bg-300), var(--bg-100));
color: var(--text-100); color: var(--text-100);
font-style: italic; font-style: italic;
} }
code { .highlight {
margin-left: 16px;
padding: 2px 16px;
border-left: 8px solid var(--primary-100);
background: linear-gradient(to left top, var(--bg-100), 20%, var(--bg-200));
font-family: monospace; font-family: monospace;
font-size: 14px;
margin-block-start: 1em;
margin-block-end: 1em;
overflow-x: auto;
} }
img { img {
max-width: 100%; max-width: 120%;
margin-left: -10%;
} }
table { table {
@ -97,7 +111,7 @@ table {
th { th {
padding: 2px 8px; padding: 2px 8px;
border-right: 1px solid var(--accent-100); border-right: 1px solid var(--accent-100);
border-bottom: 1px solid var(--accent-100); border-bottom: 4px solid var(--contrast-100);
background-color: var(--bg-300); background-color: var(--bg-300);
} }
td { td {
@ -127,7 +141,7 @@ header {
font-size: 1.5em; font-size: 1.5em;
} }
.title h1:hover { .title h1:hover {
color: var(--primary-100); color: var(--contrast-100);
} }
nav { nav {
@ -143,7 +157,9 @@ nav a {
text-decoration: none; text-decoration: none;
} }
nav a:hover { nav a:hover {
text-decoration: none; text-decoration: underline;
text-decoration-style: solid;
text-decoration-color: var(--contrast-100);
} }
main { main {
@ -175,3 +191,13 @@ ul.blog-posts li {
ul.blog-posts li span { ul.blog-posts li span {
padding-right: 8px; padding-right: 8px;
} }
.tags a {
border: 1px dotted var(--primary-100);
padding: 2px 8px;
text-decoration: none;
}
.tags a:hover {
border: 1px solid var(--contrast-100);
text-decoration: none;
}