groundedsage / VeganBN-website

Real World JAM stack with Clojure, Boot, Rum, Devcards
5 stars 1 forks source link

Navigation and devcards. #1

Closed ericnormand closed 7 years ago

ericnormand commented 7 years ago

Navigation

Navigation uses the HTML5History class from Google Closure Library. It has a fallback for browsers that do not support it.

I've hooked the bidi routes into the even triggered in navigation and created a simple component to handle links to use the navigation api.

Finally, I got devcards working. Just visit /devcards.html.

Static rendering

We can now do a server-side prerender using rum.

It required using .cljc as the file extension instead of .cljs. Also, a few things were redefined just for the Clojure version using #? reader conditionals.

groundedsage commented 7 years ago

Thank you so much for this! I would have never figured this out on my own. I managed to understand the majority of it. Things I lack knowledge of are Google Closure, basics of HTTP and the pantomime.mime library goes literally straight over my head atm.

It all merged pretty seamlessly. Devcards remains at the top of the page after you visit the page and return back + visit other pages.

I'll give myself some time to comprehend the new code before I ask any questions.