mirror of https://github.com/jpanther/congo.git
🚚 Move author image to assets
parent
6eab5f95fb
commit
1b9b660abe
|
@ -143,5 +143,6 @@ hugo.linux
|
||||||
# End of https://www.toptal.com/developers/gitignore/api/hugo
|
# End of https://www.toptal.com/developers/gitignore/api/hugo
|
||||||
|
|
||||||
exampleSite/public/
|
exampleSite/public/
|
||||||
|
exampleSite/resources/_gen/
|
||||||
TODO
|
TODO
|
||||||
.lighthouseci
|
.lighthouseci
|
||||||
|
|
|
@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Upgrade to Tailwind v3.0.12
|
- Upgrade to Tailwind v3.0.12
|
||||||
|
- Author images are now Hugo assets
|
||||||
|
|
||||||
## [1.6.2] - 2022-01-07
|
## [1.6.2] - 2022-01-07
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
@ -11,7 +11,7 @@ dateFormat = "2 January 2006"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Congo"
|
name = "Congo"
|
||||||
image = "img/author.jpg"
|
image = "author.jpg"
|
||||||
bio = "This is an example author bio, and although there's a stock photo of a dog here, this article was actually created by a human. :dog:"
|
bio = "This is an example author bio, and although there's a stock photo of a dog here, this article was actually created by a human. :dog:"
|
||||||
links = [
|
links = [
|
||||||
{ twitter = "https://twitter.com/" },
|
{ twitter = "https://twitter.com/" },
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
|
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
{{ with .Site.Author.image }}
|
{{ with .Site.Author.image }}
|
||||||
|
{{ $authorImage := resources.Get . }}
|
||||||
|
{{ if $authorImage }}
|
||||||
|
{{ $authorImage := $authorImage.Fill "192x192" }}
|
||||||
<img
|
<img
|
||||||
class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full"
|
class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full"
|
||||||
width="96"
|
width="96"
|
||||||
height="96"
|
height="96"
|
||||||
alt="Author"
|
alt="Author"
|
||||||
src="{{ . | relURL }}"
|
src="{{ $authorImage.RelPermalink }}"
|
||||||
/>
|
/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
<div class="place-self-center">
|
<div class="place-self-center">
|
||||||
{{ with .Site.Author.name | markdownify | emojify }}
|
{{ with .Site.Author.name | markdownify | emojify }}
|
||||||
<div class="text-[0.6rem] leading-3 text-neutral-500 dark:text-neutral-400 uppercase">
|
<div class="text-[0.6rem] leading-3 text-neutral-500 dark:text-neutral-400 uppercase">
|
||||||
|
|
|
@ -5,7 +5,17 @@
|
||||||
>
|
>
|
||||||
<header class="flex flex-col items-center mb-3">
|
<header class="flex flex-col items-center mb-3">
|
||||||
{{ with .Site.Author.image }}
|
{{ with .Site.Author.image }}
|
||||||
<img class="mb-2 rounded-full w-36 h-36" alt="Author" src="{{ . | relURL }}" />
|
{{ $authorImage := resources.Get . }}
|
||||||
|
{{ if $authorImage }}
|
||||||
|
{{ $authorImage := $authorImage.Fill "288x288" }}
|
||||||
|
<img
|
||||||
|
class="mb-2 rounded-full w-36 h-36"
|
||||||
|
width="144"
|
||||||
|
height="144"
|
||||||
|
alt="Author"
|
||||||
|
src="{{ $authorImage.RelPermalink }}"
|
||||||
|
/>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<h1 class="text-4xl font-extrabold">
|
<h1 class="text-4xl font-extrabold">
|
||||||
{{ .Site.Author.name | default .Site.Title }}
|
{{ .Site.Author.name | default .Site.Title }}
|
||||||
|
|
Loading…
Reference in New Issue