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

@ -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 "42x" }}
{{ 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>