Skip to content

Commit

Permalink
fix: move the authors to the end of article
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanddd committed Feb 22, 2024
1 parent 71aaf52 commit ef9a28d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 4 additions & 0 deletions assets/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -557,3 +557,7 @@ a:visited {
border-top-color: black;
}
}

.authors {
text-align: right;
}
11 changes: 11 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
{{ if not .IsHome }}
{{ if .Params.authors -}}
<aside class="authors">
by
{{ $authorsLen := sub (len $.Params.authors) 1}}
{{ range $i, $e := .Params.authors }}
<a href="/members/{{ $e }}">{{ $e }}</a>{{ if (gt $authorsLen $i) }},{{end}}
{{ end }}
</aside>
{{ end }}
{{ end }}
</main>
</div>
</body>
Expand Down
12 changes: 0 additions & 12 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,6 @@
<main>
<!-- <a href="/">{{ .Site.Title }}</a> / <a href="{{ .RelPermalink }}">{{ .Title }}</a> -->

{{ if not .IsHome }}
{{ if .Params.authors -}}
<aside class="authors">
by
{{ $authorsLen := sub (len $.Params.authors) 1}}
{{ range $i, $e := .Params.authors }}
<a href="/members/{{ $e }}">{{ $e }}</a>{{ if (gt $authorsLen $i) }},{{end}}
{{ end }}
</aside>
{{ end }}
{{ end }}

{{ if .Params.notice -}}
<div class="notice">{{ .Params.notice }}</div>
{{ end }}
Expand Down

0 comments on commit ef9a28d

Please sign in to comment.