Template:Home/FeaturedRegionCard/styles.css: Difference between revisions
Template page
More actions
Eloise Zomia (talk | contribs) No edit summary |
Eloise Zomia (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
/* FeaturedRegionCard — TemplateStyles-safe | /* FeaturedRegionCard — TemplateStyles-safe, minimal */ | ||
/* Grid on | /* Grid wrapper (use on Main Page section) */ | ||
.fr-grid { | .fr-grid { | ||
display: grid; | display: grid; | ||
grid-template-columns: repeat(auto-fit, minmax( | grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | ||
gap: 16px; | |||
align-items: stretch; | align-items: stretch; | ||
max-width: 1200px; | |||
margin: 0 auto; | margin: 0 auto; | ||
} | } | ||
/* Card */ | /* Card */ | ||
.fr-card { | .fr-card { | ||
background: # | display: flex; | ||
flex-direction: column; | |||
background: #ffffff; | |||
border: 1px solid #e5e7eb; | border: 1px solid #e5e7eb; | ||
border-radius: | border-radius: 12px; | ||
overflow: hidden; | overflow: hidden; | ||
box-shadow: 0 2px | box-shadow: 0 1px 2px rgba(0,0,0,.04); | ||
transition: box-shadow .2s ease; | |||
transition: | |||
} | } | ||
.fr-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); } | |||
/* Media */ | /* Media */ | ||
Line 117: | Line 28: | ||
position: relative; | position: relative; | ||
height: 200px; | height: 200px; | ||
background: #f3f4f6; | |||
overflow: hidden; | overflow: hidden; | ||
} | } | ||
.fr-img | .fr-img, | ||
.fr-img a { display: block; height: 100%; } | |||
.fr-img img, | |||
.fr-img .mw-file-element { | |||
display: block; | |||
width: 100%; | |||
.fr-img | |||
} | |||
.fr- | |||
.fr-img-- | |||
display: | |||
height: 100%; | height: 100%; | ||
object-fit: cover; | |||
object-position: center; | |||
} | } | ||
/* | /* make whole image clickable when Page= exists */ | ||
.fr-media-link, | .fr-media-link, | ||
.fr-media-link a { | .fr-media-link a { | ||
position: absolute; | position: absolute; | ||
top: 0; right: 0; bottom: 0; left: 0; | top: 0; right: 0; bottom: 0; left: 0; | ||
display: block; | display: block; | ||
text-decoration: none; | |||
text-decoration: none | |||
} | } | ||
/* | /* Body */ | ||
.fr- | .fr-body { padding: 16px 18px 18px; display: flex; flex-direction: column; } | ||
.fr-title { margin: 0; font-size: 1.125rem; line-height: 1.25; color: #1f2937; font-weight: 700; } | |||
.fr-title a { color: #1f2937; text-decoration: none; } | |||
.fr-title a:hover { text-decoration: underline; color: #059669; } | |||
} | |||
.fr- | .fr-sub { margin: 2px 0 8px 0; color: #6b7280; font-size: .9rem; line-height: 1.3; } | ||
} | |||
/* Status chip */ | |||
.fr-status { | |||
display: inline-flex; | |||
align-items: center; | |||
padding: 6px 12px; | |||
border-radius: 999px; | |||
background: #f8fafc; | |||
border: 1px solid #e5e7eb; | |||
font-weight: 600; | |||
/* | |||
.fr | |||
display: flex; | |||
padding: | |||
border-radius: | |||
background: # | |||
border: 1px solid # | |||
font-size: .85rem; | font-size: .85rem; | ||
color: #374151; | color: #374151; | ||
margin: | margin: 2px 0 10px 0; | ||
} | } | ||
.fr-status .fr-dot { | |||
width: 8px; height: 8px; border-radius: 50%; | |||
.fr | display: inline-block; margin-right: 8px; | ||
} | } | ||
.fr-status .fr-sep { margin: 0 8px; color: #9ca3af; font-weight: 400; } | |||
.fr-status .fr-acc { color: #6b7280; font-weight: 500; } | |||
.fr-status- | /* Dot colors controlled by card’s status class */ | ||
.fr--status-stable .fr-status .fr-dot { background: #22c55e; } | |||
.fr--status-vulnerable .fr-status .fr-dot { background: #eab308; } | |||
.fr--status-endangered .fr-status .fr-dot { background: #f97316; } | |||
.fr--status-critical .fr-status .fr-dot { background: #ef4444; } | |||
.fr--status-extinct .fr-status .fr-dot { background: #6b7280; } | |||
.fr--status-unknown .fr-status .fr-dot { background: #9ca3af; } | |||
} | |||
/* Hook + CTA */ | |||
/* Hook | |||
.fr-hook { | .fr-hook { | ||
margin: 0 0 | margin: 0 0 10px 0; | ||
color: #4b5563; | color: #4b5563; | ||
line-height: 1. | line-height: 1.45; | ||
max-height: 4.5em; | max-height: 4.5em; /* 3 lines */ | ||
overflow: hidden; | overflow: hidden; | ||
} | } | ||
.fr-cta { margin-top: auto; } | |||
.fr-cta a { color: #059669; font-weight: 600; text-decoration: none; } | |||
.fr-cta a:hover { text-decoration: underline; color: #047857; } | |||
.fr-missing { color: #9ca3af; font-style: italic; } | |||
/* Responsive | /* Responsive tweaks */ | ||
@media (min-width: 1024px) { | @media (min-width: 1024px) { .fr-media { height: 220px; } } | ||
@media (max-width: 480px) { .fr-media { height: 180px; } } | |||
} | |||
@media | |||
} |
Revision as of 08:10, 25 August 2025
/* FeaturedRegionCard — TemplateStyles-safe, minimal */ /* Grid wrapper (use on Main Page section) */ .fr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: stretch; max-width: 1200px; margin: 0 auto; } /* Card */ .fr-card { display: flex; flex-direction: column; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: box-shadow .2s ease; } .fr-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); } /* Media */ .fr-media { position: relative; height: 200px; background: #f3f4f6; overflow: hidden; } .fr-img, .fr-img a { display: block; height: 100%; } .fr-img img, .fr-img .mw-file-element { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; } /* make whole image clickable when Page= exists */ .fr-media-link, .fr-media-link a { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; text-decoration: none; } /* Body */ .fr-body { padding: 16px 18px 18px; display: flex; flex-direction: column; } .fr-title { margin: 0; font-size: 1.125rem; line-height: 1.25; color: #1f2937; font-weight: 700; } .fr-title a { color: #1f2937; text-decoration: none; } .fr-title a:hover { text-decoration: underline; color: #059669; } .fr-sub { margin: 2px 0 8px 0; color: #6b7280; font-size: .9rem; line-height: 1.3; } /* Status chip */ .fr-status { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: #f8fafc; border: 1px solid #e5e7eb; font-weight: 600; font-size: .85rem; color: #374151; margin: 2px 0 10px 0; } .fr-status .fr-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; } .fr-status .fr-sep { margin: 0 8px; color: #9ca3af; font-weight: 400; } .fr-status .fr-acc { color: #6b7280; font-weight: 500; } /* Dot colors controlled by card’s status class */ .fr--status-stable .fr-status .fr-dot { background: #22c55e; } .fr--status-vulnerable .fr-status .fr-dot { background: #eab308; } .fr--status-endangered .fr-status .fr-dot { background: #f97316; } .fr--status-critical .fr-status .fr-dot { background: #ef4444; } .fr--status-extinct .fr-status .fr-dot { background: #6b7280; } .fr--status-unknown .fr-status .fr-dot { background: #9ca3af; } /* Hook + CTA */ .fr-hook { margin: 0 0 10px 0; color: #4b5563; line-height: 1.45; max-height: 4.5em; /* 3 lines */ overflow: hidden; } .fr-cta { margin-top: auto; } .fr-cta a { color: #059669; font-weight: 600; text-decoration: none; } .fr-cta a:hover { text-decoration: underline; color: #047857; } .fr-missing { color: #9ca3af; font-style: italic; } /* Responsive tweaks */ @media (min-width: 1024px) { .fr-media { height: 220px; } } @media (max-width: 480px) { .fr-media { height: 180px; } }