Skip to content

Commit 5e1a9b8

Browse files
committed
refactor: update example views
1 parent 9bb388c commit 5e1a9b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2291
-10562
lines changed

src/pug/_mixins/example.pug

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,27 @@ mixin example(script)
66
a.nav-link.active(data-coreui-toggle="tab" href="#preview-"+id role="tab")
77
svg.icon.me-2
88
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-media-play")
9+
|
910
| Preview
1011
li.nav-item
1112
a.nav-link(data-coreui-toggle="tab" href="#code-"+id role="tab")
1213
svg.icon.me-2
1314
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-code")
15+
|
1416
| Code
1517
if script
1618
li.nav-item
1719
a.nav-link(data-coreui-toggle="tab" href="#js-"+id role="tab")
1820
svg.icon.me-2
1921
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-cog")
22+
|
2023
| JavaScript
2124
.tab-content.rounded-bottom
2225
.tab-pane.p-3.active.preview(role="tabpanel" id="preview-"+id )
23-
block
26+
if script
27+
block html
28+
else
29+
block
2430
.tab-pane.pt-1(role="tabpanel" id="code-"+id )
2531
script.language-markup(type='text/plain')
2632
if script

src/pug/_partials/banner.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
* CoreUI - Free Bootstrap Admin Template
3-
* @version v4.0.0-alpha.2
3+
* @version v4.0.0-beta.0
44
* @link https://coreui.io
55
* Copyright (c) 2021 creativeLabs Łukasz Holeczek
66
* Licensed under MIT (https://coreui.io/license)

src/pug/_partials/head.pug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ meta(name='msapplication-TileImage', content='assets/favicon/ms-icon-144x144.png
2525
meta(name='theme-color', content='#ffffff')
2626

2727
link(rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.css')
28+
link(rel='stylesheet' href='node_modules/simplebar/dist/simplebar.css')
29+
2830

2931
// Main styles for this application
3032
link(href='css/style.css', rel='stylesheet')

src/pug/_partials/header.pug

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,36 @@ header.header.header-sticky.mb-4
33
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")
6-
a.header-brand.d-xl-none(href="#")
6+
|
7+
a.header-brand.d-md-none(href="#")
78
svg(width="118" height="46" alt="CoreUI Logo")
89
use(xlink:href="assets/brand/coreui.svg#full")
9-
ul.header-nav.d-md-down-none
10+
|
11+
ul.header-nav.d-none.d-md-flex
1012
li.nav-item
1113
a.nav-link(href="#") Dashboard
1214
li.nav-item
1315
a.nav-link(href="#") Users
1416
li.nav-item
1517
a.nav-link(href="#") Settings
1618
ul.header-nav.ms-auto
17-
li.nav-item.d-md-down-none
19+
li.nav-item
1820
a.nav-link(href="#")
1921
svg.icon.icon-lg
2022
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-bell")
21-
li.nav-item.d-md-down-none
23+
|
24+
li.nav-item
2225
a.nav-link(href="#")
2326
svg.icon.icon-lg
2427
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-list-rich")
25-
li.nav-item.d-md-down-none
28+
|
29+
li.nav-item
2630
a.nav-link(href="#")
2731
svg.icon.icon-lg
2832
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-envelope-open")
33+
|
2934
ul.header-nav.ms-3
30-
li.nav-item.dropdown.d-flex.align-items-center
35+
li.nav-item.dropdown
3136
a.nav-link.py-0(data-coreui-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false")
3237
.avatar.avatar-md
3338
img.avatar-img(src="assets/img/avatars/8.jpg" alt="[email protected]")
@@ -37,51 +42,61 @@ header.header.header-sticky.mb-4
3742
a.dropdown-item(href="#")
3843
svg.icon.me-2
3944
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-bell")
45+
|
4046
| Updates
4147
span.badge.badge-sm.bg-info.ms-2 42
4248
a.dropdown-item(href="#")
4349
svg.icon.me-2
4450
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-envelope-open")
51+
|
4552
| Messages
4653
span.badge.badge-sm.bg-success.ms-2 42
4754
a.dropdown-item(href="#")
4855
svg.icon.me-2
4956
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-task")
57+
|
5058
| Tasks
5159
span.badge.badge-sm.bg-danger.ms-2 42
5260
a.dropdown-item(href="#")
5361
svg.icon.me-2
5462
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-comment-square")
63+
|
5564
| Comments
5665
span.badge.badge-sm.bg-warning.ms-2 42
5766
.dropdown-header.bg-light.py-2
5867
.fw-semibold Settings
5968
a.dropdown-item(href="#")
6069
svg.icon.me-2
6170
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-user")
71+
|
6272
| Profile
6373
a.dropdown-item(href="#")
6474
svg.icon.me-2
6575
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-settings")
76+
|
6677
| Settings
6778
a.dropdown-item(href="#")
6879
svg.icon.me-2
6980
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-credit-card")
81+
|
7082
| Payments
7183
span.badge.badge-sm.bg-secondary.ms-2 42
7284
a.dropdown-item(href="#")
7385
svg.icon.me-2
7486
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-file")
87+
|
7588
| Projects
7689
span.badge.badge-sm.bg-primary.ms-2 42
7790
.dropdown-divider
7891
a.dropdown-item(href="#")
7992
svg.icon.me-2
8093
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-lock-locked")
94+
|
8195
| Lock Account
8296
a.dropdown-item(href="#")
8397
svg.icon.me-2
8498
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-account-logout")
99+
|
85100
| Logout
86101
.header-divider
87102
.container-fluid

src/pug/_partials/scripts.pug

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
// CoreUI and necessary plugins
22
script(src='node_modules/@coreui/coreui/dist/js/coreui.bundle.min.js')
3+
script(src='node_modules/simplebar/dist/simplebar.min.js')
4+
35
script(src='https://cdn.jsdelivr.net/npm/[email protected]/prism.js')
46
script(src='https://cdn.jsdelivr.net/npm/[email protected]/plugins/autoloader/prism-autoloader.min.js')
57
script(src='https://cdn.jsdelivr.net/npm/[email protected]/plugins/unescaped-markup/prism-unescaped-markup.min.js')
68
script(src='https://cdn.jsdelivr.net/npm/[email protected]/plugins/normalize-whitespace/prism-normalize-whitespace.js')
79

810
block scripts
11+
12+
script
13+
block js
14+

src/pug/_partials/sidebar.pug

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
.sidebar.sidebar-dark.sidebar-fixed.sidebar-self-hiding-xl#sidebar
2-
.sidebar-brand.d-lg-down-none
2+
.sidebar-brand.d-none.d-md-flex
33
svg.sidebar-brand-full(width="118" height="46" alt="CoreUI Logo")
44
use(xlink:href="assets/brand/coreui.svg#full")
5+
|
56
svg.sidebar-brand-narrow(width="46" height="46" alt="CoreUI Logo")
67
use(xlink:href="assets/brand/coreui.svg#signet")
7-
ul.sidebar-nav(data-coreui="navigation")
8+
ul.sidebar-nav(data-coreui="navigation" data-simplebar)
89
li.nav-item
9-
a.nav-link(href=ajax ? 'main.html' : 'index.html')
10+
a.nav-link(href='index.html')
1011
svg.nav-icon
1112
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-speedometer")
1213
| Dashboard

src/pug/views/404.pug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ block view
1212
span.input-group-text
1313
svg.icon
1414
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-magnifying-glass")
15+
|
1516
input#prependedInput.form-control(size='16', type='text', placeholder='What are you looking for?')
1617
button.btn.btn-info(type='button') Search

src/pug/views/500.pug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ block view
1212
span.input-group-text
1313
svg.icon
1414
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-magnifying-glass")
15+
|
1516
input#prependedInput.form-control(size='16', type='text', placeholder='What are you looking for?')
1617
button.btn.btn-info(type='button') Search

src/pug/views/base/cards.pug

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ block view
7676
.card(style='width: 18rem;')
7777
.card-body
7878
h5.card-title Card title
79-
h6.card-subtitle.mb-2.text-muted Card subtitle
79+
h6.card-subtitle.mb-2.text-medium-emphasis Card subtitle
8080
p.card-text
8181
| Some quick example text to build on the card title and make up the bulk of the card's content.
8282
a.card-link(href='#') Card link
@@ -196,7 +196,7 @@ block view
196196
h5.card-title Special title treatment
197197
p.card-text With supporting text below as a natural lead-in to additional content.
198198
a.btn.btn-primary(href='#') Go somewhere
199-
.card-footer.text-muted
199+
.card-footer.text-medium-emphasis
200200
| 2 days ago
201201

202202
.card.mb-4
@@ -331,15 +331,15 @@ block view
331331
p.card-text
332332
| This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
333333
p.card-text
334-
small.text-muted Last updated 3 mins ago
334+
small.text-medium-emphasis Last updated 3 mins ago
335335
.col-md-6
336336
.card
337337
.card-body
338338
h5.card-title Card title
339339
p.card-text
340340
| This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
341341
p.card-text
342-
small.text-muted Last updated 3 mins ago
342+
small.text-medium-emphasis Last updated 3 mins ago
343343
img.card-img-bottom(src='assets/img/full.jpg' alt='')
344344
.card.mb-4
345345
.card-header
@@ -380,7 +380,7 @@ block view
380380
p.card-text
381381
| This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
382382
p.card-text
383-
small.text-muted Last updated 3 mins ago
383+
small.text-medium-emphasis Last updated 3 mins ago
384384
.card.mb-4
385385
.card-header
386386
strong Card
@@ -637,22 +637,22 @@ block view
637637
p.card-text
638638
| This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
639639
p.card-text
640-
small.text-muted Last updated 3 mins ago
640+
small.text-medium-emphasis Last updated 3 mins ago
641641
.card
642642
img.card-img-top(src='assets/img/full.jpg' alt='')
643643
.card-body
644644
h5.card-title Card title
645645
p.card-text This card has supporting text below as a natural lead-in to additional content.
646646
p.card-text
647-
small.text-muted Last updated 3 mins ago
647+
small.text-medium-emphasis Last updated 3 mins ago
648648
.card
649649
img.card-img-top(src='assets/img/full.jpg' alt='')
650650
.card-body
651651
h5.card-title Card title
652652
p.card-text
653653
| This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
654654
p.card-text
655-
small.text-muted Last updated 3 mins ago
655+
small.text-medium-emphasis Last updated 3 mins ago
656656
p.text-medium-emphasis.small When using card groups with footers, their content will automatically line up.
657657
+example()
658658
.card-group
@@ -663,22 +663,22 @@ block view
663663
p.card-text
664664
| This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
665665
.card-footer
666-
small.text-muted Last updated 3 mins ago
666+
small.text-medium-emphasis Last updated 3 mins ago
667667
.card
668668
img.card-img-top(src='assets/img/full.jpg' alt='')
669669
.card-body
670670
h5.card-title Card title
671671
p.card-text This card has supporting text below as a natural lead-in to additional content.
672672
.card-footer
673-
small.text-muted Last updated 3 mins ago
673+
small.text-medium-emphasis Last updated 3 mins ago
674674
.card
675675
img.card-img-top(src='assets/img/full.jpg' alt='')
676676
.card-body
677677
h5.card-title Card title
678678
p.card-text
679679
| This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
680680
.card-footer
681-
small.text-muted Last updated 3 mins ago
681+
small.text-medium-emphasis Last updated 3 mins ago
682682
.card.mb-4
683683
.card-header
684684
strong Card
@@ -804,15 +804,15 @@ block view
804804
p.card-text
805805
| This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
806806
.card-footer
807-
small.text-muted Last updated 3 mins ago
807+
small.text-medium-emphasis Last updated 3 mins ago
808808
.col
809809
.card.h-100
810810
img.card-img-top(src='assets/img/full.jpg' alt='')
811811
.card-body
812812
h5.card-title Card title
813813
p.card-text This card has supporting text below as a natural lead-in to additional content.
814814
.card-footer
815-
small.text-muted Last updated 3 mins ago
815+
small.text-medium-emphasis Last updated 3 mins ago
816816
.col
817817
.card.h-100
818818
img.card-img-top(src='assets/img/full.jpg' alt='')
@@ -821,4 +821,4 @@ block view
821821
p.card-text
822822
| This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
823823
.card-footer
824-
small.text-muted Last updated 3 mins ago
824+
small.text-medium-emphasis Last updated 3 mins ago

src/pug/views/base/navs.pug

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ block view
201201
| as only
202202
code .nav-link
203203
| is required for styling
204-
code <a>
204+
code
205+
= '<a>'
205206
| elements.
206207
+example()
207208
nav.nav.nav-pills.nav-fill

0 commit comments

Comments
 (0)