Transition to Hugo Image Processing (#173)
* Update layout to use Hugo Image Processing. Created shortcode rimg that uses the srcset attribute to display responsive images. * Copy Static images to assets folder. * Add image processing to missing components + Update examples * Fix rendering in https://themes.gohugo.io/ Co-authored-by: Emruz Hossain <emruz@appscode.com>
This commit is contained in:
parent
ba1d6014d9
commit
a2b3c7fda2
53 changed files with 352 additions and 75 deletions
|
@ -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"
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue