-
Notifications
You must be signed in to change notification settings - Fork 140
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
fix(api-reference): allow users to add custom header / footers easily #1899
Conversation
|
#1990 Bundle Size — 1.95MiB (+0.05%).Warning Bundle contains 4 duplicate packages – View duplicate packages Bundle metrics
Bundle analysis report Branch cam/fix-allow-custom-header-foot... Project dashboard |
Preview deployed to https://6a2a0538-a507-449a-b3fa-b7713bf4581c--scalar-deploy-preview.netlify.app |
@@ -70,6 +70,20 @@ useResizeObserver(documentEl, (entries) => { | |||
elementHeight.value = entries[0].contentRect.height + 'px' | |||
}) | |||
|
|||
const yPosition = ref(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oooo we shouldn't calculate style in js. doesn't work on SSR. Can we use only css instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They could technically overwrite the position with --scalar-y-offset
if they had a custom header so could be fine?
Is that an alternative solution to #1775? |
closed in favour of #2198 |
This is a draft proposal to allow users to easily add custom headers and footers
unlike the other wonderful solutions this one relies on removing scroll from
.scalar-api-reference
and instead using the body for scrolling.Why this instead of the other?
Some users require scrolling of the whole page rather than just
.scalar-api-reference
which creates double scrollbars on the website when they embed scalar, this fixes that.demo:
headerfootervid.mov
if we choose to go with this approach there remains some todo's:
overflow:hidden
in /scalar-org so this approach will work