Updating post layout

This commit is contained in:
2020-06-09 01:40:51 +01:00
parent e2c1b06006
commit bd2be62986
5 changed files with 38 additions and 28 deletions

View File

@@ -9,7 +9,7 @@
"js": "2.lazyload.1168fc21175de558d316.min.js"
},
"main": {
"css": "main.651bb1fef802c68b6843.min.css",
"css": "main.854425fe9410f0937f19.min.css",
"js": "main.48637aff6f96e597ae05.min.js"
},
"vendors~app": {

View File

@@ -1,5 +1,7 @@
{{- if .Params.authors -}}
<ul class="authors list-inline">
<p class="text-muted">Written by</p>
<!-- <br> -->
{{- range .Params.authors -}}
{{- with $.Site.GetPage (printf "/authors/%s" (. | urlize)) -}}
{{- $term := . -}}

View File

@@ -1,4 +1,4 @@
<footer class="footer text-center bg-dark py-4" style="z-index: 10;">
<footer class="footer text-center bg-primary py-4" style="z-index: 10;">
<div class="container">
<div class="row">
<div class="col">
@@ -41,7 +41,7 @@
{{- end }}
</ul>
<p class="text-muted">
<p class="text-white">
{{ if .Site.Copyright }}
{{ .Site.Copyright | safeHTML }}
{{ else }}
@@ -49,9 +49,6 @@
{{ end }}
</p>
<!-- <p class="text-muted">
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with <a href="https://github.com/puresyntax71/hugo-theme-chunky-poster" target="_blank">Chunky Poster</a>.
</p> -->
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
{{- $related := .Site.RegularPages.Related . | first 3 -}}
{{- with $related -}}
<div class="related-content row mt-5 row-cols-1 row-cols-lg-3">
<div class="related-content row mt-5 row-cols-1 row-cols-lg-5">
{{- range . -}}
<div class="col mb-3">
{{ .Render "card" }}

View File

@@ -5,21 +5,6 @@
{{ $page := . }}
<div class="row">
<div class="col-lg-8">
<article>
<div class="row justify-content-center">
<div class="col-lg-9">
<div class="meta text-muted mb-3">
<p class="created text-muted text-uppercase font-weight-bold mb-1">{{ $page.Date.Format "January 2, 2006" }}</p>
<span class="mr-2"><i class="fas fa-book-open mr-2"></i>{{ $page.WordCount }} words</span>
<span><i class="fas fa-clock mr-2"></i>{{ $page.ReadingTime }} min read</span>
</div>
<h1>{{ $page.Title }}</h1>
{{ partial "authors.html" $page }}
</div>
</div>
{{- with .Resources.Match "images/banner.svg" -}}
{{ range . }}
<div class="row justify-content-center mb-3">
@@ -29,13 +14,34 @@
</div>
{{- end -}}
{{- end -}}
<article>
<div class="row justify-content-center">
<div class="col-lg-9">
<h1 class="display-3">{{ $page.Title }}</h1>
<div class="d-flex justify-content-between align-items-stretch post-info">
<div>{{ partial "authors.html" $page }}</div>
<div class="meta text-muted mb-3 d-flex flex-column justify-content-start">
<div>
<p class="text-muted">Posted on:</p>
</div>
<div>
<p class="created text-muted text-uppercase font-weight-bold mb-1">{{ $page.Date.Format "January 2, 2006" }}</p>
<span class="mr-2"><i class="fas fa-book-open mr-2"></i>{{ $page.WordCount }} words</span>
<span><i class="fas fa-clock mr-2"></i>{{ $page.ReadingTime }} min read</span>
</div>
</div>
</div>
</div>
</div>
{{- with $page.Params.tags -}}
<div class="row justify-content-center">
<div class="col-lg-9">
<div class="tags my-3">
{{- range . -}}
<a class="badge badge-pill badge-light border mr-2" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
<a class="badge badge-dark mr-2" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
<i class="fas fa-tag mr-2"></i>{{ . }}
</a>
{{- end -}}
@@ -55,7 +61,7 @@
{{- if .Site.Params.commento.enable -}}
<div class="row justify-content-center my-3">
<div class="col-lg-6">
<div class="col-lg-8">
<div id="commento"></div>
<script src="{{ .Site.Params.commento.url }}"></script>
</div>
@@ -63,11 +69,16 @@
{{- end -}}
</article>
</div>
<div id="" class="col-lg-2 toc-sidebar">
<div id="" class="col-lg-2 toc-sidebar d-none d-md-block">
<aside>
<h5 class="text-center text-uppercase">Table of contents</h5>
<div class="toc-contents">
{{ .TableOfContents }}
</div>
</aside>
<div class="d-flex justify-content-center">
<img src="/images/icons/Wizard.png" style="width: 50%;" />
</div>
</div>
</div>