feat: created basic blog layout

This commit is contained in:
Leyla Becker 2026-02-10 11:02:43 -06:00
parent 42fd071301
commit 0d41db36ef
13 changed files with 935 additions and 3 deletions

259
css/style.css Normal file
View file

@ -0,0 +1,259 @@
/* Base styles */
:root {
--primary-color: #2c3e50;
--secondary-color: #3498db;
--text-color: #333;
--background-color: #fff;
--border-color: #ddd;
--code-background: #f5f5f5;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
line-height: 1.6;
color: var(--text-color);
background-color: var(--background-color);
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}
/* Header and Navigation */
header {
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border-color);
}
header nav a {
color: var(--primary-color);
text-decoration: none;
font-weight: bold;
font-size: 1.2rem;
}
header nav a:hover {
color: var(--secondary-color);
}
/* Main content */
main {
min-height: calc(100vh - 200px);
}
h1, h2, h3, h4, h5, h6 {
color: var(--primary-color);
margin: 1.5rem 0 1rem;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p {
margin-bottom: 1rem;
}
a {
color: var(--secondary-color);
}
/* Blog post list */
.post-list {
list-style: none;
}
.post-list li {
margin-bottom: 1.5rem;
}
.post-list li:last-child {
margin-bottom: 0;
}
.post-card {
display: block;
text-decoration: none;
padding: 1.5rem;
border: 1px solid var(--border-color);
border-radius: 8px;
transition: border-color 0.2s, box-shadow 0.2s;
}
.post-card:hover {
border-color: var(--secondary-color);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.post-card h2 {
margin: 0 0 0.5rem;
color: var(--primary-color);
}
.post-card:hover h2 {
color: var(--secondary-color);
}
.post-card time {
color: #666;
font-size: 0.9rem;
}
.post-card p {
color: var(--text-color);
margin-top: 0.5rem;
margin-bottom: 0;
}
/* Blog post */
.blog-post {
margin-bottom: 2rem;
}
.post-header {
margin-bottom: 2rem;
}
.post-header h1 {
margin-bottom: 0.5rem;
}
.post-header time {
color: #666;
font-size: 0.9rem;
}
.post-content {
margin-bottom: 2rem;
}
.post-content img {
max-width: 100%;
height: auto;
}
.post-content code {
background-color: var(--code-background);
padding: 0.2rem 0.4rem;
border-radius: 3px;
font-size: 0.9em;
}
.post-content pre {
background-color: var(--code-background);
padding: 1rem;
border-radius: 5px;
overflow-x: auto;
margin: 1rem 0;
}
.post-content pre code {
padding: 0;
background: none;
}
/* Expandable sections */
.expandable {
border: 1px solid var(--border-color);
border-radius: 5px;
margin: 1rem 0;
}
.expandable summary {
padding: 0.75rem 1rem;
cursor: pointer;
font-weight: bold;
background-color: var(--code-background);
border-radius: 5px 5px 0 0;
}
.expandable[open] summary {
border-bottom: 1px solid var(--border-color);
}
.expandable > *:not(summary) {
padding: 0 1rem;
}
.expandable > p:last-child {
padding-bottom: 1rem;
}
/* Tags */
.post-tags {
margin-top: 2rem;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
}
.post-tags h2 {
font-size: 1rem;
margin-bottom: 0.5rem;
}
.tag-list {
list-style: none;
display: flex;
flex-wrap: wrap;
gap: 0.5rem 1rem;
}
.tag-list li {
display: inline;
}
.tag-list a {
color: var(--secondary-color);
text-decoration: none;
}
.tag-list a:hover {
text-decoration: underline;
}
/* Footnotes */
.footnotes {
margin-top: 2rem;
padding-top: 1rem;
border-top: 2px solid var(--border-color);
font-size: 0.9rem;
}
.footnotes h2 {
font-size: 1rem;
margin-bottom: 0.5rem;
}
.footnotes ol {
padding-left: 1.5rem;
}
.footnotes li {
margin-bottom: 0.5rem;
}
.footnote-ref a {
color: var(--secondary-color);
text-decoration: none;
}
.footnote-backref {
margin-left: 0.5rem;
text-decoration: none;
}
/* Footer */
footer {
margin-top: 2rem;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
text-align: center;
color: #666;
font-size: 0.9rem;
}