pidgin/nest

Use less terrible SourceForge logo.

2019-08-20, Elliott Sales de Andrade
f2a64e7fba0e
Parents 481c70731b36
Children 9996e439a48d
Use less terrible SourceForge logo.

The SVG does not seem to specify a height or width, so it needs a small
modification to add a min-width style.
--- a/hugo/data/supporters.json Tue Aug 20 01:37:05 2019 -0400
+++ b/hugo/data/supporters.json Tue Aug 20 16:36:18 2019 -0400
@@ -1,7 +1,8 @@
[
{
"url": "https://sourceforge.net",
- "badge": "Sourceforge_logo.png"
+ "badge": "https://sourceforge.net/sflogo.php?type=17&group_id=235",
+ "style": "min-width:190px"
}, {
"url": "https://networkredux.com/",
"badge": "networkredux.png"
--- a/hugo/layouts/partials/supporters.html Tue Aug 20 01:37:05 2019 -0400
+++ b/hugo/layouts/partials/supporters.html Tue Aug 20 16:36:18 2019 -0400
@@ -2,6 +2,20 @@
<b>{{ T "Our-Supporters" }}</b>
<div>
{{ range .Site.Data.supporters }}
- <a href="{{ .url | safeHTMLAttr }}"> <img src="/images/badges/{{ .badge }}" /> </a> {{ end }}
+ {{ $url := urls.Parse .badge }}
+ {{ $style := "" }}
+ {{ if .style }}
+ {{ $style = printf "style=\"%s\"" .style }}
+ {{ end }}
+ {{ if $url.Scheme }}{{/* Absolute path */}}
+ <a href="{{ .url | safeHTMLAttr }}">
+ <img src="{{ .badge }}" {{ $style | safeHTMLAttr }}/>
+ </a>
+ {{ else }}
+ <a href="{{ .url | safeHTMLAttr }}">
+ <img src="/images/badges/{{ .badge }}" {{ $style | safeHTMLAttr }}/>
+ </a>
+ {{ end }}
+ {{ end }}
</div>
</section>
Binary file hugo/static/images/badges/Sourceforge_logo.png has changed