Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

SMAK is another image gallery app for werc.
(by JGL.yiyus 2009)

It displays thumbnails of the image files in the
directory if no index file is found, and shows
previews of the images in synthetic urls of the
form path/img for the file path/img.jpg. The
preview preloads the next image, so it can be
stored on the client cache.

To enable SMAK, add:


to _werc/config in the dir with the image gallery.

Comments can be added to the preview image with
markdown syntax through the file path/ for
the file path/img.jpg.

To configure SMAK to your taste, set these variables:

   - smak_extensions=(png jpg jpeg bmp gif)
   - smak_prev_width=420
   - smak_thumb_height=96

For further customizations, use the tpl files. You
can copy the files preview.tpl and/or thumbnails.tpl
to _werc/smak/ for a given gallery, or use lib files
per site or directory in _werc/lib/smak/.

SMAK uses the p9p tools to convert the images: bmp,
jpg, png and gif to read input files; resample and
topng to transform and write them.

The _werc directory has to be writable by the
web server. Thumbnails and preview png files will
be stored in _werc/smak/thumb and _werc/smak/prev.
Be sure that your web server is serving the static
files or images won't be correctly cached by the client.

- What is the meaning of SMAK?

Recent activity


website_scraping began watching yiyus/smak


Commits by yi...@1936 were pushed to yiyus/smak

3c9b800 - moved style to css

Commits by yi...@1936 were pushed to yiyus/smak

7aef4fc - use get_lib_file to find templates

Commits by yi...@1936 were pushed to yiyus/smak

a1e49a9 - smak_template function
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.