Permalink
Browse files

feat: add menu active

  • Loading branch information...
xianmin committed Nov 8, 2018
1 parent 588d5bf commit 007f95a52784b992e2c0432b2dc2712d8f08916e
@@ -8,6 +8,10 @@
padding-right: 15px;
font-family: $global-serif-font-family;
.active {
font-weight: 700;
}
.menu-item {
display: inline-block;
margin-left: 1em;
@@ -46,7 +50,7 @@
visibility: visible;
transition-delay: 0s; /* react immediately on hover */
}
// @include underline-from-center;
}
@@ -55,17 +55,17 @@ defaultContentLanguage = "en" # Default language to use (if you setup multiling
name = "Archives"
weight = 20
identifier = "archives"
url = "post/"
url = "/post/"
[[languages.en.menu.main]]
name = "Tags"
weight = 30
identifier = "tags"
url = "tags/"
url = "/tags/"
[[languages.en.menu.main]]
name = "Categories"
weight = 40
identifier = "categories"
url = "categories/"
url = "/categories/"
[[languages.en.menu.main]]
name = "external-link"
weight = 50
@@ -10,8 +10,9 @@
<nav class="site-navbar">
<ul id="menu" class="menu">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="menu-item">
<li class="menu-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}">
{{ if .HasChildren }}
<!-- drop down navigation MENU -->
<a class="menu-item-link menu-parent" href="{{ .URL | absLangURL | safeURL }}">{{ .Name }}</a>

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1 +1 @@
{"Target":"sass/jane.min.f64ace117d14efc3943239ebd780fcd68a86127f6c63367968f91b22694b2a60.css","MediaType":"text/css","Data":{"Integrity":"sha256-9krOEX0U78OUMjnr14D81oqGEn9sYzZ5aPkbImlLKmA="}}
{"Target":"sass/jane.min.f384a7fa4673433bc34e238c5074bb1303d90e5d5a29a2ffbaf61226ef213c29.css","MediaType":"text/css","Data":{"Integrity":"sha256-84Sn+kZzQzvDTiOMUHS7EwPZDl1aKaL/uvYSJu8hPCk="}}

0 comments on commit 007f95a

Please sign in to comment.