Skip to content

Commit f18c9a8

Browse files
author
Anass Rach
committed
Fix breadcrumb display!
1 parent 93b4171 commit f18c9a8

2 files changed

Lines changed: 115 additions & 53 deletions

File tree

_includes/simple_breadcrumb.html

Lines changed: 65 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,89 @@
1-
<!-- Improved breadcrumb with better category links and styling -->
2-
<div class="simple-breadcrumb">
3-
<a href="{{ '/' | relative_url }}">🏠 Home</a>
1+
<!-- Fixed breadcrumb component that will definitely display -->
2+
<div class="flashcard-breadcrumb" style="display: block !important; visibility: visible !important;">
3+
<a href="{{ '/' | relative_url }}" class="breadcrumb-home">🏠 Home</a>
44
{% if page.category %}
5-
<span class="breadcrumb-sep"></span>
6-
<a href="{{ '/' | relative_url }}#{{ page.category | slugify }}" class="category-link"
7-
onclick="setTimeout(function(){ document.getElementById('{{ page.category | slugify }}').open = true; }, 100);">
5+
<span class="breadcrumb-separator"></span>
6+
<a href="{{ '/' | relative_url }}#{{ page.category | slugify }}" class="breadcrumb-category"
7+
onclick="setTimeout(function(){
8+
const element = document.getElementById('{{ page.category | slugify }}');
9+
if(element) element.open = true;
10+
}, 100);">
811
{{ page.category }}
912
</a>
10-
<span class="breadcrumb-sep"></span>
13+
<span class="breadcrumb-separator"></span>
1114
{% endif %}
12-
<span class="current-page">{{ page.title }}</span>
15+
<span class="breadcrumb-current">{{ page.title }}</span>
1316
</div>
1417

1518
<style>
16-
.simple-breadcrumb {
17-
background: linear-gradient(135deg, #f8f9fa, #e9ecef);
18-
padding: 14px 18px;
19-
border-radius: 8px;
20-
margin-bottom: 25px;
21-
font-size: 0.9em;
22-
border: 1px solid #e1e8ed;
23-
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
24-
}
25-
26-
.simple-breadcrumb a {
27-
color: #667eea;
28-
text-decoration: none;
29-
font-weight: 500;
30-
transition: all 0.3s ease;
19+
/* Ensure breadcrumb is always visible */
20+
.flashcard-breadcrumb {
21+
background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
22+
padding: 16px 20px !important;
23+
border-radius: 10px !important;
24+
margin-bottom: 30px !important;
25+
font-size: 0.95em !important;
26+
border: 1px solid #e1e8ed !important;
27+
box-shadow: 0 3px 8px rgba(0,0,0,0.08) !important;
28+
display: flex !important;
29+
align-items: center !important;
30+
flex-wrap: wrap !important;
31+
gap: 8px !important;
32+
width: 100% !important;
33+
box-sizing: border-box !important;
3134
}
3235

33-
.simple-breadcrumb a:hover {
34-
color: #764ba2;
35-
text-decoration: underline;
36+
.breadcrumb-home,
37+
.breadcrumb-category {
38+
color: #667eea !important;
39+
text-decoration: none !important;
40+
font-weight: 600 !important;
41+
padding: 6px 12px !important;
42+
border-radius: 6px !important;
43+
transition: all 0.3s ease !important;
3644
}
3745

38-
.simple-breadcrumb .category-link {
39-
background: rgba(102, 126, 234, 0.1);
40-
padding: 2px 8px;
41-
border-radius: 4px;
42-
border: 1px solid rgba(102, 126, 234, 0.2);
46+
.breadcrumb-home:hover,
47+
.breadcrumb-category:hover {
48+
background: rgba(102, 126, 234, 0.1) !important;
49+
color: #764ba2 !important;
50+
text-decoration: none !important;
51+
transform: translateY(-1px) !important;
4352
}
4453

45-
.simple-breadcrumb .category-link:hover {
46-
background: rgba(102, 126, 234, 0.15);
47-
transform: translateY(-1px);
54+
.breadcrumb-category {
55+
background: rgba(102, 126, 234, 0.08) !important;
56+
border: 1px solid rgba(102, 126, 234, 0.2) !important;
4857
}
4958

50-
.breadcrumb-sep {
51-
margin: 0 10px;
52-
color: #667eea;
53-
font-weight: bold;
59+
.breadcrumb-separator {
60+
color: #667eea !important;
61+
font-weight: bold !important;
62+
margin: 0 4px !important;
5463
}
5564

56-
.current-page {
57-
color: #2c3e50;
58-
font-weight: 600;
65+
.breadcrumb-current {
66+
color: #2c3e50 !important;
67+
font-weight: 700 !important;
68+
padding: 6px 0 !important;
5969
}
6070

71+
/* Mobile responsiveness */
6172
@media (max-width: 768px) {
62-
.simple-breadcrumb {
63-
font-size: 0.8em;
64-
padding: 12px 15px;
73+
.flashcard-breadcrumb {
74+
padding: 12px 15px !important;
75+
font-size: 0.85em !important;
6576
}
66-
67-
.breadcrumb-sep {
68-
margin: 0 6px;
77+
}
78+
79+
@media (max-width: 480px) {
80+
.flashcard-breadcrumb {
81+
font-size: 0.8em !important;
6982
}
7083
}
84+
85+
/* Override any conflicting styles */
86+
.simple-breadcrumb {
87+
display: none !important;
88+
}
7189
</style>

index.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,56 @@ layout: default
117117
margin-bottom: 40px;
118118
}
119119

120-
.site-logo {
121-
max-width: 280px;
122-
width: 100%;
123-
height: auto;
124-
margin-bottom: 20px;
125-
transition: transform 0.3s ease;
120+
/* Logo display on flashcard pages */
121+
.site-logo,
122+
.site-header .site-logo,
123+
.site-nav .site-logo,
124+
.main-header .site-logo {
125+
width: auto !important;
126+
height: 60px !important;
127+
max-width: 200px !important;
128+
min-width: 150px !important;
129+
display: block !important;
130+
margin: 10px 0 !important;
131+
}
132+
133+
/* Ensure header is visible and properly sized */
134+
.site-header {
135+
min-height: 80px !important;
136+
display: flex !important;
137+
align-items: center !important;
138+
padding: 15px 20px !important;
139+
}
140+
141+
/* Add header styling for flashcard pages if missing */
142+
.main-content-wrap {
143+
padding-top: 20px !important;
144+
}
145+
146+
/* Mobile responsive logo */
147+
@media (max-width: 768px) {
148+
.site-logo,
149+
.site-header .site-logo,
150+
.site-nav .site-logo,
151+
.main-header .site-logo {
152+
height: 50px !important;
153+
min-width: 120px !important;
154+
}
155+
156+
.site-header {
157+
min-height: 70px !important;
158+
padding: 10px 15px !important;
159+
}
160+
}
161+
162+
@media (max-width: 480px) {
163+
.site-logo,
164+
.site-header .site-logo,
165+
.site-nav .site-logo,
166+
.main-header .site-logo {
167+
height: 40px !important;
168+
min-width: 100px !important;
169+
}
126170
}
127171

128172
.site-logo:hover {

0 commit comments

Comments
 (0)