Refactor bootstrap style

This commit is contained in:
Manuel Thalmann 2022-03-01 15:05:12 +00:00
parent 397d401d13
commit 983ce40397

View file

@ -11,47 +11,49 @@
</head>
<body class="d-flex flex-column h-100">
<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">
<div class="container-fluid">
<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="visually-hidden"> (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="visually-hidden"> (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="visually-hidden"> (current)</span><% end_if %>
</a>
</li>
<% end_if %>
<% end_loop %>
</ul>
</div>
<% end_if %>
</li>
<% end_if %>
<% end_loop %>
</ul>
</div>
<% end_if %>
</div>
</nav>
<main role="main" class="col-11 flex-shrink-0" style="padding-top: 4.5rem">
<main role="main" class="container-fluid col-11 flex-shrink-0" style="padding-top: 4.5rem">
$Content
$Form
</main>