1
0
mirror of https://github.com/Damillora/Yuika synced 2024-11-13 21:47:32 +00:00

fix: fallback to cover image when site background isn't available

This commit is contained in:
Damillora 2021-04-20 17:50:19 +07:00
parent 506123bfac
commit 276119e573

View File

@ -36,5 +36,25 @@ for it, and apply those styles to the <header> tag. Else, we just output a <head
{{else}}
<style type="text/css">
.responsive-header-img {
background-image: url({{img_url @site.cover_image size='xl'}});
background-size: cover;
}
@media(max-width: 1000px) {
.responsive-header-img {
background-image: url({{img_url @site.cover_image size='l'}});
background-position: center;
}
}
@media(max-width: 600px) {
.responsive-header-img {
background-image: url({{img_url @site.cover_image size='m'}});
background-position: center;
}
}
</style>
{{/if}}