fix(Header): fixed height for header image to not cause css glitch at startup
This commit is contained in:
parent
fb7aa315b4
commit
5bd5a5f0df
4 changed files with 8 additions and 9 deletions
|
|
@ -220,7 +220,7 @@ function renderCard(organization) {
|
|||
let currentTag = null
|
||||
let currentCardContainer = null
|
||||
|
||||
function enableTag(node, sortOperation = false) {
|
||||
function enableTag(node, sortOperation = false, initialOperation = false) {
|
||||
|
||||
let all = node.id === 'nav-all'
|
||||
let tagId = ''
|
||||
|
|
@ -250,12 +250,12 @@ function enableTag(node, sortOperation = false) {
|
|||
}
|
||||
|
||||
// close the menu if on mobile
|
||||
if (navEnablerExists) {
|
||||
if (navEnablerExists && !initialOperation) {
|
||||
navOpened = !navOpened
|
||||
closeMenu()
|
||||
document.getElementsByClassName('content')[0].scrollIntoView(true)
|
||||
} else {
|
||||
if (window.scrollY() > 300) {
|
||||
if (window.scrollY() > 300 && !initialOperation) {
|
||||
document.getElementsByClassName('content')[0].scrollIntoView(true)
|
||||
}
|
||||
}
|
||||
|
|
@ -368,5 +368,5 @@ window.addEventListener('DOMContentLoaded', () => {
|
|||
iconHTML: node.querySelector('.nav-icon').innerHTML
|
||||
})
|
||||
})
|
||||
enableTag(navAll)
|
||||
enableTag(navAll, false, true)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
.header-image img {
|
||||
width: 7em;
|
||||
height: 158px;
|
||||
}
|
||||
|
||||
.header-home-link {
|
||||
|
|
@ -418,6 +419,7 @@ Nav
|
|||
}
|
||||
.header-image img {
|
||||
width: 6em;
|
||||
height: 135px;
|
||||
}
|
||||
.header-sub-title {
|
||||
margin-top: 1em;
|
||||
|
|
@ -431,9 +433,6 @@ Nav
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.card {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue