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

[FEATURE] Different Style for TOC #23

Closed
HEIGE-PCloud opened this issue Apr 25, 2021 · 7 comments · Fixed by #35
Closed

[FEATURE] Different Style for TOC #23

HEIGE-PCloud opened this issue Apr 25, 2021 · 7 comments · Fixed by #35
Labels
enhancement Enhance existing features
Milestone

Comments

@HEIGE-PCloud
Copy link
Owner

The max-width: 800px setting on the article element leaves a lot of blank space on a wide screen. The position and margin of TOC and article need some redesigns.

Different styles can be left as a setting which can be switched by the user manually for each post or entire site, or it can be adjusted by the reader with a button.

@HEIGE-PCloud HEIGE-PCloud added the enhancement Enhance existing features label Apr 25, 2021
@HEIGE-PCloud HEIGE-PCloud added this to the v0.2.11 milestone Apr 25, 2021
@HEIGE-PCloud
Copy link
Owner Author

HEIGE-PCloud commented Apr 25, 2021

Possible layout 1

image

.page {
    margin-left: 10%;
    margin-right: auto;
    max-width: initial;
    width: 70%;
}

@HEIGE-PCloud
Copy link
Owner Author

Possible layout 2

image

.page {
    margin-left: 324px;
    margin-right: auto;
    max-width: initial;
    width: 70%;
}
.toc-auto {
    right: 1168px;
    max-width: 328px;
    visibility: visible;
    position: fixed;
    top: 76px;
}

@HEIGE-PCloud
Copy link
Owner Author

HEIGE-PCloud commented Apr 25, 2021

Possible layout 3

image

image

Use a button to turn TOC on and off. The CSS needs to be further optimized.

@HEIGE-PCloud
Copy link
Owner Author

I think change max-width: 800px; to max-width: initial; can be the first harmless step.

@wu-yue-yu
Copy link

Wow, that's what I'm looking for, I like LoveIt theme, but it seems that the author has abandoned it.
I always thinks that the width is too small, so the reading experience is not good.
BTW, I prefer layouts 1 :)

@HEIGE-PCloud HEIGE-PCloud linked a pull request Apr 30, 2021 that will close this issue
@HEIGE-PCloud
Copy link
Owner Author

Layout 1 has been implemented. This issue will be closed by #35 , if there are future needs for other possible layouts, it's more than welcome to reopen this issue.

@HEIGE-PCloud
Copy link
Owner Author

HEIGE-PCloud commented Apr 30, 2021

Possible layout 4

Add a button to switch toc between auto-toc and static-toc. Should be quite easy to implement.

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

Successfully merging a pull request may close this issue.

2 participants