Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit eb72cdf

Browse files
authored
Merge pull request bootstrap-vue-next#1324 from StirStudios/main
Better UI for smaller devices for otp
2 parents e3e7b13 + 05ee12d commit eb72cdf

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

apps/docs/.vitepress/theme/Layout.vue

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
</BNav>
3939
</BNavbarNav>
4040
</BCollapse>
41-
<div class="d-flex gap-2 flex-wrap">
42-
<BNav class="d-flex gap-4">
41+
<div class="d-flex gap-2 flex-wrap socials">
42+
<BNav class="d-flex">
4343
<BNavItem
4444
v-for="link in headerExternalLinks"
4545
:href="link.url"
@@ -50,25 +50,27 @@
5050
>
5151
<component :is="link.icon()" height="1.1rem" aria-hidden />
5252
</BNavItem>
53-
<div class="border border-secondary"></div>
53+
<div class="border border-secondary ms-2 me-3" />
5454
<ClientOnly>
55-
<BNavItemDropdown toggle-class="py-1 px-0">
55+
<BNavItemDropdown toggle-class="px-0">
5656
<!-- TODO there's no way to adjust these options, say if you wanted to remove the padding -->
5757
<template #button-content>
58-
<component :is="currentIcon" :aria-label="`Toggle theme (${dark})`" />
58+
<component :is="currentIcon" height="1.1rem" :aria-label="`Toggle theme (${dark})`" />
5959
</template>
6060
<BDropdownItem v-for="el in options" :key="el" :active="dark === el" @click="set(el)">
6161
<component :is="map[el]" /> {{ el }}
6262
</BDropdownItem>
6363
</BNavItemDropdown>
6464
</ClientOnly>
6565
</BNav>
66-
<BNavbarToggle v-b-toggle.otp-menu class="otp-menu-toggle">
67-
On this page
68-
<ChevronRight aria-hidden />
69-
</BNavbarToggle>
7066
</div>
7167
</BNavbar>
68+
<div class="py-4 px-3 text-end" v-if="!isLargeScreen">
69+
<BNavbarToggle v-b-toggle.otp-menu class="otp-menu-toggle">
70+
On this page
71+
<ChevronRight aria-hidden />
72+
</BNavbarToggle>
73+
</div>
7274
<BContainer fluid class="container-lg mt-3 my-md-4 bd-layout">
7375
<aside class="bd-sidebar">
7476
<ClientOnly>
@@ -447,12 +449,18 @@ watch(
447449
color: var(--white);
448450
}
449451
450-
.otp-menu-toggle {
451-
border: none;
452-
font-size: small;
452+
.socials {
453+
.nav-link {
454+
padding: 0 0.5rem;
455+
}
453456
}
454457
}
455458
459+
.otp-menu-toggle {
460+
border: none;
461+
font-size: small;
462+
}
463+
456464
[class^='language-'] {
457465
position: relative;
458466
@@ -524,6 +532,7 @@ watch(
524532
525533
// Sidebar.
526534
.offcanvas {
535+
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(255, 255, 255, 0.15);
527536
.list-group {
528537
padding: 0 0 1.5rem 0;
529538
font-size: 0.875em;
@@ -670,5 +679,11 @@ watch(
670679
}
671680
}
672681
}
682+
683+
.offcanvas.offcanvas-end {
684+
@media (max-width: 991px) {
685+
max-width: 15rem;
686+
}
687+
}
673688
}
674689
</style>

0 commit comments

Comments
 (0)