Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

Summary should be visible from start #22

Open
Soreine opened this issue Jun 15, 2016 · 5 comments
Open

Summary should be visible from start #22

Soreine opened this issue Jun 15, 2016 · 5 comments

Comments

@Soreine
Copy link
Contributor

Soreine commented Jun 15, 2016

Currently, the Summary is hidden at start (CSS property left: -300px), and then is displayed through JavaScript.
We could do the other way around. The Summary would be visible from the start and hidden with JavaScript if needed.

This would have two advantages:

  • The Summary would not "flash" into the page after loading, in the common case where the user wants the Summary to be visible.
  • User with JavaScript disabled would still be able to access the, mostly static, content of the book.
@SamyPesse
Copy link
Member

Summary is hidden by default so that it works well on mobile.

We can maybe make a mix of both solutions to avoid flashing on mobile and desktop.

@jpreynat
Copy link
Member

This is actually already taken care of in the sidebar module:

function init() {
    // Init last state if not mobile
    if (!platform.isMobile()) {
        toggleSidebar(gitbook.storage.get('sidebar', true), false);
    }
    // ...

@Soreine
Copy link
Contributor Author

Soreine commented Sep 28, 2016

Re-opening issue since @jpreynat misunderstood the issue :)

@Soreine Soreine reopened this Sep 28, 2016
@Mackiovello
Copy link

This is indeed quite annoying. If I understand the issue correctly, this is the slight visual glitch that occurs by having the sidebar hidden by default:
firstgif

If this is not going to be fixed, how is it possible to modify the default theme for your own GitBook? Modifying styling and the header is no problem, not quite sure if it's possible to modify the JavaScript, though.

@Mackiovello
Copy link

Do we have an update on this? It is quite an ugly glitch that would be easy to fix.

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

No branches or pull requests

4 participants