This project generates two bookmarklets that make viewing images on the internet easier.
For a description and "installation" of these bookmarklets, check http://mcdlr.com/galNum-galFly/ (or index.html
in this project)
- Ruby
- Node
On project root run:
mkdir dist temp .tmp
npm install -g gulp-cli
npm install
The two bookmarklets share CSS and JS, namely
src/_gal-ui.scss
src/node_modules/gal-ui.js
And then each bookmarklet has its specific code at
src/galFly
src/galNum
For galFly:
gulp serve:fly
For galNum
gulp serve:num
They both share a similar file structure, explained below
First code run on the page, this will gather all the images and webms present in the page which is the source of the gallery created afterwards.
Also you will find seemingly interpolated information in the form of {{html}}
, this is used in the "compiling" process by make.rb
This is an emulation of what would happen if bookmarklet.js
ran on a page full of images. It's easier to prototype on top of already present data.
Other forms of interpolation are present also to be changed by make.rb
to make resources inline for the bookmarklet.
Specific bookmarklet code. It require
s selector
and gal-ui
shared code
Specific bookmarklet styling. It @import
s _gal-ui.scss
shared code.
Array with a list of image sources, which would actually be generated by bookmarklet.js
. galNum does not need this since it only needs a numeric progression and a single URL is hardcoded for development.
After making your changes you can generate the new versions with
./make.rb
And following the instructions