Template:IndexPage/styles.css: Difference between revisions
From അഭിപ്രായവേദി
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
/* ================ INDEX PAGE STYLES (OVERHAULED) ================ */ | /* ================ INDEX PAGE STYLES (OVERHAULED & INTEGRATED) ================ */ | ||
/* Hero Section Banner */ | /* Hero Section Banner */ | ||
| Line 10: | Line 10: | ||
margin-bottom: 40px; | margin-bottom: 40px; | ||
} | } | ||
.main-hero h1 { | .main-hero h1 { | ||
font-family: 'Manjari', 'Meera', sans-serif !important; | font-family: 'Manjari', 'Meera', sans-serif !important; | ||
| Line 17: | Line 16: | ||
font-weight: 700; | font-weight: 700; | ||
} | } | ||
.main-hero p { | .main-hero p { | ||
font-family: 'Manjari', 'Meera', sans-serif !important; | font-family: 'Manjari', 'Meera', sans-serif !important; | ||
| Line 23: | Line 21: | ||
margin-bottom: 28px; | margin-bottom: 28px; | ||
opacity: 0.95; | opacity: 0.95; | ||
} | } | ||
| Line 40: | Line 27: | ||
* This fixes the height mismatch visible in your screenshot. | * This fixes the height mismatch visible in your screenshot. | ||
*/ | */ | ||
.featured-grid > div, | .main-featured-grid > div, | ||
. | .main-topstories-grid > div, | ||
.recent | .main-recent-grid > div { | ||
display: flex !important; | |||
} | |||
.article-card { | .article-card { | ||
height: 100% !important; | height: 100% !important; | ||
display: flex !important; | display: flex !important; | ||
flex-direction: column !important; | flex-direction: column !important; | ||
width: 100%; | |||
} | } | ||
/ | /* Alignment Fix: This forces the metadata row to anchor at the base */ | ||
.article-info { | .article-info { | ||
display: flex !important; | display: flex !important; | ||
| Line 58: | Line 46: | ||
flex-grow: 1 !important; /* Forces layout box to expand fully */ | flex-grow: 1 !important; /* Forces layout box to expand fully */ | ||
} | } | ||
.article-meta-row { | .article-meta-row { | ||
margin-top: auto !important; /* Pushes author line to the base layout */ | margin-top: auto !important; /* Pushes author line to the base layout */ | ||
| Line 74: | Line 61: | ||
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; | transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; | ||
} | } | ||
.article-card:hover { | .article-card:hover { | ||
transform: translateY(-4px); | transform: translateY(-4px); | ||
| Line 80: | Line 66: | ||
} | } | ||
/* ================ | /* ==================== FEATURED SECTION (2 in a row) ==================== */ | ||
.main-featured-grid { | |||
display: grid; | |||
grid-template-columns: repeat(2, 1fr); /* ഒരു വരിയിൽ 2 വലിയ കാർഡുകൾ */ | |||
gap: 24px; | |||
padding: 24px; | |||
background-color: #f1f5f9; /* നേർത്ത സ്ലേറ്റ് ബ്ലൂ പശ്ചാത്തലം */ | |||
border-radius: 12px; | |||
margin-bottom: 45px; | |||
width: 100%; | |||
} | |||
.main-featured-grid .article-thumbnail { | |||
max-height: 240px !important; | |||
} | |||
.main-featured-grid .article-title { | |||
font-size: 1.4em !important; | |||
} | |||
/* | /* ==================== TOP STORIES SECTION (3 in a row) ==================== */ | ||
. | .main-topstories-grid { | ||
display: grid; | display: grid; | ||
grid-template-columns: repeat( | grid-template-columns: repeat(3, 1fr); /* ഒരു വരിയിൽ 3 കാർഡുകൾ */ | ||
gap: | gap: 24px; | ||
margin-bottom: | padding: 24px; | ||
background-color: #ffffff; /* പ്യുവർ വൈറ്റ് പശ്ചാത്തലം */ | |||
border-radius: 12px; | |||
margin-bottom: 45px; | |||
width: 100%; | width: 100%; | ||
} | |||
.main-topstories-grid .article-thumbnail { | |||
max-height: 180px !important; | |||
} | } | ||
/* | /* ==================== RECENT PUBLICATIONS (4 in a row) ==================== */ | ||
.recent- | .main-recent-grid { | ||
display: grid; | |||
grid-template-columns: repeat(4, 1fr); /* ഒരു വരിയിൽ 4 ഒതുക്കമുള്ള കാർഡുകൾ */ | |||
gap: 16px; | |||
padding: 20px; | |||
background-color: #f8fafc; /* വളരെ നേർത്ത ഗ്രേ പശ്ചാത്തലം */ | |||
border-radius: 12px; | |||
margin-bottom: 45px; | |||
width: 100%; | |||
} | } | ||
.main-recent-grid .article-thumbnail { | |||
/* | max-height: 130px !important; /* ചെറിയ ഇമേജ് ലുക്ക് */ | ||
.recent | } | ||
.main-recent-grid .article-title { | |||
font-size: 1.1em !important; | font-size: 1.1em !important; | ||
line-height: 1.3; | line-height: 1.3; | ||
margin-bottom: 4px !important; | margin-bottom: 4px !important; | ||
} | } | ||
.main-recent-grid .article-intro-wrapper { | |||
max-height: 3.2em !important; /* ഇൻട്രോ കൃത്യമായി 2 വരികളിൽ ഒതുക്കുന്നു */ | |||
.recent | |||
max-height: 3.2em !important; /* 2 | |||
margin-bottom: 4px !important; | margin-bottom: 4px !important; | ||
} | } | ||
.main-recent-grid .article-info { | |||
padding: 12px !important; /* ഇൻഫോ ബോക്സിന്റെ പാഡിങ് കുറച്ചു */ | |||
.recent | |||
padding: 12px !important; | |||
} | } | ||
.main-recent-grid .article-meta-row { | |||
.recent | |||
padding-top: 4px !important; | padding-top: 4px !important; | ||
font-size: 0.9em; | font-size: 0.9em; | ||
} | } | ||
| Line 136: | Line 138: | ||
width: 100%; | width: 100%; | ||
} | } | ||
.category-box { | .category-box { | ||
display: inline-block; | |||
width: 100%; | |||
background: #f8fafc; | background: #f8fafc; | ||
border: 1px solid #e2e8f0; | border: 1px solid #e2e8f0; | ||
border-radius: 8px; | border-radius: 8px; | ||
text-align: center; | text-align: center; | ||
box-sizing: border-box; | |||
transition: all 0.2s ease-in-out; | transition: all 0.2s ease-in-out; | ||
} | } | ||
.category-box a { | .category-box a { | ||
display: block; | display: block; | ||
| Line 154: | Line 157: | ||
text-decoration: none !important; | text-decoration: none !important; | ||
} | } | ||
.category-box:hover { | .category-box:hover { | ||
background: #3182ce; | background: #3182ce; | ||
| Line 161: | Line 163: | ||
box-shadow: 0 4px 6px rgba(0,0,0,0.05); | box-shadow: 0 4px 6px rgba(0,0,0,0.05); | ||
} | } | ||
.category-box:hover a { | .category-box:hover a { | ||
color: #ffffff !important; | color: #ffffff !important; | ||
} | } | ||
.category-grid p, | .category-grid p, | ||
.category-grid br { | .category-grid br { | ||
| Line 172: | Line 171: | ||
margin: 0 !important; | margin: 0 !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
} | } | ||
/* Strict Cleanup: Target MediaWiki's auto-generated empty paragraph tags */ | /* Strict Cleanup: Target MediaWiki's auto-generated empty paragraph tags */ | ||
.mw-parser-output .featured-grid p:empty, | .mw-parser-output .main-featured-grid p:empty, | ||
.mw-parser-output . | .mw-parser-output .main-topstories-grid p:empty, | ||
.mw-parser-output .recent | .mw-parser-output .main-recent-grid p:empty, | ||
.mw-parser-output .featured-grid br, | .mw-parser-output .main-featured-grid br, | ||
.mw-parser-output . | .mw-parser-output .main-topstories-grid br, | ||
.mw-parser-output .main-recent-grid br { | |||
display: none !important; | display: none !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
| Line 252: | Line 222: | ||
margin-bottom: 10px; | margin-bottom: 10px; | ||
color: #4a5568; | color: #4a5568; | ||
} | |||
/* ==================== RESPONSIVE OVERRIDES ==================== */ | |||
@media (max-width: 992px) { | |||
.main-recent-grid { grid-template-columns: repeat(2, 1fr); } | |||
} | |||
@media (max-width: 768px) { | |||
.main-featured-grid, | |||
.main-topstories-grid { | |||
grid-template-columns: 1fr; | |||
} | |||
.main-hero { | |||
padding: 40px 15px; | |||
margin-bottom: 25px; | |||
} | |||
.main-hero h1 { | |||
font-size: 2em; | |||
} | |||
} | } | ||
Revision as of 19:43, 13 June 2026
/* ================ INDEX PAGE STYLES (OVERHAULED & INTEGRATED) ================ */
/* Hero Section Banner */
.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-family: 'Manjari', 'Meera', sans-serif !important;
font-size: 2.8em;
margin: 0 0 14px 0;
font-weight: 700;
}
.main-hero p {
font-family: 'Manjari', 'Meera', sans-serif !important;
font-size: 1.25em;
margin-bottom: 28px;
opacity: 0.95;
}
/*
* Force MediaWiki Parser output to stretch cards evenly inside the grid.
* This fixes the height mismatch visible in your screenshot.
*/
.main-featured-grid > div,
.main-topstories-grid > div,
.main-recent-grid > div {
display: flex !important;
}
.article-card {
height: 100% !important;
display: flex !important;
flex-direction: column !important;
width: 100%;
}
/* Alignment Fix: This forces the metadata row to anchor at the base */
.article-info {
display: flex !important;
flex-direction: column !important;
flex-grow: 1 !important; /* Forces layout box to expand fully */
}
.article-meta-row {
margin-top: auto !important; /* Pushes author line to the base layout */
padding-top: 12px;
border-top: 1px solid #edf2f7;
}
/* Smooth hover effects on standard Article Cards */
.article-card {
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.article-card:hover {
transform: translateY(-4px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
/* ==================== FEATURED SECTION (2 in a row) ==================== */
.main-featured-grid {
display: grid;
grid-template-columns: repeat(2, 1fr); /* ഒരു വരിയിൽ 2 വലിയ കാർഡുകൾ */
gap: 24px;
padding: 24px;
background-color: #f1f5f9; /* നേർത്ത സ്ലേറ്റ് ബ്ലൂ പശ്ചാത്തലം */
border-radius: 12px;
margin-bottom: 45px;
width: 100%;
}
.main-featured-grid .article-thumbnail {
max-height: 240px !important;
}
.main-featured-grid .article-title {
font-size: 1.4em !important;
}
/* ==================== TOP STORIES SECTION (3 in a row) ==================== */
.main-topstories-grid {
display: grid;
grid-template-columns: repeat(3, 1fr); /* ഒരു വരിയിൽ 3 കാർഡുകൾ */
gap: 24px;
padding: 24px;
background-color: #ffffff; /* പ്യുവർ വൈറ്റ് പശ്ചാത്തലം */
border-radius: 12px;
margin-bottom: 45px;
width: 100%;
}
.main-topstories-grid .article-thumbnail {
max-height: 180px !important;
}
/* ==================== RECENT PUBLICATIONS (4 in a row) ==================== */
.main-recent-grid {
display: grid;
grid-template-columns: repeat(4, 1fr); /* ഒരു വരിയിൽ 4 ഒതുക്കമുള്ള കാർഡുകൾ */
gap: 16px;
padding: 20px;
background-color: #f8fafc; /* വളരെ നേർത്ത ഗ്രേ പശ്ചാത്തലം */
border-radius: 12px;
margin-bottom: 45px;
width: 100%;
}
.main-recent-grid .article-thumbnail {
max-height: 130px !important; /* ചെറിയ ഇമേജ് ലുക്ക് */
}
.main-recent-grid .article-title {
font-size: 1.1em !important;
line-height: 1.3;
margin-bottom: 4px !important;
}
.main-recent-grid .article-intro-wrapper {
max-height: 3.2em !important; /* ഇൻട്രോ കൃത്യമായി 2 വരികളിൽ ഒതുക്കുന്നു */
margin-bottom: 4px !important;
}
.main-recent-grid .article-info {
padding: 12px !important; /* ഇൻഫോ ബോക്സിന്റെ പാഡിങ് കുറച്ചു */
}
.main-recent-grid .article-meta-row {
padding-top: 4px !important;
font-size: 0.9em;
}
/* ================ CATEGORY BUTTONS COMPACT STYLES ================ */
.category-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 16px;
margin-bottom: 40px;
width: 100%;
}
.category-box {
display: inline-block;
width: 100%;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
text-align: center;
box-sizing: border-box;
transition: all 0.2s ease-in-out;
}
.category-box a {
display: block;
padding: 14px 10px;
font-family: 'Manjari', 'Meera', sans-serif !important;
font-size: 1.1em;
font-weight: bold;
color: #2d3748 !important;
text-decoration: none !important;
}
.category-box:hover {
background: #3182ce;
border-color: #3182ce;
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.category-box:hover a {
color: #ffffff !important;
}
.category-grid p,
.category-grid br {
display: none !important;
margin: 0 !important;
padding: 0 !important;
}
/* Strict Cleanup: Target MediaWiki's auto-generated empty paragraph tags */
.mw-parser-output .main-featured-grid p:empty,
.mw-parser-output .main-topstories-grid p:empty,
.mw-parser-output .main-recent-grid p:empty,
.mw-parser-output .main-featured-grid br,
.mw-parser-output .main-topstories-grid br,
.mw-parser-output .main-recent-grid br {
display: none !important;
margin: 0 !important;
padding: 0 !important;
height: 0 !important;
}
/* ================ CATEGORY PAGE SPECIFIC STYLES ================ */
.category-page-header {
background: #edf2f7;
padding: 30px 20px;
border-radius: 10px;
margin-bottom: 30px;
border-left: 5px solid #3182ce;
}
.category-page-header h1 {
font-family: 'Manjari', 'Meera', sans-serif !important;
margin: 0 0 8px 0;
color: #1a202c;
}
.category-page-header p {
margin: 0;
color: #4a5568;
}
.older-articles-section {
margin-top: 40px;
padding-top: 20px;
border-top: 2px dashed #e2e8f0;
}
.older-articles-section h3 {
font-family: 'Manjari', sans-serif !important;
color: #2d3748;
margin-bottom: 15px;
}
.older-articles-list ul {
list-style-type: square;
padding-left: 20px;
}
.older-articles-list li {
font-family: 'Manjari', sans-serif !important;
font-size: 1.05em;
margin-bottom: 10px;
color: #4a5568;
}
/* ==================== RESPONSIVE OVERRIDES ==================== */
@media (max-width: 992px) {
.main-recent-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
.main-featured-grid,
.main-topstories-grid {
grid-template-columns: 1fr;
}
.main-hero {
padding: 40px 15px;
margin-bottom: 25px;
}
.main-hero h1 {
font-size: 2em;
}
}