Skip to content

Commit 7129f8a

Browse files
author
Anass Rach
committed
Cleanup and restructure embedded CSS!
1 parent 3f9f7fd commit 7129f8a

2 files changed

Lines changed: 193 additions & 384 deletions

File tree

_layouts/flashcard.html

Lines changed: 51 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -73,65 +73,15 @@ <h1>{{ page.title }}</h1>
7373
</div>
7474

7575
<style>
76-
/* Flashcard Container */
76+
/* Main Container */
7777
.flashcard-container {
7878
max-width: 800px;
7979
margin: 0 auto;
8080
padding: 20px;
8181
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
8282
}
8383

84-
/* Breadcrumb Styles */
85-
.flashcard-breadcrumb {
86-
background: linear-gradient(135deg, #f8f9fa, #e9ecef);
87-
padding: 16px 20px;
88-
border-radius: 10px;
89-
margin-bottom: 30px;
90-
font-size: 0.95em;
91-
border: 1px solid #e1e8ed;
92-
box-shadow: 0 3px 8px rgba(0,0,0,0.08);
93-
display: flex;
94-
align-items: center;
95-
flex-wrap: wrap;
96-
gap: 8px;
97-
}
98-
99-
.breadcrumb-home,
100-
.breadcrumb-category {
101-
color: #667eea;
102-
text-decoration: none;
103-
font-weight: 600;
104-
padding: 6px 12px;
105-
border-radius: 6px;
106-
transition: all 0.3s ease;
107-
}
108-
109-
.breadcrumb-home:hover,
110-
.breadcrumb-category:hover {
111-
background: rgba(102, 126, 234, 0.1);
112-
color: #764ba2;
113-
text-decoration: none;
114-
transform: translateY(-1px);
115-
}
116-
117-
.breadcrumb-category {
118-
background: rgba(102, 126, 234, 0.08);
119-
border: 1px solid rgba(102, 126, 234, 0.2);
120-
}
121-
122-
.breadcrumb-separator {
123-
color: #667eea;
124-
font-weight: bold;
125-
margin: 0 4px;
126-
}
127-
128-
.breadcrumb-current {
129-
color: #2c3e50;
130-
font-weight: 700;
131-
padding: 6px 0;
132-
}
133-
134-
/* Flashcard Header */
84+
/* Header Section */
13585
.flashcard-header {
13686
text-align: center;
13787
margin-bottom: 30px;
@@ -171,15 +121,15 @@ <h1>{{ page.title }}</h1>
171121
.difficulty-medium { background: #FF9800; }
172122
.difficulty-hard { background: #F44336; }
173123

174-
/* Flashcard Content */
124+
/* Content */
175125
.flashcard-content {
176126
margin: 30px 0;
177127
font-size: 1.1em;
178128
line-height: 1.7;
179129
color: #333;
180130
}
181131

182-
/* Navigation Section */
132+
/* Navigation */
183133
.flashcard-navigation {
184134
margin-top: 40px;
185135
padding-top: 20px;
@@ -246,7 +196,7 @@ <h1>{{ page.title }}</h1>
246196
box-shadow: none;
247197
}
248198

249-
/* Flashcard Meta */
199+
/* Meta Information */
250200
.flashcard-meta {
251201
text-align: center;
252202
font-size: 0.9em;
@@ -278,64 +228,7 @@ <h1>{{ page.title }}</h1>
278228
text-decoration: underline;
279229
}
280230

281-
/* Responsive Design */
282-
@media (max-width: 768px) {
283-
.flashcard-container {
284-
padding: 15px;
285-
}
286-
287-
.flashcard-breadcrumb {
288-
padding: 12px 15px;
289-
font-size: 0.85em;
290-
flex-direction: column;
291-
align-items: flex-start;
292-
gap: 5px;
293-
}
294-
295-
.breadcrumb-separator {
296-
display: none;
297-
}
298-
299-
.flashcard-header h1 {
300-
font-size: 1.5em;
301-
}
302-
303-
.nav-buttons {
304-
flex-direction: column;
305-
gap: 10px;
306-
}
307-
308-
.btn-nav {
309-
width: 100%;
310-
min-width: unset;
311-
}
312-
313-
.flashcard-meta {
314-
font-size: 0.8em;
315-
}
316-
}
317-
318-
@media (max-width: 480px) {
319-
.flashcard-breadcrumb {
320-
padding: 10px 12px;
321-
font-size: 0.8em;
322-
}
323-
324-
.flashcard-header h1 {
325-
font-size: 1.3em;
326-
}
327-
328-
.flashcard-content {
329-
font-size: 1em;
330-
}
331-
332-
.btn-nav {
333-
padding: 10px 16px;
334-
font-size: 0.9em;
335-
}
336-
}
337-
338-
/* Enhanced Navigation Styles */
231+
/* Top Navigation */
339232
.flashcard-top-navigation {
340233
position: sticky;
341234
top: 0;
@@ -346,7 +239,6 @@ <h1>{{ page.title }}</h1>
346239
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
347240
}
348241

349-
/* Improved Breadcrumb */
350242
.flashcard-breadcrumb {
351243
background: linear-gradient(135deg, #f8f9fa, #e9ecef);
352244
padding: 12px 20px;
@@ -358,7 +250,7 @@ <h1>{{ page.title }}</h1>
358250
border-bottom: 1px solid #e1e8ed;
359251
}
360252

361-
.breadcrumb-home {
253+
.breadcrumb-home, .breadcrumb-category {
362254
color: #667eea;
363255
text-decoration: none;
364256
font-weight: 600;
@@ -370,33 +262,14 @@ <h1>{{ page.title }}</h1>
370262
gap: 4px;
371263
}
372264

373-
.breadcrumb-icon {
374-
font-size: 1.1em;
375-
}
376-
377-
.breadcrumb-text {
378-
display: inline-block;
379-
}
380-
381-
.breadcrumb-home:hover {
265+
.breadcrumb-home:hover, .breadcrumb-category:hover {
382266
background: rgba(102, 126, 234, 0.1);
383267
transform: translateY(-1px);
384268
}
385269

386270
.breadcrumb-category {
387-
color: #667eea;
388-
text-decoration: none;
389-
font-weight: 600;
390-
padding: 5px 10px;
391-
border-radius: 6px;
392271
background: rgba(102, 126, 234, 0.08);
393272
border: 1px solid rgba(102, 126, 234, 0.2);
394-
transition: all 0.2s ease;
395-
}
396-
397-
.breadcrumb-category:hover {
398-
background: rgba(102, 126, 234, 0.15);
399-
transform: translateY(-1px);
400273
}
401274

402275
.breadcrumb-separator {
@@ -411,6 +284,10 @@ <h1>{{ page.title }}</h1>
411284
padding: 5px 0;
412285
}
413286

287+
.breadcrumb-icon {
288+
font-size: 1.1em;
289+
}
290+
414291
/* Quick Navigation Bar */
415292
.quick-nav-bar {
416293
display: flex;
@@ -421,19 +298,13 @@ <h1>{{ page.title }}</h1>
421298
min-height: 50px;
422299
}
423300

424-
.quick-nav-left,
425-
.quick-nav-right {
301+
.quick-nav-left, .quick-nav-right {
426302
flex: 1;
427303
display: flex;
428304
}
429305

430-
.quick-nav-left {
431-
justify-content: flex-start;
432-
}
433-
434-
.quick-nav-right {
435-
justify-content: flex-end;
436-
}
306+
.quick-nav-left { justify-content: flex-start; }
307+
.quick-nav-right { justify-content: flex-end; }
437308

438309
.quick-nav-center {
439310
flex: 0 0 auto;
@@ -480,10 +351,6 @@ <h1>{{ page.title }}</h1>
480351
font-weight: bold;
481352
}
482353

483-
.nav-label {
484-
display: inline-block;
485-
}
486-
487354
.card-counter {
488355
color: #666;
489356
font-size: 0.9em;
@@ -495,8 +362,12 @@ <h1>{{ page.title }}</h1>
495362
font-weight: 700;
496363
}
497364

498-
/* Responsive adjustments */
365+
/* Responsive Design */
499366
@media (max-width: 768px) {
367+
.flashcard-container {
368+
padding: 15px;
369+
}
370+
500371
.flashcard-top-navigation {
501372
margin: -15px -15px 20px -15px;
502373
}
@@ -524,6 +395,24 @@ <h1>{{ page.title }}</h1>
524395
.card-counter {
525396
font-size: 0.85em;
526397
}
398+
399+
.flashcard-header h1 {
400+
font-size: 1.5em;
401+
}
402+
403+
.nav-buttons {
404+
flex-direction: column;
405+
gap: 10px;
406+
}
407+
408+
.btn-nav {
409+
width: 100%;
410+
min-width: unset;
411+
}
412+
413+
.flashcard-meta {
414+
font-size: 0.8em;
415+
}
527416
}
528417

529418
@media (max-width: 480px) {
@@ -541,5 +430,18 @@ <h1>{{ page.title }}</h1>
541430
.card-counter strong {
542431
font-size: 1.1em;
543432
}
433+
434+
.flashcard-header h1 {
435+
font-size: 1.3em;
436+
}
437+
438+
.flashcard-content {
439+
font-size: 1em;
440+
}
441+
442+
.btn-nav {
443+
padding: 10px 16px;
444+
font-size: 0.9em;
445+
}
544446
}
545447
</style>

0 commit comments

Comments
 (0)