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

Disappear TOC #311

Open
4lt3rr opened this issue Jan 31, 2025 · 11 comments
Open

Disappear TOC #311

4lt3rr opened this issue Jan 31, 2025 · 11 comments

Comments

@4lt3rr
Copy link

4lt3rr commented Jan 31, 2025

I need help with the fact that even though I have configured it to true I still don't see the TOC in my posts

  toc: {
    enable: true,           // Display the table of contents on the right side of the post
    depth: 2                // Maximum heading depth to show in the table, from 1 to 3
  },

What I need to do to fix this? For more info please view my page

@4lt3rr 4lt3rr changed the title Disapear TOC Disappear TOC Jan 31, 2025
@luxus
Copy link

luxus commented Jan 31, 2025

you have to scroll down and the browser should be a little wider

@Kurumi30
Copy link

Kurumi30 commented Feb 1, 2025

This happened to me too. Adjust the zoom to 80% and you will see the TOC

Image

@4lt3rr
Copy link
Author

4lt3rr commented Feb 1, 2025

Hey thanks for replying me

So how can I fix that instead of zoom to 80%?

@Matthiasbrat
Copy link

Not the best and not supported by firefox but u can :

html {
    zoom: .8; /* Standard Property */
}

@JoeyC-Dev
Copy link
Contributor

JoeyC-Dev commented Feb 2, 2025

Will be better if TOC can be expanded/collapsed, instead of making it hidden when the screen is small.
/feature_request

@luxus
Copy link

luxus commented Feb 2, 2025

yeah i had someone asking for that too.. or maybe put it on top if the screen is too small

@4lt3rr
Copy link
Author

4lt3rr commented Feb 13, 2025

Not the best and not supported by firefox but u can :

html {
zoom: .8; /* Standard Property */
}

Where can I put these?

Does it work for Edge

@Matthiasbrat
Copy link

Not the best and not supported by firefox but u can :
html {
zoom: .8; /* Standard Property */
}

Where can I put these?

Does it work for Edge

src/styles/main.css

@Exiled1
Copy link

Exiled1 commented Feb 19, 2025

You can also go to the TOC.astro + MainGridLayout.astro file and change the TOC container in MainGridLayout to be a bit more permissive with sizes in the tailwind CSS, probably not the best change to make the whole site start zoomed.

Specifically this line, Remove the 2xl:block

<div class="absolute w-full z-0 hidden 2xl:block">

And if that doesn't work modify the toc-wrapper to something like this to not push the wrapper too much

<div id="toc-wrapper" class:list={["block lg:block transition absolute top-0 right-0 lg:-right-[var(--toc-width)] w-[var(--toc-width)] flex items-center",

@luxus
Copy link

luxus commented Feb 20, 2025

i guess the best solution would be that the toc move over the article on smaller windowsize, did someone implement that?

@Exiled1
Copy link

Exiled1 commented Feb 20, 2025

i guess the best solution would be that the toc move over the article on smaller windowsize, did someone implement that?

If you get it looking nice on mobile let me know because right now I'm gonna settle for a button haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants