Update layouts from slick.
This commit is contained in:
parent
98869cc875
commit
1a48905b01
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Site.LanguageCode | default "en" }}">
|
<html lang="{{ default "en" .Site.LanguageCode }}">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>{{ if and (.Title) (not (eq .Title .Site.Title)) }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
<title>{{ if and (.Title) (not (eq .Title .Site.Title)) }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
||||||
|
@ -10,13 +10,26 @@
|
||||||
{{ if .Site.Params.schema }}{{ template "_internal/schema.html" . }}{{ end -}}
|
{{ if .Site.Params.schema }}{{ template "_internal/schema.html" . }}{{ end -}}
|
||||||
{{ if .Site.Params.twitter_cards }}{{ template "_internal/twitter_cards.html" . }}{{ end -}}
|
{{ if .Site.Params.twitter_cards }}{{ template "_internal/twitter_cards.html" . }}{{ end -}}
|
||||||
{{ .Hugo.Generator }}
|
{{ .Hugo.Generator }}
|
||||||
{{- with .Site.RSSLink }}
|
{{- with .Site.Home.OutputFormats.Get "RSS" }}
|
||||||
<link href="{{ . }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }} Feed" />
|
{{- $rssLink := .RelPermalink }}
|
||||||
|
<link href="{{ $rssLink }}" rel="{{ .Rel }}" type="application/rss+xml" title="{{ $.Site.Title }} Feed" />
|
||||||
|
{{- with $.Page.OutputFormats.Get "RSS" }}
|
||||||
|
{{- if ne $rssLink .RelPermalink }}
|
||||||
|
<link href="{{ .RelPermalink }}" rel="{{ .Rel }}" type="application/rss+xml" title="{{ $.Site.Title }} {{ $.Title }} Feed" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $favicon := .Site.Params.favicon | default "favicon.ico" }}
|
{{- end }}
|
||||||
{{- $favtype := cond (eq (path.Ext $favicon) ".png") "image/png" "image/x-icon" }}
|
{{- end }}
|
||||||
<link rel="shortcut icon" href="{{ .Site.BaseURL }}{{ $favicon }}" type="{{ $favtype }}" />
|
{{- with .Site.Params.favicon | default "favicon.ico" }}
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}assets/nocolor.css" />
|
{{- if resources.Get . }}
|
||||||
|
{{- $favicon := resources.Get . | resources.Fingerprint }}
|
||||||
|
<link rel="shortcut icon" href="{{ $favicon.RelPermalink }}" type="{{ $favicon.MediaType }}" />
|
||||||
|
{{- else if fileExists (path.Join "static" .) }}
|
||||||
|
{{- $favtype := cond (eq (path.Ext .) ".png") "image/png" "image/x-icon" }}
|
||||||
|
<link rel="shortcut icon" href="{{ $.Site.BaseURL }}{{ . }}" type="{{ $favtype }}" />
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $style := resources.Get "nocolor.css" }}
|
||||||
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
|
||||||
{{- with .Site.Params.css }}
|
{{- with .Site.Params.css }}
|
||||||
{{- if resources.Get . }}
|
{{- if resources.Get . }}
|
||||||
{{- $styleCustom := resources.Get . | resources.Fingerprint }}
|
{{- $styleCustom := resources.Get . | resources.Fingerprint }}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<li>
|
<li>
|
||||||
<div class="post-title">
|
<div class="post-title">
|
||||||
{{- if .Draft }}DRAFT: {{ end }}
|
{{- if .Draft }}DRAFT: {{ end }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
</div>
|
</div>
|
||||||
{{ partial "post_meta.html" . }}
|
{{ partial "post_meta.html" . }}
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||||
<generator>Hugo {{ .Hugo.Version }} -- gohugo.io</generator>
|
<generator>Hugo {{ hugo.Version }} -- gohugo.io</generator>
|
||||||
{{- with .Site.LanguageCode }}
|
{{- with .Site.LanguageCode }}
|
||||||
<language>{{ . }}</language>
|
<language>{{ . }}</language>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
{{- with .OutputFormats.Get "RSS" }}
|
{{- with .OutputFormats.Get "RSS" }}
|
||||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ range $pages }}
|
{{- range $pages }}
|
||||||
<item>
|
<item>
|
||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
|
@ -35,8 +35,8 @@
|
||||||
{{- with .Site.Author.email }}
|
{{- with .Site.Author.email }}
|
||||||
<author>{{ . }}{{ with $.Site.Author.name }} ({{ . }}){{ end }}</author>
|
<author>{{ . }}{{ with $.Site.Author.name }} ({{ . }}){{ end }}</author>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<guid>{{ .Permalink }}</guid>
|
<guid isPermaLink="true">{{ .Permalink }}</guid>
|
||||||
<description>{{- .Content | html -}}</description>
|
<description>{{ .Content | html }}</description>
|
||||||
</item>
|
</item>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</channel>
|
</channel>
|
||||||
|
|
|
@ -2,12 +2,11 @@
|
||||||
<div>
|
<div>
|
||||||
<p>{{ .Title }}:</p>
|
<p>{{ .Title }}:</p>
|
||||||
<ul>
|
<ul>
|
||||||
{{- $type := .Type }}
|
{{- range .Data.Terms.ByCount }}
|
||||||
{{- range $.Data.Terms.ByCount }}
|
{{ $count := .Count }}
|
||||||
{{- $count := .Count }}
|
{{- with $.GetPage (lower .Name) }}
|
||||||
{{- with $.Site.GetPage (lower (printf "/%s/%s" $type (urlize .Name))) }}
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .Permalink }}">{{ .Name }}</a>
|
<a href="{{ .RelPermalink }}"{{ if .Title }} title="{{ .Title }}"{{ end }}>{{ .Name }}</a>
|
||||||
<span>({{ $count }})</span>
|
<span>({{ $count }})</span>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
{{- define "main" }}
|
{{- define "main" }}
|
||||||
{{ $showfull := cond (isset $.Site.Params "showfullcontent") $.Site.Params.showfullcontent false }}
|
{{- $showfull := default false $.Site.Params.showFullContent }}
|
||||||
{{- range $idx, $_ := .Paginator.Pages }}
|
{{- $pagepool := where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
|
||||||
<p {{ if and $showfull $idx }}class="post-divider"{{ end }}>
|
{{- range $idx, $_ := (.Paginate $pagepool).Pages }}
|
||||||
|
<div{{ if and $showfull $idx }} class="post-divider"{{ end }}>
|
||||||
<div>
|
<div>
|
||||||
<h2 class="post-title">
|
<h2 class="post-title">
|
||||||
{{ if .Draft }}DRAFT: {{ end }}
|
{{ if .Draft }}DRAFT: {{ end }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
</h2>
|
</h2>
|
||||||
{{ partial "post_meta.html" . }}
|
{{ partial "post_meta.html" . }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ cond $showfull .Content .Summary }}
|
{{ cond $showfull .Content .Summary }}
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -10,16 +10,16 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Site.RSSLink }}
|
{{- with .Site.Home.OutputFormats.Get "RSS" }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ . }}">RSS</a>
|
<a href="{{ .RelPermalink }}">RSS</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{- with .Site.Copyright }}
|
{{- with .Site.Copyright }}
|
||||||
<div class="copyright">
|
<div class="copyright">
|
||||||
© {{ now.Format "2006" }} — {{ . }}
|
{{ . }}
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,20 +1,35 @@
|
||||||
|
{{- $showdate := default (default true $.Site.Params.showMetaDates) .Params.showmetadates }}
|
||||||
|
{{- $showlink := default (default true $.Site.Params.showMetaLinks) .Params.showmetalinks }}
|
||||||
|
{{- if or $showdate $showlink }}
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
|
{{- if $showdate }}
|
||||||
|
<span>Date:</span>
|
||||||
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||||
{{- .Date.Format (cond (isset $.Site.Params "datefmt") $.Site.Params.datefmt "01-02-2006") -}}
|
{{- .Date.Format (default "01-02-2006" .Site.Params.dateFmt) -}}
|
||||||
</time>;
|
</time>;
|
||||||
|
{{- if ne .Date .Lastmod }}
|
||||||
|
<span>Last modified:</span> [
|
||||||
|
<time datetime="{{- .Lastmod.Format "2006-01-02T15:04:05Z07:00" -}}">
|
||||||
|
{{ .Lastmod.Format (default "01-02-2006" .Site.Params.dateFmt) }}
|
||||||
|
</time>;
|
||||||
|
{{- end }} <!-- if ne .Date .Lastmod -->
|
||||||
|
{{- end }} <!-- if $showdate -->
|
||||||
|
|
||||||
{{- range $taxo := (slice "Categories" "Series" "Tags") }}
|
{{- if $showlink }}
|
||||||
{{- $elems := $.Param $taxo }}
|
{{- $fallback := slice (dict "Identifier" "Categories") (dict "Identifier" "Series") (dict "Identifier" "Tags") }}
|
||||||
{{- if $elems }}
|
{{- range default $fallback .Site.Menus.meta }}
|
||||||
<span class="{{ (lower $taxo) }}">
|
{{- $taxo := $.Param .Identifier }}
|
||||||
{{ $taxo }}: [
|
{{- if $taxo }}
|
||||||
{{- range $name := $elems }}
|
{{ $name := default .Identifier .Name }}
|
||||||
{{- with $.Site.GetPage (lower (printf "/%s/%s" $taxo (urlize $name))) }}
|
{{ $link := default .Identifier .URL }}
|
||||||
<a href="{{ .Permalink }}">{{ $name }}</a>
|
<span{{ if .Title }} title="{{ .Title }}"{{ end }}>{{ $name }}:</span> [
|
||||||
{{- end }}
|
{{- range $taxo }}
|
||||||
{{- end }}
|
{{- $perma := lower (path.Join $link (urlize .)) }}
|
||||||
|
<a href="{{ $perma | relURL }}">{{ . }}</a>
|
||||||
|
{{- end }} <!-- range $taxo -->
|
||||||
]
|
]
|
||||||
</span>
|
{{- end }} <!-- if $taxo -->
|
||||||
{{- end }}
|
{{- end }} <!-- range default $fallback .Site.Menus.meta -->
|
||||||
{{- end }}
|
{{- end }} <!-- - if $showlink -->
|
||||||
</div>
|
</div>
|
||||||
|
{{- end }} <!-- if or $showdate $showlink -->
|
||||||
|
|
Loading…
Reference in New Issue