blog/content/default.css

363 lines
7.1 KiB
CSS

/* content/default.css */
:root {
--bg-color: #ffffff;
--header-bg: #000000;
--header-text: #ffffff;
--text-color: #333333;
--link-color: #000000;
--accent-color: #cc0000;
--sidebar-bg: #ffffff;
--sidebar-border: #000000;
--font-primary: "Helvetica Neue", Helvetica, Arial, sans-serif;
--font-mono: "Monaco", "Menlo", monospace;
--content-width: 680px;
}
body.dark-mode {
--bg-color: #1a1a1a;
--header-bg: #000000;
/* Keep header black, maybe slightly lighter? User said "dark theme" */
--header-text: #e0e0e0;
--text-color: #e0e0e0;
--link-color: #ffffff;
--accent-color: #ff4444;
--sidebar-bg: #2a2a2a;
--sidebar-border: #555555;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
background-color: var(--bg-color);
color: var(--text-color);
font-family: var(--font-primary);
font-size: 18px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
/* Header - Stark Black Block */
/* Ensure header text color uses variable */
.main-header {
background-color: var(--header-bg);
color: var(--header-text);
/* Make header taller per request */
padding: 6rem 1rem;
margin-bottom: 5rem;
}
.header-content {
max-width: var(--content-width);
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
gap: 2rem;
/* Space between logo and text */
}
.header-logo img {
height: 80px;
/* Adjust as needed */
width: auto;
margin: 0;
border: none;
}
.main-header h1 {
margin: 0;
/* Make title bigger per request */
font-size: 4rem;
font-weight: 700;
letter-spacing: -1px;
line-height: 1;
text-align: left;
}
/* Content Container */
.main-content {
max-width: var(--content-width);
margin: 0 auto;
padding: 0 1rem 8rem 1rem;
/* Bottom padding for scroll space */
}
/* Typography */
/* Update headers to use text color variable */
h1,
h2,
h3,
h4 {
color: var(--text-color);
margin-top: 2.5em;
margin-bottom: 0.8em;
font-weight: 700;
line-height: 1.2;
}
/* First Line Logic - "Sugar" */
/* Update first paragraph color */
.main-content>p:first-of-type {
font-size: 1.3em;
color: var(--text-color);
/* Was hardcoded #000 */
margin-bottom: 2em;
line-height: 1.5;
}
/* Dark Mode Toggle Button */
#theme-toggle {
background: none;
border: 1px solid var(--sidebar-border);
color: var(--text-color);
padding: 5px 10px;
cursor: pointer;
font-family: var(--font-primary);
margin-top: 1rem;
width: 100%;
text-transform: uppercase;
font-size: 0.8rem;
}
#theme-toggle:hover {
background-color: var(--accent-color);
color: #fff;
border-color: var(--accent-color);
}
p {
margin-bottom: 1.5em;
}
a {
color: var(--link-color);
text-decoration: underline;
text-decoration-thickness: 1px;
text-underline-offset: 2px;
}
a:hover {
color: var(--accent-color);
text-decoration-color: var(--accent-color);
}
/* Images - Full width of container */
img {
max-width: 100%;
height: auto;
display: block;
margin: 3rem auto;
}
/* Code */
pre {
background: #f4f4f4;
padding: 1.5rem;
overflow-x: auto;
font-size: 0.9em;
border-radius: 4px;
/* Slight softening */
margin: 2rem 0;
}
code {
font-family: var(--font-mono);
background: #f4f4f4;
padding: 2px 4px;
font-size: 0.9em;
}
blockquote {
border-left: 3px solid #000;
margin: 2rem 0;
padding-left: 1.5rem;
font-style: italic;
color: #666;
}
/* Sidebar - The "Ghost" Panel */
.sidebar {
position: fixed;
right: 2rem;
bottom: 2rem;
width: 300px;
background: var(--sidebar-bg);
border: 1px solid var(--sidebar-border);
padding: 2rem;
opacity: 0;
/* Default hidden */
pointer-events: none;
transition: opacity 0.3s ease;
z-index: 100;
box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.1);
/* 27bslash6 vibe */
}
.sidebar.force-visible {
opacity: 1 !important;
pointer-events: auto !important;
}
#close-sidebar {
position: absolute;
top: 5px;
right: 10px;
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
font-weight: bold;
color: var(--text-color);
}
.latest-posts h2 {
margin-top: 0;
font-size: 1rem;
text-transform: uppercase;
border-bottom: 2px solid var(--sidebar-border);
padding-bottom: 0.5rem;
}
.latest-posts ul {
list-style: none;
padding: 0;
margin: 0;
}
.latest-posts li {
margin-bottom: 0.8rem;
font-size: 0.9rem;
display: flex;
flex-direction: column;
}
.latest-posts .date {
font-size: 0.75rem;
color: #888;
margin-bottom: 2px;
}
.latest-posts a {
text-decoration: none;
font-weight: 500;
}
.latest-posts a:hover {
color: var(--accent-color);
}
.directory-link {
margin-top: 1.5rem;
text-align: center;
font-size: 0.9rem;
font-weight: bold;
text-transform: uppercase;
}
/* Mobile Trigger */
#read-more-trigger {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #000;
color: #fff;
text-align: center;
padding: 1rem;
font-weight: bold;
cursor: pointer;
transform: translateY(100%);
transition: transform 0.3s ease;
z-index: 90;
display: none;
/* Desktop default hidden */
}
/* Mobile Tweaks */
@media (max-width: 900px) {
.sidebar {
display: none;
/* Hide standard sidebar on mobile */
}
.sidebar.force-visible {
display: block;
left: 1rem;
right: 1rem;
bottom: 4rem;
/* Above trigger */
width: auto;
}
#read-more-trigger {
display: block;
/* Active on mobile */
}
#read-more-trigger.visible {
transform: translateY(0);
}
.main-header h1 {
font-size: 2rem;
}
}
/* Latest Post Preview Section */
.latest-post-preview {
margin-top: 4rem;
padding-top: 2rem;
border-top: 1px solid var(--sidebar-border);
}
.latest-post-preview h3 {
margin-top: 0;
margin-bottom: 2rem;
font-size: 1.5rem;
text-transform: uppercase;
letter-spacing: 1px;
}
.preview-content {
position: relative;
max-height: 400px;
/* Limit height for the fade effect */
overflow: hidden;
margin-bottom: 2rem;
/* Fade Effect at the bottom */
-webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
.read-more-container {
text-align: center;
margin-top: -2rem;
/* Pull up to cover the faded bottom area slightly or just sit below */
position: relative;
z-index: 10;
}
.read-more-btn {
display: inline-block;
padding: 10px 20px;
border: 1px solid var(--text-color);
text-decoration: none;
text-transform: uppercase;
font-weight: bold;
font-size: 0.9rem;
transition: all 0.3s ease;
background: var(--bg-color);
color: var(--text-color);
}
.read-more-btn:hover {
background: var(--text-color);
color: var(--bg-color);
border-color: var(--text-color);
}