MediaWiki:Common.css: Difference between revisions
Arisepedia (talk | contribs) No edit summary Tag: Reverted |
Arisepedia (talk | contribs) No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
/* MediaWiki:Common.css */ | /* MediaWiki:Common.css */ | ||
/* Featured Articles Section */ | /* Featured Articles Section */ | ||
Line 189: | Line 8: | ||
padding: 20px; | padding: 20px; | ||
margin-bottom: 40px; | margin-bottom: 40px; | ||
overflow | overflow: hidden; /* Hide scrollbar by default */ | ||
} | } | ||
Line 204: | Line 23: | ||
display: flex; | display: flex; | ||
gap: 20px; | gap: 20px; | ||
overflow-x: auto; | |||
padding-bottom: 20px; /* Space for scrollbar */ | |||
scroll-behavior: smooth; /* Smooth scrolling */ | |||
-webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */ | |||
} | } | ||
.article-card { | .article-card { | ||
flex: 0 0 | flex: 0 0 250px; | ||
background: var(--card-bg); | background: var(--card-bg); | ||
border-radius: 10px; | border-radius: 10px; | ||
Line 215: | Line 37: | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
transition: transform 0.3s ease, box-shadow 0.3s ease; | |||
cursor: pointer; | |||
} | |||
.article-card:hover { | |||
transform: translateY(-5px); | |||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); | |||
} | } | ||
Line 223: | Line 52: | ||
border-radius: 10px; | border-radius: 10px; | ||
margin-bottom: 10px; | margin-bottom: 10px; | ||
transition: filter 0.3s ease; | |||
} | |||
.article-card:hover img { | |||
filter: brightness(1.1); | |||
} | } | ||
Line 229: | Line 63: | ||
margin-bottom: 10px; | margin-bottom: 10px; | ||
color: var(--text-color); | color: var(--text-color); | ||
transition: color 0.3s ease; | |||
} | |||
.article-card:hover h3 { | |||
color: var(--link-color); | |||
} | } | ||
Line 236: | Line 75: | ||
line-height: 1.4; | line-height: 1.4; | ||
margin-bottom: 10px; | margin-bottom: 10px; | ||
overflow: hidden; | |||
display: -webkit-box; | |||
-webkit-line-clamp: 3; | |||
-webkit-box-orient: vertical; | |||
} | } | ||
Line 247: | Line 90: | ||
font-size: 0.9em; | font-size: 0.9em; | ||
font-weight: 600; | font-weight: 600; | ||
transition: background 0.3s, | transition: background 0.3s ease, transform 0.3s ease; | ||
align-self: flex-start; | align-self: flex-start; | ||
} | } | ||
Line 253: | Line 96: | ||
.read-more:hover { | .read-more:hover { | ||
background: var(--link-hover); | background: var(--link-hover); | ||
transform: scale(1.05); | |||
} | } | ||
/* Scrollbar Styles */ | |||
.article-grid::-webkit-scrollbar { | |||
height: 8px; | |||
} | |||
.article-grid::-webkit-scrollbar-track { | |||
background: var(--card-bg); | |||
border-radius: 4px; | |||
} | |||
.article-grid::-webkit-scrollbar-thumb { | |||
background: var(--link-color); | |||
border-radius: 4px; | |||
} | |||
.article-grid::-webkit-scrollbar-thumb:hover { | |||
background: var(--link-hover); | |||
} | |||
/* Show scrollbar on hover */ | |||
.featured-articles:hover .article-grid { | |||
overflow-x: auto; | |||
} | |||
/* Animation for card appearance */ | |||
@keyframes fadeInUp { | |||
from { | |||
opacity: 0; | |||
transform: translateY(20px); | |||
} | |||
to { | |||
opacity: 1; | |||
transform: translateY(0); | |||
} | |||
} | |||
.article-card { | |||
animation: fadeInUp 0.5s ease-out forwards; | |||
opacity: 0; | |||
} | |||
.article-card:nth-child(1) { animation-delay: 0.1s; } | |||
.article-card:nth-child(2) { animation-delay: 0.2s; } | |||
.article-card:nth-child(3) { animation-delay: 0.3s; } | |||
.article-card:nth-child(4) { animation-delay: 0.4s; } |
Revision as of 18:34, 5 October 2024
/* MediaWiki:Common.css */ /* Featured Articles Section */ .featured-articles { background: var(--card-bg); border-radius: 15px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); padding: 20px; margin-bottom: 40px; overflow: hidden; /* Hide scrollbar by default */ } .featured-articles h2 { font-size: 2em; color: var(--heading-color); border-bottom: 3px solid var(--card-border); padding-bottom: 10px; margin-bottom: 20px; font-weight: 700; } .article-grid { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 20px; /* Space for scrollbar */ scroll-behavior: smooth; /* Smooth scrolling */ -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */ } .article-card { flex: 0 0 250px; background: var(--card-bg); border-radius: 10px; padding: 15px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; } .article-card:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); } .article-card img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; transition: filter 0.3s ease; } .article-card:hover img { filter: brightness(1.1); } .article-card h3 { font-size: 1.2em; margin-bottom: 10px; color: var(--text-color); transition: color 0.3s ease; } .article-card:hover h3 { color: var(--link-color); } .article-card p { flex-grow: 1; font-size: 0.9em; line-height: 1.4; margin-bottom: 10px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; } .read-more { display: inline-block; background: var(--link-color); color: var(--hero-text); padding: 8px 15px; border-radius: 20px; text-decoration: none; font-size: 0.9em; font-weight: 600; transition: background 0.3s ease, transform 0.3s ease; align-self: flex-start; } .read-more:hover { background: var(--link-hover); transform: scale(1.05); } /* Scrollbar Styles */ .article-grid::-webkit-scrollbar { height: 8px; } .article-grid::-webkit-scrollbar-track { background: var(--card-bg); border-radius: 4px; } .article-grid::-webkit-scrollbar-thumb { background: var(--link-color); border-radius: 4px; } .article-grid::-webkit-scrollbar-thumb:hover { background: var(--link-hover); } /* Show scrollbar on hover */ .featured-articles:hover .article-grid { overflow-x: auto; } /* Animation for card appearance */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .article-card { animation: fadeInUp 0.5s ease-out forwards; opacity: 0; } .article-card:nth-child(1) { animation-delay: 0.1s; } .article-card:nth-child(2) { animation-delay: 0.2s; } .article-card:nth-child(3) { animation-delay: 0.3s; } .article-card:nth-child(4) { animation-delay: 0.4s; }