vishwamano

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

commit c3ba13ab0d8252630480efecb26c2bd5d39ecac6
parent 43882d807f5a1b20b6fd1a78a4cf61da289a28fc
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat, 10 Nov 2018 22:26:48 -0500

as: Update index.php.

Don't use smarty; plain fucking php.

* as/index.php: Update file.
* parts/as.php: New file.

Diffstat:
as/index.php | 70++++++++++++++++++++++------------------------------------------------
parts/as.php | 115+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+), 48 deletions(-)

diff --git a/as/index.php b/as/index.php @@ -1,42 +1,25 @@ <?php -/* Vishwamano.com PHP snafu. +/** + * License: CC0-1.0 + */ - Copyright (C) 2015 rsiddharth <s@ricketyspace.net> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - COPYING contains the full text of the GNU Affero General Public - License. If you have not recieved a copy of the file along with - this program, see <http://www.gnu.org/licenses/>. - -*/ - - -require_once('../templating.php'); -require_once($abs_path . '/utils.php'); +require_once('../init.php'); $title = 'Vishwa Mano - Apertures &amp; Shutters'; -$meta_keywords = 'Basic, Advanced, Photography, Workshop, Course, Class, Chennai, Amateur, Beginner, Academy, Institute, Fashion, Product, Nature, Wildlife'; -$meta_desc = 'Learn to See, Compose, Control and Click! Basic and Advanced Photography Workshops in Chennai by Nature and Wildlife Photographer, Vishwa Mano.'; - -$pc_title = "Apertures &amp; Shutters"; -$pc_intro = " -<p>A Chennai based nature and wildlife photographer, Vishwa offered -training in basic and advanced photography for budding -photographers. He has trained over 160 people from December 2012 to -March 2016.</p> - -<p>'<strong>Apertures &amp; Shutters</strong>' was his start up, which +$meta_keywords = 'Basic, Advanced, Photography, Workshop, Course,' + . ' Class, Chennai, Amateur, Beginner, Academy, Institute,' + . ' Fashion, Product, Nature, Wildlife'; +$meta_desc = 'Learn to See, Compose, Control and Click!' + . ' Basic and Advanced Photography Workshops' + . ' in Chennai by Nature and Wildlife Photographer, Vishwa Mano.'; +$pc_title = 'Apertures &amp; Shutters'; +$pc_intro = '<p>A Chennai based nature and wildlife photographer, Vishwa offered +training in basic and advanced photography for budding photographers. He has +trained over 160 people from December 2012 to March 2016.</p> + +<p>\'<strong>Apertures &amp; Shutters</strong>\' was his start up, which provided a congenial atmosphere to learn photography. A&amp;S was equipped with a classroom cum studio floor, lighting equipment and an editing room. It was stocked with the latest photography journals and @@ -54,20 +37,11 @@ perspectives about photography. It was always a two way learning. Moreover, the friendships earned in this journey will last a life time. The testimonials Vishwa received from his students and the photos clicked over three years will forever be displayed in this page -as a fond memory.</p> -"; - -# workshop gallery -$wg_img_dir = $abs_path . '/images/workshops/gallery/'; -$wg_imgs = get_images($wg_img_dir); +as a fond memory.</p>'; -$wg_imgs_info = array('imgs' => $wg_imgs, - 'path' => '/images/workshops/gallery'); +$imgs = get_images('../images/workshops/gallery/'); -$smarty->assign('pc_title', $pc_title); -$smarty->assign('pc_intro', $pc_intro); -$smarty->assign('wg_imgs_info', $wg_imgs_info); -$smarty->assign('title', $title); -$smarty->assign('meta_keywords', $meta_keywords); -$smarty->assign('meta_description', $meta_desc); -$smarty->display('as.tpl'); +require(PARTS . 'header.php'); +require(PARTS . 'as.php'); +require(PARTS . 'aside.php'); +require(PARTS . 'footer.php'); diff --git a/parts/as.php b/parts/as.php @@ -0,0 +1,115 @@ +<div class="container-fluid"> <!-- top container start --> + <article class="vm-workshops"> + <div class="row text-center margin-bottom"> + <h1><?=$pc_title?></h1> + </div> + + <div class="row"> <!-- pc row start --> + <div id="pc-first-column" class="col-sm-offset-1 col-sm-5"> <!-- pc column start --> + <div class="lead"> + <?=$pc_intro?> + </div> + + <hr class="visible-xs hr-long" /> + </div> <!-- pc column end --> + + <div id="pc-second-column" class="margin-top col-sm-5"> <!-- pc static images column start --> + + <div id="vm-testimonials" class="row"> + <div class="col-sm-offset-3 col-sm-6 col-xs-12"> + <a href="/as/testimonials/" + class="btn btn-primary btn-lg btn-block margin-bottom workshop-btn-lg"> + Testimonials + </a> + </div> + </div> + + <img id="vm-loading-img" class="img-responsive" + src="/themes/bs3/img/loading-vm.gif" alt="[ Loading... ]"> + <div class="students-grid" style="visibility: hidden;"> + <?php foreach ($imgs as $img) { ?> + <img class="img-responsive margin-top" + src="/images/workshops/gallery/<?=$img?>" + alt="[ static image - <?=$img?> ]"> + <?php } ?> + </div> + + <!-- start of equipment partner content --> + <aside class="equipment-partner text-center"> + <h2>Equipment Partner</h2> + <a href="https://facebook.com/profile.php?id=287147924751841&amp;tsid=0.451601832639426&amp;source=typeahead"> + <img class="img-responsive center-block" + src="/themes/bs3/img/equipment-partner.jpg" + alt="[ Equipment Partner Logo ]"> + </a> + </aside> + <!-- end of equipment partner content --> + + </div> <!-- pc static images column end --> + + </div> <!-- pc row end --> + </article> +</div> <!-- top container end --> + +<script> + $(document).ready(setupPhotoGrid) + + function setupPhotoGrid() { + var layout_spec = '222222'; + $('.students-grid').photosetGrid({ + highresLinks: true, + gutter: '5px', + layout: layout_spec, + rel: 'category', + onInit: function(){}, + onComplete: function(){ + $('img').remove('#vm-loading-img'); + $('.students-grid').attr('style', ''); + $('.students-grid a').colorbox({ + photo: true, + scalePhotos: true, + maxHeight:'90%', + maxWidth:'90%' + }); + } + }); + } + + function adjustHRLine() { + var screenWidth = $(window).width(); + if(screenWidth < 768) { + $('.hr-long').css('width', $(window).width() - 20); + $('.vm-workshops h1').css('padding-right', 0); + }else { + $('.hr-long').css('width', ($('#pc-first-column').width() + + $('#pc-second-column').width())); + $('.vm-workshops h1').css('padding-right', '2.3em'); + } + } + $(document).ready(adjustHRLine); + $(window).resize(adjustHRLine); + + function adjustTable() { + var screenWidth = $(window).width(); + if(screenWidth < 768) { + $('.vm-workshops table').css('width', '100%'); + }else { + $('.vm-workshops table').css('width', '100%'); + } + } + $(document).ready(adjustTable); + $(window).resize(adjustTable); + + function photos_after_desc() { + screen_size = $(window).width(); + if(screen_size <= 767) { + $(".students-grid").insertBefore("#pc-section"); + $(".equipment-partner").insertBefore("#pc-section"); + } else { + $(".students-grid").insertAfter("#vm-testimonials"); + $(".equipment-partner").insertAfter(".students-grid"); + } + } + $(document).ready(photos_after_desc); + $(window).resize(photos_after_desc); +</script>