Files
flask_blog/static/css/simple-blog-template.css
2026-03-14 21:35:54 +01:00

280 lines
5.0 KiB
CSS

/* --- Global Styles --- */
body {
padding-top: 80px;
font-family:
"Inter",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
sans-serif;
background-color: #fcfcfc;
color: #222; /* Darker for better contrast */
font-size: 18px; /* Larger body text for readability */
line-height: 1.75; /* Increased breathing room between lines */
}
/* Narrower container improves readability by limiting line length */
@media (min-width: 1200px) {
.container {
width: 720px;
}
}
/* --- Navigation --- */
nav {
text-transform: uppercase;
letter-spacing: 0.05em;
}
.navbar-inverse {
background-color: #1a1a1a;
border: none;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.navbar-inverse .navbar-brand {
color: #fff !important;
font-weight: 700;
font-size: 20px;
}
/* Fixes 'ABOUT' being lost in the middle - pushes it to the right */
.navbar-right {
float: right !important;
margin-right: 0;
}
.navbar-inverse .navbar-nav > li > a {
color: #ccc !important;
font-weight: 600;
font-size: 13px;
transition: color 0.2s;
}
.navbar-inverse .navbar-nav > li > a:hover {
color: #fff !important;
}
/* --- Post List & Content --- */
.post-preview {
margin-bottom: 50px;
padding-bottom: 30px;
border-bottom: 1px solid #eee;
}
.post-title {
font-size: 2.4rem;
font-weight: 700;
margin-top: 0;
margin-bottom: 12px;
letter-spacing: -0.02em;
line-height: 1.2;
}
.post-title a {
color: #1a1a1a;
text-decoration: none;
transition: color 0.2s;
}
.post-title a:hover {
color: #0366d6;
}
.post-meta {
color: #666;
font-size: 0.9rem;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 8px;
}
/* --- Buttons --- */
.btn-read-more {
float: right;
background: #fff;
border: 1px solid #ddd;
color: #555;
border-radius: 6px;
padding: 8px 18px;
font-size: 0.9rem;
font-weight: 600;
transition: all 0.2s;
display: inline-block;
text-decoration: none !important;
}
.btn-read-more:hover {
border-color: #0366d6;
color: #0366d6;
background: #f0f7ff;
}
.btn-read-more:active {
transform: translateY(1px);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* --- Terminal Style (Code Blocks) --- */
.terminal-style {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
background-color: #0d1117;
color: #e6edf3;
padding: 20px;
border-radius: 8px;
border: 1px solid #30363d;
font-size: 0.95rem; /* Larger for technical clarity */
line-height: 1.5;
overflow-x: auto;
margin: 25px 0;
}
/* --- Comments Section --- */
/* Modernizing the container */
.comment-card {
background: #ffffff;
border: 1px solid #e1e4e8;
border-radius: 8px;
padding: 24px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
margin-top: 30px;
}
.comment-card h4 {
margin-top: 0;
font-weight: 600;
color: #333;
margin-bottom: 20px;
}
/* Styling the inputs */
.comment-card .form-control {
border-radius: 6px;
border: 1px solid #d1d5da;
box-shadow: none;
transition:
border-color 0.2s,
box-shadow 0.2s;
padding: 10px 12px;
}
.comment-card .form-control:focus {
border-color: #007bff;
box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
outline: none;
}
/* Making the button pop */
.comment-card .btn-primary {
background-color: #007bff;
border: none;
padding: 8px 20px;
font-weight: 500;
border-radius: 6px;
margin-top: 15px;
transition: background 0.2s;
}
.comment-card .btn-primary:hover {
background-color: #0056b3;
}
.comment-card {
background: #ffffff;
border: 1px solid #e1e4e8;
border-radius: 12px;
padding: 32px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
margin-top: 40px;
}
.comment-item {
display: flex;
gap: 16px;
margin-bottom: 24px;
padding-bottom: 20px;
border-bottom: 1px solid #f0f0f0;
}
.comment-item:last-child {
border-bottom: none;
}
.avatar-img {
border-radius: 50%;
border: 1px solid #eee;
background: #f8f9fa;
}
.comment-author {
font-weight: 700;
color: #1a1a1a;
font-size: 1rem;
}
.comment-text {
white-space: pre-line; /* Essential: Handles the \n line breaks */
color: #444;
line-height: 1.6;
margin-top: 4px;
}
/* Button inside comment form */
.btn-modern {
background-color: #0366d6;
color: white;
border: none;
padding: 10px 24px;
font-weight: 600;
border-radius: 6px;
cursor: pointer;
margin-top: 15px;
display: inline-block;
transition: background 0.2s;
}
.btn-modern:hover {
background-color: #005cc5;
}
/* --- Pagination --- */
.pager {
display: flex;
justify-content: space-between;
padding: 30px 0;
margin-top: 20px;
}
.pager li {
list-style: none;
}
.pager li > a {
color: #444;
font-weight: 600;
text-decoration: none;
padding: 10px 20px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 0.9rem;
}
.pager li > a:hover {
background-color: #f6f8fa;
border-color: #ccc;
}
/* --- Decoration --- */
.background-svg {
position: fixed;
bottom: 40px;
right: 40px;
width: 140px;
z-index: -1;
pointer-events: none;
opacity: 0.2;
}