Skip to content
Snippets Groups Projects
Commit 62f6a4ae authored by Antodias's avatar Antodias
Browse files

added active menu

parent b09ea9e8
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@
{{- end }}
{{- end }}
</head>
<body>
<body class="{{ .Params.Color | default "blue" }}">
<nav id="top-bar">
<div class="container">
<div class="logo">
......@@ -35,7 +35,9 @@
<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>
<li{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) (eq .URL $.URL) }} class="active"{{end}}>
<a class="menu-item" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
{{ $.Scratch.Set "nav-orientation" "" }}
......@@ -43,7 +45,6 @@
</div>
</nav>
<nav class="hamburger">
<input type="checkbox" />
......@@ -56,7 +57,9 @@
<ul>
{{ $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>
<li{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) (eq .URL $.URL)}} class="active"{{end}}>
<a class="menu-item" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
</li>
{{ end }}
<li class="fatty"></li>
{{ if .Site.IsMultiLingual }}
......@@ -81,7 +84,7 @@
</nav>
<article>
<header class="{{ .Params.Color | default "blue" }}">
<header>
<h1>{{ .Params.Header | default .Title }}</h1>
{{ with .Params.SubHeader }}
<span class="subtitle">{{.}}</span>
......
......@@ -177,6 +177,8 @@ ul.menu {
ul.menu li {
display: inline-block;
margin: 0;
padding: 0 15px;
}
ul.menu li a {
......@@ -184,6 +186,11 @@ ul.menu li a {
padding: 15px 5px;
}
.menu .active,
.hamburger .active {
background: rgba(94, 146, 189, 0.22);
}
.lang-dropdown {
cursor: default;
position: relative;
......@@ -339,29 +346,32 @@ header h1 {
text-shadow: 0px 0px 1px rgba(0,0,0,0.8);
}
.yellow {
.yellow header {
background-color: rgb(255, 232, 89);
box-shadow: 0 0 8px 0 rgba(255, 232, 89, 0.12);
}
.yellow h1 {
.yellow header h1 {
color: black;
text-shadow: none;
}
.red {
.red header {
background-color: rgb(226, 107, 68);
box-shadow: 0 0 8px 0 rgba(226, 107, 68, 0.12);
}
.red h1 { color: white; }
.green {
.red header h1 { color: white; }
.green header {
background-color: rgb(137, 187, 79);
box-shadow: 0 0 8px 0 rgba(137, 187, 79, 0.12);
}
.green h1 { color: white; }
.blue {
.green header h1 { color: white; }
.blue header {
background-color: rgb(94, 146, 189);
box-shadow: 0 0 8px 0 rgba(94, 146, 189, 0.12);
}
.blue h1 { color: white; }
.blue header h1 { color: white; }
h1,
h2,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment