-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Restructure member rendering
Member rendering refactored to use partials and re-use the same code for both current and former members. Additionally redo the avatar URL linking to be consistent.
- Loading branch information
Showing
5 changed files
with
48 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
overlays: | ||
image: hugomods/hugo:latest | ||
volumes: | ||
- "./:/src/" | ||
command: [ | ||
"hugo", "server", "--disableFastRender", "--bind", "0.0.0.0", | ||
] | ||
ports: | ||
- "1313:1313" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- if .gravatar }} | ||
{{ $avatar := printf "https://gravatar.com/avatar/%s.jpg?s=142" .gravatar }} | ||
{{ $image := resources.GetRemote $avatar}} | ||
<img class="avatar" src="{{ $image.RelPermalink }}" /> | ||
{{ else }} | ||
{{ $avatar := printf "avatars/%s.png" .name }} | ||
{{ $image := resources.Get $avatar }} | ||
{{- if $image }} | ||
{{ $image := $image.Process "fit 200x200" }} | ||
<img class="avatar" src="{{ $image.RelPermalink }}" /> | ||
{{ else }} | ||
<img class="blank-avatar" src="/blank_avatar.png" alt="No avatar image" /> | ||
{{end -}} | ||
{{end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<li> | ||
{{- if .link }} | ||
<a href="{{ .link }}"> | ||
{{- partial "member-image" . }} | ||
</a> | ||
{{- else }} | ||
{{- partial "member-image" . }} | ||
{{ end -}} | ||
<h4 class="member-name"> | ||
{{- if .link }}<a href="{{ .link }}"><u>{{ .name }}</u></a>{{ else }}{{ .name }}{{ end -}} | ||
</h4> | ||
<div class="member-tags"> | ||
{{- range .tags }}<span class="tag tag-{{ . }}">{{ . }}</span>{{ end -}} | ||
</div> | ||
<p class="member-desc">{{ .bio | markdownify }}</p> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters