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

Commit b5d8f9d

Browse files
authored
Merge pull request bootstrap-vue-next#1164 from StirStudios/main
Small theming update for purple navbar
2 parents c78e8f9 + 2245ddb commit b5d8f9d

File tree

4 files changed

+94
-26
lines changed

4 files changed

+94
-26
lines changed

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

Lines changed: 77 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
<b-container>
111111
<b-row>
112112
<b-col>
113-
<Content class="bd-content" />
113+
<Content class="doc-content" />
114114
</b-col>
115115
</b-row>
116116
</b-container>
@@ -206,7 +206,24 @@ const globalData = inject(appInfoKey, {
206206

207207
<style lang="scss">
208208
#app {
209-
.bd-content > div > {
209+
--bvn-primary: #6528e0;
210+
--black: #000000;
211+
--white: #ffffff;
212+
--pink: #e83e8c;
213+
--bvn-bg-primary: linear-gradient(rgba(var(--bvn-primary), 1), rgba(var(--bvn-primary), 0.95));
214+
.bg-primary {
215+
background-color: var(--bvn-primary) !important;
216+
border-color: var(--bvn-primary);
217+
color: var(--white);
218+
}
219+
@mixin hover-focus-active() {
220+
&:hover,
221+
&:focus,
222+
&:active {
223+
@content;
224+
}
225+
}
226+
.doc-content > div > {
210227
h2,
211228
h3,
212229
h4,
@@ -261,6 +278,46 @@ const globalData = inject(appInfoKey, {
261278
}
262279
}
263280
}
281+
.component-reference {
282+
.display-6 {
283+
font-size: 1.5rem;
284+
display: block;
285+
margin: 0.75rem 0 1rem;
286+
}
287+
h2 {
288+
margin-top: 2rem;
289+
}
290+
ul {
291+
li {
292+
margin-bottom: 0.4rem;
293+
}
294+
}
295+
h5 > a {
296+
color: var(--bs-body-color);
297+
text-decoration: none;
298+
}
299+
.table {
300+
margin-top: 0.5rem;
301+
font-size: 0.9rem;
302+
& > tbody > tr > td,
303+
& > tbody > tr > th,
304+
& > tfoot > tr > td,
305+
& > tfoot > tr > th,
306+
& > thead > tr > td,
307+
& > thead > tr > th {
308+
padding: 0.5rem;
309+
}
310+
& > tbody > tr > td:first-child {
311+
color: var(--pink);
312+
}
313+
}
314+
}
315+
.anchorjs-link {
316+
text-decoration: none;
317+
&::after {
318+
content: '#';
319+
}
320+
}
264321
.card {
265322
margin-bottom: 3rem;
266323
pre {
@@ -289,14 +346,14 @@ const globalData = inject(appInfoKey, {
289346
.card-link {
290347
text-decoration: none;
291348
}
292-
// Short term fix for navbar modes.
349+
// Navbar.
293350
.navbar {
294-
color: #fff;
351+
color: var(--white);
295352
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(255, 255, 255, 0.15);
296353
.nav-link,
297354
.navbar-brand,
298355
.btn {
299-
color: #fff;
356+
color: var(--white);
300357
}
301358
}
302359
[class^='language-'] {
@@ -360,6 +417,7 @@ const globalData = inject(appInfoKey, {
360417
}
361418
}
362419
}
420+
// Sidebar.
363421
.offcanvas {
364422
.list-group {
365423
padding: 0 0 1.5rem 0;
@@ -391,7 +449,7 @@ const globalData = inject(appInfoKey, {
391449
}
392450
}
393451
}
394-
// TOC
452+
// Sidebar onscreen.
395453
@media (min-width: 992px) {
396454
.bd-layout {
397455
display: grid !important;
@@ -422,17 +480,28 @@ const globalData = inject(appInfoKey, {
422480
.bd-main {
423481
display: grid;
424482
grid-area: main;
425-
grid-template-areas: 'intro toc' 'content toc';
483+
grid-template-areas: 'content toc';
426484
grid-template-rows: auto 1fr;
427485
grid-template-columns: 4fr 1fr;
428486
.bd-content {
429487
grid-area: content;
430488
min-width: 1px;
431489
}
432490
}
491+
.bd-toc {
492+
grid-area: toc;
493+
position: -webkit-sticky;
494+
position: sticky;
495+
top: 5rem;
496+
right: 0;
497+
z-index: 2;
498+
height: calc(100vh - 7rem);
499+
overflow-y: auto;
500+
}
433501
}
434502
}
435-
.offcanvas.offcanvas-start {
503+
// Sidebar width.
504+
.bd-sidebar .offcanvas.offcanvas-start {
436505
width: 200px !important;
437506
}
438507
</style>

apps/docs/src/components/ComponentReference.vue

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<b-container fluid class="p-0">
2+
<b-container fluid class="p-0 component-reference">
33
<b-row>
44
<b-col>
55
<h2>Component Reference</h2>
@@ -10,29 +10,21 @@
1010
<b-container v-for="component in sortData" :key="component.component" fluid class="p-0">
1111
<b-row>
1212
<b-col>
13-
<h3>
14-
{{ component.component }}
15-
</h3>
13+
<code class="display-6">{{ `<` + component.component + `>` }}</code>
1614
</b-col>
1715
</b-row>
1816
<b-row>
1917
<b-col>
2018
<ul>
2119
<li v-for="section in sections" :key="section">
22-
<h4>
23-
<b-link :to="buildCompReferenceLink(`${component.component}-${section}`)">
24-
&lt;{{ component.component }}&gt; {{ section }}
25-
</b-link>
26-
</h4>
20+
<b-link :to="buildCompReferenceLink(`${component.component}-${section}`)">
21+
&lt;{{ component.component }}&gt; {{ section }}
22+
</b-link>
2723
</li>
2824
</ul>
2925
</b-col>
3026
</b-row>
31-
<b-row
32-
v-for="section in sections"
33-
:key="section"
34-
class="border-bottom border-secondary my-3"
35-
>
27+
<b-row v-for="section in sections" :key="section" class="my-3">
3628
<b-col>
3729
<b-container fluid>
3830
<b-row>
@@ -50,7 +42,14 @@
5042
</b-row>
5143
<b-row>
5244
<b-col>
53-
<b-table :items="component[sectionToComponentItem(section)]" />
45+
<b-table
46+
:items="component[sectionToComponentItem(section)]"
47+
hover
48+
small
49+
responsive
50+
bordered
51+
striped
52+
/>
5453
</b-col>
5554
</b-row>
5655
</b-container>
@@ -79,9 +78,9 @@ const sortData = computed(() =>
7978
props: el.props
8079
.map((inner) => ({
8180
prop: inner.prop,
82-
description: inner.description,
8381
type: inner.type,
8482
default: inner.default,
83+
description: inner.description,
8584
}))
8685
.sort((a, b) => a.prop.localeCompare(b.prop)),
8786
emits: el.emits

apps/docs/src/docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ app.mount('#app')
201201

202202
</b-card>
203203

204-
### <a id="nuxtjs"></a> Installation - Nuxt.js 3
204+
### Installation - Nuxt.js 3 <a id="nuxtjs" class="anchorjs-link"></a>
205205

206206
In your Nuxt3 application, install the necessary packages for `bootstrap-vue-next`.
207207

apps/docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ With more than 35 components, several directives and composibles (and growing),
4040

4141
<div class="d-flex gap-2 mt-4">
4242
<b-button :to="withBase('/docs')" variant="primary">Get Started</b-button>
43-
<b-button :href="globalData.githubUrl" target="_blank" rel="noopener" variant="outline-secondary">GitHub</b-button>
43+
<b-button :href="globalData.githubUrl" target="_blank" aria-label="Open Github" rel="noopener" variant="outline-secondary">GitHub</b-button>
4444
</div>
4545

4646
## Integrate with Nuxt.js

0 commit comments

Comments
 (0)