From dfb4be490dcece9f03680e4c0ea61816e4781e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 17 Oct 2022 10:34:34 +0100 Subject: [PATCH] UI improvements to background hero --- assets/css/compiled/main.css | 4 ++-- layouts/_default/single.html | 9 +++++++-- layouts/partials/hero/background.html | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 558654bb..de1f909c 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1634,8 +1634,8 @@ select { height: 2rem; } -.h-\[45vh\] { - height: 45vh; +.h-\[300px\] { + height: 300px; } .h-36 { diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c071fced..4766d4a4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -146,10 +146,15 @@ var header = document.getElementById("single_header") var style = getComputedStyle(header); - var margin = '-'+ (parseInt(style.height) + parseInt(style.marginTop) + parseInt(style.marginBottom) + 20) + 'px' var hero = document.getElementById('hero') - if(hero) + if(hero){ + var margin = '-'+ (parseInt(style.height) + parseInt(style.marginTop) + parseInt(style.marginBottom) + 20) + 'px' + var height = (-parseInt(margin) + parseInt(getComputedStyle(hero).height)) + "px" + console.log(height) hero.style["margin-bottom"] = margin; + hero.style["height"] = height; + } +