Breadcrumbs nav. bar, general posts layout
Added back in article partials to base layouts.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<article class="list-item" itemscope itemtype="http://schema.org/Blog">
|
||||
<h2 class="headline" itemprop="headline"><a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} (Draft){{ end }}</a></h2>
|
||||
<h2 class="headline" itemprop="headline"><a href="{{ .RelPermalink }}#content">{{ .Title }}{{ if .Draft }} (Draft){{ end }}</a></h2>
|
||||
<div class="meta">
|
||||
{{ if not .Date.IsZero }}
|
||||
<span class="key">published on</span>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
{{ if not .Page.Date.IsZero }}
|
||||
<!-- <span class="key">published </span> -->
|
||||
<span class="val"><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
|
||||
<span class="val" id="content"><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.categories }}
|
||||
|
||||
@@ -1,8 +1,25 @@
|
||||
<div class="container clearfix nav-bar">
|
||||
[ <a href="{{ .Site.BaseURL }}">~</a> /
|
||||
<a href="{{ .Page.Permalink }}">{{ .Page.Dir }}</a>
|
||||
|
||||
]
|
||||
|
||||
{{ define "breadcrumbnav" }}
|
||||
{{ if .p1.Parent }}
|
||||
<!-- <p>{{ .p1 }} {{ .p2 }}</p> -->
|
||||
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
||||
{{ else if not .p1.IsHome }}
|
||||
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||
{{ end }}
|
||||
<a href="{{ .p1.RelPermalink }}">
|
||||
{{ if .p1.IsHome }}~{{ else }}
|
||||
{{- replace .p1.Title " " "-" | lower -}}
|
||||
{{ end }}</a>
|
||||
{{ if ne .p1 .p2 }}
|
||||
/
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
[
|
||||
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
||||
]
|
||||
|
||||
<span class="caret"># _</span>
|
||||
<div class="nav-bar-links">
|
||||
{{ range .Site.Menus.main }}
|
||||
|
||||
Reference in New Issue
Block a user