hugo-djem-so

Hugo theme for my blog

git clone git://git.shimmy1996.com/hugo-djem-so.git
commit 5682d7682a0464658f8795e287e86608d2ada9a9
parent 01478b70877edec2ab7d3684899a3bd5077e9a3d
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sat, 30 Nov 2019 09:25:20 -0500

Adjust how menu space are inserted

Diffstat:
MREADME.org | 4++--
Mlayouts/partials/nav.html | 9++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/README.org b/README.org
@@ -15,12 +15,12 @@ What is retained though is support for multilingual page contents. The result is
     31 ./layouts/partials/css/style.css
      1 ./layouts/partials/footer.html
      0 ./layouts/partials/head_custom.html
-    17 ./layouts/partials/nav.html
+    16 ./layouts/partials/nav.html
      7 ./layouts/partials/head.html
      4 ./layouts/_default/single.html
     14 ./layouts/_default/list.html
     11 ./layouts/_default/baseof.html
-    91 total
+    90 total
 #+END_EXAMPLE
 
 ** Customization
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
@@ -1,12 +1,11 @@
 <nav>
-  <a href="{{ .Site.Home.Permalink | relURL }}"><b>{{ .Site.Title }}</b></a>&nbsp;|&nbsp;
-  {{- range $i, $menu := .Site.Menus.main -}}
-  {{- if (ge $i 1) -}}&nbsp;|&nbsp;{{- end -}}
-  <a href="{{ $menu.URL | relURL }}">{{ $menu.Name }}</a>
+  <a href="{{ .Site.Home.Permalink | relURL }}"><b>{{ .Site.Title }}</b></a>
+  {{- range .Site.Menus.main -}}
+  &nbsp;|&nbsp;<a href="{{ .URL | relURL }}">{{ .Name }}</a>
   {{- end -}}
   {{- if .IsTranslated -}}
   <span style="float:right;">
-    &nbsp;&#91;&nbsp;
+    &#91;&nbsp;
     {{- range $i, $page := .Translations -}}
     {{- if (ge $i 1) }}&nbsp;|&nbsp;{{ end -}}
     <a href="{{ $page.Permalink | relURL }}">{{ $page.Language.LanguageName }}</a>