UI improvements to background hero

This commit is contained in:
Nuno Coração
2022-10-17 10:34:34 +01:00
parent 9afae930fd
commit dfb4be490d
3 changed files with 10 additions and 5 deletions

View File

@@ -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;
}
</script>
</section>
<footer class="pt-8 max-w-prose print:hidden">