mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-11 01:38:28 +00:00
Add authorbox
This commit is contained in:
parent
290d1cb0ae
commit
0038cc1f58
6 changed files with 52 additions and 1 deletions
|
@ -78,6 +78,11 @@ theme = "binario"
|
||||||
disqusShortname = "" # Enable comments by entering your Disqus shortname
|
disqusShortname = "" # Enable comments by entering your Disqus shortname
|
||||||
googleAnalytics = "" # Enable Google Analytics by entering your tracking id
|
googleAnalytics = "" # Enable Google Analytics by entering your tracking id
|
||||||
|
|
||||||
|
[Author] # Used in authorbox
|
||||||
|
name = "John Doe"
|
||||||
|
bio = "John Doe's true identity is unknown. Maybe he is a successful blogger or writer."
|
||||||
|
avatar = "img/avatar.png"
|
||||||
|
|
||||||
[Params]
|
[Params]
|
||||||
author = "John Doe" # Used in meta author. Optional
|
author = "John Doe" # Used in meta author. Optional
|
||||||
description = "Responsive card-based & code-light Hugo theme" # Description of your site. Used in meta description
|
description = "Responsive card-based & code-light Hugo theme" # Description of your site. Used in meta description
|
||||||
|
@ -87,6 +92,7 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
|
||||||
mainSections = ["post"] # Set main page sections
|
mainSections = ["post"] # Set main page sections
|
||||||
post_meta = ["date", "categories"] # Enable post meta fields in given order
|
post_meta = ["date", "categories"] # Enable post meta fields in given order
|
||||||
dateFormat = "January 02, 2006" # Change the format of dates
|
dateFormat = "January 02, 2006" # Change the format of dates
|
||||||
|
authorbox = true # Show authorbox at bottom of single pages if true
|
||||||
toc = true # Enable Table of Contents for all site pages
|
toc = true # Enable Table of Contents for all site pages
|
||||||
tocOpen = true # Open Table of Contents block. Optional
|
tocOpen = true # Open Table of Contents block. Optional
|
||||||
comments = true # Enable comments for all site pages
|
comments = true # Enable comments for all site pages
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
||||||
<script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
|
<script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
|
||||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
|
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
|
||||||
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
|
|
||||||
{{ if .Site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }}
|
{{ if .Site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }}
|
||||||
{{ if .Site.Params.twitter_cards }}{{ template "_internal/twitter_cards.html" . }}{{ end }}
|
{{ if .Site.Params.twitter_cards }}{{ template "_internal/twitter_cards.html" . }}{{ end }}
|
||||||
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
|
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
{{ partial "authorbox.html" . }}
|
||||||
{{ partial "related.html" . }}
|
{{ partial "related.html" . }}
|
||||||
{{ partial "comments.html" . }}
|
{{ partial "comments.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
21
layouts/partials/authorbox.html
Normal file
21
layouts/partials/authorbox.html
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{{- if .Param "authorbox" }}
|
||||||
|
<div class="authorbox block">
|
||||||
|
<div class="author">
|
||||||
|
{{- with .Site.Author.avatar }}
|
||||||
|
<figure class="author__avatar">
|
||||||
|
<img class="author__img" alt="{{ $.Site.Author.name }} avatar" src="{{ $.Site.Author.avatar | relURL }}" height="90" width="90">
|
||||||
|
</figure>
|
||||||
|
{{- end }}
|
||||||
|
<div class="author__body">
|
||||||
|
<div class="author__name">
|
||||||
|
{{ .Site.Author.name }}
|
||||||
|
</div>
|
||||||
|
{{- with .Site.Author.bio }}
|
||||||
|
<div class="author__bio">
|
||||||
|
{{- . -}}
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
|
@ -816,6 +816,30 @@ mark {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Authorbox */
|
||||||
|
.author {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author__avatar {
|
||||||
|
margin-right: .875rem;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author__img {
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author__body {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author__name {
|
||||||
|
margin-bottom: .625rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
/* Comments */
|
/* Comments */
|
||||||
.comments {
|
.comments {
|
||||||
margin-top: .625rem;
|
margin-top: .625rem;
|
||||||
|
|
BIN
static/img/avatar.png
Normal file
BIN
static/img/avatar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 428 B |
Loading…
Reference in a new issue