vishwamano

source of vishwamano.com
git clone git://git.ricketyspace.net/vishwamano.git
Log | Files | Refs

commit 5f8bae474a2a9fa6782cea9cfa74b2cc006ea7a8
parent 7e401df49c7b888640ee550bf269eba91ce998bd
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Wed, 12 Aug 2015 11:14:23 -0400

renamed ngallery.tpl -> gallery.tpl; ngallery-genre.tpl -> gallery-genre.tpl

	modified:   gallery/animals/index.php
	modified:   gallery/birds/index.php
	modified:   gallery/index.php
	modified:   gallery/landscapes/index.php
	modified:   gallery/macro/index.php
	renamed:    themes/bs3/templates/ngallery-genre.tpl -> themes/bs3/templates/gallery-genre.tpl
	renamed:    themes/bs3/templates/ngallery.tpl -> themes/bs3/templates/gallery.tpl

Diffstat:
gallery/animals/index.php | 2+-
gallery/birds/index.php | 2+-
gallery/index.php | 2+-
gallery/landscapes/index.php | 4++--
gallery/macro/index.php | 4++--
themes/bs3/templates/gallery-genre.tpl | 126+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
themes/bs3/templates/gallery.tpl | 128++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
themes/bs3/templates/ngallery-genre.tpl | 108-------------------------------------------------------------------------------
themes/bs3/templates/ngallery.tpl | 79-------------------------------------------------------------------------------
9 files changed, 176 insertions(+), 279 deletions(-)

diff --git a/gallery/animals/index.php b/gallery/animals/index.php @@ -39,5 +39,5 @@ $smarty->assign('gallery_info', $gallery_info); $smarty->assign('images', $images); $smarty->assign('title', $title); $smarty->assign('meta_description', $meta_desc); -$smarty->display('ngallery-genre.tpl'); +$smarty->display('gallery-genre.tpl'); diff --git a/gallery/birds/index.php b/gallery/birds/index.php @@ -39,5 +39,5 @@ $smarty->assign('gallery_info', $gallery_info); $smarty->assign('images', $images); $smarty->assign('title', $title); $smarty->assign('meta_description', $meta_desc); -$smarty->display('ngallery-genre.tpl'); +$smarty->display('gallery-genre.tpl'); diff --git a/gallery/index.php b/gallery/index.php @@ -66,4 +66,4 @@ foreach($img_directories as $g_desc => $img_dir) { ksort($all_images); $smarty->assign('all_images', $all_images); -$smarty->display('ngallery.tpl'); +$smarty->display('gallery.tpl'); diff --git a/gallery/landscapes/index.php b/gallery/landscapes/index.php @@ -39,4 +39,4 @@ $smarty->assign('gallery_info', $gallery_info); $smarty->assign('images', $images); $smarty->assign('title', $title); $smarty->assign('meta_description', $meta_desc); -$smarty->display('ngallery-genre.tpl');- \ No newline at end of file +$smarty->display('gallery-genre.tpl');+ \ No newline at end of file diff --git a/gallery/macro/index.php b/gallery/macro/index.php @@ -39,4 +39,4 @@ $smarty->assign('gallery_info', $gallery_info); $smarty->assign('images', $images); $smarty->assign('title', $title); $smarty->assign('meta_description', $meta_desc); -$smarty->display('ngallery-genre.tpl');- \ No newline at end of file +$smarty->display('gallery-genre.tpl');+ \ No newline at end of file diff --git a/themes/bs3/templates/gallery-genre.tpl b/themes/bs3/templates/gallery-genre.tpl @@ -1,46 +1,108 @@ -{include file='header.tpl'} +{include file='fp-header.tpl'} <div class="container-fluid"> <!-- top container start --> - <h1>{$gallery_info.name}</h1> + {include file='gallery-nav.tpl'} - <div class="row"> <!-- first row start --> - {foreach $images as $img} + <div class="row"> <!-- loading img start --> + <div class="col-sm-12"> + <img id="vm-loading-img" class="img-responsive loading-vm" src="/themes/bs3/img/loading-vm.gif" + alt="[ Loading... ]"> + </div> + </div> <!-- loading img end --> - {if $img@index % 4 == 0} - </div> <!-- prev. row end --> - <div class="row"> <!-- another row start --> - {/if} - - <div class="col-sm-3 margin-top"> - <a class="fancybox" rel="tag" href="{$gallery_info.imgs_root}/{$img}"> - <img class="img-responsive img-thumbnail" src="{$gallery_info.imgs_root}/{$img}" + <div class="row"> <!-- photoset row start --> + <div class="col-sm-12"> + <div class="photoset-grid-custom" style="visibility: hidden;"> <!-- photoset grid start --> + {foreach $images as $i => $img} + <img class="img-responsive" src="{$gallery_info.imgs_root}/{$img}" alt="[ {$gallery_info.name} - {$img} ]"/> - </a> - </div> + {/foreach} + </div> <!-- photoset grid end --> + </div> + </div> <!-- photoset row end --> + {include file='aside.tpl'} +</div> <!-- top container end --> + +{include file='js.tpl'} +<script type="text/javascript" + src="{$doc_root}themes/bs3/js/jquery-photoset-grid/jquery.photoset-grid.min.js"></script> +<script type="text/javascript" + src="{$doc_root}themes/bs3/js/jquery-colorbox/jquery.colorbox-min.js"></script> +<script type="text/javascript"> +$(document).ready(setupPhotoGrid); - {/foreach} - </div> <!-- last row end --> +function setupPhotoGrid() { + var layout_spec = ''; + var screenWidth = $(window).width(); + var no_images = {$no_of_images}; - <p class="text-center margin-top"> - <a class="btn btn-primary btn-sm" - href="{$gallery_info.parent}"> - <span class="glyphicon glyphicon-chevron-left"></span> - back - </a> - </p> + var l = []; + var li; // index for array `l'. + var layout_array = []; + var i = 0; // index for array `layout_array'. -</div> <!-- top container end --> + if(screenWidth <= 736) { + l = [1, 2]; + } + else { + l = [3, 3]; + } -{include file='js.tpl'} + var sum = 0; + var iter = 0; + while(sum != no_images) { + li = iter++ % 2; + if(sum + l[li] > no_images) + continue; + + sum += l[li]; + layout_array[i++] = l[li]; + } + + for(i = 0; i < layout_array.length; i++) { + layout_spec += layout_array[i]; + } + + $('.photoset-grid-custom').photosetGrid({ + highresLinks: true, + gutter: '5px', + layout: layout_spec, + rel: 'category', + onInit: function(){}, + onComplete: function(){ + $('img').remove('#vm-loading-img'); + $('.photoset-grid-custom').attr('style', ''); + $('.photoset-grid-custom a').colorbox({ + photo: true, + scalePhotos: true, + maxHeight:'90%', + maxWidth:'90%' + }); + } + }); +} +</script> <script> - $('#nav-link-gallery').addClass("active"); +function galleryNavAdjust() { + var screenWidth = $(window).width(); + + if(screenWidth < 549) { + $('#gallery-nav').attr('class', 'gallery-nav-2-col'); + }else { + $('#gallery-nav').attr('class', 'breadcrumb text-center center-wrt-nav'); + } + $('.hr-long').css('width', $('.photoset-grid-custom').width()); +} +$(document).ready(galleryNavAdjust); +$(window).resize(galleryNavAdjust); </script> -<script type="text/javascript" - src="{$doc_root}themes/bs3/js/jquery-fancybox/jquery.fancybox.pack.js"></script> -<script type="text/javascript"> - $(document).ready(function() { - $(".fancybox").fancybox(); - }); +<script> +$('#{$gallery_info['name']}').addClass('active'); +</script> +<script> + var uagent = navigator.userAgent.toLowerCase(); + if(uagent.search('mobile') > -1) + $('#stay-in-touch').append('<li><a href="tel://+919176560151"><i class="fa fa-phone"></i></a></li>'); </script> {include file='footer.tpl'} diff --git a/themes/bs3/templates/gallery.tpl b/themes/bs3/templates/gallery.tpl @@ -1,57 +1,79 @@ -{include file='header.tpl'} - -<div class="container-fluid"> <!-- top container start --> - <div class="row"> <!-- first row start --> - - {foreach $all_images as $g_desc => $images} - - {if $images@index % 2 == 0} - </div> <!-- close prev. row --> - <div class="row"> <!-- start new row --> - {/if} - - <div class="col-sm-6"> <!-- {$g_desc} column start --> - - <h1 class="gallery"> - <span class="label label-inverse">{$g_desc}</span> - </h1> - - <div class="row"> <!-- first {$g_desc} row start --> - {foreach $images[0] as $i => $image} - {if $image@index % 3 == 0} - </div> <!-- close prev. row --> - <div class="row"> <!-- start new row --> - {/if} - <div class="col-sm-4 margin-top"> - <a class="fancybox" rel="tag" href="{$doc_root}{$images[1]}{$image}"> - <img class="img-responsive img-thumbnail" src="{$doc_root}{$images[1]}{$image}" - alt="[ Image - {$image} ]"/> - </a> - </div> - {/foreach} - </div> <!-- last {$g_desc} row end --> - - <p class="text-center margin-top"> - <a class="btn btn-primary btn-sm" href="{$doc_root}{$images[2]}"> - more <span class="glyphicon glyphicon-plus"></span> - </a> - </p> - - </div> <!-- {$g_desc} column end --> - {/foreach} - - </div> <!-- last row end --> -</div> <!-- top container end --> - -{include file='js.tpl'} -<script> - $('#nav-link-gallery').addClass("active"); -</script> +<div class="container-fluid"> <!-- ntop container start --> + {include file='gallery-nav.tpl'} + + <div class="row"> <!-- loading img start --> + <div class="col-sm-12"> + <img id="vm-loading-img" class="img-responsive loading-vm" src="/themes/bs3/img/loading-vm.gif" + alt="[ Loading... ]"> + </div> + </div> <!-- loading img end --> + + <div id="vm-gallery" class="row"> <!-- second row start --> + <div class="col-sm-12"> + <div class="photoset-grid-custom" style="visibility: hidden;"> <!-- photoset start --> + {foreach $all_images as $i => $image} + <img class="img-responsive" src="{$image}" + alt="[ Image - {$image} ]" /> + {/foreach} + </div> <!-- photoset end --> + </div> + </div> <!-- second row end --> + {include file='aside.tpl'} +</div> <!-- ntop container end --> + + <script type="text/javascript" - src="{$doc_root}themes/bs3/js/jquery-fancybox/jquery.fancybox.pack.js"></script> + src="{$doc_root}themes/bs3/js/jquery-photoset-grid/jquery.photoset-grid.min.js"></script> +<script type="text/javascript" + src="{$doc_root}themes/bs3/js/jquery-colorbox/jquery.colorbox-min.js"></script> <script type="text/javascript"> - $(document).ready(function() { - $(".fancybox").fancybox(); - }); +$(document).ready(setupPhotoGrid) + +function setupPhotoGrid() { + var layout_spec = ''; + var screenWidth = $(window).width(); + + if(screenWidth <= 736) + layout_spec = '12121212'; + else + layout_spec = '2424'; + + $('.photoset-grid-custom').photosetGrid({ + highresLinks: true, + gutter: '5px', + layout: layout_spec, + rel: 'category', + onInit: function(){}, + onComplete: function(){ + $('img').remove('#vm-loading-img'); + $('.photoset-grid-custom').attr('style', ''); + $('.photoset-grid-custom a').colorbox({ + photo: true, + scalePhotos: true, + maxHeight:'90%', + maxWidth:'90%' + }); + } + }); +} +</script> +<script> +function galleryNavAdjust() { + var screenWidth = $(window).width(); + + if(screenWidth < 549) { + $('#gallery-nav').attr('class', 'gallery-nav-2-col'); + }else { + $('#gallery-nav').attr('class', 'breadcrumb text-center center-wrt-nav'); + } + $('.hr-long').css('width', $('.photoset-grid-custom').width()); +} +$(document).ready(galleryNavAdjust); +$(window).resize(galleryNavAdjust); +</script> +<script> + var uagent = navigator.userAgent.toLowerCase(); + if(uagent.search('mobile') > -1) + $('#stay-in-touch').append('<li><a href="tel://+919176560151"><i class="fa fa-phone"></i></a></li>'); </script> {include file='footer.tpl'} diff --git a/themes/bs3/templates/ngallery-genre.tpl b/themes/bs3/templates/ngallery-genre.tpl @@ -1,108 +0,0 @@ -{include file='fp-header.tpl'} - -<div class="container-fluid"> <!-- top container start --> - - {include file='gallery-nav.tpl'} - - <div class="row"> <!-- loading img start --> - <div class="col-sm-12"> - <img id="vm-loading-img" class="img-responsive loading-vm" src="/themes/bs3/img/loading-vm.gif" - alt="[ Loading... ]"> - </div> - </div> <!-- loading img end --> - - <div class="row"> <!-- photoset row start --> - <div class="col-sm-12"> - <div class="photoset-grid-custom" style="visibility: hidden;"> <!-- photoset grid start --> - {foreach $images as $i => $img} - <img class="img-responsive" src="{$gallery_info.imgs_root}/{$img}" - alt="[ {$gallery_info.name} - {$img} ]"/> - {/foreach} - </div> <!-- photoset grid end --> - </div> - </div> <!-- photoset row end --> - {include file='aside.tpl'} -</div> <!-- top container end --> - -{include file='js.tpl'} -<script type="text/javascript" - src="{$doc_root}themes/bs3/js/jquery-photoset-grid/jquery.photoset-grid.min.js"></script> -<script type="text/javascript" - src="{$doc_root}themes/bs3/js/jquery-colorbox/jquery.colorbox-min.js"></script> -<script type="text/javascript"> -$(document).ready(setupPhotoGrid); - -function setupPhotoGrid() { - var layout_spec = ''; - var screenWidth = $(window).width(); - var no_images = {$no_of_images}; - - var l = []; - var li; // index for array `l'. - var layout_array = []; - var i = 0; // index for array `layout_array'. - - if(screenWidth <= 736) { - l = [1, 2]; - } - else { - l = [3, 3]; - } - - var sum = 0; - var iter = 0; - while(sum != no_images) { - li = iter++ % 2; - if(sum + l[li] > no_images) - continue; - - sum += l[li]; - layout_array[i++] = l[li]; - } - - for(i = 0; i < layout_array.length; i++) { - layout_spec += layout_array[i]; - } - - $('.photoset-grid-custom').photosetGrid({ - highresLinks: true, - gutter: '5px', - layout: layout_spec, - rel: 'category', - onInit: function(){}, - onComplete: function(){ - $('img').remove('#vm-loading-img'); - $('.photoset-grid-custom').attr('style', ''); - $('.photoset-grid-custom a').colorbox({ - photo: true, - scalePhotos: true, - maxHeight:'90%', - maxWidth:'90%' - }); - } - }); -} -</script> -<script> -function galleryNavAdjust() { - var screenWidth = $(window).width(); - - if(screenWidth < 549) { - $('#gallery-nav').attr('class', 'gallery-nav-2-col'); - }else { - $('#gallery-nav').attr('class', 'breadcrumb text-center center-wrt-nav'); - } - $('.hr-long').css('width', $('.photoset-grid-custom').width()); -} -$(document).ready(galleryNavAdjust); -$(window).resize(galleryNavAdjust); -</script> -<script> -$('#{$gallery_info['name']}').addClass('active'); -</script> -<script> - var uagent = navigator.userAgent.toLowerCase(); - if(uagent.search('mobile') > -1) - $('#stay-in-touch').append('<li><a href="tel://+919176560151"><i class="fa fa-phone"></i></a></li>'); -</script> -{include file='footer.tpl'} diff --git a/themes/bs3/templates/ngallery.tpl b/themes/bs3/templates/ngallery.tpl @@ -1,79 +0,0 @@ -<div class="container-fluid"> <!-- ntop container start --> - {include file='gallery-nav.tpl'} - - <div class="row"> <!-- loading img start --> - <div class="col-sm-12"> - <img id="vm-loading-img" class="img-responsive loading-vm" src="/themes/bs3/img/loading-vm.gif" - alt="[ Loading... ]"> - </div> - </div> <!-- loading img end --> - - <div id="vm-gallery" class="row"> <!-- second row start --> - <div class="col-sm-12"> - <div class="photoset-grid-custom" style="visibility: hidden;"> <!-- photoset start --> - {foreach $all_images as $i => $image} - <img class="img-responsive" src="{$image}" - alt="[ Image - {$image} ]" /> - {/foreach} - </div> <!-- photoset end --> - </div> - </div> <!-- second row end --> - {include file='aside.tpl'} -</div> <!-- ntop container end --> - - -<script type="text/javascript" - src="{$doc_root}themes/bs3/js/jquery-photoset-grid/jquery.photoset-grid.min.js"></script> -<script type="text/javascript" - src="{$doc_root}themes/bs3/js/jquery-colorbox/jquery.colorbox-min.js"></script> -<script type="text/javascript"> -$(document).ready(setupPhotoGrid) - -function setupPhotoGrid() { - var layout_spec = ''; - var screenWidth = $(window).width(); - - if(screenWidth <= 736) - layout_spec = '12121212'; - else - layout_spec = '2424'; - - $('.photoset-grid-custom').photosetGrid({ - highresLinks: true, - gutter: '5px', - layout: layout_spec, - rel: 'category', - onInit: function(){}, - onComplete: function(){ - $('img').remove('#vm-loading-img'); - $('.photoset-grid-custom').attr('style', ''); - $('.photoset-grid-custom a').colorbox({ - photo: true, - scalePhotos: true, - maxHeight:'90%', - maxWidth:'90%' - }); - } - }); -} -</script> -<script> -function galleryNavAdjust() { - var screenWidth = $(window).width(); - - if(screenWidth < 549) { - $('#gallery-nav').attr('class', 'gallery-nav-2-col'); - }else { - $('#gallery-nav').attr('class', 'breadcrumb text-center center-wrt-nav'); - } - $('.hr-long').css('width', $('.photoset-grid-custom').width()); -} -$(document).ready(galleryNavAdjust); -$(window).resize(galleryNavAdjust); -</script> -<script> - var uagent = navigator.userAgent.toLowerCase(); - if(uagent.search('mobile') > -1) - $('#stay-in-touch').append('<li><a href="tel://+919176560151"><i class="fa fa-phone"></i></a></li>'); -</script> -{include file='footer.tpl'}