Add new buttons
This commit is contained in:
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 |
|
@ -151,8 +151,6 @@ below. You have an option depending on your website's color scheme :-)
|
||||||
|
|
||||||
| Type | Preview | HTML |
|
| Type | Preview | HTML |
|
||||||
| -----|---------|--------|
|
| -----|---------|--------|
|
||||||
| 200x40 Banner |  | ```<a href="https://redstrate.com/"><img src="https://redstrate.com/banner.webp"/></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>``` |
|
||||||
| 200x40 Banner |  | ```<a href="https://redstrate.com/"><img src="https://redstrate.com/banner2.webp"/></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>``` |
|
||||||
| 88x31 Button |  | ```<a href="https://redstrate.com/"><img src="https://redstrate.com/button-light.png"/></a>``` |
|
|
||||||
| 88x31 Button | | ```<a href="https://redstrate.com/"><img src="https://redstrate.com/button-dark.png"/></a>``` |
|
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
|
|
||||||
{{ $path := printf "/links/%s" $banner}}
|
{{ $path := printf "/links/%s" $banner}}
|
||||||
{{ $img := resources.Get $path }}
|
{{ $img := resources.Get $path }}
|
||||||
|
{{ if not $img }}
|
||||||
|
{{ $img = resources.GetRemote $banner }}
|
||||||
|
{{ end }}
|
||||||
{{ with $img }}
|
{{ with $img }}
|
||||||
<!-- Some browsers (safari) sucks and blocks 88x31, so force them to be 89x31 instead. -->
|
<!-- 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 }}">
|
<img title="{{ $label}}" src="{{ .RelPermalink }}" style="width: auto; height: 31px" alt="{{ $label }}" width="{{ add .Width 1 }}" height="{{ .Height }}">
|
||||||
|
|
Loading…
Add table
Reference in a new issue