mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 22:45:42 -06:00
Merge pull request #133 from nunocoracao/132-background-hero-images-improvements
UI improvements to background hero
This commit is contained in:
commit
3cf081ad9e
3 changed files with 10 additions and 5 deletions
|
@ -1634,8 +1634,8 @@ select {
|
|||
height: 2rem;
|
||||
}
|
||||
|
||||
.h-\[45vh\] {
|
||||
height: 45vh;
|
||||
.h-\[300px\] {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.h-36 {
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
{{- with $featured -}}
|
||||
{{ with .Resize "1200x" }}
|
||||
<div id="hero" class="relative h-[45vh] single_hero_background nozoom" style="background-image:url({{ .RelPermalink }});">
|
||||
<div id="hero" class="relative h-[300px] single_hero_background nozoom" style="background-image:url({{ .RelPermalink }});">
|
||||
<div class="hero_gradient bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue