Replace Fancybox with something jQuery-less
arhadthedev opened this issue · 1 comments
arhadthedev commented
Fancybox, currently used to organize images into navigable galleries, requires 15 files to be deployed for proper work:
- jquery-1.11.0.min.js
- fancybox/blank.gif
- fancybox/fancybox_loading.gif
- fancybox/fancybox_loading@2x.gif
- fancybox/fancybox_overlay.png
- fancybox/fancybox_sprite.png
- fancybox/fancybox_sprite@2x.png
- fancybox/jquery.fancybox.css
- fancybox/jquery.fancybox.pack.js
- fancybox/helpers/fancybox_buttons.png
- fancybox/helpers/jquery.fancybox-buttons.css
- fancybox/helpers/jquery.fancybox-buttons.js
- fancybox/helpers/jquery.fancybox-media.js
- fancybox/helpers/jquery.fancybox-thumbs.css
- 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.
arhadthedev commented
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.