Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lingxz/er.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLingyi Hu <lingyihuu@gmail.com>2018-06-02 17:17:10 +0300
committerLingyi Hu <lingyihuu@gmail.com>2018-06-02 17:17:10 +0300
commit99112419630a25529f7099b16a4c946e4ea48b91 (patch)
treeaaa5d5b014fc37a3569beb914ffd8833ec95a638
parent5454e36d86a45f0c7b0c57992783dea2b2a132d2 (diff)
fix a bug in the menus navbar
-rw-r--r--layouts/partials/nav.html7
1 files changed, 3 insertions, 4 deletions
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index c845d3d..4b9e778 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -1,11 +1,10 @@
-
-<nav class="{{ with .Site.Menus.main }}{{ if lt (len .Site.Menus.main) 3 }} flex {{ else }} flex-ns{{ end }}{{ end }} justify-between border-box pa3 pl3-l pr2-l mt1 mt0-ns" id="navbar">
+<nav class="{{ with .Site.Menus.main }}{{ if lt (len .) 3 }} flex {{ else }} flex-ns{{ end }}{{ end }} justify-between border-box pa3 pl3-l pr2-l mt1 mt0-ns" id="navbar">
<div class="flex">
<a class="f4 fw6 ttu no-underline dim bg-main-color pv1 ph2 br2" id="site-title" href='{{ "" | relURL }}' title="Home">{{ .Site.Title }}</a>
</div>
{{ with .Site.Menus.main }}
- <div class="{{ if lt (len .Site.Menus.main) 3 }} flex-grow {{ else }} flex-ns mt2 mt0-ns{{ end }} pv1">
- {{ range .Site.Menus.main }}
+ <div class="{{ if lt (len . ) 3 }} flex-grow {{ else }} flex-ns mt2 mt0-ns{{ end }} pv1">
+ {{ range . }}
<a class="link dim dark-gray f6 dib mr2 mr3-l ttu tracked" href='{{.URL}}' title="{{ .Name }}">{{ .Name }}</a>
{{ end }}
</div>