Skip to content

Commit ed99a1f

Browse files
committed
refactor: update breadcrumbs
1 parent b9e9bd2 commit ed99a1f

Some content is hidden

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

74 files changed

+468
-293
lines changed

src/pug/_mixins/breadcrumb.pug

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
mixin breadcrumb(items, last)
1+
mixin breadcrumb(items)
22
nav(aria-label="breadcrumb")
33
ol.breadcrumb.my-0
4-
each item in items
5-
li.breadcrumb-item
6-
// if breadcrumb is single
7-
if (items.length === 1)
8-
span= item
9-
else
10-
a(href="#")= item
4+
each item, index in items
5+
- var href = item.href
6+
- var label = item.label
117

12-
if last
13-
li.breadcrumb-item.active
14-
span= last
15-
else
8+
li.breadcrumb-item(class=(index === items.length - 1 ? 'active' : false))
9+
if (href)
10+
a(href=(href ? href : '#'))= label ? label : item
11+
else
12+
span= label ? label : item

src/pug/views/base/accordion.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ block canonical
44
link(rel='canonical' href='https://coreui.io/docs/components/accordion/')
55

66
block breadcrumb
7-
+breadcrumb(['Home', 'Components', 'Base'], 'Accordion')
7+
+breadcrumb(
8+
[
9+
{ href: '#', label: 'Home'},
10+
{ label: 'Components'},
11+
{ label: 'Base'},
12+
'Accordion'
13+
],
14+
)
815

916
block view
1017
.row

src/pug/views/base/breadcrumb.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ block canonical
44
link(rel='canonical' href='https://coreui.io/docs/components/breadcrumb/')
55

66
block breadcrumb
7-
+breadcrumb(['Home', 'Components', 'Base'], 'Breadcrumb')
7+
+breadcrumb(
8+
[
9+
{ href: '#', label: 'Home'},
10+
{ label: 'Components'},
11+
{ label: 'Base'},
12+
'Breadcrumb'
13+
]
14+
)
815

916
block view
1017
.row

src/pug/views/base/cards.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ block canonical
44
link(rel='canonical' href='https://coreui.io/docs/components/card/')
55

66
block breadcrumb
7-
+breadcrumb(['Home', 'Components', 'Base'], 'Cards')
7+
+breadcrumb(
8+
[
9+
{ href: '#', label: 'Home'},
10+
{ label: 'Components'},
11+
{ label: 'Base'},
12+
'Cards'
13+
],
14+
)
815

916
block view
1017
.card.mb-4

src/pug/views/base/carousel.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ block canonical
44
link(rel='canonical' href='https://coreui.io/docs/components/carousel/')
55

66
block breadcrumb
7-
+breadcrumb(['Home', 'Components', 'Base'], 'Carousel')
7+
+breadcrumb(
8+
[
9+
{ href: '#', label: 'Home'},
10+
{ label: 'Components'},
11+
{ label: 'Base'},
12+
'Carousel'
13+
],
14+
)
815

916
block view
1017
.card.mb-4

src/pug/views/base/collapse.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ block canonical
44
link(rel='canonical' href='https://coreui.io/docs/components/collapse/')
55

66
block breadcrumb
7-
+breadcrumb(['Home', 'Components', 'Base'], 'Collapse')
7+
+breadcrumb(
8+
[
9+
{ href: '#', label: 'Home'},
10+
{ label: 'Components'},
11+
{ label: 'Base'},
12+
'Collapse'
13+
]
14+
)
815

916
block view
1017
.card.mb-4

src/pug/views/base/list-group.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ block canonical
44
link(rel='canonical' href='https://coreui.io/docs/components/list-group/')
55

66
block breadcrumb
7-
+breadcrumb(['Home', 'Components', 'Base'], 'List group')
7+
+breadcrumb(
8+
[
9+
{ href: '#', label: 'Home'},
10+
{ label: 'Components'},
11+
{ label: 'Base'},
12+
'List group'
13+
],
14+
)
815

916
block view
1017
.row

src/pug/views/base/navs-tabs.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ block canonical
44
link(rel='canonical' href='https://coreui.io/docs/components/navs-tabs/')
55

66
block breadcrumb
7-
+breadcrumb(['Home', 'Components', 'Base'], 'Navs')
7+
+breadcrumb(
8+
[
9+
{ href: '#', label: 'Home'},
10+
{ label: 'Components'},
11+
{ label: 'Base'},
12+
'Navs & Tabs'
13+
],
14+
)
815

916
block view
1017
.row

src/pug/views/base/pagination.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ block canonical
44
link(rel='canonical' href='https://coreui.io/docs/components/pagination/')
55

66
block breadcrumb
7-
+breadcrumb(['Home', 'Components', 'Base'], 'Pagination')
7+
+breadcrumb(
8+
[
9+
{ href: '#', label: 'Home'},
10+
{ label: 'Components'},
11+
{ label: 'Base'},
12+
'Pagination'
13+
],
14+
)
815

916
block view
1017
.row

src/pug/views/base/placeholders.pug

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ block canonical
44
link(rel='canonical' href='https://coreui.io/docs/components/placeholders/')
55

66
block breadcrumb
7-
+breadcrumb(['Home', 'Components', 'Base'], 'Placeholders')
7+
+breadcrumb(
8+
[
9+
{ href: '#', label: 'Home'},
10+
{ label: 'Components'},
11+
{ label: 'Base'},
12+
'Placeholders'
13+
],
14+
)
815

916
block view
1017
.row

0 commit comments

Comments
 (0)