Add more semantic HTML and ARIA stuff.
This commit is contained in:
parent
d18d25cf30
commit
4569349b15
|
@ -38,7 +38,9 @@
|
|||
<body>
|
||||
|
||||
{{ partial "header.html" . }}
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{ partial "extra_foot.html" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<p id="nocolor_list">{{ .Title }}:</p>
|
||||
<ul>
|
||||
{{- range .Paginator.Pages }}
|
||||
<li>
|
||||
<div class="post-title">
|
||||
<li role="article">
|
||||
<section class="post-title" aria-label="Title">
|
||||
{{- if .Draft }}DRAFT: {{ end }}
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</div>
|
||||
</section>
|
||||
{{ partial "post_meta.html" . }}
|
||||
</li>
|
||||
{{- end }}
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
{{- define "main" }}
|
||||
<h1 class="post-title">{{ if .Draft }}DRAFT: {{ end }}{{ .Title }}</h1>
|
||||
{{ partial "post_meta.html" . }}
|
||||
<article aria-labelledby="nocolor_title">
|
||||
<h1 class="post-title" id="nocolor_title">{{ if .Draft }}DRAFT: {{ end }}{{ .Title }}</h1>
|
||||
{{ partial "post_meta.html" . }}
|
||||
|
||||
{{ partial "toc.html" . }}
|
||||
{{ partial "toc.html" . }}
|
||||
|
||||
<article class="content">{{ .Content }}</article>
|
||||
<section class="content" aria-label="Content">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
</article>
|
||||
{{- end }}
|
||||
|
|
|
@ -2,18 +2,16 @@
|
|||
{{- $showfull := default false $.Site.Params.showFullContent }}
|
||||
{{- $pagepool := where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
|
||||
{{- range $idx, $_ := (.Paginate $pagepool).Pages }}
|
||||
<div{{ if and $showfull $idx }} class="post-divider"{{ end }}>
|
||||
<div>
|
||||
<h2 class="post-title">
|
||||
{{ if .Draft }}DRAFT: {{ end }}
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</h2>
|
||||
{{ partial "post_meta.html" . }}
|
||||
</div>
|
||||
<div>
|
||||
{{- $contentlabel := cond $showfull "Content" "Summary" }}
|
||||
<article{{ if and $showfull $idx }} class="post-divider"{{ end }}>
|
||||
<h2 class="post-title">
|
||||
{{ if .Draft }}DRAFT: {{ end }}<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</h2>
|
||||
{{ partial "post_meta.html" . }}
|
||||
<section aria-label="{{ $contentlabel }}">
|
||||
{{ cond $showfull .Content .Summary }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
{{- end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in New Issue