Fix accessibility issues and re-format templates
This commit is contained in:
parent
04d9175af8
commit
5a0af3384d
@ -1,10 +1,10 @@
|
||||
{{ define "main" }}
|
||||
{{ if .Content }}
|
||||
{{ if .Content }}
|
||||
<div class="index-content {{ if .Params.framed -}}framed{{- end -}}">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
@ -17,13 +17,15 @@
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="post on-list">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ with .Params.Author }}<span class="post-author">::
|
||||
{{ . }}</span>{{ end }}
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author">::{{ . }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
@ -36,8 +38,8 @@
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="{{ . | absURL }}" class="post-cover" />
|
||||
{{ if .Params.Cover }}
|
||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" alt="{{ .Title | plainify | default " " }}" />
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
@ -61,5 +63,5 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -1,20 +1,22 @@
|
||||
{{ define "main" }}
|
||||
{{ with .Content }}
|
||||
{{ with .Content }}
|
||||
<div class="index-content">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
{{ range .Pages }}
|
||||
<div class="post on-list">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ with .Params.Author }}<span class="post-author">::
|
||||
{{ . }}</span>{{ end }}
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author">::{{ . }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
@ -27,8 +29,8 @@
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="{{ . | absURL }}" class="post-cover" />
|
||||
{{ if .Params.Cover }}
|
||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" alt="{{ .Title | plainify | default " " }}" />
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
@ -52,5 +54,5 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -23,8 +23,8 @@
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="{{ . | absURL }}" class="post-cover" />
|
||||
{{ if .Params.Cover }}
|
||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" alt="{{ .Title | plainify | default " " }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.Toc }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" />
|
||||
<meta name="robots" content="noodp" />
|
||||
|
Loading…
Reference in New Issue
Block a user