Template:Home/Cards - styles/styles.css
Template page
More actions
/* ============================================ */
/* HOME GRID LAYOUT */
/* ============================================ */
.home-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 0.75rem;
margin-top: 0;
width: 100%;
align-items: stretch;
}
/* ============================================ */
/* BASE HOME CARD STYLES */
/* ============================================ */
.home-card {
position: relative;
padding: 12px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.0575);
font-size: 0.8125rem;
transition: transform 0.2s ease, box-shadow 0.2s ease;
border: 1px solid #dee2e6;
min-height: 100px;
height: 100%;
display: flex;
flex-direction: column;
}
.home-card--col1 {
grid-column: span 1;
}
.home-card--col2 {
grid-column: span 2;
}
.home-card--col3 {
grid-column: span 3;
}
.home-card--col4 {
grid-column: span 4;
}
.home-card--col5 {
grid-column: span 5;
}
.home-card--col6 {
grid-column: span 6;
}
.home-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.115);
}
/* ============================================ */
/* CARD SUB-ELEMENTS */
/* ============================================ */
.home-card__label {
color: #6c757d;
font-size: 0.6875rem;
letter-spacing: 0.5px;
text-transform: uppercase;
font-weight: 500;
margin: 0 0 2px 0;
}
.home-card__header {
margin: 0 0 0.5rem 0 !important;
font-size: 0.95rem;
color: #2d5016;
font-weight: 600;
}
.home-card__header a {
color: inherit;
text-decoration: none;
}
.home-card__header a:hover {
color: #3d6b1f;
}
.home-card__body {
color: #495057;
line-height: 1.4;
margin-bottom: 0.1rem;
flex-grow: 1;
}
.home-card__body a:hover {
text-decoration: underline;
}
.home-card__links {
font-size: 0.75rem;
color: #6c757d;
border-top: 1px solid #dee2e6;
padding-top: 0.5rem;
margin-top: auto;
}
.home-card__links a {
color: #2d5016;
text-decoration: none;
font-weight: 500;
}
.home-card__links a:hover {
text-decoration: underline;
}
/* ============================================ */
/* MEDIAWIKI PARAGRAPH WRAPPING FIXES */
/* ============================================ */
.home-card p {
margin: 0;
}
.home-card p:empty {
display: none;
}
/* ============================================ */
/* HERO SPLIT (used in --col6 hero card) */
/* ============================================ */
.home-hero-split {
display: grid;
grid-template-columns: 1fr 2fr;
column-gap: 24px;
flex-grow: 1;
}
.home-hero-split__left,
.home-hero-split__right {
display: flex;
flex-direction: column;
min-width: 0;
}
/* ============================================ */
/* FACET ROWS (Browse Accessions) */
/* ============================================ */
.home-facets-grid {
display: flex;
flex-direction: column;
margin: 0.5rem 0 0 0;
flex-grow: 1;
}
.home-facet-row {
border-bottom: 1px solid #f0ede5;
}
.home-facet-row:last-child {
border-bottom: none;
}
.home-facet-row a {
display: flex;
align-items: center;
padding: 14px 0;
color: #6c757d !important;
text-decoration: none !important;
font-size: 0.875rem;
transition: color 0.15s ease, padding-left 0.15s ease;
}
.home-facet-row a:hover {
color: #2d5016 !important;
padding-left: 4px;
}
.home-facet-row a::after {
content: "→";
margin-left: auto;
color: #2d5016;
font-weight: 500;
opacity: 0.45;
transition: opacity 0.15s ease, transform 0.15s ease;
}
.home-facet-row a:hover::after {
opacity: 1;
transform: translateX(2px);
}
/* ============================================ */
/* KNOWLEDGE PORTALS */
/* ============================================ */
.home-portals {
display: flex;
flex-direction: column;
margin: 0.5rem 0 0 0;
}
.home-portal {
border-bottom: 1px solid #f0ede5;
}
.home-portal:last-child {
border-bottom: none;
}
.home-portal a {
display: flex;
align-items: center;
padding: 8px 0;
font-size: 0.875rem;
font-weight: 500;
color: #2d5016 !important;
text-decoration: none !important;
line-height: 1.25;
transition: padding-left 0.15s ease, color 0.15s ease;
}
.home-portal a:hover {
padding-left: 4px;
color: #3d6b1f !important;
}
.home-portal a::before {
content: '';
width: 20px;
height: 20px;
margin-right: 12px;
flex-shrink: 0;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
opacity: 0.85;
}
/* Per-portal icons */
.home-portal--botany a::before {
background-image: url("https://landrace.wiki/images/a/a0/Icon-botany.png");
}
.home-portal--genetics a::before {
background-image: url("https://landrace.wiki/images/7/73/Icon-genetics.png");
}
.home-portal--chemistry a::before {
background-image: url("https://landrace.wiki/images/d/da/Icon-chemistry.png");
}
.home-portal--geography a::before {
background-image: url("https://landrace.wiki/images/8/8d/Icon-geography.png");
}
.home-portal--history a::before {
background-image: url("https://landrace.wiki/images/e/e5/Icon-history.png");
}
.home-portal--culture a::before {
background-image: url("https://landrace.wiki/images/0/0a/Icon-culture.png");
}
.home-portal--cultivation a::before {
background-image: url("https://landrace.wiki/images/2/21/Icon-cultivation.png");
}
.home-portal--conservation a::before {
background-image: url("https://landrace.wiki/images/d/d6/Icon-conservation.png");
}
.home-portals__header {
margin-bottom: 0;
padding-bottom: 4px;
}
.home-portals__footer {
text-align: center;
}
/* ============================================ */
/* FEATURED ACCESSION */
/* ============================================ */
.home-featured__image-wrap {
aspect-ratio: 16 / 10;
background-color: #d4ddc6;
border-radius: 6px;
overflow: hidden;
margin: 0 0 16px 0;
position: relative;
}
.home-featured__image-wrap p {
margin: 0;
height: 100%;
}
.home-featured__image-wrap a {
display: block;
width: 100%;
height: 100%;
}
.home-featured__image-wrap img {
width: 100% !important;
height: 100% !important;
object-fit: cover;
display: block;
transition: transform 0.4s ease;
}
.home-featured__image-wrap:hover img {
transform: scale(1.02);
}
.home-featured__title {
margin: 0 0 4px 0;
font-size: 1.15rem;
line-height: 1.3;
}
.home-featured__breadcrumb {
font-size: 0.75rem;
color: #6c757d;
margin-bottom: 12px;
line-height: 1.5;
}
.home-featured__breadcrumb a {
color: #495057;
text-decoration: none;
}
.home-featured__breadcrumb a:hover {
color: #2d5016;
text-decoration: underline;
}
.home-featured__breadcrumb-sep {
margin: 0 6px;
color: #adb5bd;
}
.home-featured__desc {
font-size: 0.8125rem;
color: #495057;
line-height: 1.55;
margin-bottom: 12px;
flex-grow: 1;
}
/* ============================================ */
/* FEATURED ARTICLE (floated image + read more) */
/* ============================================ */
.home-featured {
flex-grow: 1;
}
.home-featured::after {
content: '';
display: block;
clear: both;
}
.home-featured__body {
color: #495057;
line-height: 1.6;
font-size: 0.875rem;
margin-bottom: 12px;
}
.home-featured__body p {
margin: 0 0 0.75em 0;
}
.home-featured__body p:last-child {
margin-bottom: 0;
}
.home-featured__more a {
color: #2d5016;
font-weight: 500;
text-decoration: none;
white-space: nowrap;
}
.home-featured__more a:hover {
text-decoration: underline;
}
.home-featured__float {
float: right;
width: 180px;
margin: 0 0 12px 18px;
background-color: #d4ddc6;
border-radius: 6px;
overflow: hidden;
}
.home-featured__float p {
margin: 0;
}
.home-featured__float a {
display: block;
}
.home-featured__float img {
width: 100% !important;
height: auto !important;
display: block;
transition: transform 0.4s ease;
}
.home-featured__float:hover img {
transform: scale(1.02);
}
/* ============================================ */
/* MOBILE RESPONSIVENESS */
/* ============================================ */
@media (max-width: 1024px) {
.home-grid {
grid-template-columns: repeat(4, 1fr);
}
.home-card--col1 {
grid-column: span 4;
}
.home-card--col2 {
grid-column: span 2;
}
.home-card--col3 {
grid-column: span 4;
}
.home-card--col4 {
grid-column: span 4;
}
.home-card--col5 {
grid-column: span 4;
}
.home-card--col6 {
grid-column: span 4;
}
}
@media (max-width: 768px) {
.home-grid {
grid-template-columns: repeat(2, 1fr);
gap: 0.625rem;
}
.home-card--col1,
.home-card--col2,
.home-card--col3,
.home-card--col4,
.home-card--col5,
.home-card--col6 {
grid-column: span 2;
}
.home-card {
padding: 10px;
}
.home-hero-split {
grid-template-columns: 1fr;
row-gap: 1rem;
}
.home-featured__image-wrap {
aspect-ratio: 16 / 9;
}
.home-featured__float {
float: none;
width: 100%;
margin: 0 0 12px 0;
}
}
@media (max-width: 480px) {
.home-grid {
grid-template-columns: 1fr;
gap: 0.5rem;
}
.home-card--col1,
.home-card--col2,
.home-card--col3,
.home-card--col4,
.home-card--col5,
.home-card--col6 {
grid-column: span 1;
}
.home-card {
padding: 10px;
}
}