Merge pull request #1 from mattfarina/fix-layout

Making blog layout consistent
This commit is contained in:
Matt Farina 2020-12-15 10:24:30 -05:00 committed by GitHub
commit 57942428ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 13 deletions

View File

@ -1,12 +1,11 @@
{{ define "main" }}
{{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }}
{{ range sort .Paginator.Pages }}
<article class="gdoc-markdown gdoc-post">
<header>
<h1 class="gdoc-post__title">
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h1>
<div class="gdoc-post__date">{{ .Date.Format $dateFormat }}</div>
<div class="gdoc-post__date">{{ partial "byline" . }}</div>
</header>
<div>
{{ .Summary }}
@ -18,4 +17,8 @@
</div>
</article>
{{ end }}
<nav role="pagination">
{{ template "_internal/pagination.html" . }}
</nav>
{{ end }}

View File

@ -1,14 +1,22 @@
{{ define "main" }}
<main aria-role="main">
<div>
<article class="gdoc-markdown">
{{ range (.Paginate .Site.RegularPages).Pages }}
<h1><a href="{{ .Permalink }}">{{ partial "title" . }}</a></h1>
{{ .Summary }}
{{ end }}
{{ range sort .Paginator.Pages }}
<article class="gdoc-markdown gdoc-post">
<header>
<h1 class="gdoc-post__title">
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h1>
<div class="gdoc-post__date">{{ partial "byline" . }}</div>
</header>
<div>
{{ .Summary }}
{{ if .Truncated }}
<a class="gdoc-post__readmore" title="Read full post" href="{{ .RelPermalink }}">
Read full post
</a>
{{ end }}
</div>
</article>
</div>
</main>
{{ end }}
<nav role="pagination">
{{ template "_internal/pagination.html" . }}

View File

@ -502,7 +502,7 @@ img {
color: #0a539a
}
.gdoc-post__readmore:after {
content: "\1f82a"
content: "»"
}
.gdoc-footer {
background: #2f333e;

File diff suppressed because one or more lines are too long