Skip to content

Commit

Permalink
Use <main> and have different class names for authors
Browse files Browse the repository at this point in the history
  • Loading branch information
BBaoVanC committed Apr 10, 2022
1 parent 4f45037 commit dff2304
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions assets/css/bobastyle.css
Expand Up @@ -85,21 +85,21 @@
opacity: .75;
}

.post-title {
.post-title, .author-name {
margin-bottom: 10px;
}

.post-title a {
.post-title a, .author-name a {
color: inherit;
text-decoration: inherit;
}

.post-meta-item {
.post-meta-item, .author-meta-item {
margin-right: 10px;
display: inline-block;
}

.post-metadata {
.post-metadata, .author-metadata {
margin-bottom: 15px;
}

Expand All @@ -112,7 +112,7 @@
margin-top: 15px;
}

.post-description {
.post-description, .author-description {
margin-top: 10px;
}

Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/baseof.html
Expand Up @@ -14,11 +14,11 @@
{{ partial "breadcrumb.html" . }}
{{ end }}

<div class="main">
<main>
{{ block "main" . }}
{{ .Content }}
{{ end }}
</div>
</main>

{{ if or .Site.Copyright .Site.Params.footer }}
<hr>
Expand Down
6 changes: 3 additions & 3 deletions layouts/_default/summary/author.html
@@ -1,12 +1,12 @@
<div class="post">
<h2 class="post-title">
<div class="author">
<h2 class="author-name">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>

{{ partial "post-metadata/author.html" . }}

<div class="post-description">
<div class="author-description">
{{ partial "description-or-summary.html" . }}
</div>

Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/post-metadata/author.html
@@ -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 */}}
{{ $total_words := 0 }}
{{ range .Data.Pages }}
{{ $total_words = add $total_words .WordCount }}
{{ 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" }}
{{ i18n "post_count" (len .Data.Pages) }}
</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" }}
{{ i18n "wordcount" $total_words }}
</span>
Expand Down

0 comments on commit dff2304

Please sign in to comment.