Template:IndexPage/styles.css: Difference between revisions
From AbhiprayaVedi
mNo edit summary |
mNo edit summary |
||
| Line 71: | Line 71: | ||
.story-card h4 { | .story-card h4 { | ||
margin: 0 0 10px 0; | margin: 0 0 10px 0; | ||
font-size: 1. | font-size: 1.28em; | ||
line-height: 1.35; | line-height: 1.35; | ||
} | } | ||
| Line 77: | Line 77: | ||
.index-card-intro { | .index-card-intro { | ||
color: #555; | color: #555; | ||
font-size: 0. | font-size: 0.96em; | ||
line-height: 1.55; | line-height: 1.55; | ||
margin-bottom: 12px; | margin-bottom: 12px; | ||
display: block; | |||
max-height: 4.65em; /* Approx 3 lines */ | |||
overflow: hidden; | |||
} | } | ||
| Line 126: | Line 129: | ||
.top-stories-grid { | .top-stories-grid { | ||
grid-template-columns: 1fr; | grid-template-columns: 1fr; | ||
} | } | ||
} | } | ||
Revision as of 18:37, 29 May 2026
/* ================ INDEX PAGE STYLES ================ */
.main-hero {
background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
color: white;
padding: 60px 20px;
text-align: center;
border-radius: 12px;
margin-bottom: 40px;
}
.main-hero h1 {
font-size: 2.8em;
margin: 0 0 12px 0;
font-weight: 700;
}
.main-hero p {
font-size: 1.25em;
margin: 0 0 25px 0;
opacity: 0.95;
}
/* Featured Grid */
.featured-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
gap: 24px;
margin-bottom: 50px;
}
/* Top Stories Grid */
.top-stories-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 20px;
margin-bottom: 50px;
}
/* General Card Styles */
.index-card,
.story-card,
.featured-card {
background: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
transition: transform 0.2s, box-shadow 0.2s;
}
.index-card:hover,
.story-card:hover,
.featured-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.index-card-image img,
.story-image img {
width: 100%;
height: 200px;
object-fit: cover;
}
.index-card-text,
.story-card-text {
padding: 18px;
}
.index-card h3,
.story-card h4 {
margin: 0 0 10px 0;
font-size: 1.28em;
line-height: 1.35;
}
.index-card-intro {
color: #555;
font-size: 0.96em;
line-height: 1.55;
margin-bottom: 12px;
display: block;
max-height: 4.65em; /* Approx 3 lines */
overflow: hidden;
}
.index-card-meta,
.story-meta {
color: #666;
font-size: 0.9em;
}
/* Category Grid */
.category-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 12px;
margin: 30px 0;
}
.category-grid a {
display: block;
padding: 16px 20px;
background: #f8fafc;
border-radius: 8px;
text-align: center;
font-weight: 600;
color: #1e40af;
text-decoration: none;
transition: all 0.2s;
}
.category-grid a:hover {
background: #dbeafe;
transform: translateY(-2px);
}
/* Responsive Adjustments */
@media (max-width: 768px) {
.main-hero {
padding: 40px 15px;
}
.main-hero h1 {
font-size: 2.2em;
}
.featured-grid,
.top-stories-grid {
grid-template-columns: 1fr;
}
}
/* Clean spacing */
.section-title {
font-size: 1.6em;
margin: 40px 0 20px 0;
color: #1e3a8a;
border-bottom: 3px solid #bfdbfe;
padding-bottom: 8px;
}