Skip to content

Commit 2ee2d18

Browse files
committed
fix(ui): restore objective badges and fix grid layout for benefit cards
- Restore .objective-badge and .objective-badge-standalone styles - Fix whole-card linking for objective index cards - Implement robust CSS grid for benefit cards to ensure balanced layout - Reduce vertical spacing between benefit cards and landing sections - Synchronize heading sizes for landing page sections - Restore header badge injection for objective pages
1 parent 73e2aa6 commit 2ee2d18

File tree

1 file changed

+107
-61
lines changed

1 file changed

+107
-61
lines changed

docs/stylesheets/extra.css

Lines changed: 107 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@
7979
text-align: center !important;
8080
}
8181

82-
/* Hide the anchor link pilcrow in the hero to ensure perfect centering */
83-
.hero-container h1 .headerlink {
84-
display: none !important;
85-
}
82+
.hero-container h1 .headerlink { display: none !important; }
8683

8784
.md-typeset .hero-container p {
8885
font-size: 1.25rem !important;
@@ -133,18 +130,8 @@
133130
gap: 1.5rem;
134131
margin: 2rem 0;
135132
}
136-
137-
@media screen and (min-width: 600px) {
138-
.benefit-grid {
139-
grid-template-columns: repeat(2, 1fr);
140-
}
141-
}
142-
143-
@media screen and (min-width: 1200px) {
144-
.benefit-grid {
145-
grid-template-columns: repeat(4, 1fr);
146-
}
147-
}
133+
@media screen and (min-width: 600px) { .benefit-grid { grid-template-columns: repeat(2, 1fr); } }
134+
@media screen and (min-width: 1200px) { .benefit-grid { grid-template-columns: repeat(4, 1fr); } }
148135

149136
.benefit-card-custom {
150137
position: relative;
@@ -159,41 +146,17 @@
159146
transition: transform 0.3s ease, box-shadow 0.3s ease;
160147
text-decoration: none !important;
161148
}
162-
163-
.benefit-card-custom:hover {
164-
transform: translateY(-5px);
165-
box-shadow: 0 10px 25px rgba(0,0,0,0.3);
166-
}
167-
149+
.benefit-card-custom:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
168150
.benefit-card-custom::before {
169151
content: "";
170152
position: absolute;
171153
inset: 0;
172154
background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.1) 100%);
173155
z-index: 1;
174156
}
175-
176-
.benefit-card-custom-content {
177-
position: relative;
178-
z-index: 2;
179-
padding: 1.5rem;
180-
color: white;
181-
}
182-
183-
.benefit-card-custom-content strong {
184-
display: block;
185-
font-size: 1.4rem;
186-
font-weight: 700;
187-
margin-bottom: 0.5rem;
188-
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
189-
}
190-
191-
.benefit-card-custom-content p {
192-
margin: 0;
193-
font-size: 0.95rem;
194-
line-height: 1.4;
195-
opacity: 0.95;
196-
}
157+
.benefit-card-custom-content { position: relative; z-index: 2; padding: 1.5rem; color: white; }
158+
.benefit-card-custom-content strong { display: block; font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
159+
.benefit-card-custom-content p { margin: 0; font-size: 0.95rem; line-height: 1.4; opacity: 0.95; }
197160

198161
/* Admonitions */
199162
.md-typeset .admonition { border-radius: 0.5rem !important; margin: 1.5rem 0 !important; }
@@ -202,29 +165,112 @@
202165
hr { margin: 4rem 0 !important; opacity: 0.1 !important; }
203166

204167
/* Landing page explanatory section */
205-
.landing-explanatory-section {
206-
font-size: 1.1rem;
207-
line-height: 1.6;
208-
}
168+
.landing-explanatory-section { font-size: 1.1rem; line-height: 1.6; }
169+
.landing-explanatory-section h2 { font-size: 2rem !important; margin-top: 1.5rem !important; }
170+
.landing-explanatory-section h3 { font-size: 1.4rem !important; margin-top: 1.25rem !important; }
171+
.landing-explanatory-section p, .landing-explanatory-section li { margin-bottom: 1rem; }
209172

210-
.landing-explanatory-section h2 {
211-
font-size: 2rem !important;
212-
margin-top: 1.5rem !important;
173+
/* Typography */
174+
.md-typeset h2 { font-weight: 700 !important; margin-top: 2rem !important; font-size: 2rem !important; }
175+
176+
/* Objective badge styling - circular badges with letters */
177+
.md-typeset .objective-badge {
178+
display: inline-flex;
179+
align-items: center;
180+
justify-content: center;
181+
width: 3rem !important;
182+
height: 3rem !important;
183+
border-radius: 50%;
184+
background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-primary-fg-color--dark) 100%);
185+
color: white;
186+
font-weight: 700;
187+
font-size: 1.5rem;
188+
line-height: 1;
189+
margin-bottom: 1rem;
190+
opacity: 0.9;
191+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
192+
box-shadow: 0 2px 8px rgba(74, 35, 217, 0.2);
193+
position: relative;
194+
}
195+
.md-typeset .objective-badge::before { content: attr(data-letter); }
196+
[data-md-color-scheme="slate"] .md-typeset .objective-badge {
197+
background: linear-gradient(135deg, var(--md-primary-fg-color--light) 0%, var(--md-primary-fg-color) 100%);
198+
box-shadow: 0 2px 8px rgba(74, 35, 217, 0.3);
213199
}
214200

215-
.landing-explanatory-section h3 {
216-
font-size: 1.4rem !important;
217-
margin-top: 1.25rem !important;
201+
/* Standalone objective badge */
202+
.md-typeset .objective-badge-standalone {
203+
display: inline-flex;
204+
align-items: center;
205+
justify-content: center;
206+
width: 3rem !important;
207+
height: 3rem !important;
208+
border-radius: 50%;
209+
background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-primary-fg-color--dark) 100%);
210+
color: white;
211+
font-weight: 700;
212+
font-size: 1.5rem;
213+
line-height: 1;
214+
margin-right: 0.5rem;
215+
margin-bottom: 0;
216+
opacity: 0.9;
217+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
218+
box-shadow: 0 2px 8px rgba(74, 35, 217, 0.2);
219+
position: relative;
220+
vertical-align: middle;
221+
flex-shrink: 0;
222+
}
223+
.md-typeset .objective-badge-standalone::before { content: attr(data-letter); }
224+
[data-md-color-scheme="slate"] .md-typeset .objective-badge-standalone {
225+
background: linear-gradient(135deg, var(--md-primary-fg-color--light) 0%, var(--md-primary-fg-color) 100%);
226+
box-shadow: 0 2px 8px rgba(74, 35, 217, 0.3);
218227
}
219228

220-
.landing-explanatory-section p,
221-
.landing-explanatory-section li {
229+
/* Objective page header with badge */
230+
.md-typeset .objective-header-with-badge {
231+
display: flex;
232+
align-items: center;
233+
gap: 0.5rem;
222234
margin-bottom: 1rem;
223235
}
236+
.md-typeset .objective-header-with-badge h1 { margin: 0; flex: 1; }
224237

225-
/* Typography */
226-
.md-typeset h2 {
227-
font-weight: 700 !important;
228-
margin-top: 2rem !important;
229-
font-size: 2rem !important;
238+
/* Grid card structural fixes for objective index */
239+
.md-typeset .grid.cards > ul > li {
240+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
241+
border-radius: 0.5rem !important;
242+
overflow: hidden;
243+
position: relative;
244+
cursor: pointer;
245+
padding: 1.5rem !important;
246+
display: flex !important;
247+
flex-direction: column !important;
248+
}
249+
.md-typeset .grid.cards > ul > li:hover {
250+
transform: translateY(-4px) scale(1.01) !important;
251+
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
252+
}
253+
.md-typeset .grid.cards strong {
254+
font-size: 1.25em !important;
255+
font-weight: 700 !important;
256+
display: block;
257+
margin-bottom: 0.75rem;
258+
color: var(--md-primary-fg-color) !important;
259+
}
260+
[data-md-color-scheme="slate"] .md-typeset .grid.cards strong { color: var(--md-primary-fg-color--light) !important; }
261+
262+
/* Whole card link for objective cards */
263+
.md-typeset .grid.cards > ul > li > p:last-child {
264+
margin: 0 !important; padding: 0 !important;
265+
position: absolute; top: 0; left: 0; right: 0; bottom: 0;
266+
width: 100%; height: 100%; z-index: 1;
267+
font-size: 0; line-height: 0; overflow: visible;
268+
}
269+
.md-typeset .grid.cards > ul > li > p:last-child > a {
270+
position: absolute; top: 0; left: 0; right: 0; bottom: 0;
271+
width: 100%; height: 100%; display: block;
272+
text-indent: -9999px; overflow: hidden;
273+
color: transparent; font-size: 0; z-index: 1;
230274
}
275+
.md-typeset .grid.cards > ul > li > *:not(p:last-child) { position: relative; z-index: 2; pointer-events: none; }
276+
.md-typeset .grid.cards > ul > li > *:not(p:last-child) a { pointer-events: auto; }

0 commit comments

Comments
 (0)