Make banners pixelated, fix rendering issues on safari
This commit is contained in:
parent
ee0c2d2356
commit
2e0a27c0a8
2 changed files with 3 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
{{ range $.Site.Menus.badges }}
|
||||
{{ $badgeScope := . }}
|
||||
{{ with resources.Get .URL }}
|
||||
<img width="{{ .Width }}" height="{{ .Height }}" src="{{ .Permalink }}" alt="{{ $badgeScope.Name }}">
|
||||
<img style="image-rendering: pixelated;" width="{{ .Width }}" height="{{ .Height }}" src="{{ .Permalink }}" alt="{{ $badgeScope.Name }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
{{ $path := printf "/links/%s" $banner}}
|
||||
{{ $img := resources.Get $path }}
|
||||
{{ with $img }}
|
||||
<img src="{{ .RelPermalink }}" style="width: auto; height: 31px;" alt="{{ $label }}" width="{{ .Width }}" height="{{ .Height }}"/>
|
||||
<!-- Some browsers (safari) sucks and blocks 88x31, so force them to be 89x31 instead. -->
|
||||
<img src="{{ .RelPermalink }}" style="width: auto; height: 31px; image-rendering: pixelated;" alt="{{ $label }}" width="{{ add .Width 1 }}" height="{{ .Height }}"/>
|
||||
{{ end }}
|
||||
|
||||
</a>
|
||||
|
|
Loading…
Add table
Reference in a new issue