File size: 5,088 Bytes
9b7d64e 76fc93a 55f5851 76fc93a 55f5851 76fc93a 55f5851 76fc93a 55f5851 76fc93a 55f5851 76fc93a 55f5851 76fc93a 9b7d64e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | /* ============================================================================ */
/* Hero + Meta bar */
/* Extracted from HeroArticle.astro scoped styles. */
/* Shared between editor (FrontmatterHero.tsx) and publisher (html-renderer). */
/* ============================================================================ */
/* ---- Hero section ---- */
.hero {
width: 100%;
padding: 64px 16px 16px;
text-align: center;
}
.hero-title {
font-size: clamp(34px, 5vw, 54px);
font-weight: 800;
line-height: 1.12;
letter-spacing: -0.02em;
margin: 0 auto 8px;
max-width: 780px;
text-wrap: balance;
}
.hero-title[data-title-size="md"] {
font-size: clamp(28px, 4vw, 44px);
}
.hero-title[data-title-size="sm"] {
font-size: clamp(24px, 3.2vw, 38px);
}
.hero-banner {
max-width: 980px;
margin: 0 auto;
aspect-ratio: 5 / 2;
overflow: hidden;
}
.hero-banner iframe {
background: transparent;
}
/* Filled banner: hosts the iframe AND the action button cluster. */
.hero-banner--filled {
position: relative;
}
/* Edit + Remove buttons are always visible (not hover-gated): the
request from the author flow is to make banner mutation a first-
class affordance, not a discover-on-hover surprise. Grouped in a
single cluster top-right so screen-readers can navigate them as a
pair and the shared backdrop reads well over any iframe content
(image, chart, gradient). */
.hero-banner-actions {
position: absolute;
top: 8px;
right: 8px;
display: inline-flex;
align-items: center;
gap: 4px;
z-index: 2;
}
.hero-banner-action {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
border: 1px solid var(--border-color);
border-radius: 6px;
background: var(--surface-bg, rgba(0, 0, 0, 0.6));
color: var(--text-color);
cursor: pointer;
transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.hero-banner-action:hover,
.hero-banner-action:focus-visible {
border-color: var(--text-color);
background: var(--surface-bg, rgba(0, 0, 0, 0.8));
outline: none;
}
.hero-banner-action--danger:hover,
.hero-banner-action--danger:focus-visible {
border-color: var(--ed-error, #d32f2f);
color: var(--ed-error, #d32f2f);
}
/* Empty-banner placeholder: shown when the article has no banner set.
Keeps the same aspect-ratio as a real banner so the layout doesn't jump
when a user uploads an image or generates a chart. */
.hero-banner--empty {
display: flex;
align-items: center;
justify-content: center;
border: 1px dashed var(--border-color);
border-radius: 8px;
background: var(--surface-bg, transparent);
transition: border-color 120ms ease, background 120ms ease;
}
.hero-banner--empty:hover {
border-color: var(--text-color);
}
.hero-banner-empty__inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 14px;
padding: 24px;
text-align: center;
}
.hero-banner-empty__hint {
margin: 0;
color: var(--muted-color);
font-size: 14px;
}
.hero-banner-empty__actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
justify-content: center;
}
.hero-banner-empty__actions .btn {
display: inline-flex;
align-items: center;
gap: 6px;
}
.hero-desc {
color: var(--muted-color);
font-style: italic;
margin: 0 auto 16px;
max-width: 55%;
}
@media (max-width: 768px) {
.hero-banner { aspect-ratio: auto; }
.hero-desc { max-width: 90%; }
}
/* ---- Meta bar ---- */
.meta {
border-top: 1px solid var(--border-color);
border-bottom: 1px solid var(--border-color);
padding: 1rem 0;
font-size: 0.9rem;
}
.meta-container {
max-width: 980px;
display: flex;
flex-direction: row;
justify-content: space-between;
margin: 0 auto;
padding: 0 var(--content-padding-x, 16px);
gap: 8px;
flex-wrap: wrap;
row-gap: 12px;
}
.meta-container a:not(.button) {
color: var(--primary-color);
text-decoration: underline;
text-underline-offset: 2px;
text-decoration-thickness: 0.06em;
text-decoration-color: var(--link-underline);
transition: text-decoration-color 0.15s ease-in-out;
}
.meta-container a:hover {
text-decoration-color: var(--link-underline-hover);
}
.meta-container-cell {
display: flex;
flex-direction: column;
gap: 8px;
max-width: 400px;
}
.meta-container-cell h3 {
margin: 0;
font-size: 12px;
font-weight: 400;
color: var(--muted-color);
text-transform: uppercase;
letter-spacing: 0.02em;
}
.meta-container-cell p {
margin: 0;
}
.authors {
margin: 0;
list-style-type: none;
padding-left: 0;
display: flex;
flex-wrap: wrap;
}
.authors li {
white-space: nowrap;
padding: 0;
}
.affiliations {
margin: 0;
padding-left: 1.25em;
}
.affiliations li {
margin: 0;
}
@media (max-width: 768px) {
.meta-container-cell:nth-child(even) { text-align: right; }
.meta-container-cell:last-child:nth-child(odd) {
flex-grow: 0;
flex-basis: auto;
margin-left: auto;
text-align: right;
}
}
|