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 (strict) */ | /* FeaturedRegionCard — TemplateStyles-safe (strict) — FIXED VERSION */ | ||
/* Grid on main page */ | /* Grid on main page */ | ||
.fr-grid { | .fr-grid { | ||
display: grid; | display: grid; | ||
grid-template-columns: repeat(auto-fit, minmax( | grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); | ||
grid-gap: | grid-gap: 1.5rem; | ||
align-items: stretch; | align-items: stretch; | ||
margin: 0 auto; | |||
max-width: 1200px; | |||
} | } | ||
Line 13: | Line 15: | ||
background: #fff; | background: #fff; | ||
border: 1px solid #e5e7eb; | border: 1px solid #e5e7eb; | ||
border-radius: | border-radius: 16px; | ||
overflow: hidden; | overflow: hidden; | ||
box-shadow: 0 | box-shadow: 0 2px 8px rgba(0,0,0,.06); | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
height: 100%; | height: 100%; | ||
transition: all 0.2s ease; | |||
position: relative; | |||
} | |||
.fr-card:hover { | |||
box-shadow: 0 8px 25px rgba(0,0,0,.12); | |||
} | } | ||
/* Media */ | /* Media */ | ||
.fr-media { | .fr-media { | ||
position: relative; | position: relative; | ||
height: | height: 200px; | ||
overflow: hidden; | overflow: hidden; | ||
background: # | background: #f8fafc; | ||
border-top-left-radius: | border-top-left-radius: 16px; | ||
border-top-right-radius: | border-top-right-radius: 16px; | ||
} | |||
.fr-img { | |||
width: 100%; | |||
height: 100%; | |||
display: block; | |||
position: relative; | |||
} | } | ||
.fr-img img { | .fr-img img { | ||
display: block; | display: block; | ||
width: 100%; | width: 100%; | ||
height: 100%; | height: 100%; | ||
object-fit: cover; | object-fit: cover; | ||
object-position: center; | |||
} | } | ||
/* | /* Enhanced gradient overlay for better badge readability */ | ||
.fr-media::after { | .fr-media::after { | ||
content: ""; | content: ""; | ||
position: absolute; top: 0; right: 0; bottom: 0; left: 0; | position: absolute; | ||
background: linear-gradient(to top, rgba(0,0,0,. | top: 0; right: 0; bottom: 0; left: 0; | ||
border-top-left-radius: | background: linear-gradient( | ||
border-top-right-radius: | to top, | ||
z-index: | rgba(0,0,0,.4) 0%, | ||
rgba(0,0,0,.2) 25%, | |||
rgba(0,0,0,0) 50% | |||
); | |||
border-top-left-radius: 16px; | |||
border-top-right-radius: 16px; | |||
z-index: 1; | |||
} | } | ||
Line 55: | Line 73: | ||
align-items: center; | align-items: center; | ||
height: 100%; | height: 100%; | ||
color: # | color: #9ca3af; | ||
font-size: | font-size: 1rem; | ||
background: linear-gradient(135deg, # | font-weight: 500; | ||
background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); | |||
} | } | ||
/* Make whole image clickable | /* Make whole image clickable */ | ||
.fr-media-link, | .fr-media-link, | ||
.fr-media-link a { | .fr-media-link a { | ||
position: absolute; top: 0; right: 0; bottom: 0; left: 0; | position: absolute; | ||
top: 0; right: 0; bottom: 0; left: 0; | |||
display: block; | display: block; | ||
z-index: | z-index: 2; | ||
} | |||
.fr-media-link a { | |||
text-decoration: none; | |||
} | |||
.fr-media-link a:focus { | |||
outline: 3px solid #059669; | |||
outline-offset: 2px; | |||
border-radius: 12px; | |||
} | } | ||
/* Badge (status + accessions) */ | /* Badge (status + accessions) - MAJOR IMPROVEMENTS */ | ||
.fr-badge { | .fr-badge { | ||
position: absolute; left: 16px | position: absolute; | ||
left: 16px; | |||
padding: | bottom: 16px; | ||
border-radius: | padding: 8px 14px; | ||
background: rgba(255,255,255,. | border-radius: 24px; | ||
border: 1px solid | background: rgba(255,255,255,.95); | ||
font-size: . | border: 1px solid rgba(255,255,255,.3); | ||
box-shadow: 0 | font-size: .875rem; | ||
z-index: | font-weight: 600; | ||
color: #374151; | |||
box-shadow: 0 4px 12px rgba(0,0,0,.15); | |||
z-index: 3; | |||
white-space: nowrap; | white-space: nowrap; | ||
line-height: 1; | |||
} | |||
.fr-dot { | |||
width: 8px; | |||
height: 8px; | |||
border-radius: 50%; | |||
display: inline-block; | |||
margin-right: 8px; | |||
flex-shrink: 0; | |||
} | |||
.fr-badgelabel { | |||
margin-right: 2px; | |||
} | |||
.fr-badge .fr-sep { | |||
color: #9ca3af; | |||
margin: 0 8px; | |||
font-weight: 400; | |||
} | |||
.fr-badge .fr-acc { | |||
color: #6b7280; | |||
font-weight: 500; | |||
font-size: .8rem; | |||
} | } | ||
/* | /* Enhanced dot colors by status */ | ||
.fr--status-stable .fr-dot { background: # | .fr--status-stable .fr-dot { background: #22c55e; } | ||
.fr--status-vulnerable .fr-dot { background: # | .fr--status-vulnerable .fr-dot { background: #eab308; } | ||
.fr--status-endangered .fr-dot { background: #f97316; } | .fr--status-endangered .fr-dot { background: #f97316; } | ||
.fr--status-critical .fr-dot { background: #ef4444; } | .fr--status-critical .fr-dot { background: #ef4444; } | ||
Line 96: | Line 147: | ||
.fr--status-unknown .fr-dot { background: #9ca3af; } | .fr--status-unknown .fr-dot { background: #9ca3af; } | ||
/* Body */ | /* Body - IMPROVED SPACING */ | ||
.fr-body { | .fr-body { | ||
padding: | padding: 20px 20px 24px; | ||
flex: 1; | flex: 1; | ||
display: flex; | display: flex; | ||
Line 104: | Line 155: | ||
} | } | ||
/* Title | /* Title - BETTER LINE HEIGHT AND SPACING */ | ||
.fr-title { | .fr-title { | ||
margin: | margin: 0 0 12px; | ||
font-size: 1. | font-size: 1.25rem; | ||
line-height: 1. | line-height: 1.3; | ||
color: #1f2937; | color: #1f2937; | ||
font-weight: | font-weight: 700; | ||
overflow: hidden; | |||
} | |||
.fr-title a { | |||
color: #1f2937; | |||
text-decoration: none; | |||
transition: color 0.15s ease; | |||
} | |||
.fr-title a:hover { | |||
color: #059669; | |||
text-decoration: underline; | |||
} | } | ||
/* Subtitle | /* Subtitle - IMPROVED TRUNCATION */ | ||
.fr-sub { | .fr-sub { | ||
margin: 0 0 | margin: 0 0 16px; | ||
font-size: . | font-size: .9rem; | ||
color: #6b7280; | color: #6b7280; | ||
line-height: 1. | line-height: 1.4; | ||
font-weight: 500; | |||
white-space: nowrap; | white-space: nowrap; | ||
overflow: hidden; | overflow: hidden; | ||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||
} | } | ||
/* Hook | /* Hook - BETTER TEXT CLAMPING */ | ||
.fr-hook { | .fr-hook { | ||
margin: 0 0 | margin: 0 0 20px; | ||
font-size: | font-size: 1rem; | ||
color: # | color: #4b5563; | ||
line-height: 1. | line-height: 1.5; | ||
max-height: 4. | max-height: 4.5em; | ||
overflow: hidden; | overflow: hidden; | ||
flex: 1; | flex: 1; | ||
} | } | ||
/* CTA */ | /* CTA - IMPROVED STYLING */ | ||
.fr-cta { margin: 0; margin-top: auto; } | .fr-cta { | ||
margin: 0; | |||
margin-top: auto; | |||
padding-top: 4px; | |||
} | |||
.fr-cta a { | .fr-cta a { | ||
color: #059669; | color: #059669; | ||
font-weight: 600; | font-weight: 600; | ||
text-decoration: none; | text-decoration: none; | ||
font-size: . | font-size: .95rem; | ||
padding: | padding: 8px 0; | ||
transition: all 0.15s ease; | |||
} | |||
.fr-cta a:hover { | |||
color: #047857; | |||
text-decoration: underline; | |||
} | |||
.fr-missing { | |||
color: #9ca3af; | |||
font-style: italic; | |||
font-size: .9rem; | |||
font-weight: 500; | |||
} | |||
/* Responsive - ENHANCED BREAKPOINTS */ | |||
@media (min-width: 1024px) { | |||
.fr-media { height: 220px; } | |||
.fr-grid { grid-template-columns: repeat(3, 1fr); } | |||
} | |||
@media (min-width: 768px) and (max-width: 1023px) { | |||
.fr-grid { | |||
grid-template-columns: repeat(2, 1fr); | |||
grid-gap: 1.25rem; | |||
} | |||
.fr-media { height: 190px; } | |||
} | } | ||
@media (max-width: 767px) { | |||
@media ( | .fr-grid { | ||
grid-template-columns: 1fr; | |||
grid-gap: 1.25rem; | |||
.fr-media { height: | margin: 0 1rem; | ||
.fr-body { padding: | } | ||
.fr-title { font-size: 1. | .fr-media { height: 180px; } | ||
.fr-sub { font-size: .8rem; } | .fr-body { padding: 16px 18px 20px; } | ||
.fr- | .fr-title { font-size: 1.125rem; } | ||
.fr-sub { font-size: .85rem; } | |||
.fr-hook { font-size: .95rem; } | |||
.fr-badge { | |||
left: 12px; | |||
bottom: 12px; | |||
padding: 6px 12px; | |||
font-size: .8rem; | |||
} | |||
.fr-badge .fr-acc { font-size: .75rem; } | |||
} | } |
Revision as of 07:17, 25 August 2025
/* FeaturedRegionCard — TemplateStyles-safe (strict) — FIXED VERSION */ /* Grid on main page */ .fr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); grid-gap: 1.5rem; align-items: stretch; margin: 0 auto; max-width: 1200px; } /* Card */ .fr-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); display: flex; flex-direction: column; height: 100%; transition: all 0.2s ease; position: relative; } .fr-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,.12); } /* Media */ .fr-media { position: relative; height: 200px; overflow: hidden; background: #f8fafc; border-top-left-radius: 16px; border-top-right-radius: 16px; } .fr-img { width: 100%; height: 100%; display: block; position: relative; } .fr-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; } /* Enhanced gradient overlay for better badge readability */ .fr-media::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient( to top, rgba(0,0,0,.4) 0%, rgba(0,0,0,.2) 25%, rgba(0,0,0,0) 50% ); border-top-left-radius: 16px; border-top-right-radius: 16px; z-index: 1; } /* Placeholder */ .fr-img--placeholder { display: flex; justify-content: center; align-items: center; height: 100%; color: #9ca3af; font-size: 1rem; font-weight: 500; background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); } /* Make whole image clickable */ .fr-media-link, .fr-media-link a { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; z-index: 2; } .fr-media-link a { text-decoration: none; } .fr-media-link a:focus { outline: 3px solid #059669; outline-offset: 2px; border-radius: 12px; } /* Badge (status + accessions) - MAJOR IMPROVEMENTS */ .fr-badge { position: absolute; left: 16px; bottom: 16px; padding: 8px 14px; border-radius: 24px; background: rgba(255,255,255,.95); border: 1px solid rgba(255,255,255,.3); font-size: .875rem; font-weight: 600; color: #374151; box-shadow: 0 4px 12px rgba(0,0,0,.15); z-index: 3; white-space: nowrap; line-height: 1; } .fr-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; flex-shrink: 0; } .fr-badgelabel { margin-right: 2px; } .fr-badge .fr-sep { color: #9ca3af; margin: 0 8px; font-weight: 400; } .fr-badge .fr-acc { color: #6b7280; font-weight: 500; font-size: .8rem; } /* Enhanced dot colors by status */ .fr--status-stable .fr-dot { background: #22c55e; } .fr--status-vulnerable .fr-dot { background: #eab308; } .fr--status-endangered .fr-dot { background: #f97316; } .fr--status-critical .fr-dot { background: #ef4444; } .fr--status-extinct .fr-dot { background: #6b7280; } .fr--status-unknown .fr-dot { background: #9ca3af; } /* Body - IMPROVED SPACING */ .fr-body { padding: 20px 20px 24px; flex: 1; display: flex; flex-direction: column; } /* Title - BETTER LINE HEIGHT AND SPACING */ .fr-title { margin: 0 0 12px; font-size: 1.25rem; line-height: 1.3; color: #1f2937; font-weight: 700; overflow: hidden; } .fr-title a { color: #1f2937; text-decoration: none; transition: color 0.15s ease; } .fr-title a:hover { color: #059669; text-decoration: underline; } /* Subtitle - IMPROVED TRUNCATION */ .fr-sub { margin: 0 0 16px; font-size: .9rem; color: #6b7280; line-height: 1.4; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Hook - BETTER TEXT CLAMPING */ .fr-hook { margin: 0 0 20px; font-size: 1rem; color: #4b5563; line-height: 1.5; max-height: 4.5em; overflow: hidden; flex: 1; } /* CTA - IMPROVED STYLING */ .fr-cta { margin: 0; margin-top: auto; padding-top: 4px; } .fr-cta a { color: #059669; font-weight: 600; text-decoration: none; font-size: .95rem; padding: 8px 0; transition: all 0.15s ease; } .fr-cta a:hover { color: #047857; text-decoration: underline; } .fr-missing { color: #9ca3af; font-style: italic; font-size: .9rem; font-weight: 500; } /* Responsive - ENHANCED BREAKPOINTS */ @media (min-width: 1024px) { .fr-media { height: 220px; } .fr-grid { grid-template-columns: repeat(3, 1fr); } } @media (min-width: 768px) and (max-width: 1023px) { .fr-grid { grid-template-columns: repeat(2, 1fr); grid-gap: 1.25rem; } .fr-media { height: 190px; } } @media (max-width: 767px) { .fr-grid { grid-template-columns: 1fr; grid-gap: 1.25rem; margin: 0 1rem; } .fr-media { height: 180px; } .fr-body { padding: 16px 18px 20px; } .fr-title { font-size: 1.125rem; } .fr-sub { font-size: .85rem; } .fr-hook { font-size: .95rem; } .fr-badge { left: 12px; bottom: 12px; padding: 6px 12px; font-size: .8rem; } .fr-badge .fr-acc { font-size: .75rem; } }