Skip to content

Commit

Permalink
style: do not wrap the breadcrumb on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jan 29, 2023
1 parent 36871bb commit 9960a38
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions assets/main/scss/_breadcrumb.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.hbs-breadcrumb {
.breadcrumb-item {
max-width: 240px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

@include media-breakpoint-down(sm) {
.breadcrumb-item:not(:last-child):not(:first-child) {
&::after {
content: '...';
}

a {
display: none;
}
}
}
}
1 change: 1 addition & 0 deletions assets/main/scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@import 'archives';
@import 'author';
@import 'blockquote';
@import 'breadcrumb';
@import 'card';
@import 'component';
@import 'code';
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/breadcrumb.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if and .Site.Params.breadcrumb (default true .Params.breadcrumb) -}}
<nav class="row card component" aria-label="breadcrumb">
<div class="card-body pb-0">
<ol class="breadcrumb">
<ol class="hbs-breadcrumb breadcrumb flex-nowrap">
{{- template "breadcrumbnav" (dict "p1" . "p2" . "titleCase" $.Site.Params.titleCase) -}}
</ol>
</div>
Expand Down

0 comments on commit 9960a38

Please sign in to comment.