diff --git a/ui/gallery.html b/ui/gallery.html index e2d1471f..cf1400ae 100755 --- a/ui/gallery.html +++ b/ui/gallery.html @@ -100,8 +100,43 @@ $(document).ready(function() { // set the default position... $('.current-image').click() + + // load images... + // XXX not allowed... + //$.getJSON('images.js', loadImages}) + // XXX STUB + loadImages({ + images:[ + 'images/350px/DSC_3501.jpg', + 'images/350px/DSC_3503.jpg', + 'images/350px/DSC_3504.jpg', + 'images/350px/DSC_3506.jpg', + ] + }) + }); +function loadImages(json){ + // XXX STUB + var images = json.images + var ribbon = $('.ribbon').last() + + + $('.image').remove() + + for(var i = 0; i < images.length; i++){ + $('
') + .css({ + background : 'url('+images[i]+') no-repeat 50% black', + 'background-size': 'contain', + }) + .click(handleClick) + .appendTo(ribbon) + } + ribbon.children().first().click() + +} + // XXX jquery.gestures handler... function handleGestures(e){ switch (e){ @@ -251,15 +286,11 @@ function firstImage(){ } function prevImage(){ - $('.current-image') - .prev('.image') - .click() + $('.current-image').prev('.image').click() } function nextImage(){ - $('.current-image') - .next('.image') - .click() + $('.current-image').next('.image').click() } function lastImage(){ diff --git a/ui/images.json b/ui/images.json new file mode 100755 index 00000000..e0320145 --- /dev/null +++ b/ui/images.json @@ -0,0 +1,7 @@ +{ + "images":[ + "image 1", + "image 2", + "image 3" + ] +} diff --git a/ui/images/350px/DSC_3501.jpg b/ui/images/350px/DSC_3501.jpg new file mode 100755 index 00000000..f5686078 Binary files /dev/null and b/ui/images/350px/DSC_3501.jpg differ diff --git a/ui/images/350px/DSC_3503.jpg b/ui/images/350px/DSC_3503.jpg new file mode 100755 index 00000000..942f1459 Binary files /dev/null and b/ui/images/350px/DSC_3503.jpg differ diff --git a/ui/images/350px/DSC_3504.jpg b/ui/images/350px/DSC_3504.jpg new file mode 100755 index 00000000..ebe9ff89 Binary files /dev/null and b/ui/images/350px/DSC_3504.jpg differ diff --git a/ui/images/350px/DSC_3506.jpg b/ui/images/350px/DSC_3506.jpg new file mode 100755 index 00000000..a72221ce Binary files /dev/null and b/ui/images/350px/DSC_3506.jpg differ diff --git a/ui/images/README b/ui/images/README new file mode 100644 index 00000000..e69de29b