README.md in rails-gallery-0.2.0 vs README.md in rails-gallery-0.2.1
- old
+ new
@@ -9,10 +9,11 @@
## Galleries included
* slideshow
* responsive
* galleria
+* touch_touch
Please add more using a similar convention as is used for these galleries ;)
## Configuration
@@ -23,34 +24,50 @@
* require responsive-gallery
* require gallery/responsive/elastislide
* require gallery/responsive/style
* require gallery/slideshow
* require gallery/galleria
+ * require gallery/touch_touch
*/
```
-Using Compass, f.ex in `application.css.scss.erb`
+Using Compass, f.ex in `application.css.scss`
```
@import 'gallery/responsive/elastislide';
-@import 'gallery/responsive/style';
+@import 'gallery/responsive';
@import 'gallery/slideshow';
@import 'gallery/galleria';
+@import 'gallery/touch_touch';
```
In `application.js` manifest file:
```javascript
//= require gallery/responsive
//= require gallery/slideshow
//= require gallery/galleria
+//= require gallery/touch_touch
-//= require jquery.easing-1.3
-//= require jquery.elastislide
-//= require jquery.tmpl.min
+//= require jquery/jquery.easing-1.3
+//= require jquery/jquery.elastislide
+//= require jquery/jquery.tmpl.min
```
+## Touch-Touch
+
+```javascript
+$(function(){
+
+ // Initialize the gallery
+ $('#thumbs a').touchTouch();
+
+});
+```
+
+See [TouchTouch](http://tutorialzine.com/2012/04/mobile-touch-gallery/) and [github repo](https://github.com/martinaglv/touchTouch)
+
## Minimalistic Slideshow gallery
See [minimalistic-slideshow-gallery](http://tympanus.net/codrops/2010/07/05/minimalistic-slideshow-gallery/) for more info.
@@ -93,18 +110,43 @@
```
*Automatic slideshow*
I wanted the same thing and I find a way to do it.
-In the file gallery.js, in the function _initCarousel add these lines after `$esCarousel.elastislide( ‘setCurrent’, current );` (~ line 103):
+In the file gallery.js, in the function _initCarousel add these lines after:
+`$esCarousel.elastislide( 'setCurrent', current );`
+
```javascript
window.setInterval(function(){
-_navigate( ‘right’ );
+ _navigate( 'right' );
}, 5000);
```
-You just have to change 5000 to the value you want (milliseconds).
+You just have to change `5000` to the value you want (milliseconds).
+
+* Fancybox integration*
+
+First you have to include the js and the css file of fancybox in the file where you have the carousel.
+
+In the file `responsive.js`, replace this line:
+
+`$rgGallery.find('div.rg-image').empty().append('img src="' + largesrc + '"');`
+
+With this (which adds 'fancybox' class to all images):
+
+`$rgGallery.find('div.rg-image').empty().append('a class="fancybox"
+href="'+largesrc+ '" img src="' + largesrc + '" a');`
+
+In this line, don’t forget to add the `"` for the img and link tags.
+
+Then do the fancybox magic on any class with the `fancybox` class
+
+```javascript
+$(document).ready(function() {
+ $(“.fancybox”).fancybox();
+});
+```
## Galleria
See [galleria.io](http://galleria.io) for more info.