Set social image sizes in img property

This commit is contained in:
Tony Blyler 2016-11-03 15:59:13 -04:00
parent 419fb6e310
commit 6db1e12b76
3 changed files with 10 additions and 8 deletions

View file

@ -20,29 +20,30 @@
{{ end }}
</a>
<div id="social">
{{ $icon_size := "64px" }}
{{ if .Site.Params.email }}
<a href="mailto:{{ .Site.Params.email }}" title="Email">
<img alt="Email" src="{{ .Site.BaseURL }}/images/email.svg" />
<img alt="Email" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{ .Site.BaseURL }}/images/email.svg" />
</a>
{{ end }}
{{ if .Site.Params.github }}
<a href="https://github.com/{{ .Site.Params.github }}" title="Github">
<img alt="GitHub" src="{{ .Site.BaseURL }}/images/github.svg" />
<img alt="GitHub" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{ .Site.BaseURL }}/images/github.svg" />
</a>
{{ end }}
{{ if .Site.Params.facebook }}
<a href="https://facebook.com/{{ .Site.Params.facebook }}" title="Facebook">
<img alt="Facebook" src="{{ .Site.BaseURL }}/images/facebook.svg" />
<img alt="Facebook" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{ .Site.BaseURL }}/images/facebook.svg" />
</a>
{{ end }}
{{ if .Site.Params.twitter }}
<a href="https://twitter.com/{{ .Site.Params.twitter }}" title="Twitter">
<img alt="Twitter" src="{{ .Site.BaseURL }}/images/twitter.svg" />
<img alt="Twitter" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{ .Site.BaseURL }}/images/twitter.svg" />
</a>
{{ end }}
{{ if .Site.Params.linkedin }}
<a href="https://linkedin.com/in/{{ .Site.Params.linkedin }}" title="LinkedIn">
<img alt="LinkedIn" src="{{ .Site.BaseURL }}/images/linkedin.svg" />
<img alt="LinkedIn" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{ .Site.BaseURL }}/images/linkedin.svg" />
</a>
{{ end }}
</div>

View file

@ -40,8 +40,9 @@ a:hover {
// these images are always SVG
img {
height: 64px;
width: 64px;
// this is now set in the img property itself
//height: 64px;
//width: 64px;
}
}

File diff suppressed because one or more lines are too long