Template:IndexPage/styles.css: Difference between revisions
From AbhiprayaVedi
mNo edit summary |
mNo edit summary |
||
| Line 22: | Line 22: | ||
} | } | ||
.featured-grid { | |||
.featured-grid, | display: grid; | ||
grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); | |||
gap: 28px; | |||
margin-bottom: 50px; | |||
} | |||
.top-stories-grid { | .top-stories-grid { | ||
display: grid; | display: grid; | ||
grid-template-columns: repeat(auto-fit, minmax( | grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); | ||
gap: | gap: 22px; | ||
margin-bottom: | margin-bottom: 50px; | ||
} | } | ||
/* Card Styles */ | /* Card Styles */ | ||
.index-card { | .index-card { | ||
height: 100%; | height: 100%; | ||
display: flex; | |||
flex-direction: column; | |||
} | |||
.index-card-image { | |||
flex-shrink: 0; | |||
} | |||
.index-card-text { | |||
flex-grow: 1; | |||
display: flex; | |||
flex-direction: column; | |||
} | } | ||
.index-card | .index-card h3 { | ||
margin-top: auto; | |||
} | } | ||
| Line 50: | Line 61: | ||
height: 210px; | height: 210px; | ||
object-fit: cover; | object-fit: cover; | ||
flex-shrink: 0; | |||
} | } | ||
Revision as of 15:04, 1 June 2026
/* ================ MAIN PAGE STYLES ================ */
.main-hero {
background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
color: white;
padding: 70px 20px;
text-align: center;
border-radius: 12px;
margin-bottom: 45px;
}
.main-hero h1 {
font-size: 2.9em;
margin: 0 0 14px 0;
font-weight: 700;
}
.main-hero p {
font-size: 1.28em;
margin-bottom: 28px;
opacity: 0.95;
}
.featured-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
gap: 28px;
margin-bottom: 50px;
}
.top-stories-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 22px;
margin-bottom: 50px;
}
/* Card Styles */
.index-card {
height: 100%;
display: flex;
flex-direction: column;
}
.index-card-image {
flex-shrink: 0;
}
.index-card-text {
flex-grow: 1;
display: flex;
flex-direction: column;
}
.index-card h3 {
margin-top: auto;
}
.index-card-image img {
width: 100%;
height: 210px;
object-fit: cover;
flex-shrink: 0;
}
.index-card-text {
padding: 20px;
}
.index-card h3 {
margin: 0 0 10px 0;
font-size: 1.32em;
line-height: 1.35;
}
.index-card-intro {
color: #555;
font-size: 0.97em;
line-height: 1.55;
margin-bottom: 12px;
max-height: 4.8em; /* Approx 3 lines */
overflow: hidden;
}
.index-card-meta {
color: #666;
font-size: 0.92em;
}
/* Category Grid */
.category-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 14px;
margin: 35px 0;
}
.category-grid a {
display: block;
padding: 18px 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 */
@media (max-width: 768px) {
.main-hero h1 {
font-size: 2.3em;
}
.featured-grid,
.top-stories-grid {
grid-template-columns: 1fr;
}
}
/* Section Titles */
.section-title {
font-size: 1.65em;
margin: 45px 0 22px 0;
color: #1e3a8a;
border-bottom: 3px solid #bfdbfe;
padding-bottom: 10px;
}