Skip to content

Commit 3bfbc08

Browse files
committed
docs: add components examples
1 parent f17c9fd commit 3bfbc08

File tree

19 files changed

+1450
-499
lines changed

19 files changed

+1450
-499
lines changed

src/assets/img/full.jpg

283 KB
Loading

src/js/toasts.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* global coreui */
2+
3+
/**
4+
* --------------------------------------------------------------------------
5+
* CoreUI Free Boostrap Admin Template (v4.0.0-alpha.2): popovers.js
6+
* Licensed under MIT (https://coreui.io/license)
7+
* --------------------------------------------------------------------------
8+
*/
9+
10+
const toastTrigger = document.getElementById('liveToastBtn')
11+
const toastLiveExample = document.getElementById('liveToast')
12+
if (toastTrigger) {
13+
toastTrigger.addEventListener('click', function () {
14+
const toast = new coreui.Toast(toastLiveExample)
15+
toast.show()
16+
})
17+
}

src/pug/_mixins/example.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ mixin example
1212
svg.icon.me-2
1313
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-code")
1414
| Code
15-
.tab-content
16-
.tab-pane.py-3.active.preview(role="tabpanel" id="preview-"+id )
15+
.tab-content.border.border-top-0.rounded-bottom
16+
.tab-pane.p-3.active.preview(role="tabpanel" id="preview-"+id )
1717
block
1818
.tab-pane.py-3(role="tabpanel" id="code-"+id )
1919
script.language-markup(type='text/plain')

src/pug/_partials/header.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
header.header.header-sticky.mb-4
22
.container-fluid
3-
button.header-toggler.px-md-0.me-md-3.d-xl-none(type="button" onclick="coreui.Sidebar.getInstance(document.querySelector('#sidebar')).toggle()")
3+
button.header-toggler.px-md-0.me-md-3.d-xxl-none(type="button" onclick="coreui.Sidebar.getInstance(document.querySelector('#sidebar')).toggle()")
44
svg.icon.icon-lg
55
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-menu")
66
a.header-brand.d-xl-none(href="#")

src/pug/_partials/sidebar.pug

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@
178178
a.nav-link(href='notifications/modals.html')
179179
span.nav-icon
180180
| Modals
181+
li.nav-item
182+
a.nav-link(href='notifications/toasts.html')
183+
span.nav-icon
184+
| Toasts
181185
li.nav-item
182186
a.nav-link(href='widgets.html')
183187
svg.nav-icon

src/pug/views/base/cards.pug

Lines changed: 818 additions & 254 deletions
Large diffs are not rendered by default.

src/pug/views/base/carousel.pug

Lines changed: 244 additions & 111 deletions
Large diffs are not rendered by default.

src/pug/views/base/collapse.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ block view
77
+callout('Collapse', 'https://coreui.io/docs/4.0/components/collapse/')
88
.card.mb-4
99
.card-header
10-
| Collapse
10+
strong Collapse
1111
.card-body
1212
p.text-medium-emphasis.small
1313
| You can use a link with the

src/pug/views/base/navs.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ block view
6060
.card-body
6161
p.text-medium-emphasis.small
6262
| Change the horizontal alignment of your nav with
63-
a(href='/docs/4.0/layout/grid/#horizontal-alignment') flexbox utilities
63+
a(href='https://coreui.io/docs/4.0/docs/4.0/layout/grid/#horizontal-alignment') flexbox utilities
6464
| . By default, navs are left-aligned, but you can easily change them to center or right aligned.
6565
p.text-medium-emphasis.small
6666
| Centered with
@@ -243,7 +243,7 @@ block view
243243
.card-body
244244
p.text-medium-emphasis.small
245245
| If you need responsive nav variations, consider using a series of
246-
a(href='/docs/4.0/utilities/flex/') flexbox utilities
246+
a(href='https://coreui.io/docs/4.0/docs/4.0/utilities/flex/') flexbox utilities
247247
| . While more verbose, these utilities offer greater customization across responsive breakpoints. In the example below, our nav will be stacked on the lowest breakpoint, then adapt to a horizontal layout that fills the available width starting from the small breakpoint.
248248
+example()
249249
nav.nav.nav-pills.flex-column.flex-sm-row

src/pug/views/base/pagination.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ block view
173173
.card-body
174174
p.text-medium-emphasis.small
175175
| Change the alignment of pagination components with
176-
a(href='/docs/4.0/utilities/flex/') flexbox utilities
176+
a(href='https://coreui.io/docs/4.0/docs/4.0/utilities/flex/') flexbox utilities
177177
| .
178178
+example()
179179
nav(aria-label='Page navigation example')

0 commit comments

Comments
 (0)