Directly link to my own buttons

This commit is contained in:
Joshua Goins 2024-10-13 15:36:27 -04:00
parent 641826e61c
commit ebe746ca63
2 changed files with 4 additions and 6 deletions

View file

@ -146,8 +146,7 @@ Want out of the button-less shame list? Make a button!
# Incoming
If you want to link back to my website, you can use one of the two buttons
below. You have an option depending on your website's color scheme :-)
Please host these images yourself. I have two options depending on your preference:
| Type | Preview | HTML |
| -----|---------|--------|

View file

@ -6,12 +6,11 @@
{{ $path := printf "/links/%s" $banner}}
{{ $img := resources.Get $path }}
{{ if not $img }}
{{ $img = resources.GetRemote $banner }}
{{ end }}
{{ with $img }}
<!-- Some browsers (safari) sucks and blocks 88x31, so force them to be 89x31 instead. -->
<img title="{{ $label }}" src="{{ .RelPermalink }}" style="width: auto; height: 31px" alt="{{ $label }}" width="{{ add .Width 1 }}" height="{{ .Height }}">
{{ else }}
<img title="{{ $label }}" src="{{ $banner }}" style="width: auto; height: 31px" alt="{{ $label }}" width="89" height="31">
{{ end }}
</a>