Add image processing to missing components + Update examples

This commit is contained in:
Emruz Hossain 2021-01-01 01:41:40 +06:00
parent 94138f89f0
commit 7317ba53de
26 changed files with 171 additions and 111 deletions

View file

@ -16,6 +16,23 @@
{{ end }}
{{ end }}
{{/* footer logos */}}
{{ $themeLogo := "/images/theme-logo.png" }}
{{ $hugoLogo := "/images/hugo-logo.svg" }}
{{/* resize the logos. don't resize svg because it is not supported */}}
{{ $themeLogo:= resources.Get $themeLogo}}
{{ if and $themeLogo (ne $themeLogo.MediaType.SubType "svg") }}
{{ $themeLogo = $themeLogo.Resize "32x" }}
{{ end }}
{{ $themeLogo = $themeLogo.RelPermalink}}
{{ $hugoLogo:= resources.Get $hugoLogo}}
{{ if and $hugoLogo (ne $hugoLogo.MediaType.SubType "svg")}}
{{ $hugoLogo = $hugoLogo.Resize "32x" }}
{{ end }}
{{ $hugoLogo = $hugoLogo.RelPermalink}}
<footer class="container-fluid text-center align-content-center footer pb-2">
<div class="container pt-5">
<div class="row text-left">
@ -76,7 +93,7 @@
<div class="row text-left">
<div class="col-md-4">
<a id="theme" href="https://github.com/hossainemruz/toha" target="#">
<img src="{{ "/assets/images/inverted-logo.png" | relURL }}">
<img src="{{ $themeLogo }}">
Toha
</a>
</div>
@ -84,7 +101,7 @@
<div class="col-md-4 text-right">
<a id="hugo" href="https://gohugo.io/">{{ i18n "hugoAttributionText" }}
<img
src="{{ "/assets/images/hugo-logo-wide.svg" | relURL }}"
src="{{ $hugoLogo }}"
alt="Hugo Logo"
height="18"
/>