Silex icon indicating copy to clipboard operation
Silex copied to clipboard

Pageable script rewrite

Open lexoyo opened this issue 3 years ago • 0 comments

Pageable script is a js script used in Silex. It is used only before publication - in the editor and the preview. It makes it possible to have the hole website in 1 single HTML page. It mimics a normal website navigation but instead of having multiple pages at different paths, it handles deep links or URL hash: https://editor.silex.me/ ... /editable.html#!page-home

Current state

Pageable script should have 1 single feature: watch current URL and add .pageable-hide, .pageable-show css classes to corresponding .pageable

Also it should

  • no jquery, no dependencies
  • basic documentation
  • npm package
  • ? use history API
  • options:
    • pageable selector ([data-pageable] by default)
    • show class (.pageable-show)
    • hide class (.pageable-hide)
    • hash prefix (#!page-)

Todo in Silex

  • in preview links should be real links with href="#!page-
  • change page => change iframe hash

lexoyo avatar Apr 30 '21 15:04 lexoyo