yak-blog/css/style.css

276 lines
5.0 KiB
CSS
Raw Normal View History

2025-04-26 12:50:45 +01:00
:root {
--main-bg-color: #F7F7F2;
--border-color: #E6E6E0;
--hover-color: #EEEEE8;
--text-color: #333333;
--accent-color: #686B5E;
--card-bg-color: #FFFFFF;
}
body, input, textarea {
color: var(--text-color);
font-family: 'helvetica', Georgia, serif;
padding: 0;
margin: 0;
background-color: var(--main-bg-color);
line-height: 1.6;
}
a {
text-decoration: none;
color: var(--text-color);
transition: color 0.3s ease;
}
a:hover {
color: var(--accent-color);
text-decoration: none;
}
#header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30px 0 15px 0;
border-bottom: 1px solid var(--border-color);
margin-bottom: 40px;
}
#site-title {
font-size: 38px;
font-weight: 400;
margin: 0;
}
#article-title {
font-size: 28px;
font-weight: 300;
margin: 10px 0 0 0;
color: var(--accent-color);
}
nav ul {
list-style-type: none;
display: flex;
margin: 0;
padding: 0;
}
nav li {
margin-left: 30px;
}
nav li a {
font-size: 20px;
padding: 10px 5px;
position: relative;
}
nav li a:hover {
background-color: transparent;
}
nav li a:after {
content: '';
position: absolute;
width: 0;
height: 1px;
bottom: 0;
left: 0;
background-color: var(--accent-color);
transition: width 0.3s ease;
}
nav li a:hover:after {
width: 100%;
}
#wrapper {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
.featured-article {
margin-bottom: 40px;
background-color: var(--card-bg-color);
padding: 30px;
/* border-radius: 4px;*/
/*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
transition: transform 0.3s ease, box-shadow 0.3s ease;*/
border-top: solid 1px var(--border-color);
border-bottom: solid 1px var(--border-color);
}
.featured-article:hover {
/* transform: translateY(-5px);*/
/* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);*/
}
.featured-article h2 {
font-size: 32px;
margin-top: 0;
margin-bottom: 15px;
}
.featured-article .date {
color: var(--accent-color);
font-style: italic;
margin-bottom: 15px;
display: block;
}
.featured-article .excerpt {
margin-bottom: 20px;
}
.read-more {
display: inline-block;
padding: 8px 16px;
background-color: var(--accent-color);
color: white;
border-radius: 4px;
font-size: 16px;
transition: background-color 0.3s ease;
}
.read-more:hover {
background-color: #555;
color: white;
}
.articles-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 30px;
}
.article-card {
background-color: var(--card-bg-color);
/* border-radius: 4px;*/
padding: 20px;
/*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
transition: transform 0.3s ease, box-shadow 0.3s ease;*/
border-top: solid 1px var(--border-color);
border-bottom: solid 1px var(--border-color);
}
.article-card:hover {
/* transform: translateY(-5px);*/
/* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);*/
}
.article-card h3 {
font-size: 24px;
margin-top: 0;
margin-bottom: 10px;
}
.article-card .date {
color: var(--accent-color);
font-style: italic;
margin-bottom: 10px;
display: block;
}
.article-card .excerpt {
margin-bottom: 15px;
}
#footer {
margin-top: 60px;
padding: 20px 0;
border-top: 1px solid var(--border-color);
text-align: center;
font-size: 14px;
color: var(--accent-color);
}
.about-container {
padding: 30px;
background-color: var(--card-bg-color);
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.about-container h1 {
margin-top: 0;
border-bottom: 1px solid var(--border-color);
padding-bottom: 10px;
}
.about-content {
display: flex;
gap: 30px;
margin-top: 30px;
}
.about-bio {
flex: 2;
}
.about-sidebar {
flex: 1;
}
.article-page {
background-color: var(--card-bg-color);
padding: 40px;
/* border-radius: 4px;*/
/* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);*/
border-top: solid 1px var(--border-color);
border-bottom: solid 1px var(--border-color);
}
.article-page h1 {
margin-top: 0;
margin-bottom: 15px;
}
.article-meta {
color: var(--accent-color);
font-style: italic;
margin-bottom: 50px; /* Increased from 30px to 50px */
padding-bottom: 15px;
border-bottom: 1px solid var(--border-color);
}
/* Responsive styles */
@media (max-width: 900px) {
.articles-grid {
grid-template-columns: repeat(2, 1fr);
}
.about-content {
flex-direction: column;
}
}
@media (max-width: 600px) {
#header {
flex-direction: column;
align-items: flex-start;
}
nav {
margin-top: 20px;
width: 100%;
}
nav ul {
justify-content: flex-end;
}
.articles-grid {
grid-template-columns: 1fr;
}
.featured-article, .article-card {
padding: 15px;
}
.article-page {
padding: 20px;
}
}