Skip to content

Instantly share code, notes, and snippets.

@jocafi
Created November 1, 2019 15:42
Show Gist options
  • Save jocafi/6fd90154ff17d7c72967f65c78c4ba88 to your computer and use it in GitHub Desktop.
Save jocafi/6fd90154ff17d7c72967f65c78c4ba88 to your computer and use it in GitHub Desktop.
Header using Bootstrap 4.0
<!-- More examples are here https://www.codeply.com/go/qhaBrcWp3v -->
<nav class="navbar navbar-expand-lg navbar-light bg-light justify-content-center">
<div class="d-flex mr-auto">
<a class="navbar-brand logo-font p-0">TEST SYSTEM</a><span class="app-version text-secondary">1.0.0</span>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse w-100" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown link
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
<a class="navbar-brand admin-logo justify-content-end ml-3" href="https://www.google.de" target="_blank">
<img src="assets/images/system_logo.png" class="d-inline-block align-top header-logo" alt="system_logo">
</a>
</nav>
@import "../../../../styles/fonts";
@import '~bootstrap/scss/functions';
@import '~bootstrap/scss/variables';
@import '~bootstrap/scss/mixins';
.logo-font {
font-family: $minalisFont;
font-size: 28px;
color: black;
text-decoration: none;
}
.header-logo {
height: 40px;
}
.app-version {
vertical-align: sub;
font-size: x-small;
}
.admin-logo {
display: none;
}
@include media-breakpoint-up(xl) {
.admin-logo {
display: block;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment