feat: add min_height option to banner
This commit is contained in:
parent
325912a0eb
commit
f39f3884cc
3 changed files with 13 additions and 0 deletions
|
@ -151,6 +151,7 @@ yat:
|
|||
# opacity: 1.0
|
||||
# background: "rgba(0, 0, 0, 0.8)"
|
||||
# height: "640px"
|
||||
# min_height: null
|
||||
|
||||
# Excerpt size setting
|
||||
# excerpt_size: 350
|
||||
|
|
|
@ -26,3 +26,8 @@
|
|||
{% assign name = 'banner.height' %}
|
||||
{%- include functions.html func='get_value' -%}
|
||||
{% assign banner_height = return %}
|
||||
|
||||
{%- include functions.html func='log' level='debug' msg='Get banner_min_height value' -%}
|
||||
{% assign name = 'banner.min_height' %}
|
||||
{%- include functions.html func='get_value' -%}
|
||||
{% assign banner_min_height = return %}
|
||||
|
|
|
@ -25,7 +25,14 @@
|
|||
{% endif %}
|
||||
{% if banner_height %}
|
||||
<style>
|
||||
{% assign num = banner_height | times: 1 %}
|
||||
{% assign unit = banner_height | replace_first: num %}
|
||||
{% assign banner_min_height = banner_min_height | default: banner_height %}
|
||||
html .page-banner {
|
||||
height: {{ banner_height | times: 0.368 | append: unit }};
|
||||
min-height: {{ banner_min_height }};
|
||||
}
|
||||
html[data-scroll-status="top"] .page-banner {
|
||||
height: {{ banner_height }};
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue