-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathSubNav.astro
More file actions
27 lines (24 loc) · 989 Bytes
/
SubNav.astro
File metadata and controls
27 lines (24 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
import { getVersionedDocsPath } from '@libs/path'
const slug = Astro.url.pathname.split('/')[4]
const sidebarMap = {
'getting-started': 'Getting started',
foundation: 'Foundation',
components: 'Components',
utilities: 'Utilities',
layout: 'Layout'
}
---
<!--OUDS mod: doesn’t exist anymore in Bootstrap-->
<nav class="bd-subnavbar py-small d-lg-none" aria-label="Secondary navigation">
<div class="container-fluid container-max-width d-flex justify-content-start">
<button class="btn btn-default" type="button" data-bs-toggle="offcanvas"
data-bs-target="#bdSidebar" aria-controls="bdSidebar">
<svg aria-hidden="true">
<use xlink:href={`${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#outgoing')}`}></use>
</svg>
<span class="d-none d-sm-inline">Browse docs: {sidebarMap[slug]}</span>
<span class="d-sm-none">Browse docs</span><span class="visually-hidden">{sidebarMap[slug]}</span>
</button>
</div>
</nav>