forked from BgLUG/bglug.it
authors (#237)
fixes #233 Reviewed-on: BgLUG/bglug.it#237 Co-authored-by: paspo <paolo@asperti.com> Co-committed-by: paspo <paolo@asperti.com>
This commit is contained in:
parent
cf8ac5cb95
commit
26f07b4cd3
BIN
assets/images/placeholder_autore.png
Normal file
BIN
assets/images/placeholder_autore.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
11
config.yml
11
config.yml
@ -52,6 +52,7 @@ params:
|
||||
|
||||
taxonomies:
|
||||
tag: tags
|
||||
author: author
|
||||
|
||||
languages:
|
||||
it:
|
||||
@ -117,6 +118,11 @@ languages:
|
||||
parent: about
|
||||
pageRef: /pages/segreteria
|
||||
weight: 54
|
||||
- identifer: authors
|
||||
name: Autori
|
||||
parent: about
|
||||
pageRef: /author
|
||||
weight: 55
|
||||
- identifier: privacy
|
||||
name: Privacy
|
||||
pageRef: /pages/privacy-policy
|
||||
@ -184,6 +190,11 @@ languages:
|
||||
name: Secretery
|
||||
pageRef: /pages/segreteria
|
||||
weight: 54
|
||||
- identifer: authors
|
||||
name: Authors
|
||||
parent: about
|
||||
pageRef: /author
|
||||
weight: 55
|
||||
- identifier: privacy
|
||||
name: Privacy
|
||||
pageRef: /pages/privacy-policy
|
||||
|
3
content/author/_index.en.md
Normal file
3
content/author/_index.en.md
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
title: BgLUG's authors
|
||||
---
|
3
content/author/_index.it.md
Normal file
3
content/author/_index.it.md
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
title: Gli autori del BgLUG
|
||||
---
|
5
content/author/paspo/_index.md
Normal file
5
content/author/paspo/_index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: paspo
|
||||
image: paspo.png
|
||||
description: paspo's [website](https://paspo.dev)
|
||||
---
|
BIN
content/author/paspo/paspo.png
Normal file
BIN
content/author/paspo/paspo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
@ -1,3 +1,4 @@
|
||||
---
|
||||
license: License
|
||||
footer_license_note: Except where otherwise noted, content on this site is published under [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) license.
|
||||
all_posts_by: "All {{ . }}'s posts"
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
license: Licenza
|
||||
footer_license_note: Eccetto dove diversamente indicato, ogni contenuto di questo sito è pubblicato con licenza [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/).
|
||||
all_posts_by: "Tutti i post di {{ . }}"
|
||||
|
17
layouts/_default/author.html
Normal file
17
layouts/_default/author.html
Normal file
@ -0,0 +1,17 @@
|
||||
{{ define "main" }}
|
||||
<header>
|
||||
<h2>{{ i18n "all_posts_by" .Title }}</h2>
|
||||
{{ with .Description -}}
|
||||
<p>{{ . | markdownify }}</p>
|
||||
{{- end }}
|
||||
</header>
|
||||
|
||||
{{- if .Params.image }}
|
||||
<span class="image featured"><img src="{{ .Params.image | relURL }}" alt="{{ .Params.image_alt }}" /></span>
|
||||
{{ end }}
|
||||
|
||||
{{ range .RegularPages }}
|
||||
{{ .Render "shortblock" }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
@ -39,9 +39,16 @@
|
||||
<a href="{{ .RelPermalink }}" class="image left"><img src="{{ $featimg }}" alt="{{ .Params.image_alt }}" /></a>
|
||||
<div class="inner">
|
||||
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
{{- with .Params.author -}}
|
||||
di {{ . | markdownify }}<br/>
|
||||
{{- end -}}
|
||||
|
||||
{{- with .GetTerms "author" }}
|
||||
{{- range . -}}
|
||||
<div class="author">
|
||||
di <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{ if .Site.Params.show_post_dates | default true }}
|
||||
{{- with .Date }}<time>{{ . | time.Format ":date_medium" }}</time>{{ end }}
|
||||
{{ end }}
|
||||
|
@ -2,9 +2,15 @@
|
||||
<header>
|
||||
<h2>{{ .Title }}</h2>
|
||||
<p>{{ .Description }}</p>
|
||||
{{- with .Params.author -}}
|
||||
<div class="author">di {{ . | markdownify }}</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- with .GetTerms "author" }}
|
||||
{{- range . -}}
|
||||
<div class="author">
|
||||
di <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if .Site.Params.show_post_dates | default true }}
|
||||
{{- with .Date }}<time>{{ . | time.Format ":date_medium" }}</time>{{ end }}
|
||||
{{ end }}
|
||||
|
17
layouts/_default/taxonomy.html
Normal file
17
layouts/_default/taxonomy.html
Normal file
@ -0,0 +1,17 @@
|
||||
{{ define "main" }}
|
||||
<header>
|
||||
<h2>{{ .Title }}</h2>
|
||||
{{ with .Description -}}
|
||||
<p>{{ . | markdownify }}</p>
|
||||
{{- end }}
|
||||
</header>
|
||||
|
||||
{{- if .Params.image }}
|
||||
<span class="image featured"><img src="{{ .Params.image | relURL }}" alt="{{ .Params.image_alt }}" /></span>
|
||||
{{ end }}
|
||||
|
||||
{{ range .Pages }}
|
||||
{{ .Render "taxonomyshortblock" }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
@ -4,8 +4,8 @@
|
||||
{{ $rasters := slice "jpeg" "png" }}
|
||||
{{ $newres := "360x250 smart" }}
|
||||
|
||||
{{/* di default, niente immagine */}}
|
||||
{{- $featimg := "#" -}}
|
||||
{{/* immagine di default */}}
|
||||
{{- $featimg := (resources.Get "/images/placeholder_autore.png").RelPermalink -}}
|
||||
|
||||
{{- if .Params.image -}}
|
||||
{{/* se è stata definita un'immagine featured */}}
|
||||
@ -44,9 +44,9 @@
|
||||
{{ end }}
|
||||
<p>
|
||||
{{ with .Description }}
|
||||
{{- . | truncate 400 }}
|
||||
{{- . | markdownify | truncate 400 }}
|
||||
{{- else }}
|
||||
{{- .Summary | truncate 400 }}
|
||||
{{- .Summary | markdownify | truncate 400 }}
|
||||
{{- end }}
|
||||
</p>
|
||||
{{ partial "tags.html" . }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user