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
|
@ -7,9 +7,19 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{/* not found image */}}
|
||||
{{ $notFoundImage := "/images/404.png" }}
|
||||
|
||||
{{/* resize the image. don't resize svg because it is not supported */}}
|
||||
{{ $notFoundImage := resources.Get $notFoundImage}}
|
||||
{{ if and $notFoundImage (ne $notFoundImage.MediaType.SubType "svg") }}
|
||||
{{ $notFoundImage = $notFoundImage.Resize "1500x" }}
|
||||
{{ end }}
|
||||
{{ $notFoundImage = $notFoundImage.RelPermalink}}
|
||||
|
||||
<div class="container">
|
||||
<div class="notFound">
|
||||
<img src="{{ "/assets/images/404.png" | relURL }}" alt="">
|
||||
<img src="{{ $notFoundImage }}" alt="">
|
||||
<div class="message">
|
||||
<h1>404</h1>
|
||||
<h4>The page you are looking for is not there yet.</h4>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue