dashboard
repositories
filestore
activity
search
login
external-software
/
github_gohugo_theme_compose
mirror of
https://github.com/onweru/compose.git
summary
commits
tree
docs
forks
compare
blame
|
history
|
raw
add shortcode
weru
20.41.2020
41a910951bb7dd39e72e9f3247c7660eefe9a18f
[external-software/github_gohugo_theme_compose.git]
/
layouts
/
shortcodes
/
picture.html
1
2
3
4
5
6
7
8
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>