Add new buttons

This commit is contained in:
Joshua Goins 2024-10-13 15:28:47 -04:00
parent b95731e61b
commit 641826e61c
6 changed files with 5 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -151,8 +151,6 @@ below. You have an option depending on your website's color scheme :-)
| Type | Preview | HTML |
| -----|---------|--------|
| 200x40 Banner | ![](/banner.webp) | ```<a href="https://redstrate.com/"><img src="https://redstrate.com/banner.webp"/></a>``` |
| 200x40 Banner | ![](/banner2.webp) | ```<a href="https://redstrate.com/"><img src="https://redstrate.com/banner2.webp"/></a>``` |
| 88x31 Button | ![](/button-light.png) | ```<a href="https://redstrate.com/"><img src="https://redstrate.com/button-light.png"/></a>``` |
| 88x31 Button |![](/button-dark.png) | ```<a href="https://redstrate.com/"><img src="https://redstrate.com/button-dark.png"/></a>``` |
| 88x31 Button | {{< out-link banner="https://images.redstrate.com/misc/button.png" link="" label="" >}} | ```<a href="https://redstrate.com/"><img src="button.png"/></a>``` |
| 88x31 Button (Text-only) | {{< out-link banner="https://images.redstrate.com/misc/button2.png" link="" label="" >}} | ```<a href="https://redstrate.com/"><img src="button2.png"/></a>``` |

View file

@ -6,6 +6,9 @@
{{ $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 }}">