Commit ad529dde authored by Julien Schmidt's avatar Julien Schmidt
Browse files

add navigation

parent 6315c8a1
......@@ -7,6 +7,7 @@ enableRobotsTXT = true
disableHugoGeneratorInject = true
disableKinds = ["RSS","taxonomy","taxonomyTerm"]
enableGitInfo = false
SectionPagesMenu = "main"
[params]
gitEditBaseUrl = "https://gitlab.stusta.de/stustanet/stustanet-website/edit/master/content/"
......@@ -17,7 +18,31 @@ weight = 1
languageCode = "de-DE"
languageName = "Deutsch"
[[Languages.de.menu.main]]
weight = 1
name = "Home"
identifier = "home"
url = "/de/"
[[Languages.de.menu.main]]
weight = 2
name = "Verein"
identifier = "about"
url = "/de/about/"
[Languages.en]
weight = 2
languageCode = "en-US"
languageName = "English"
[[Languages.en.menu.main]]
weight = 1
name = "Home"
identifier = "home"
url = "/en/"
[[Languages.en.menu.main]]
weight = 2
name = "About Us"
identifier = "about"
url = "/en/about/"
......@@ -22,14 +22,22 @@
{{- end }}
</head>
<body>
<nav id="top-bar">
<div class="container">
<div class="logo">
<a href="/" title="To Homepage"><img src="/logo.png" alt="StuStaNet" /></a>
</div>
<ul class="menu">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li><a class="menu-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</div>
</nav>
<main aria-role="main">
<header>
<nav>
<div class="container">
<a href="/" title="To Homepage"><img src="/logo.png" alt="StuStaNet" class="logo" /></a>
</div>
</nav>
<h1>{{.Title}}</h1>
{{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
......
......@@ -20,7 +20,7 @@ body {
color: #4B4B4B;
}
nav {
#top-bar {
background: #fff;
width: 100%;
height: 54px;
......@@ -31,12 +31,36 @@ nav {
z-index: 1;
}
nav a img.logo {
#top-bar div.logo {
display: inline-block;
}
#top-bar .logo a img {
height: 34px;
width: auto;
margin: 10px 10px 10px -5px;
}
ul.menu {
list-style-type: none;
margin: 0;
padding: 0;
}
ul.menu li {
display: inline-block;
}
ul.menu li a {
display: inline-block;
padding: 15px 5px;
}
#top-bar .menu {
float: right;
}
.lang-dropdown {
color: #EDEDED;
cursor: default;
......@@ -257,6 +281,7 @@ footer {
footer .editPage {
float: left;
padding: 15px;
padding-left: 0px;
margin-right: -100px;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment