GithubHelp home page GithubHelp logo

picogal's Introduction

picoGal

Smallest possible gallery for your website

  1. Usage
  2. Reference
  3. Credit

Usage

The simplest possible way to create a gallery is to list your images in a tag and then refer to that tag is picoGal.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="/picoGal.js"></script>
<div>
    <img src="1" title="title1"/>
    ...
    <img src="10" title="title10"/>
</div>

Given this html you can do:

$('div').picoGal({}).picoGal('show');

or (even simpler)

$('div').picoGal('show');

And that's it. Really. Give it a try!

Reference

Settings

  • effect [none|randomize|reveal]: display effect (how thumbnails are displayed)
  • thumbWidth: thumbnail width
  • thumbHeight: thumbnail height
  • height: image hight (the full size one)
  • width: image width (the full size one)
  • displayTitle: if true then title is displayed when mouse hover over the thumbnail
  • thumbTransform: function that returns thumbnail url based on full size image url (usefull with picasa)

Methods

  • init ('init', settings): takes settings structure and initializes gallery
  • build ('build'): build the gallery
  • show ('show'): shows the gallery (reveals it)
  • hide ('hide'): hides gallery, but the underlying dom is still there
  • destroy ('destroy'): clears out the dom so the gallery is completely removed

Credits

Go to me and my wife for having the crazy idea of settings up our website :-) Randomize array alghorithm found somewhere on stackoverflow, then forgotten and then reinvented myself.

picogal's People

Contributors

ondrej-li avatar

Watchers

 avatar  avatar

picogal's Issues

Better way showing thumbnails

Don't let the browser scale down images, use functions (or intelligent filters etc.) to figure out thumbnail location

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.