Skip to content

Commit a3362af

Browse files
committed
header top nav toggler
1 parent 5e8e7b0 commit a3362af

File tree

2 files changed

+15
-34
lines changed

2 files changed

+15
-34
lines changed

src/_includes/header.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{% assign user = site.data.users[40] %}
2-
<div class="header">
2+
<div class="header py-lg-4">
33
<div class="container">
44
<div class="d-flex">
5-
<a class="navbar-brand" href="{{ site.base }}/index.html">
6-
<img src="{{ site.base }}/demo/brand/tabler.svg" class="navbar-brand-img" alt="tabler.io">
5+
<a class="header-brand" href="{{ site.base }}/index.html">
6+
<img src="{{ site.base }}/demo/brand/tabler.svg" class="header-brand-img" alt="tabler logo">
77
</a>
8-
<div class="ml-auto d-flex order-lg-2">
8+
9+
<div class="d-flex order-lg-2 ml-auto">
910
<div class="nav-item d-none d-md-flex">
1011
<a href="{{ site.github_url }}" class="btn btn-sm btn-outline-primary" target="_blank">Source code</a>
1112
</div>
@@ -71,16 +72,17 @@
7172
</a>
7273
</div>
7374
</div>
74-
75-
<div class="nav-item d-flex d-md-none">
76-
<a href="#" class="nav-link icon"><i class="fe fe-menu"></i></a>
77-
</div>
7875
</div>
76+
77+
<a class="header-toggler d-lg-none" data-toggle="collapse" data-target="#headerMenuCollapse">
78+
<span class="header-toggler-icon"></span>
79+
zzz
80+
</a>
7981
</div>
8082
</div>
8183
</div>
8284

83-
<div class="header p-0">
85+
<div class="header collapse d-lg-flex p-0" id="headerMenuCollapse">
8486
<div class="container">
8587
<div class="row align-items-center">
8688
<div class="col-lg-3 ml-auto">

src/assets/scss/dashboard/_header.scss

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.header {
2-
padding-top: 1rem;
3-
padding-bottom: 1rem;
4-
//height: $header-height;
2+
padding-top: .75rem;
3+
padding-bottom: .75rem;
54
background: #fff;
65
border-bottom: 1px solid $border-color;
76

@@ -32,7 +31,7 @@
3231
border-radius: 50%;
3332
}
3433

35-
.navbar-brand {
34+
.header-brand {
3635
color: inherit;
3736
margin-right: 1rem;
3837
font-size: 1.25rem;
@@ -49,7 +48,7 @@
4948
}
5049
}
5150

52-
.navbar-brand-img {
51+
.header-brand-img {
5352
height: 2rem;
5453
line-height: 2rem;
5554
vertical-align: bottom;
@@ -65,26 +64,6 @@
6564
border-radius: 50%;
6665
}
6766

68-
.header-overlay {
69-
position: fixed;
70-
top: $header-height;
71-
right: 0;
72-
bottom: 0;
73-
left: 0;
74-
background: rgba(26,54,80,0.1);
75-
visibility: hidden;
76-
opacity: 0;
77-
z-index: $zindex-overlay;
78-
transition: .6s opacity, .6s visibility;
79-
backdrop-filter: blur(1px);
80-
81-
82-
.dropdown-menu.show + & {
83-
visibility: visible;
84-
opacity: 1;
85-
}
86-
}
87-
8867
//.header-nav {
8968
// background: #fff;
9069
// border-bottom: 1px solid $border-color;

0 commit comments

Comments
 (0)