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

Single page architecture #66

Closed
mrpotes opened this issue Apr 9, 2014 · 12 comments
Closed

Single page architecture #66

mrpotes opened this issue Apr 9, 2014 · 12 comments

Comments

@mrpotes
Copy link

mrpotes commented Apr 9, 2014

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.

@mrpotes
Copy link
Author

mrpotes commented Apr 9, 2014

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.

@nijikokun
Copy link

This question was already raised in #57 and I've made a theme that supports it, will be releasing it tonight :)

@mrpotes
Copy link
Author

mrpotes commented Apr 9, 2014

Cool :-)

One of the niggles that e was bothering me was the progress bar animation -
died your theme fix that too?
On 9 Apr 2014 19:34, "Nijiko Yonskai" notifications@github.com wrote:

This question was already raised in #57https://github.com/GitbookIO/gitbook/issues/57and I've made a theme that supports it, will be releasing it tonight :)

Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-40000238
.

@nijikokun
Copy link

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.

@nijikokun
Copy link

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.

@AaronO
Copy link

AaronO commented Apr 10, 2014

👍 Looks nice !

I think we should move towards themes being npm-installable. And have a convention for package names such as : gitbook-theme-clarity. What do you think ?

@AaronO
Copy link

AaronO commented Apr 10, 2014

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.

gitbook (and thus it's theme system) is barely a week old, so it's a young project that needs to be shaped by feedback from users like yourself.

Thanks for the good work !

@nijikokun
Copy link

The most complex parts:

  1. Building, and compiling the theme. Maybe it should be gitbook that does this, not the end-user.
  2. Not knowing whether gitbook is actually using the theme until you view the site.
  3. If we setup a naming convention gitbook can use that to load the npm and build it. I've setup clarity to use npm install && npm build to build the assets folder.

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.

@AaronO
Copy link

AaronO commented Apr 10, 2014

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 gitbook theme ?

@nijikokun
Copy link

Thank you :) wow! that would be awesome!

(Fixes are finished)

@SamyPesse
Copy link
Member

@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 ;)

@SamyPesse
Copy link
Member

I just merged @nijikokun clarity theme into gitbook and improve its stability.

So GitBook now uses ajax refresh.

Nyar233 pushed a commit to Nyar233/gitbook that referenced this issue May 12, 2024
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

4 participants