summaryrefslogtreecommitdiff
path: root/_includes/views
diff options
context:
space:
mode:
authorjeffreytse <jeffreytse.mail@gmail.com>2021-06-17 21:32:19 +0800
committerjeffreytse <jeffreytse.mail@gmail.com>2021-06-17 21:51:00 +0800
commitf39f3884cc9670efb31bec2a73ea4a0be9b46140 (patch)
tree204579672e0f5ef74285762994aa3d4241512e39 /_includes/views
parent325912a0eb0577e09c9de80f6361c3bfffc4c628 (diff)
feat: add min_height option to banner
Diffstat (limited to '_includes/views')
-rw-r--r--_includes/views/banner.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/_includes/views/banner.html b/_includes/views/banner.html
index d70c3a7..32bb3cd 100644
--- a/_includes/views/banner.html
+++ b/_includes/views/banner.html
@@ -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>