trying to make header work
This commit is contained in:
parent
45a6b0967c
commit
851c53b5e2
@ -1 +1,7 @@
|
|||||||
<h1>Test</h1>
|
{{ define "main" }}
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h2 class="display-4 text-center">Main body goes here</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
24
layouts/partials/footer.html
Normal file
24
layouts/partials/footer.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<footer class="footer fixed-bottom bg-dark">
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
|
||||||
|
<p class="col-md-4 mb-0 text-body-secondary">© {{ now.Year }} University of Stuttgart</p>
|
||||||
|
|
||||||
|
<a href="/" class="col-md-4 d-flex align-items-center justify-content-center mb-3 mb-md-0 me-md-auto link-body-emphasis text-decoration-none">
|
||||||
|
<svg class="bi me-2" width="40" height="32"><use xlink:href="#bootstrap"/></svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ul class="nav col-md-4 justify-content-end">
|
||||||
|
<li class="nav-item"><a href="#" class="nav-link px-2 text-body-secondary">Protection of Privacy</a></li>
|
||||||
|
<li class="nav-item"><a href="#" class="nav-link px-2 text-body-secondary">Imprint</a></li>
|
||||||
|
</ul>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- JavaScript and dependencies -->
|
||||||
|
|
||||||
|
{{ $bootstrap := resources.Get "js/bootstrap.bundle.min.js" }} {{ $js := slice
|
||||||
|
$bootstrap | resources.Concat "js/bundle.js" | resources.Minify }}
|
||||||
|
|
||||||
|
<script src="{{$js.RelPermalink}}" defer></script>
|
||||||
|
</footer>
|
@ -1 +1 @@
|
|||||||
<p>Copyright {{ now.Year }}. All rights reserved.</p>
|
<p>© My Dummy Website</p>
|
||||||
|
@ -1,2 +1 @@
|
|||||||
<h1>{{ site.Title }}</h1>
|
|
||||||
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}
|
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}
|
||||||
|
@ -11,10 +11,22 @@ Renders a menu for the given menu ID.
|
|||||||
{{- $menuID := .menuID }}
|
{{- $menuID := .menuID }}
|
||||||
|
|
||||||
{{- with index site.Menus $menuID }}
|
{{- with index site.Menus $menuID }}
|
||||||
<nav>
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4">
|
||||||
<ul>
|
<div class="container-fluid">
|
||||||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
<a class="navbar-brand" href="#">Here be logo</a>
|
||||||
</ul>
|
<button
|
||||||
|
class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#navbarCollapse" aria-controls="navbarCollapse"
|
||||||
|
aria-expanded="false" aria-label="Toggle navigation"
|
||||||
|
>
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||||
|
<ul class="navbar-nav- me-auto mb-2 mb-md-0">
|
||||||
|
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@ -27,8 +39,8 @@ Renders a menu for the given menu ID.
|
|||||||
{{- else if $page.HasMenuCurrent .Menu .}}
|
{{- else if $page.HasMenuCurrent .Menu .}}
|
||||||
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
|
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<li>
|
<li class="nav-item">
|
||||||
<a
|
<a class="nav-link" aria-current="page"
|
||||||
{{- range $k, $v := $attrs }}
|
{{- range $k, $v := $attrs }}
|
||||||
{{- with $v }}
|
{{- with $v }}
|
||||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||||
|
@ -6,8 +6,3 @@ description = 'Theme description'
|
|||||||
# If the theme has a single author
|
# If the theme has a single author
|
||||||
[author]
|
[author]
|
||||||
name = 'Robin Mueller'
|
name = 'Robin Mueller'
|
||||||
|
|
||||||
[module]
|
|
||||||
[[module.mounts]]
|
|
||||||
source = "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
|
|
||||||
target = "assets/js/bootstrap.bundle.min.js"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user