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> </head>
<body class="d-flex flex-column h-100"> <body class="d-flex flex-column h-100">
<nav class="navbar navbar-expand-md fixed-top navbar-dark bg-dark"> <nav class="navbar navbar-expand-md fixed-top navbar-dark bg-dark">
<a class="navbar-brand" href="$AbsoluteBaseURL"> <div class="container-fluid">
<div class="navbar-title">$SiteConfig.Title</div> <a class="navbar-brand" href="$AbsoluteBaseURL">
<div class="navbar-tagline">$SiteConfig.Tagline</div> <div class="navbar-title">$SiteConfig.Title</div>
</a> <div class="navbar-tagline">$SiteConfig.Tagline</div>
<% if $Menu(1) %> </a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainNav" aria-controls="mainNav" aria-expanded="false" aria-label="Toggle navigation"> <% if $Menu(1) %>
<span class="navbar-toggler-icon"></span> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainNav" aria-controls="mainNav" aria-expanded="false" aria-label="Toggle navigation">
</button> <span class="navbar-toggler-icon"></span>
<div class="collapse navbar-collapse" id="mainNav"> </button>
<ul class="navbar-nav"> <div class="collapse navbar-collapse" id="mainNav">
<% loop $Menu(1) %> <ul class="navbar-nav">
<% if $Children %> <% loop $Menu(1) %>
<li class="nav-item dropdown"> <% if $Children %>
<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"> <li class="nav-item dropdown">
$MenuTitle <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">
</a> $MenuTitle
<div class="dropdown-menu" aria-labelledby="mainNav_$URLSegment"> </a>
<a class="dropdown-item<% if $isCurrent %> active <% end_if %>" href="$Link"> <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 %> $MenuTitle<% if $isCurrent %><span class="visually-hidden"> (current)</span><% end_if %>
</a> </a>
<div class="dropdown-divider"></div> </li>
<% loop $Children %> <% end_if %>
<a class="dropdown-item<% if $isCurrent %> active<% end_if %>" href="$Link"> <% end_loop %>
$MenuTitle </ul>
</a> </div>
<% end_loop %> <% end_if %>
</div> </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 %>
</nav> </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 $Content
$Form $Form
</main> </main>