arhadthedev/fontefideliti.ru

Replace Fancybox with something jQuery-less

arhadthedev opened this issue · 1 comments

Fancybox, currently used to organize images into navigable galleries, requires 15 files to be deployed for proper work:

  1. jquery-1.11.0.min.js
  2. fancybox/blank.gif
  3. fancybox/fancybox_loading.gif
  4. fancybox/fancybox_loading@2x.gif
  5. fancybox/fancybox_overlay.png
  6. fancybox/fancybox_sprite.png
  7. fancybox/fancybox_sprite@2x.png
  8. fancybox/jquery.fancybox.css
  9. fancybox/jquery.fancybox.pack.js
  10. fancybox/helpers/fancybox_buttons.png
  11. fancybox/helpers/jquery.fancybox-buttons.css
  12. fancybox/helpers/jquery.fancybox-buttons.js
  13. fancybox/helpers/jquery.fancybox-media.js
  14. fancybox/helpers/jquery.fancybox-thumbs.css
  15. fancybox/helpers/jquery.fancybox-thumbs.js

Sure, not all of these files are used due to configuration. However, such extras complicate maintainance.

Following an article Bloated by Fabien Sanglard, the best variant is a small, inlined viewer with no Javascript involved. Not looking for custom-tailored solutions, something like JesterBox is a feasible variant. It does its work by maintaining the currently opened image as an anchor of a current page address.

Fixed in cd01c20; though pure CSS solution requires lots of service HTML markup for traversing between photos; so let it be a JS solution with fallback.