Merge pull request #372 from Seirdy/a11y-fixes

A11y fixes
This commit is contained in:
Radek Kozieł 2022-10-22 11:37:49 +02:00 committed by GitHub
commit 21cdda5eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 17 deletions

View File

@ -15,15 +15,15 @@
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
{{ range $paginator.Pages }}
<div class="post on-list">
<article class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- with .Date }}
<span class="post-date">
{{ .Format "2006-01-02" }}
</span>
<time class="post-date">
{{ .Format "2006-01-02" }}
</time>
{{- end }}
{{ with .Params.Author }}
<span class="post-author">:: {{ . }}</span>
@ -60,7 +60,7 @@
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</div>
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>

View File

@ -6,16 +6,16 @@
{{ end }}
<div class="posts">
{{ range .Paginator.Pages }}
<div class="post on-list">
<article class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- with .Date }}
<span class="post-date">
{{ .Format "2006-01-02" }}
</span>
{{- end }}
{{- with .Date }}
<time class="post-date">
{{ .Format "2006-01-02" }}
</time>
{{- end }}
{{ with .Params.Author }}
<span class="post-author">:: {{ . }}</span>
{{ end }}
@ -50,7 +50,7 @@
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</div>
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>

View File

@ -1,13 +1,13 @@
{{ define "main" }}
<div class="post">
<article class="post">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<div class="post-meta">
{{ if .Params.Date }}
<span class="post-date">
{{ .Date.Format "2006-01-02" }}
<time>{{ .Date.Format "2006-01-02" }}</time>
{{ if $.Site.Params.showLastUpdated }}
[{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format "2006-01-02" }}]
[{{or $.Site.Params.updatedDatePrefix "Updated"}}: <time>{{ .Lastmod.Format "2006-01-02" }}</time>]
{{ end }}
</span>
{{ end }}
@ -40,7 +40,7 @@
<div class="post-content">
{{- with .Content -}}
<div>
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">&#8983;</a> ${3}` | safeHTML }}
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" aria-label="Anchor">&#8983;</a> ${3}` | safeHTML }}
</div>
{{- end -}}
</div>
@ -52,5 +52,5 @@
{{ if not (.Params.hideComments | default false) }}
{{ partial "comments.html" . }}
{{ end }}
</div>
</article>
{{ end }}