cleanup and variablization
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
{{ if isset .Params "tags" }}
|
||||
{{ $tagsLen := len .Params.tags }}
|
||||
{{ if gt $tagsLen 0 }}
|
||||
{{- if isset .Params "tags" -}}
|
||||
{{- $tagsLen := len .Params.tags -}}
|
||||
{{- if gt $tagsLen 0 -}}
|
||||
<div class=taglist>
|
||||
See related:<br>
|
||||
{{ range $k, $v := .Params.tags }}
|
||||
{{ $url := printf "tags/%s" (. | urlize | lower) }}
|
||||
<a href="{{ $url | absURL }}">{{ . | title }}</a>
|
||||
{{ if lt $k (sub $tagsLen 1) }}·{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.relatedtext }}{{ . }}<br>{{ end }}
|
||||
{{- range $k, $v := .Params.tags -}}
|
||||
{{- $url := printf "tags/%s" (. | urlize | lower) -}}
|
||||
<a id="tag_{{ . }}" href="{{ $url | absURL }}">{{ . | title }}</a>
|
||||
{{- if lt $k (sub $tagsLen 1) }}·{{ end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</main>
|
||||
<footer><a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a></footer>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</main>
|
||||
<footer>
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a></br>
|
||||
<a href="/index.xml"><img src="/pix/rss.svg" style="max-height:.9em;display:inline" alt=""> Subscribe via RSS for Updates.</a></footer>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,16 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language }}">
|
||||
<head>
|
||||
<head>
|
||||
<title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel='stylesheet' type='text/css' href='/style.css'>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . ", " }}{{ end }}">
|
||||
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/rss.xml'>
|
||||
<link rel="canonical" href="{{ .Site.BaseURL }}">
|
||||
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
|
||||
{{ with .Site.Params.stylesheet }}<link rel='stylesheet' type='text/css' href='{{ . }}'>
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.favicon }}<link rel="icon" href="{{ . }}">
|
||||
{{ end -}}
|
||||
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
|
||||
</head>
|
||||
<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . ", " }}{{ end }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "nav.html" . }}
|
||||
<main>
|
||||
{{- partial "nav.html" . -}}
|
||||
<main>
|
||||
|
@@ -1,7 +1,10 @@
|
||||
{{- if .Site.Menus.main }}
|
||||
<nav>
|
||||
<ul>{{ $sec := .Page.Section }}{{ $file := .File.TranslationBaseName }}
|
||||
<ul>
|
||||
{{- $sec := .Page.Section }}{{ $file := .File.TranslationBaseName -}}
|
||||
{{ range.Site.Menus.main }}{{ $base := path.Base .URL }}
|
||||
<a {{ if or ( eq $sec $base ) ( eq $file $base ) ( and (eq $sec "") ( eq $file "_index") (eq $base "/") ) }}class="menuactive" {{ end }}href="{{ .URL }}"><li><span class=pre>{{ .Pre }}</span><span class=menuname>{{ .Name }}</span></li></a>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{- end }}
|
||||
|
Reference in New Issue
Block a user