@@ -20,99 +20,108 @@ interface Props {
2020}
2121
2222const { addedIn, layout, title } = Astro .props
23+
24+ const activeSection = title === ' Examples' ? ' Examples' : ' Docs'
2325---
2426
2527<header class =" navbar lg:navbar-expand bd-navbar border-bottom" >
26- <nav class =" 2xl:container bd-gutter flex-wrap lg:flex-nowrap" aria-label =" Main navigation" >
27- { /* Docs sidebar toggle - only shown on docs pages */ }
28+ <nav class =" 2xl:container bd-gutter flex-wrap lg:flex-nowrap justify-content-start" aria-label =" Main navigation" >
29+ <div class =" d-flex align-items-center gap-2 lg:gap-1" >
30+ <a class =" navbar-brand p-0 me-0 lg:me-2" href =" /" aria-label =" Bootstrap" style =" color: var(--bs-indigo-500);" >
31+ <BootstrapWhiteFillIcon class =" d-block my-1" height ={ 32 } width ={ 40 } />
32+ </a >
33+
34+ <span class =" lg:d-none fg-4" >/</span >
35+
36+ { /* Mobile breadcrumb dropdown - visible below lg */ }
37+ <div class =" nav-item lg:d-none" >
38+ <button
39+ class =" nav-link fs-5 fw-medium d-inline-flex align-items-center gap-1 px-0"
40+ type =" button"
41+ data-bs-toggle =" menu"
42+ aria-expanded =" false"
43+ >
44+ { activeSection }
45+ <svg class =" bi bi-sm" aria-hidden =" true" ><use href =" #chevron-expand" ></use ></svg >
46+ </button >
47+ <div class =" menu" >
48+ <a
49+ class:list ={ [' menu-item' , { active: layout === ' docs' }]}
50+ href ={ getVersionedDocsPath (' getting-started/install/' )}
51+ >
52+ Docs
53+ { layout === ' docs' && <svg class = " bi ms-auto" aria-hidden = " true" ><use href = " #check2" ></use ></svg >}
54+ </a >
55+ <a
56+ class:list ={ [' menu-item' , { active: title === ' Examples' }]}
57+ href ={ getVersionedDocsPath (' examples/' )}
58+ >
59+ Examples
60+ { title === ' Examples' && <svg class = " bi ms-auto" aria-hidden = " true" ><use href = " #check2" ></use ></svg >}
61+ </a >
62+ <a class =" menu-item" href ={ getConfig ().icons } target =" _blank" rel =" noopener" >
63+ Icons
64+ <svg class =" bi ms-auto" aria-hidden =" true" ><use href =" #box-arrow-up-right" ></use ></svg >
65+ </a >
66+ <a class =" menu-item" href ={ getConfig ().blog } target =" _blank" rel =" noopener" >
67+ Blog
68+ <svg class =" bi ms-auto" aria-hidden =" true" ><use href =" #box-arrow-up-right" ></use ></svg >
69+ </a >
70+ <hr class =" menu-divider" />
71+ <a class =" menu-item" href ={ getConfig ().github_org } target =" _blank" rel =" noopener" >
72+ GitHub
73+ <svg class =" bi ms-auto" aria-hidden =" true" ><use href =" #box-arrow-up-right" ></use ></svg >
74+ </a >
75+ <a class =" menu-item" href ={ getConfig ().opencollective } target =" _blank" rel =" noopener" >
76+ OpenCollective
77+ <svg class =" bi ms-auto" aria-hidden =" true" ><use href =" #box-arrow-up-right" ></use ></svg >
78+ </a >
79+ <a class =" menu-item" href ={ ` https://x.com/${getConfig ().x } ` } target =" _blank" rel =" noopener" >
80+ Twitter/X
81+ <svg class =" bi ms-auto" aria-hidden =" true" ><use href =" #box-arrow-up-right" ></use ></svg >
82+ </a >
83+ </div >
84+ </div >
85+
86+ { /* Desktop nav links - visible at lg+ */ }
87+ <ul class =" nav navbar-nav flex-row d-none lg:d-flex bd-navbar-nav" >
88+ <LinkItem active ={ layout === ' docs' } href ={ getVersionedDocsPath (' getting-started/install/' )} track >
89+ Docs
90+ </LinkItem >
91+ <LinkItem active ={ title === ' Examples' } href ={ getVersionedDocsPath (' examples/' )} track >Examples</LinkItem >
92+ <LinkItem href ={ getConfig ().icons } target =" _blank" rel =" noopener" track >Icons</LinkItem >
93+ <LinkItem href ={ getConfig ().blog } target =" _blank" rel =" noopener" track >Blog</LinkItem >
94+ </ul >
95+ </div >
96+
97+ <ul class =" nav navbar-nav flex-row ms-auto" >
98+ <li class =" nav-item nav-link px-1" id =" docsearch" data-bd-docs-version ={ getConfig ().docs_version } ></li >
99+
100+ <Versions layout ={ layout } addedIn ={ addedIn } />
101+
102+ <LinkItem class =" px-1 d-none lg:d-flex" href ={ getConfig ().github_org } target =" _blank" rel =" noopener" >
103+ <GitHubIcon class =" navbar-nav-svg" height ={ 16 } width ={ 16 } />
104+ </LinkItem >
105+
106+ <li class =" nav-item" >
107+ <ThemeToggler layout ={ layout } />
108+ </li >
109+ </ul >
110+
28111 {
29112 layout === ' docs' && (
30113 <button
31- class = " btn-icon navbar-btn-icon lg:d-none ms- -2"
114+ class = " btn-icon btn-sm navbar-btn-icon lg:d-none ms-2"
32115 type = " button"
33116 data-bs-toggle = " drawer"
34117 data-bs-target = " #bdSidebar"
35118 aria-controls = " bdSidebar"
36119 aria-label = " Toggle docs navigation"
37120 >
38- <HamburgerIcon class = " navbar-toggler-icon" height = { 20 } width = { 20 } />
121+ <HamburgerIcon class = " navbar-toggler-icon" height = { 16 } width = { 16 } />
39122 <span class = " d-none fs-6 pe-1" >Browse</span >
40123 </button >
41124 )
42125 }
43- { layout !== ' docs' && <div class = " lg:d-none" style = " width: 4.25rem;" />}
44-
45- <a class =" navbar-brand p-0 me-0 lg:me-2" href =" /" aria-label =" Bootstrap" style =" color: var(--bs-indigo-500);" >
46- <BootstrapWhiteFillIcon class =" d-block my-1" height ={ 32 } width ={ 40 } />
47- </a >
48-
49- { /* Search and nav toggles */ }
50- <div class =" d-flex gap-3" >
51- <div class =" bd-search" id =" docsearch" data-bd-docs-version ={ getConfig ().docs_version } ></div >
52-
53- <button
54- class =" btn-icon navbar-btn-icon lg:d-none order-3 me--2"
55- type =" button"
56- data-bs-toggle =" drawer"
57- data-bs-target =" #bdNavbar"
58- aria-controls =" bdNavbar"
59- aria-label =" Toggle navigation"
60- >
61- <svg class =" bi" aria-hidden =" true" ><use href =" #three-dots" ></use ></svg >
62- </button >
63- </div >
64-
65- { /* Main navigation - drawer on mobile, inline on desktop */ }
66- <dialog
67- class =" lg:drawer drawer-end flex-grow-1 drawer-fit-content"
68- tabindex =" -1"
69- id =" bdNavbar"
70- aria-labelledby =" bdNavbarDrawerLabel"
71- >
72- <div class =" drawer-header px-4 pb-0" >
73- <h5 class =" drawer-title text-white" id =" bdNavbarDrawerLabel" >Bootstrap</h5 >
74- <CloseButton dismiss =" drawer" target =" #bdNavbar" />
75- </div >
76-
77- <div class =" drawer-body p-4 pt-0 lg:p-0" >
78- <hr class =" lg:d-none mb-0" />
79- <ul class =" nav navbar-nav flex-row flex-wrap bd-navbar-nav" >
80- <LinkItem active ={ layout === ' docs' } href ={ getVersionedDocsPath (' getting-started/install/' )} track >
81- Docs
82- </LinkItem >
83- <LinkItem active ={ title === ' Examples' } href ={ getVersionedDocsPath (' examples/' )} track >Examples</LinkItem >
84- <LinkItem href ={ getConfig ().icons } target =" _blank" rel =" noopener" track >Icons</LinkItem >
85- <LinkItem href ={ getConfig ().blog } target =" _blank" rel =" noopener" track >Blog</LinkItem >
86- </ul >
87-
88- <hr class =" lg:d-none my-0" />
89-
90- <ul class =" nav navbar-nav md:ms-auto" >
91- <LinkItem class =" nav-link py-2 px-0 lg:px-2" href ={ getConfig ().github_org } target =" _blank" rel =" noopener" >
92- <GitHubIcon class =" navbar-nav-svg" height ={ 16 } width ={ 16 } />
93- <small class =" lg:d-none" >GitHub</small >
94- </LinkItem >
95- <LinkItem
96- class =" nav-link py-2 px-0 lg:px-2"
97- href ={ ` https://x.com/${getConfig ().x } ` }
98- target =" _blank"
99- rel =" noopener"
100- >
101- <XIcon class =" navbar-nav-svg" height ={ 16 } width ={ 16 } />
102- <small class =" lg:d-none" >X</small >
103- </LinkItem >
104- <LinkItem class =" nav-link py-2 px-0 lg:px-2" href ={ getConfig ().opencollective } target =" _blank" rel =" noopener" >
105- <OpenCollectiveIcon class =" navbar-nav-svg" height ={ 16 } width ={ 16 } />
106- <small class =" lg:d-none" >Open Collective</small >
107- </LinkItem >
108-
109- <Versions layout ={ layout } addedIn ={ addedIn } />
110-
111- <li class =" nav-item" >
112- <ThemeToggler layout ={ layout } />
113- </li >
114- </ul >
115- </div >
116- </dialog >
117126 </nav >
118127</header >
0 commit comments