Add a few style-changes
This commit is contained in:
parent
1543603447
commit
5bb5999cde
|
@ -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
|
||||
</a>
|
||||
<ul class="nav bd-sidenav">
|
||||
<% loop $Menu(1) %>
|
||||
<li class="$LinkingMode">
|
||||
<a href="$Link">
|
||||
<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>
|
||||
<% 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) %>
|
||||
<% 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>
|
||||
<% 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>
|
||||
$Content
|
||||
$Form
|
||||
</div>
|
||||
<% 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>
|
||||
<% end_if %>
|
||||
</nav>
|
||||
<main role="main" class="col-11 flex-shrink-0" style="padding-top: 4.5rem">
|
||||
$Content
|
||||
$Form
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
37
src/Theme/_nav.scss
Normal file
37
src/Theme/_nav.scss
Normal 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;
|
||||
}
|
||||
}
|
1
src/Theme/_variables.scss
Normal file
1
src/Theme/_variables.scss
Normal file
|
@ -0,0 +1 @@
|
|||
$tagline-font-size: $small-font-size / 2;
|
|
@ -1 +1,3 @@
|
|||
@import "~bootstrap/scss/bootstrap";
|
||||
@import "variables";
|
||||
@import "nav";
|
||||
|
|
Loading…
Reference in a new issue