Liking cljdoc? Tell your friends :D

clerk.core

Clerk: In-page navigation (scrolling) for SPAs. Tries to mimic the default browser behaviour for ”regular” sites. Use Clerk together with your router and HTML5 history manager of choice.

New navigxation history entries are always scrolled to the hash target in the location, or, when the target is missing, the top of the page. When the user is navigating to existing history entries we restore the scroll position. The reason for this is that the browser's own restoration is not timed with the rendering of the page and this crates a 'jumpy' experience. Unfortunately only Chrome supports a reliable way to disable the browser's scroll restoration, but at least there we can create a smooth scroll restoration experience.

Clerk: In-page navigation (scrolling) for SPAs.
Tries to mimic the default browser behaviour for ”regular” sites.
Use Clerk together with your router and HTML5 history manager of choice.
          
New navigxation history entries are always scrolled to the hash target in the location,
or, when the target is missing, the top of the page.
When the user is navigating to existing history entries we restore the scroll position.
The reason for this is that the browser's own restoration is not timed with the rendering
of the page and this crates a 'jumpy' experience. Unfortunately only Chrome supports a
reliable way to disable the browser's scroll restoration, but at least there we can create a
smooth scroll restoration experience.
raw docstring

after-render!cljs

(after-render!)

Call this after the page has rendered to perform any deferred page-navigation (i.e. scrolling).

Call this after the page has rendered to perform any deferred
page-navigation (i.e. scrolling).
sourceraw docstring

initialize!cljs

(initialize!)

Call when your app is starting.

Call when your app is starting.
sourceraw docstring

(navigate-page! url & [top-element-id])

Call this on every navigation. Navigates the page by scrolling to the appropriate y position. It's either:

  • A history stack navigation => any saved scroll position should be used
  • A new history stack element => either scroll to the top or to any hash target (URL fragment) In both cases consider if the navigation is:
  • on the same page -> scroll immediatelly (and smooth)
  • not on the same page -> defer scrolling (for an after render handler to deal with If a top-element-id is given we translate the y coordinate to the bottom the top element (sometimes needed with those sticky menus at the top of pages.)
Call this on every navigation.
Navigates the page by scrolling to the appropriate y position. It's either:
* A history stack navigation => any saved scroll position should be used
* A new history stack element => either scroll to the top or to any hash target (URL fragment)
In both cases consider if the navigation is:
* on the same page -> scroll immediatelly (and smooth)
* not on the same page -> defer scrolling (for an after render handler to deal with
If a `top-element-id` is given we translate the y coordinate to the bottom
the top element (sometimes needed with those sticky menus at the top of pages.)
sourceraw docstring

reagent-mount-pagecljs

(reagent-mount-page render-fn)

Utility page component for reagent projects. Consider using `reagent/after-render instead. See README.

Utility page component for reagent projects. Consider using
`reagent/after-render instead. See README.
sourceraw docstring

rum-after-rendercljs

Utility. Rum mixin.

Utility. Rum mixin.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close