From 90ad50c7f5c30f45065798304cf7708a47ac9342 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 5 Aug 2019 09:34:47 -0400 Subject: [PATCH] Use normal nav on user pages when SimpleNav This shows About, Reader, Log out links on backend user pages when logged in. It also adds "New post" buttons on the backend pages and blogs. --- less/core.less | 25 +++++++++++++++++++++++++ templates/base.tmpl | 2 +- templates/collection.tmpl | 1 + templates/user/include/header.tmpl | 23 ++++++++++++++++++++--- 4 files changed, 47 insertions(+), 4 deletions(-) diff --git a/less/core.less b/less/core.less index 7e39f35..b1b8301 100644 --- a/less/core.less +++ b/less/core.less @@ -405,6 +405,31 @@ body { } } +nav#full-nav { + margin: 0; + + .left-side { + display: inline-block; + + a:first-child { + margin-left: 0; + } + } + + .right-side { + float: right; + } +} + +nav#full-nav a.simple-btn { + font-family: @sansFont; + border: 1px solid #ccc !important; + padding: .5rem 1rem; + margin: 0; + .rounded(.25em); + text-decoration: none; +} + .post-title { a { &:link { diff --git a/templates/base.tmpl b/templates/base.tmpl index 775dac9..c1f17ad 100644 --- a/templates/base.tmpl +++ b/templates/base.tmpl @@ -19,7 +19,7 @@ {{end}} diff --git a/templates/collection.tmpl b/templates/collection.tmpl index 18942a9..364ba15 100644 --- a/templates/collection.tmpl +++ b/templates/collection.tmpl @@ -48,6 +48,7 @@ {{else}}
  • {{.SiteName}}
  • {{end}} + {{if .SimpleNav}}
  • New Post
  • {{end}}
  • Customize
  • Stats

  • diff --git a/templates/user/include/header.tmpl b/templates/user/include/header.tmpl index 312d0b8..93020e2 100644 --- a/templates/user/include/header.tmpl +++ b/templates/user/include/header.tmpl @@ -38,7 +38,13 @@ {{else}} -

    {{.SiteName}}

    + {{ if .SimpleNav }} + {{end}} {{end}}