mirror of
https://gitlab.com/thelazyoxymoron/siddhartha-golu-website.git
synced 2025-07-27 04:47:59 +02:00
Completed migration from hugo-swift-theme to PaperMod
This commit is contained in:
9
layouts/shortcodes/picture.html
Normal file
9
layouts/shortcodes/picture.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{{- $normal := .Get 0 }}
|
||||
{{- $dark := .Get 1 }}
|
||||
{{- $alt := .Get 2 }}
|
||||
{{- $normalPath := absURL (printf "images/%s" $normal) }}
|
||||
{{- $darkPath := absURL (printf "images/%s" $dark) }}
|
||||
<picture class = 'nav_logo'>
|
||||
<source srcset = '{{ $darkPath }}' media="(prefers-color-scheme: dark)">
|
||||
<img srcset = '{{ $normalPath }}' alt = '{{ $alt }}'>
|
||||
</picture>
|
Reference in New Issue
Block a user