diff options
| author | Francesco <tomaselli.fr@gmail.com> | 2024-04-22 17:12:48 +0200 | 
|---|---|---|
| committer | Francesco <tomaselli.fr@gmail.com> | 2024-04-22 17:12:48 +0200 | 
| commit | b34fd641941143b856d5721b89d6233d5dbbe3d3 (patch) | |
| tree | 1df8a693aa6402cdfc2cddfdf21b30f432d2a3b7 /layouts/_default | |
| parent | 65817dee0444e28ec0b5da2a75a15aab55dbe730 (diff) | |
Theme Update
Diffstat (limited to 'layouts/_default')
| -rw-r--r-- | layouts/_default/_markup/render-image.html | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html new file mode 100644 index 0000000..ffcaab3 --- /dev/null +++ b/layouts/_default/_markup/render-image.html @@ -0,0 +1,9 @@ +{{ $url := .Destination | safeURL }} + +{{/* Append class to figures based on ending -> #dark or #light */}} + +<figure {{ $file_name_array :=split $url "#" }} {{ $file_name_len :=len $file_name_array }} {{ if eq (index +    $file_name_array (sub $file_name_len 1)) "dark" }} class="img-dark" {{ else if eq (index $file_name_array (sub +    $file_name_len 1)) "light" }} class="img-light" {{end }}> +    <img src="{{ $url }}"> +</figure>
\ No newline at end of file | 
