Skip to content

Commit 5d01cdc

Browse files
committed
docs: update theme and content
1 parent 715dc4d commit 5d01cdc

File tree

5 files changed

+189
-78
lines changed

5 files changed

+189
-78
lines changed

docs/.vuepress/theme-coreui/src/client/components/SidebarChild.ts

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,23 @@ const renderItem = (item: ResolvedSidebarItem): VNode => {
4343
const route = useRoute()
4444
if (item.children && !item.link.includes('.html')) {
4545
return h(
46-
RouterLink,
46+
CNavGroup,
4747
{
48-
to: item.link,
49-
custom: true,
48+
compact: true,
49+
visible: item.children.some((child) => isActiveItem(route, child)),
50+
// href: props.href,
5051
},
5152
{
52-
default: (props) =>
53-
h(
54-
CNavGroup,
55-
{
56-
compact: true,
57-
visible: item.children.some((child) => isActiveItem(route, child)),
58-
href: props.href,
59-
},
60-
{
61-
togglerContent: () => [
62-
h(CIcon, {
63-
customClassName: 'nav-icon text-primary',
64-
icon: ['512 512', item.icon],
65-
height: 64,
66-
width: 64,
67-
}),
68-
item.text,
69-
],
70-
default: () => item.children.map((child) => renderItem(child)),
71-
},
72-
),
53+
togglerContent: () => [
54+
h(CIcon, {
55+
customClassName: 'nav-icon text-primary',
56+
icon: ['512 512', item.icon],
57+
height: 64,
58+
width: 64,
59+
}),
60+
item.text,
61+
],
62+
default: () => item.children.map((child) => renderItem(child)),
7363
},
7464
)
7565
}

docs/.vuepress/theme-coreui/src/client/layouts/Layout.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
<Sidebar :visible="isSidebarOpen"/>
99
<div class="wrapper d-flex flex-column min-vh-100">
1010
<Header @toggle-sidebar="toggleSidebar(!isSidebarOpen)"/>
11-
<!-- <Navbar v-if="shouldShowNavbar" @toggle-sidebar="toggleSidebar">
12-
<template #before>
13-
<slot name="navbar-before" />
14-
</template>
15-
<template #after>
16-
<slot name="navbar-after" />
17-
</template>
18-
</Navbar> -->
1911
<div class="body flex-grow-1 px-3">
2012
<CContainer lg>
2113
<Home v-if="frontmatter.home" />

docs/4.0/components/sidebar.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,34 @@ Sidebar come with built-in support for a handful of sub-components. Choose from
2121
<CSidebarNav>
2222
<li class="nav-title">Nav Title</li>
2323
<CNavItem href="#">
24-
<CIcon customClasses="nav-icon" icon="cil-speedometer"/>
24+
<CIcon customClassName="nav-icon" icon="cil-speedometer"/>
2525
Nav item
2626
</CNavItem>
2727
<CNavItem href="#">
28-
<CIcon customClasses="nav-icon" icon="cil-speedometer"/>
29-
With badge
30-
<CBadge color="primary ms-auto">NEW</CBadge>
28+
<CIcon customClassName="nav-icon" icon="cil-speedometer"/>
29+
With badge
30+
<CBadge class="ms-auto" color="primary">NEW</CBadge>
3131
</CNavItem>
3232
<CNavGroup>
3333
<template #togglerContent>
34-
<CIcon customClasses="nav-icon" icon="cil-puzzle"/> Nav dropdown
34+
<CIcon customClassName="nav-icon" icon="cil-puzzle"/> Nav dropdown
35+
</template>
36+
<CNavItem href="#">
37+
<CIcon customClassName="nav-icon" icon="cil-puzzle"/> Nav dropdown item
38+
</CNavItem>
39+
<CNavItem href="#">
40+
<CIcon customClassName="nav-icon" icon="cil-puzzle"/> Nav dropdown item
41+
</CNavItem>
42+
</CNavGroup>
43+
<CNavGroup>
44+
<template #togglerContent>
45+
<CIcon customClassName="nav-icon" icon="cil-puzzle"/> Nav dropdown2
3546
</template>
3647
<CNavItem href="#">
37-
<CIcon customClasses="nav-icon" icon="cil-puzzle"/> Nav dropdown item
48+
<CIcon customClassName="nav-icon" icon="cil-puzzle"/> Nav dropdown item
3849
</CNavItem>
3950
<CNavItem href="#">
40-
<CIcon customClasses="nav-icon" icon="cil-puzzle"/> Nav dropdown item
51+
<CIcon customClassName="nav-icon" icon="cil-puzzle"/> Nav dropdown item
4152
</CNavItem>
4253
</CNavGroup>
4354
</CSidebarNav>
@@ -50,23 +61,23 @@ Sidebar come with built-in support for a handful of sub-components. Choose from
5061
<CSidebarNav>
5162
<li class="nav-title">Nav Title</li>
5263
<CNavItem href="#">
53-
<CIcon customClasses="nav-icon" icon="cil-speedometer"/>
64+
<CIcon customClassName="nav-icon" icon="cil-speedometer"/>
5465
Nav item
5566
</CNavItem>
5667
<CNavItem href="#">
57-
<CIcon customClasses="nav-icon" icon="cil-speedometer"/>
68+
<CIcon customClassName="nav-icon" icon="cil-speedometer"/>
5869
With badge
5970
<CBadge color="primary ms-auto">NEW</CBadge>
6071
</CNavItem>
6172
<CNavGroup>
6273
<template #togglerContent>
63-
<CIcon customClasses="nav-icon" icon="cil-puzzle"/> Nav dropdown
74+
<CIcon customClassName="nav-icon" icon="cil-puzzle"/> Nav dropdown
6475
</template>
6576
<CNavItem href="#">
66-
<CIcon customClasses="nav-icon" icon="cil-puzzle"/> Nav dropdown item
77+
<CIcon customClassName="nav-icon" icon="cil-puzzle"/> Nav dropdown item
6778
</CNavItem>
6879
<CNavItem href="#">
69-
<CIcon customClasses="nav-icon" icon="cil-puzzle"/> Nav dropdown item
80+
<CIcon customClassName="nav-icon" icon="cil-puzzle"/> Nav dropdown item
7081
</CNavItem>
7182
</CNavGroup>
7283
</CSidebarNav>

0 commit comments

Comments
 (0)