fix: wrong default banner opacity and height

This commit is contained in:
jeffreytse 2021-06-17 20:54:49 +08:00
parent 941fd3c248
commit c593085877

View file

@ -16,19 +16,25 @@
{%- include functions.html func='get_banner' -%} {%- include functions.html func='get_banner' -%}
{% if banner_image %} {% if banner_image %}
{% if banner_height %}
<style> <style>
html .page-banner { html .page-banner {
height: {{ banner_height }}; height: {{ banner_height }};
} }
</style>
{% endif %}
{% if banner_opacity %}
<style>
html .page-banner .page-banner-img > *:first-child { html .page-banner .page-banner-img > *:first-child {
opacity: {{ banner_opacity }}; opacity: {{ banner_opacity }};
} }
html[data-theme="dark"] .page-banner .page-banner-img > *:first-child { html[data-theme="dark"] .page-banner .page-banner-img > *:first-child {
opacity: {{ banner_opacity | times: 0.6 }}; opacity: {{ banner_opacity | times: 0.718 }};
} }
</style> </style>
{% endif %}
<section class="page-banner"> <section class="page-banner">
<div class="page-banner-img"> <div class="page-banner-img">
<div style="background-image: url({{ banner_image }})"></div> <div style="background-image: url({{ banner_image }})"></div>