diff options
author | amzrk2 | 2020-06-16 16:29:16 +0800 |
---|---|---|
committer | amzrk2 | 2020-06-16 16:29:16 +0800 |
commit | bcd4d3fdb1b5e6a6ede2dbc4ea64fc47642a2173 (patch) | |
tree | da3e34c7e03af9993d247d5ac001906cabf6117b /layouts/partials | |
parent | f88c7b78f224bf746b831001ec8cef01693a4b3c (diff) | |
download | hugo-theme-fuji-bcd4d3fdb1b5e6a6ede2dbc4ea64fc47642a2173.tar.gz hugo-theme-fuji-bcd4d3fdb1b5e6a6ede2dbc4ea64fc47642a2173.tar.bz2 hugo-theme-fuji-bcd4d3fdb1b5e6a6ede2dbc4ea64fc47642a2173.zip |
Option darken image
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/head.html | 1 | ||||
-rw-r--r-- | layouts/partials/styles.html | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 88d3d19..1bcdf85 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -29,6 +29,7 @@ {{ template "_internal/opengraph.html" . }} {{ template "_internal/twitter_cards.html" . }} <!-- dep --> +{{ partial "styles.html" . }} {{ if .Site.Params.useHugoPipes }} {{ $options := (dict "targetPath" "assets/css/fuji-custom.min.css" "outputStyle" "compressed") }} {{ $style := resources.Get "scss/fuji.scss" | resources.ToCSS $options }} diff --git a/layouts/partials/styles.html b/layouts/partials/styles.html new file mode 100644 index 0000000..cc6d930 --- /dev/null +++ b/layouts/partials/styles.html @@ -0,0 +1,13 @@ +{{ if ne .Site.Params.disableDarkImage true }} +<style> + @media (prefers-color-scheme: dark) { + body[data-theme='auto'] img { + filter: brightness(60%); + } + } + + body[data-theme='dark'] img { + filter: brightness(60%); + } +</style> +{{ end }}
\ No newline at end of file |