Skip to content

Commit 4d2aebb

Browse files
committed
chore: finish refactoring
Signed-off-by: Jaime Silvela <[email protected]>
1 parent d39ab8a commit 4d2aebb

File tree

13 files changed

+37
-36
lines changed

13 files changed

+37
-36
lines changed

archetypes/authors/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: {{ .Name | title}}
2+
title: {{ .Name | title}}
33
avatar: temp-avatar.png
44
github: {{ .Name }}
55
id: {{ .Name }}

content/authors/fdrees/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: Floor Drees
33
avatar: floor.jpg
44
github: floord
5-
id: fdrees
65
---
76

87
Open Source community advocate and Principal Program Manager at EDB. PostgreSQL Code of Conduct Committee member, PG EU Diversity Committee member, PGDay Lowlands organizer.

content/authors/gbartolini/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Gabriele Bartolini
2+
title: Gabriele Bartolini
33
avatar: gb.png
44
github: gbartolini
55
---

content/authors/jgonzalez/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: Jonathan Gonzalez V.
33
avatar: jgonzalez-gh.jpeg
44
github: sxd
5-
id: jgonzalez
65
---
76

87
A free software lover, passionate about OpenSource and all the tools that

content/authors/jsilvela/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Jaime Silvela
2+
title: Jaime Silvela
33
avatar: jsilvela-gh.jpeg
44
github: jsilvela
55
---

content/authors/leonardoce/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Leonardo Cecchi
2+
title: Leonardo Cecchi
33
avatar: leonardoce-gh.jpeg
44
github: leonardoce
55
---
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
{{ define "main" }}
2-
<h1 class="h1 text-center mx-auto md:w-3/5">{{.Title}}</h1>
2+
<!-- <h1 class="h1 text-center mx-auto md:w-3/5">{{.Title}}</h1> -->
33
<div class="md:w-3/5 mx-auto">
44
<div class="px-4">
5+
{{ with .Resources.Get .Params.avatar }}
56
<div>
6-
<img src="{{ .Params.avatar }}" alt="blog image" class="mx-auto">
7+
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="blog image" class="mx-auto">
78
</div>
9+
{{ end }}
810
<!--author image-->
911

1012
<div class="mx-auto my-10">
11-
<h3><a href="https://github.com/{{ .Params.github }}">{{ .Params.name }}</a></h3>
13+
<h3><a href="https://github.com/{{ .Params.github }}">{{ .Title }}</a></h3>
1214

1315
{{ .Content }}
1416
</div>
1517

16-
<h3 class="text-xl font-bold mb-6">Posts by {{ .Params.name }}</h3>
17-
{{ $author_git := .Params.github }}
18-
{{ $author_id := .Params.id }}
19-
{{ range (.Site.GetPage "/blog").Pages}}
20-
{{ if or (eq .Params.author $author_git) (eq .Params.author $author_id) }}
18+
<h3 class="text-xl font-bold mb-6">Posts by {{ .Title }}</h3>
19+
{{ range .Pages }}
2120
<div class="column is-half">
22-
<a href="{{ .RelPermalink }}">{{ .Params.title}}</a>
21+
<a href="{{ .RelPermalink }}">{{ .LinkTitle}}</a>
2322
{{ partial "blog_datetime.html" . }}
2423
</div>
25-
{{ end }}
26-
{{ end }}
24+
{{ end }}
2725
</div>
2826

2927
<!--Col 2 starts here-->
@@ -32,4 +30,4 @@ <h3 class="text-xl font-bold mb-6">Posts by {{ .Params.name }}</h3>
3230
</div>
3331
<!--Col 2 ends here-->
3432
</div>
35-
{{ end }}
33+
{{ end }}

layouts/blog/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!--List item starts here-->
88
<div class="pb-24">
99
<!--User profile starts here-->
10-
<div class="flex gap-3 my-5">
10+
<div class="grid gap-3 my-5">
1111
{{ partial "author.html" . }}
1212
</div>
1313
<!--User profile ends here-->

layouts/blog/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ <h1 class="h1 text-center mx-auto md:w-3/5">{{.Title}}</h1>
33
<div class="md:w-3/5 mx-auto">
44
<div class="px-4">
55
<!--User profile-->
6-
<div class="flex gap-3 my-10 mx-auto flex justify-center">
6+
<div class="grid gap-3 my-10 mx-auto justify-center">
77
{{ partial "author.html" . }}
88
</div>
99
<!--User profile-->

layouts/partials/author.html

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
{{ $author := $.Site.GetPage (path.Join "authors" .Params.author)}}
2-
<div class="my-auto">
3-
<img src="{{ $author.RelPermalink }}/{{ $author.Params.avatar }}" class="w-10 h-10 rounded-full"
4-
alt="{{$author.Params.name}}">
1+
{{ with .GetTerms "authors" }}
2+
<div class="flex gap-3">
3+
{{ range . }}
4+
<div class="my-auto">
5+
<img src="{{ .RelPermalink }}/{{ .Params.avatar }}" class="w-10 h-10 rounded-full"
6+
alt="{{.LinkTitle}}">
7+
</div>
8+
9+
<div>
10+
<h1 class="text-lg charcoal font-bold">
11+
<a href="{{ .RelPermalink }}">{{.LinkTitle}}</a>
12+
</h1>
13+
</div>
14+
{{ end }}
515
</div>
6-
<div>
7-
<div>
8-
<h1 class="text-lg charcoal font-bold">
9-
<a href="/authors/{{ .Params.author }}">{{$author.Params.name}}</a>
10-
</h1>
11-
</div>
12-
{{ partial "blog_datetime.html" . }}
13-
</div>
16+
{{ end }}
17+
18+
{{ partial "blog_datetime.html" . }}

0 commit comments

Comments
 (0)