Skip to content

Commit d406a07

Browse files
committed
fix: Remove duplicate header/banner section - Hide theme's default banner to prevent duplication with custom hero section - Enhanced CSS selectors to target minimal theme banner - Keeps custom hero section visible - Removes redundant title and description from theme header
1 parent 72a9bf8 commit d406a07

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

‎_config.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ exclude:
4040
- .git/
4141
- .vscode/
4242

43+
# Show only minimal theme elements we want
44+
show_docs: false
45+
4346
# Markdown processing
4447
markdown: kramdown
4548
kramdown:

‎assets/css/style.css‎

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,34 @@ body {
2323
background-color: var(--bg-color) !important;
2424
}
2525

26+
/* Hide theme's default header/banner to avoid duplication with hero section */
27+
/* Target the minimal theme's default banner - appears before wrapper */
28+
header.banner,
29+
.banner,
30+
[role="banner"],
31+
.wrapper > header,
32+
body > header:first-of-type,
33+
header:first-of-type:not(.hero),
34+
section[role="banner"],
35+
body > * > header:first-child {
36+
display: none !important;
37+
visibility: hidden !important;
38+
}
39+
40+
/* Hide banner that contains GitHub link (minimal theme default) */
41+
header a[href*="github"]:first-of-type,
42+
header:has(a[href*="View the Project"]) {
43+
display: none !important;
44+
}
45+
46+
/* Re-show hero section explicitly */
47+
div.hero,
48+
.hero {
49+
display: block !important;
50+
position: relative !important;
51+
visibility: visible !important;
52+
}
53+
2654
/* Override minimal theme wrapper */
2755
.wrapper {
2856
max-width: 1200px !important;
@@ -339,14 +367,16 @@ li {
339367
}
340368
}
341369

342-
/* Hero Section */
370+
/* Hero Section - Custom hero that replaces theme banner */
343371
.hero {
344372
background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
345373
color: white !important;
346374
padding: 4rem 1rem !important;
347375
text-align: center;
348376
margin: -2rem -1rem 3rem -1rem !important;
349377
border-radius: 0;
378+
position: relative;
379+
z-index: 1;
350380
}
351381

352382
.hero h1 {
@@ -355,16 +385,22 @@ li {
355385
font-size: 3rem !important;
356386
margin-bottom: 1rem !important;
357387
padding-bottom: 0 !important;
388+
font-weight: 700 !important;
358389
}
359390

360391
.hero p {
361392
font-size: 1.3rem !important;
362393
opacity: 0.95;
363394
max-width: 800px;
364-
margin: 1rem auto !important;
395+
margin: 1rem auto 2rem auto !important;
365396
color: white !important;
366397
}
367398

399+
.hero .btn {
400+
display: inline-block !important;
401+
margin: 0.5rem !important;
402+
}
403+
368404
/* Badge/Pill */
369405
.badge {
370406
display: inline-block;

0 commit comments

Comments
 (0)