Unverified Commit ab4e6f75 authored by Ethan Madison's avatar Ethan Madison
Browse files

Add sponsor to footer



Michigan Rec Sports requires their logo on our website, so it's added to
the bottom of the footer in the `sponsor.html` partial.

The logic for the partial is somewhat complex, since only one element is
needed to activate it and the image must be displayed on both root and
non-root pages.
Signed-off-by: default avatarEthan Madison <ethan@ethanmad.com>
parent 039b402e
......@@ -6,6 +6,7 @@
<footer class="doc-footer">
{{ partial "social-links.html" . }}
{{ with .Site.Copyright | markdownify }}<p>{{ . }}</p>{{ end }}
{{ partial "sponsor.html" . }}
</footer>
<script src="{{ $baseUrl }}/js/jquery.min.js"></script>
......
{{ $isHomePage := eq .Title .Site.Title }}
{{ $baseUrl := .Site.BaseURL }}
{{ if isset .Site.Params "sponsor" }}
<p>
{{ with .Site.Params.sponsor.link }}
<a href='{{ . }}' target='_blank'>
{{ end }}
{{ if isset .Site.Params.sponsor "logo" }}
<img src='{{ if $isHomePage }}{{ .Site.Params.sponsor.logo }}{{ else }}{{ $baseUrl }}/{{ .Site.Params.sponsor.logo }}{{ end }}' style='width: {{ with .Site.Params.sponsor.size }}{{ . }}{{ else }}100px{{ end }};' title='{{ with .Site.Params.sponsor.text }}{{ . }}{{ else }}Sponsor logo{{ end }}' alt='{{ with .Site.Params.sponsor.text }}{{ . }}{{ else }}Sponsor logo{{ end }}'>
{{ else }}
{{ with .Site.Params.sponsor.text }}{{ . }}{{ end }}
{{ end }}
{{ with .Site.Params.sponsor.link }}
</a>
{{ end }}
</p>
{{ end }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment