Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.99] Navbar fixes in event&contentpage #28

Closed
wants to merge 1 commit into from

Conversation

Ciel-exe
Copy link

@Ciel-exe Ciel-exe commented Sep 16, 2022

"trigger-top number undefined The distance px to top of target to trigger top affix. (if not set, use top prop)"
"top number undefined The css top property after trigger top affix. (if not set, use trigger-top prop)"
(https://www.naiveui.com/en-US/dark/components/affix)
What could have happened here is that you specified only one and the other was set to the same value, which caused the issue. I modified the top value to reflect what i did on my console but i'm not sure if this will really work as intended as i have no proof of testing

trigger-top	number	undefined	The distance px to top of target to trigger top affix. (if not set, use top prop)
top	                number	undefined	The css top property after trigger top affix. (if not set, use trigger-top prop)
What could have happened here is that you specified only one and the other was set to the same value, which caused the issue. I modified the top value to reflect what i did on my console but i'm not sure if this will really work as intended as i have no proof of testing
@050644zf
Copy link
Owner

050644zf commented Sep 16, 2022

Ah yeah, now i recalled what was going on before.

I was trying to make navbar's width met the width of content. However, once i scroll down and triggered the affix effect, the width of the nav bar will be shrunk. So it looks weird when it's attached to the top. I failed to fixed the width issue and choose to leave there a blank only to make it look better.

@Ciel-exe
Copy link
Author

I honestly like how the navbar is small. I now know it's unintended but if that was big as the whole width of the page it would look kinda oppressive, this way is cleaner in my eyes.

@050644zf
Copy link
Owner

I honestly like how the navbar is small. I now know it's unintended but if that was big as the whole width of the page it would look kinda oppressive, this way is cleaner in my eyes.

i mean not the whole page, but the text area.

@050644zf
Copy link
Owner

050644zf commented Sep 16, 2022

so the actual problem is when you scroll down the page and triggered the affix, the width suddenly shrunk which is not i expected. I hope the navbar can keep it's width

@Ciel-exe
Copy link
Author

I see
I was even able to replicate the error by setting the width to webkit fill available space or something like that.
So, basically you wanted the arrow to reach the border shown here between blue and orange-ish?
image

@050644zf
Copy link
Owner

I see
I was even able to replicate the error by setting the width to webkit fill available space or something like that.
So, basically you wanted the arrow to reach the border shown here between blue and orange-ish?
image

exactly

@Ciel-exe
Copy link
Author

It makes sense that by adding position: fixed the width shrinks tho, cause it's no more relative to the previous parent. I'll play around a bit and see if i can find solutions to that

@Ciel-exe
Copy link
Author

Ciel-exe commented Sep 16, 2022

I know that may not sound the cleanest solution to you, but i forced my correction by editing these lines on these elements:
image

image

Only thing left to do is programmatically check if the parent element has the class of "n-affix--affixed" to change only in that case the value of max-width to 45% and setting it back to normal (100%) when it doesn't have the said class.
I only changed the max-width value in the second image.

@050644zf 050644zf changed the title Update contentpage.vue Navbar fixes in event&contentpage Sep 22, 2022
@050644zf 050644zf changed the title Navbar fixes in event&contentpage [0.99] Navbar fixes in event&contentpage Sep 22, 2022
@050644zf 050644zf closed this May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants