Skip to content

Commit 0f2cb6c

Browse files
committed
refactor: update examples
1 parent e3dd33a commit 0f2cb6c

40 files changed

+333
-753
lines changed

src/_nav.js

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default [
3232
{
3333
_name: "CNavGroup",
3434
name: "Base",
35-
route: "/base",
35+
to: "/base",
3636
icon: "cil-puzzle",
3737
children: [
3838
{
@@ -122,7 +122,7 @@ export default [
122122
{
123123
_name: "CNavGroup",
124124
name: "Buttons",
125-
route: "/buttons",
125+
to: "/buttons",
126126
icon: "cil-cursor",
127127
children: [
128128
{
@@ -132,25 +132,20 @@ export default [
132132
},
133133
{
134134
_name: "CNavItem",
135-
name: "Button Dropdowns",
136-
to: "/buttons/dropdowns",
135+
name: "Button Groups",
136+
to: "/buttons/button-groups",
137137
},
138138
{
139139
_name: "CNavItem",
140-
name: "Button Groups",
141-
to: "/buttons/button-groups",
140+
name: "Dropdowns",
141+
to: "/buttons/dropdowns",
142142
},
143-
// {
144-
// _name: 'CNavItem',
145-
// name: 'Brand Buttons',
146-
// to: '/buttons/brand-buttons'
147-
// }
148143
],
149144
},
150145
{
151146
_name: "CNavGroup",
152147
name: "Forms",
153-
route: "/forms",
148+
to: "/forms",
154149
icon: "cil-star",
155150
children: [
156151
{
@@ -204,7 +199,7 @@ export default [
204199
{
205200
_name: "CNavGroup",
206201
name: "Icons",
207-
route: "/icons",
202+
to: "/icons",
208203
icon: "cil-star",
209204
children: [
210205
{
@@ -231,7 +226,7 @@ export default [
231226
{
232227
_name: "CNavGroup",
233228
name: "Notifications",
234-
route: "/notifications",
229+
to: "/notifications",
235230
icon: "cil-bell",
236231
children: [
237232
{
@@ -273,7 +268,7 @@ export default [
273268
// {
274269
// _name: 'CNavGroup',
275270
// name: 'Pages',
276-
// route: '/pages',
271+
// to: '/pages',
277272
// icon: 'cil-star',
278273
// children: [
279274
// {

src/assets/icons/icons.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import {
1818
cibVimeo,
1919
cibCcMastercard,
2020
cibCcVisa,
21-
cibStripe,
22-
cibPaypal,
23-
cibGooglePay,
21+
cibCcStripe,
22+
cibCcPaypal,
23+
cibCcApplePay,
2424
cibCcAmex
2525
} from "@coreui/icons";
2626
import { cifUs, cifBr, cifIn, cifFr, cifEs, cifPl } from "@coreui/icons";
@@ -161,9 +161,9 @@ export const iconsSet = Object.assign(
161161
cibVimeo,
162162
cibCcMastercard,
163163
cibCcVisa,
164-
cibStripe,
165-
cibPaypal,
166-
cibGooglePay,
164+
cibCcStripe,
165+
cibCcPaypal,
166+
cibCcApplePay,
167167
cibCcAmex
168168
}
169169
);

src/components/AppHeaderDropdownAccnt.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<CBadge color="warning" class="ms-auto">{{ itemsCount }}</CBadge>
2525
</CDropdownItem>
2626
<CDropdownHeader component="h6" class="bg-light fw-semibold py-2">
27-
<strong>Settings</strong>
27+
Settings
2828
</CDropdownHeader>
2929
<CDropdownItem> <CIcon icon="cil-user" /> Profile </CDropdownItem>
3030
<CDropdownItem> <CIcon icon="cil-settings" /> Settings </CDropdownItem>

src/components/DocsCallout.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default {
2929
default: undefined,
3030
required: false,
3131
},
32+
plural: Boolean
3233
},
3334
setup(props) {
3435
const href = `https://coreui.io/vue/docs/${packageJson.config.coreui_library_short_version}/${props.href}`

src/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import store from "./store";
66
import CoreuiVue from "@coreui/vue";
77
import { CIcon } from "@coreui/icons-vue";
88
import { iconsSet as icons } from "@/assets/icons/icons.js";
9-
import Example from "@/components/Example";
9+
import DocsCallout from "@/components/DocsCallout";
10+
import DocsExample from "@/components/DocsExample";
1011

1112

1213
const app = createApp(App);
@@ -15,6 +16,7 @@ app.use(router);
1516
app.use(CoreuiVue);
1617
app.provide('icons', icons);
1718
app.component("CIcon", CIcon);
18-
app.component("Example", Example);
19+
app.component("DocsCallout", DocsCallout);
20+
app.component("DocsExample", DocsExample);
1921

2022
app.mount("#app");

src/router/index.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ import { createRouter, createWebHistory } from "vue-router";
44

55
import DefaultLayout from "@/layouts/DefaultLayout";
66

7-
// Views - Components
8-
// const Breadcrumbs = () => import("@/views/base/Breadcrumbs");
9-
107
const routes = [
118
{
129
path: "/",
1310
name: "Home",
1411
component: DefaultLayout,
12+
redirect: "/dashboard",
1513
children: [
1614
{
17-
path: "dashboard",
15+
path: "/dashboard",
1816
name: "Dashboard",
1917
// route level code-splitting
2018
// this generates a separate chunk (about.[hash].js) for this route
@@ -78,11 +76,6 @@ const routes = [
7876
name: "Collapses",
7977
component: () => import("@/views/base/Collapses.vue"),
8078
},
81-
{
82-
path: "/base/forms",
83-
name: "Forms",
84-
component: () => import("@/views/base/Forms.vue"),
85-
},
8679
/*
8780
{
8881
path: "/base/jumbotrons",
@@ -130,11 +123,6 @@ const routes = [
130123
name: "Tables",
131124
component: () => import("@/views/base/Tables.vue"),
132125
},
133-
{
134-
path: "/base/tabs",
135-
name: "Tabs",
136-
component: () => import("@/views/base/Tabs.vue"),
137-
},
138126
{
139127
path: "/base/tooltips",
140128
name: "Tooltips",

src/views/base/Accordion.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<CRow>
33
<CCol :xs="12">
4-
<DocsCallout name="Breadcrumb" href="components/breadcrumb" />
4+
<DocsCallout name="Accordion" href="components/accordion" />
55
</CCol>
66
<CCol :xs="12">
77
<CCard class="mb-4">

src/views/base/Carousels.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<CRow>
33
<CCol :xs="12">
4-
<DocsCallout name="Carousel" href="components/breadcrumb" />
4+
<DocsCallout name="Carousel" href="components/carousel.html" />
55
</CCol>
66
<CCol :xs="12">
77
<CCard class="mb-4">

src/views/base/Collapses.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<CRow>
33
<CCol :xs="12">
4-
<DocsCallout name="Collapse" href="components/breadcrumb" />
4+
<DocsCallout name="Collapse" href="components/collapse.html" />
55
</CCol>
66
<CCol :xs="12">
77
<CCard class="mb-4">

src/views/base/ListGroups.vue

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<CRow>
33
<CCol :xs="12">
4-
<DocsCallout name="List Group" href="components/list-group" />
4+
<DocsCallout name="List Group" href="components/list-group.html" />
55
</CCol>
66
<CCol :xs="12">
77
<CCard class="mb-4">
@@ -14,7 +14,7 @@
1414
proper CSS classes. Build upon it with the options that follow, or
1515
with your CSS as required.
1616
</p>
17-
<DocsExample href="components/list-group">
17+
<DocsExample href="components/list-group.html">
1818
<CListGroup>
1919
<CListGroupItem>Cras justo odio</CListGroupItem>
2020
<CListGroupItem>Dapibus ac facilisis in</CListGroupItem>
@@ -37,7 +37,7 @@
3737
<code>&lt;CListGroupItem&gt;</code> to show the current active
3838
selection.
3939
</p>
40-
<DocsExample href="components/list-group/#active-items">
40+
<DocsExample href="components/list-group.html#active-items">
4141
<CListGroup>
4242
<CListGroupItem active>Cras justo odio</CListGroupItem>
4343
<CListGroupItem>Dapibus ac facilisis in</CListGroupItem>
@@ -59,7 +59,7 @@
5959
Add <code>disabled</code> boolean property to a
6060
<code>&lt;CListGroupItem&gt;</code> to make it appear disabled.
6161
</p>
62-
<DocsExample href="components/list-group/#disabled-items">
62+
<DocsExample href="components/list-group.html#disabled-items">
6363
<CListGroup>
6464
<CListGroupItem disabled>Cras justo odio</CListGroupItem>
6565
<CListGroupItem>Dapibus ac facilisis in</CListGroupItem>
@@ -87,7 +87,7 @@
8787
<code>&lt;div&gt;</code>
8888
s) don&#39;tprovide a click or tap affordance.
8989
</p>
90-
<DocsExample href="components/list-group/#links-and-buttons">
90+
<DocsExample href="components/list-group.html#links-and-buttons">
9191
<CListGroup>
9292
<CListGroupItem component="a" href="#" active>
9393
Cras justo odio
@@ -120,7 +120,7 @@
120120
rounded corners to render list group items edge-to-edge in a parent
121121
container (e.g., cards).
122122
</p>
123-
<DocsExample href="components/list-group/#flush">
123+
<DocsExample href="components/list-group.html#flush">
124124
<CListGroup flush>
125125
<CListGroupItem>Cras justo odio</CListGroupItem>
126126
<CListGroupItem>Dapibus ac facilisis in</CListGroupItem>
@@ -153,7 +153,7 @@
153153
groups.</strong
154154
>
155155
</p>
156-
<DocsExample href="components/list-group/#flush">
156+
<DocsExample href="components/list-group.html#flush">
157157
<template
158158
v-for="item in ['', '-sm', '-md', '-lg', '-xl', '-xxl']"
159159
:key="item"
@@ -178,7 +178,7 @@
178178
Use contextual classes to style list items with a stateful
179179
background and color.
180180
</p>
181-
<DocsExample href="components/list-group/#contextual-classes">
181+
<DocsExample href="components/list-group.html#contextual-classes">
182182
<CListGroup>
183183
<CListGroupItem>Dapibus ac facilisis in</CListGroupItem>
184184
<CListGroupItem
@@ -205,7 +205,7 @@
205205
<code>active</code> state; apply it to indicate an active selection
206206
on a contextual list group item.
207207
</p>
208-
<DocsExample href="components/list-group/#contextual-classes">
208+
<DocsExample href="components/list-group.html#contextual-classes">
209209
<CListGroup>
210210
<CListGroupItem component="a" href="#"
211211
>Dapibus ac facilisis in</CListGroupItem
@@ -242,7 +242,7 @@
242242
Add badges to any list group item to show unread counts, activity,
243243
and more.
244244
</p>
245-
<DocsExample href="components/list-group/#with-badges">
245+
<DocsExample href="components/list-group.html#with-badges">
246246
<CListGroup>
247247
<CListGroupItem
248248
class="d-flex justify-content-between align-items-center"
@@ -280,7 +280,7 @@
280280
>flexbox utilities</a
281281
>.
282282
</p>
283-
<DocsExample href="components/list-group/#custom-content">
283+
<DocsExample href="components/list-group.html#custom-content">
284284
<CListGroup>
285285
<CListGroupItem component="a" href="#" active>
286286
<div class="d-flex w-100 justify-content-between">
@@ -334,7 +334,7 @@
334334
Place CoreUI&#39;s checkboxes and radios within list group items and
335335
customize as needed.
336336
</p>
337-
<DocsExample href="components/list-group/#checkboxes-and-radios">
337+
<DocsExample href="components/list-group.html#checkboxes-and-radios">
338338
<CListGroup>
339339
<CListGroupItem>
340340
<CFormCheck label="Cras justo odio" />

0 commit comments

Comments
 (0)