diff options
author | Angelo Stavrow <angelo@fogcreek.com> | 2018-08-17 16:59:08 +0300 |
---|---|---|
committer | Angelo Stavrow <angelo@fogcreek.com> | 2018-08-17 16:59:08 +0300 |
commit | d1d3529dd3baae79d8ae61383871146481571409 (patch) | |
tree | 53c1bfcaef78bce87e530414c2544b31ec386a64 /layouts | |
parent | 443cc6d19257c583a19e21b7de7e9aaaae12c797 (diff) |
Change static pages to menu entries
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 4 | ||||
-rw-r--r-- | layouts/partials/pagenav.html | 34 |
2 files changed, 35 insertions, 3 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c921521..91f3901 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,8 +3,8 @@ <article class="h-entry"> <header> <h1 class="post-title p-name">{{ .Title }}</h1> - {{ if .Param "static" }} - {{ else }} + <!-- Don't show a timestamp on menu-type pages --> + {{ if not .Params.Menu }} <p class="post-date">Posted on <time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}"> {{ .PublishDate.Format "2 January, 2006 at 15:04 MST" }} diff --git a/layouts/partials/pagenav.html b/layouts/partials/pagenav.html index 4aeda1a..b332d49 100644 --- a/layouts/partials/pagenav.html +++ b/layouts/partials/pagenav.html @@ -1,5 +1,36 @@ <nav> <div id="page-nav"> + <!-- + Left-most entry is a link to the next-newest article, if we're + looking at posts, or a spacer if we're either on the home page or a + menu-content page. + --> + <div class="static-page-nav-spacer"> </div> + + <!-- Next, the menu of static content pages (e.g., about, now). --> + <div class="static-page-nav-item"> + <a alt="Home" href="{{ .Site.BaseURL }}">Home</a> + </div> + {{ range .Site.Menus.main }} + <div class="static-page-nav-item"> + <a href="{{ .URL }}"> + {{ .Pre }} + <span>{{ .Name }}</span> + </a> + </div> + {{ end }} + + <!-- + Right-most entry is a link to the next-oldest article if we're + looking at posts, or a spacer if we're either on the home page or a + menu-content page. + --> + <div class="static-page-nav-spacer"> </div> + </div> +</nav> + + +<!-- {{ if .Param "static" }} <div class="static-page-nav-spacer"> </div> <div class="static-page-nav-item"> @@ -58,4 +89,5 @@ {{ end }} {{ end }} </div> -</nav>
\ No newline at end of file +</nav> +-->
\ No newline at end of file |