-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Single page architecture #66
Comments
I'd be happy to implement this if desired. I'd probably use KnockoutJS for controlling the content, and require to load the individual page content. |
This question was already raised in #57 and I've made a theme that supports it, will be releasing it tonight :) |
Cool :-) One of the niggles that e was bothering me was the progress bar animation -
|
In my theme, I've changed the progress bar to not show the chapters (completely optional, and easy to change through the variables.less) and the progress animation works. I need to create a gruntfile for my theme. As of right now, when a new user comes it's very unclear that you must first build the theme and then reference it when you build/serve. |
mrpotes I've released it here: https://github.com/Nijikokun/clarity I have to fix the routing, push state doesn't seem to reload the page, but everything else works as intended. |
👍 Looks nice ! I think we should move towards themes being |
About static pages vs dynamic ajax loading, @SamyPesse and I made the concious decision to keep it simple to start with, so that if fallbacks nicely and works pretty much everywhere. @nijikokun Since you're the first external person to write a theme (that we know of ), it would be great to have your feedback on what you think could be made easier and improved.
Thanks for the good work ! |
The most complex parts:
The rest of the ideas and things that could be made easier are actually just a theming thing, it's like wordpress themes, gitbook essentially just compiles markdown into the theme, and the theme handles the rest (such as routing, and functionality) So plugin systems, and all of that would be on themes it seems (it all comes down to upkeep). I agree on themes being on NPM. I can publish clarity now. |
I agree entirely with the above. BTW, @SamyPesse and I really like your clarity theme and were wondering if you would be interested in it becoming the default |
Thank you :) wow! that would be awesome! (Fixes are finished) |
@nijikokun please make a PR when you're ready (just the theme changement, not the single page architecture), and add your name to the AUTHORS.md file ;) |
I just merged @nijikokun clarity theme into gitbook and improve its stability. So GitBook now uses ajax refresh. |
In site mode, as the layout of the book ultimately doesn't change, it would be good if once the site had loaded, proceeding through the pages just involved changing the main content pane, rather than reloading the entire window, which results in an annoying flicker, as well as incorrect animation on going backwards.
The text was updated successfully, but these errors were encountered: