495 lines
8.8 KiB
CSS
495 lines
8.8 KiB
CSS
/* Global link styles */
|
|
|
|
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Space+Grotesk:wght@300..700&display=swap");
|
|
|
|
:root {
|
|
--gap: 24px;
|
|
--content-gap: 20px;
|
|
--nav-width: 1024px;
|
|
--main-width: 720px;
|
|
--header-height: 60px;
|
|
--footer-height: 60px;
|
|
--radius: 8px;
|
|
--theme: rgb(255, 255, 255);
|
|
--entry: rgb(255, 255, 255);
|
|
--primary: #282828;
|
|
--secondary: #3c3836;
|
|
--tertiary: rgb(214, 214, 214);
|
|
--content: rgb(31, 31, 31);
|
|
--code-block-bg: rgb(28, 29, 33);
|
|
--code-bg: rgb(245, 245, 245);
|
|
--border: rgb(238, 238, 238);
|
|
color-scheme: light;
|
|
|
|
--red: #cc241d;
|
|
--redl: #fb4934;
|
|
|
|
--green: #98971a;
|
|
--greenl: #b8bb26;
|
|
|
|
--yellow: #d79921;
|
|
--yellowl: #fabd2f;
|
|
|
|
--blue: #458588;
|
|
--bluel: #83a598;
|
|
|
|
--purple: #b16286;
|
|
--purplel: #d3869b;
|
|
|
|
--aqua: #689d6a;
|
|
--aqual: #8ec07c;
|
|
|
|
--gray: #928374;
|
|
--grayl: #a89984;
|
|
|
|
--orange: #d65d0e;
|
|
--orangel: #fe8019;
|
|
|
|
--post-entry-bg: white; /* soft gruvbox light */
|
|
--post-entry-fg: #282828;
|
|
}
|
|
|
|
:root[data-theme="dark"] {
|
|
--theme: #1d2021;
|
|
--entry: #282828;
|
|
--primary: #ebdbb2;
|
|
--secondary: #a89984;
|
|
--tertiary: #3c3836;
|
|
--content: #ebdbb2;
|
|
--code-block-bg: #282828;
|
|
--code-bg: #3c3836;
|
|
--border: #3c3836;
|
|
color-scheme: dark;
|
|
|
|
--post-entry-bg: #282828;
|
|
--post-entry-fg: #ebdbb2;
|
|
|
|
--green: #b8bb26;
|
|
--greenl: #8ec07c;
|
|
}
|
|
|
|
body {
|
|
font-family: "Space Grotesk", monospace;
|
|
}
|
|
|
|
/* *
|
|
* UNIVERSAL HOVER ANIMATION (Fill-up Effect)
|
|
* Target: Nav spans, main links (except entries), social links, and share icons.
|
|
* */
|
|
|
|
|
|
nav #menu a span {
|
|
position: relative;
|
|
text-decoration: none !important;
|
|
color: inherit;
|
|
transition: color 0.3s ease;
|
|
z-index: 1;
|
|
padding: 8px; /* Reduced vertical padding */
|
|
}
|
|
|
|
.entry-content {
|
|
color: var(--primary)
|
|
}
|
|
|
|
main a:not(.entry-link, .anchor),
|
|
.social-icons a,
|
|
.share-buttons a,
|
|
.note-item a {
|
|
position: relative;
|
|
text-decoration: none !important;
|
|
color: inherit;
|
|
transition: color 0.3s ease;
|
|
z-index: 1;
|
|
display: inline-block;
|
|
}
|
|
|
|
/* Note items are full-width flex containers */
|
|
.note-item a {
|
|
display: flex;
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
margin: 0 -12px; /* Offset padding for full-row effect */
|
|
}
|
|
|
|
/* The fill background */
|
|
nav #menu a span::before,
|
|
main a:not(.entry-link, .anchor)::before,
|
|
.social-icons a::before,
|
|
.share-buttons a::before,
|
|
.note-item a::before {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 2px; /* Static underline state */
|
|
background-color: var(--green);
|
|
z-index: -1;
|
|
transition: height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
|
|
}
|
|
|
|
/* Notes list starts with 0 height to stay clean */
|
|
.note-item a::before,
|
|
.share-buttons a::before {
|
|
height: 0;
|
|
}
|
|
|
|
/* Hover state: Fill up the background */
|
|
nav #menu a:hover span::before,
|
|
main a:hover:not(.entry-link, .anchor)::before,
|
|
.social-icons a:hover::before,
|
|
.share-buttons a:hover::before,
|
|
.note-item a:hover::before {
|
|
height: 100%;
|
|
}
|
|
|
|
/* CONTRAST FIX: Switch text/icon color on hover */
|
|
nav #menu a:hover span,
|
|
main a:hover:not(.entry-link, .anchor),
|
|
.social-icons a:hover,
|
|
.share-buttons a:hover,
|
|
#searchResults a:hover,
|
|
.note-item a:hover .note-title,
|
|
.note-item a:hover .note-date {
|
|
color: var(--theme) !important;
|
|
}
|
|
|
|
/* Icon specific color switch */
|
|
.social-icons a:hover svg,
|
|
.share-buttons a:hover svg {
|
|
fill: var(--theme) !important;
|
|
stroke: var(--theme) !important;
|
|
}
|
|
|
|
/* Active Nav State - remain thick underline */
|
|
nav #menu .active span::before {
|
|
height: 4px;
|
|
}
|
|
|
|
nav #menu .active a:hover span::before {
|
|
height: 100%;
|
|
}
|
|
|
|
main h1 {
|
|
color: var(--green);
|
|
}
|
|
|
|
.share-buttons,
|
|
.toc,
|
|
.post-tags a {
|
|
border: 0px;
|
|
background: transparent;
|
|
}
|
|
|
|
|
|
.post-tags a {
|
|
background: var(--tertiary);
|
|
color: var(--primary);
|
|
padding: 0px 8px;
|
|
border-radius: 0px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.post-tags a:hover {
|
|
background: var(--green);
|
|
color: var(--theme);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.share-buttons {
|
|
margin-top: 40px;
|
|
padding: 20px 0;
|
|
border-top: 1px solid var(--tertiary);
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.share-buttons a {
|
|
padding: 10px;
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.anchor {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.breadcrumbs {
|
|
margin-bottom: 2rem;
|
|
font-size: 0.9rem;
|
|
color: var(--secondary);
|
|
}
|
|
|
|
.post-header .post-title {
|
|
font-size: 3rem;
|
|
margin-bottom: 0.5rem;
|
|
color: var(--green);
|
|
font-weight: 700;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.post-description {
|
|
font-style: italic;
|
|
font-size: 1.2rem;
|
|
margin-bottom: 1.5rem;
|
|
color: var(--secondary);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* main h1::before { */
|
|
/* content: "#"; */
|
|
/* color: var(--red); */
|
|
/* color: var(--green); */
|
|
/* margin-right: 0.5em; */
|
|
/* font-weight: bold; */
|
|
/* font-weight: bold; */
|
|
/* font-style: italic; */
|
|
/* } */
|
|
|
|
main .post-entry {
|
|
border: 1px solid var(--tertiary);
|
|
background-color: var(--post-entry-bg);
|
|
color: var(--post-entry-fg);
|
|
transition: transform 0.2s ease, border-color 0.2s ease;
|
|
}
|
|
|
|
main .post-entry:hover {
|
|
transform: translateY(-2px);
|
|
border-color: var(--green);
|
|
}
|
|
|
|
/* *
|
|
* NOTES SECTION - Compact list style
|
|
* */
|
|
.notes-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.note-item {
|
|
padding: 12px 0;
|
|
border-bottom: 1px solid var(--tertiary);
|
|
}
|
|
|
|
.note-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.note-item a:hover .note-title,
|
|
.note-item a:hover .note-date {
|
|
color: var(--theme) !important;
|
|
}
|
|
|
|
.note-title {
|
|
font-size: 1.1rem;
|
|
font-weight: 500;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.note-date {
|
|
font-size: 0.85rem;
|
|
color: var(--secondary);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.note-summary {
|
|
margin: 4px 0 0 0;
|
|
font-size: 0.96rem;
|
|
color: var(--secondary);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.delimiter {
|
|
margin: 0 10px;
|
|
font-weight: 800;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* *
|
|
* POSTS SECTION - Same compact style as notes but with description
|
|
* */
|
|
.posts-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.post-item {
|
|
padding: 12px 0;
|
|
border-bottom: 1px solid var(--tertiary);
|
|
}
|
|
|
|
.post-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.post-item a {
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: baseline;
|
|
text-decoration: none !important;
|
|
gap: 16px;
|
|
padding: 8px 12px;
|
|
margin: 0 -12px;
|
|
color: inherit;
|
|
transition: color 0.3s ease;
|
|
z-index: 1;
|
|
width: 100%;
|
|
}
|
|
|
|
.post-item a::before {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 0;
|
|
background-color: var(--green);
|
|
z-index: -1;
|
|
transition: height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
|
|
}
|
|
|
|
.post-item a:hover::before {
|
|
height: 100%;
|
|
}
|
|
|
|
.post-item a:hover .post-title,
|
|
.post-item a:hover .post-date {
|
|
color: var(--theme) !important;
|
|
}
|
|
|
|
.post-title {
|
|
font-size: 1.1rem;
|
|
font-weight: 500;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.post-date {
|
|
font-size: 0.85rem;
|
|
color: var(--secondary);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.post-summary {
|
|
margin: 4px 0 0 0;
|
|
font-size: 0.96rem;
|
|
color: var(--secondary);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* Common list styles */
|
|
.note-item a,
|
|
.post-item a {
|
|
display: flex !important;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
}
|
|
|
|
/* *
|
|
* POST CONTENT SPACINGS
|
|
* */
|
|
.post-content {
|
|
font-size: 1.1rem;
|
|
line-height: 1.7;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.post-content p,
|
|
.post-content ol,
|
|
.post-content ul,
|
|
.post-content dl {
|
|
margin-bottom: 1.6em;
|
|
}
|
|
|
|
.post-content h1,
|
|
.post-content h2,
|
|
.post-content h3,
|
|
.post-content h4 {
|
|
margin-top: 1.8em;
|
|
margin-bottom: 0.8em;
|
|
color: var(--green);
|
|
}
|
|
|
|
.post-content blockquote {
|
|
margin: 2em 0;
|
|
padding: 0.5em 1.5em;
|
|
border-left: 4px solid var(--green);
|
|
background-color: var(--entry);
|
|
font-style: italic;
|
|
color: var(--secondary);
|
|
}
|
|
|
|
.post-content code {
|
|
font-size: 16px;
|
|
background-color: var(--tertiary);
|
|
color: var(--primary);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.highlight {
|
|
padding: 0.6em;
|
|
}
|
|
|
|
.post-content pre code {
|
|
background-color: var(--entry) !important;
|
|
}
|
|
|
|
.post-content blockquote p {
|
|
margin: 0;
|
|
padding: 0.5em 0em;
|
|
}
|
|
|
|
/* *
|
|
* SEARCH PAGE FIXES
|
|
* */
|
|
#searchResults .post-entry {
|
|
border-radius: 0; /* Square borders like notes */
|
|
padding: 0;
|
|
border: 1px solid var(--tertiary);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
#searchResults a {
|
|
position: relative;
|
|
display: flex !important;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
padding: 12px 15px;
|
|
text-decoration: none !important;
|
|
color: var(--primary);
|
|
z-index: 1;
|
|
}
|
|
|
|
#searchResults a .search-meta {
|
|
margin-left: auto; /* Push date to the right */
|
|
font-size: 0.85rem;
|
|
color: var(--secondary);
|
|
}
|
|
|
|
#searchResults a:hover .search-title,
|
|
#searchResults a:hover .search-meta {
|
|
color: var(--theme) !important;
|
|
}
|
|
|
|
#searchResults a::before {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 0;
|
|
background-color: var(--green);
|
|
z-index: -1;
|
|
transition: height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
|
|
}
|
|
|
|
#searchResults a:hover::before {
|
|
height: 100%;
|
|
}
|
|
|
|
#searchResults a:hover {
|
|
color: var(--theme) !important;
|
|
}
|