Skip to content

Commit

Permalink
Added border to author image
Browse files Browse the repository at this point in the history
*As the title
Overwrote header.html partial to add a border to the main author image
  • Loading branch information
adamsthws committed Nov 2, 2024
1 parent 4c60128 commit d7359b6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
3 changes: 0 additions & 3 deletions layouts/partials/footer.htmlZone.Identifier

This file was deleted.

28 changes: 28 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<div class="mb-2 mt-20 flex flex-col items-center justify-center">
{{/* Add image and site title */}}
{{ $image := resources.GetMatch .Site.Params.Author.image }}
{{ $name := .Site.Params.Author.name }}
{{ $icon := .Site.Params.Author.icon }}
{{ with $image }}
{{ $image = $image.Filter (images.Process "resize 288x288 webp" ) }}
<div class="relative w-48">
<img class="mb-2 h-48 w-48 rounded-full border-2 border-solid border-slate-400 dark:border-slate-50" width="192" height="192" alt="{{ $name | default "Author" }}" src="{{ $image.RelPermalink }}" />
{{ with $icon }}
<div class="absolute bottom-4 right-0 flex h-10 w-10 items-center justify-center rounded-full border-2 border-solid border-slate-50 bg-neutral-300 dark:bg-neutral-500">
{{ . | emojify }}
</div>
{{ end }}
</div>
{{ end }}


<h1 class="text-center text-4xl font-extrabold text-slate-500 dark:text-slate-200">
{{ .Site.Title | markdownify | emojify }}
</h1>

{{ with .Site.Params.Author.greeting }}
<h2 class="mt-4 text-center text-xl text-slate-700 dark:text-slate-400">
{{ . | markdownify | emojify }}
</h2>
{{ end }}
</div>

0 comments on commit d7359b6

Please sign in to comment.