Use <main> and have different class names for authors

This commit is contained in:
BBaoVanC 2022-04-09 23:29:22 -05:00
parent 4f450374cf
commit dff23045a8
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
4 changed files with 13 additions and 13 deletions

View File

@ -85,21 +85,21 @@
opacity: .75; opacity: .75;
} }
.post-title { .post-title, .author-name {
margin-bottom: 10px; margin-bottom: 10px;
} }
.post-title a { .post-title a, .author-name a {
color: inherit; color: inherit;
text-decoration: inherit; text-decoration: inherit;
} }
.post-meta-item { .post-meta-item, .author-meta-item {
margin-right: 10px; margin-right: 10px;
display: inline-block; display: inline-block;
} }
.post-metadata { .post-metadata, .author-metadata {
margin-bottom: 15px; margin-bottom: 15px;
} }
@ -112,7 +112,7 @@
margin-top: 15px; margin-top: 15px;
} }
.post-description { .post-description, .author-description {
margin-top: 10px; margin-top: 10px;
} }

View File

@ -14,11 +14,11 @@
{{ partial "breadcrumb.html" . }} {{ partial "breadcrumb.html" . }}
{{ end }} {{ end }}
<div class="main"> <main>
{{ block "main" . }} {{ block "main" . }}
{{ .Content }} {{ .Content }}
{{ end }} {{ end }}
</div> </main>
{{ if or .Site.Copyright .Site.Params.footer }} {{ if or .Site.Copyright .Site.Params.footer }}
<hr> <hr>

View File

@ -1,12 +1,12 @@
<div class="post"> <div class="author">
<h2 class="post-title"> <h2 class="author-name">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2> </h2>
{{ partial "post-metadata/author.html" . }} {{ partial "post-metadata/author.html" . }}
<div class="post-description"> <div class="author-description">
{{ partial "description-or-summary.html" . }} {{ partial "description-or-summary.html" . }}
</div> </div>

View File

@ -1,16 +1,16 @@
<div class="post-metadata" aria-label="{{ i18n "aria_author_metadata" }}"> <div class="author-metadata" aria-label="{{ i18n "aria_author_metadata" }}">
{{/* Calculate the total word count */}} {{/* Calculate the total word count */}}
{{ $total_words := 0 }} {{ $total_words := 0 }}
{{ range .Data.Pages }} {{ range .Data.Pages }}
{{ $total_words = add $total_words .WordCount }} {{ $total_words = add $total_words .WordCount }}
{{ end }} {{ end }}
<span class="post-meta-item" aria-label="{{ i18n "aria_author_post_count" }}"> <span class="author-meta-item" aria-label="{{ i18n "aria_author_post_count" }}">
{{ partial "icon.html" "newspaper" }} {{ partial "icon.html" "newspaper" }}
{{ i18n "post_count" (len .Data.Pages) }} {{ i18n "post_count" (len .Data.Pages) }}
</span> </span>
<span class="post-meta-item" aria-label="{{ i18n "aria_author_word_count" }}"> <span class="author-meta-item" aria-label="{{ i18n "aria_author_word_count" }}">
{{ partial "icon.html" "align-left" }} {{ partial "icon.html" "align-left" }}
{{ i18n "wordcount" $total_words }} {{ i18n "wordcount" $total_words }}
</span> </span>