Skip to content

Commit cfe4642

Browse files
committed
refactor: update breadcrumbs
1 parent 5516b26 commit cfe4642

Some content is hidden

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

44 files changed

+172
-12
lines changed

src/pug/_layout/default.pug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
- var static = true
22
doctype html
33
include ../_partials/banner.pug
4+
include ../_mixins/breadcrumb.pug
45
include ../_mixins/callout.pug
6+
include ../_mixins/callout-custom.pug
57
include ../_mixins/example.pug
68

79
html(lang='en')

src/pug/_mixins/breadcrumb.pug

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Breadcrumb
2+
//- nav(aria-label="breadcrumb")
3+
//- ol.breadcrumb.my-0.ms-2
4+
//- li.breadcrumb-item Home
5+
//- li.breadcrumb-item
6+
//- a(href="#") Admin
7+
//- li.breadcrumb-item.active Dashboard
8+
9+
10+
mixin breadcrumb(items, last)
11+
nav(aria-label="breadcrumb")
12+
ol.breadcrumb.my-0.ms-2
13+
each item in items
14+
li.breadcrumb-item
15+
// if breadcrumb is single
16+
if (items.length === 1)
17+
span= item
18+
else
19+
a(href="#")= item
20+
21+
if last
22+
li.breadcrumb-item.active
23+
span= last
24+
else

src/pug/_mixins/callout-custom.pug

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mixin callout-custom
2+
.callout.callout-info.bg-white
3+
block

src/pug/_mixins/callout.pug

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ mixin callout(name, href)
33
| CoreUI #{name} has been created as an extension of Bootstrap #{name}. #{name} is delivered with some new features, variants, and unique design that matches CoreUI Design System requirements.
44
br
55
br
6-
| For more information please visit our official
6+
| For more information please visit our official
7+
|
78
a(href=href target="_blank") documentation
89
| .

src/pug/_partials/breadcrumb.pug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ nav(aria-label="breadcrumb")
55
li.breadcrumb-item
66
a(href="#") Admin
77
li.breadcrumb-item.active Dashboard
8+

src/pug/_partials/header.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@ header.header.header-sticky.mb-4
8484
| Logout
8585
.header-divider
8686
.container-fluid
87-
include ./../_partials/breadcrumb.pug
87+
block breadcrumb
8888

src/pug/views/base/accordion.pug

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ extends ../../_layout/default.pug
33
block canonical
44
link(rel='canonical' href='https://coreui.io/docs/4.0/components/accordion/')
55

6+
block breadcrumb
7+
+breadcrumb(['Home', 'Components', 'Base'], 'Accordion')
8+
69
block view
710
+callout('Accordion', 'https://coreui.io/docs/4.0/components/accordion/')
811
.row

src/pug/views/base/breadcrumb.pug

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ extends ../../_layout/default.pug
33
block canonical
44
link(rel='canonical' href='https://coreui.io/docs/4.0/components/breadcrumb/')
55

6+
block breadcrumb
7+
+breadcrumb(['Home', 'Components', 'Base'], 'Breadcrumb')
8+
69
block view
710
+callout('Breadcrumb', 'https://coreui.io/docs/4.0/components/breadcrumb/')
811
.row

src/pug/views/base/cards.pug

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ extends ../../_layout/default.pug
33
block canonical
44
link(rel='canonical' href='https://coreui.io/docs/4.0/components/card/')
55

6+
block breadcrumb
7+
+breadcrumb(['Home', 'Components', 'Base'], 'Cards')
8+
69
block view
710
+callout('Card', 'https://coreui.io/docs/4.0/components/card/')
811
.card.mb-4

src/pug/views/base/carousel.pug

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ extends ../../_layout/default.pug
33
block canonical
44
link(rel='canonical' href='https://coreui.io/docs/4.0/components/carousel/')
55

6+
block breadcrumb
7+
+breadcrumb(['Home', 'Components', 'Base'], 'Carousel')
8+
69
block view
710
+callout('Carousel', 'https://coreui.io/docs/4.0/components/carousel/')
811
.card.mb-4

0 commit comments

Comments
 (0)