Add a few style-changes

This commit is contained in:
Manuel Thalmann 2019-11-22 13:12:55 +00:00
parent 1543603447
commit 5bb5999cde
4 changed files with 83 additions and 29 deletions

View file

@ -5,42 +5,56 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<% base_tag %>
$MetaTags()
$MetaTags(false)
<title><% if $Title %>$Title <% end_if %>$SiteConfig.Title</title>
<% require themedCSS("mantra") %>
<% require themedJavascript("main") %>
</head>
<body class="d-flex flex-column h-100">
<% if $Menu(1) %>
<div class="col-1">
<nav>
<div class="active">
<a>
$Title
<nav class="navbar navbar-expand-md fixed-top navbar-dark bg-dark">
<a class="navbar-brand" href="$AbsoluteBaseURL">
<div class="navbar-title">$SiteConfig.Title</div>
<div class="navbar-tagline">$SiteConfig.Tagline</div>
</a>
<ul class="nav bd-sidenav">
<% if $Menu(1) %>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainNav" aria-controls="mainNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="mainNav">
<ul class="navbar-nav">
<% loop $Menu(1) %>
<li class="$LinkingMode">
<a href="$Link">
<% if $Children %>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle<% if $isCurrent || $isSection %> active <% end_if %>" href="#" id="mainNav_$URLSegment" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
$MenuTitle
</a>
<div class="dropdown-menu" aria-labelledby="mainNav_$URLSegment">
<a class="dropdown-item<% if $isCurrent %> active <% end_if %>" href="$Link">
$MenuTitle<% if $isCurrent %><span class="sr-only"> (current)</span><% end_if %>
</a>
<div class="dropdown-divider"></div>
<% loop $Children %>
<a class="dropdown-item<% if $isCurrent %> active <% end_if %>" href="$Link">
$MenuTitle
</a>
<% end_loop %>
</div>
</li>
<% else %>
<li class="nav-item<% if $isCurrent %> active<% end_if %>">
<a class="nav-link" href="$Link">
$MenuTitle<% if $isCurrent %><span class="sr-only"> (current)</span><% end_if %>
</a>
</li>
<% end_if %>
<% end_loop %>
</ul>
</div>
</nav>
</div>
<% end_if %>
<main role="main" class="col-11 flex-shrink-0">
<div class="container">
<% loop $Menu(1) %>
<li><a class="$LinkingMode" href="$Link" title="Go to the $Title page">$MenuTitle</a></li>
<% end_loop %>
<h1 class="display-4">
$MenuTitle
</h1>
</nav>
<main role="main" class="col-11 flex-shrink-0" style="padding-top: 4.5rem">
$Content
$Form
</div>
</main>
</body>
</html>

37
src/Theme/_nav.scss Normal file
View file

@ -0,0 +1,37 @@
.navbar {
.navbar-nav {
.nav-link {
position: relative;
&::before {
content: ' ';
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin-top: -($navbar-padding-x / 2);
margin-bottom: -($navbar-padding-x / 2);
}
}
.active > .nav-link, .nav-link.active {
&::before {
background: rgba(255, 255, 255, 0.1);
}
}
}
}
.navbar-brand {
.navbar-title {
@extend .d-inline-block;
}
.navbar-tagline {
@extend .text-muted;
@extend .d-none;
@extend .d-lg-inline-block;
font-size: 0.5em;
}
}

View file

@ -0,0 +1 @@
$tagline-font-size: $small-font-size / 2;

View file

@ -1 +1,3 @@
@import "~bootstrap/scss/bootstrap";
@import "variables";
@import "nav";