Template:IndexPage/styles.css: Difference between revisions
From AbhiprayaVedi
No edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
/* ===== | /* ================ 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 { | .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 { | .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; | |||
.story-card | |||
} | } | ||
.index-card h3, | |||
.story-card h4 { | .story-card h4 { | ||
margin: 0 0 10px 0; | |||
font-size: 1.25em; | |||
line-height: 1.35; | |||
} | } | ||
. | .index-card-intro { | ||
color: #555; | |||
font-size: 0.97em; | |||
line-height: 1.55; | |||
margin-bottom: 12px; | |||
} | } | ||
.index-card-meta, | |||
.story-meta { | .story-meta { | ||
color: #666; | |||
font-size: 0.9em; | |||
} | } | ||
/* Category Grid */ | |||
/* | |||
.category-grid { | .category-grid { | ||
display: grid; | |||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); | |||
gap: 12px; | |||
margin: 30px 0; | |||
} | } | ||
.category-grid | .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 | .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; | |||
} | |||
.article-sidebar { | |||
float: none; | |||
width: 100%; | |||
margin: 25px 0; | |||
} | |||
} | } | ||
/* | /* Clean spacing */ | ||
.section-title { | |||
font-size: 1.6em; | |||
margin: 40px 0 20px 0; | |||
color: #1e3a8a; | |||
border-bottom: 3px solid #bfdbfe; | |||
padding-bottom: 8px; | |||
} | } | ||
Revision as of 23:39, 28 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.25em;
line-height: 1.35;
}
.index-card-intro {
color: #555;
font-size: 0.97em;
line-height: 1.55;
margin-bottom: 12px;
}
.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;
}
.article-sidebar {
float: none;
width: 100%;
margin: 25px 0;
}
}
/* Clean spacing */
.section-title {
font-size: 1.6em;
margin: 40px 0 20px 0;
color: #1e3a8a;
border-bottom: 3px solid #bfdbfe;
padding-bottom: 8px;
}