• Stars
    star
    297
  • Rank 139,236 (Top 3 %)
  • Language
    HTML
  • License
    MIT License
  • Created about 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A content-focused photo gallery using a horizontal masonry layout that scales up in lightbox mode.

zoomwall.js GitHub release (latest by date) npm Coverage Status Node.js CI

zoomwall.js is a content-focused photo gallery using a horizontal masonry layout that scales up in lightbox mode.

Visit ericleong.github.io/zoomwall.js for a demo.

install

For those using npm

$ npm install zoomwall.js

usage

html

First, add a reference to zoomwall.css in your HTML file, like this:

<link rel="stylesheet" type="text/css" href="zoomwall.css" />

Add the zoomwall class to the container element.

responsive images

To have the browser determine when to load a high resolution image, use responsive images.

<div id="gallery" class="zoomwall">
  <img
    srcset="01_lowres.jpg 200w, 01_highres.jpg 800w"
    sizes="(max-width: 1200px) 200px, 800px"
    src="01_lowres.jpg"
  />
  <img
    srcset="02_lowres.jpg 200w, 02_highres.jpg 800w"
    sizes="(max-width: 1200px) 200px, 800px"
    src="02_lowres.jpg"
  />
</div>

high resolution image

Include high resolution photos using the data-highres attribute of each <img> tag.

<div id="gallery" class="zoomwall">
  <img src="01_lowres.jpg" data-highres="01_highres.jpg" />
  <img src="02_lowres.jpg" data-highres="02_highres.jpg" />
</div>

javascript

See documentation. Remember to import the module.

import * as zoomwall from "zoomwall.js";

Run zoomwall.create() on the container element (#gallery in this example), after they have loaded.

window.onload = function () {
  zoomwall.create(document.getElementById("gallery"));
};

Enable support for paging through photos with the left and right arrow keys by setting the second argument to true, like this: zoomwall.create(<element>, true).

More Repositories

1

slickr

A collection of python and bash scripts to collect and analyze frame rendering performance in Android apps.
Python
128
star
2

flipgrid.js

A simple, content-focused photo gallery inspired by Microsoft's Metro interface and CSS 3D transitions.
JavaScript
87
star
3

fisheye.js

A javascript library for applying radial lens distortion to images using WebGL.
JavaScript
70
star
4

scrollshot

A bash script for automatically scrolling and stitching screenshots of Android apps.
Shell
50
star
5

sand.js

A falling sand game as a cellular automaton, powered by WebGL.
JavaScript
34
star
6

forceengine

"My first physics engine."
Java
7
star
7

giftext

Generates animated 3d text as a gif.
JavaScript
5
star
8

pixelmap.js

A javascript library for drawing images to the canvas with reverse pixel mapping using WebGL.
JavaScript
4
star
9

fadefilter

Android app demonstrating a simple fade image filter using OpenGL.
Java
3
star
10

lightblocks.js

A content-focused photo gallery using a horizontal masonry layout that automatically rescales in lightbox mode.
JavaScript
3
star
11

tumblr3d

Tumblr + Google Cardboard
Java
2
star
12

ideashout

IdeaShout is a social aggregator for events and ideas, exploring the connection between space and time.
Python
2
star
13

bentobox

Code for a talk on asynchronous dependency injection.
Java
2
star
14

rubiks

A simple Rubiks cube implementation with arcball-based interaction.
C
1
star
15

giferator-android

Android version of giferator
Java
1
star
16

bubblebattles

Live life as a bubble.
JavaScript
1
star
17

powerdash

Dashboard for energy consumption at 41 Cooper Square.
JavaScript
1
star