From a9660305068802ea75bc1cf6c9e03684a9c53d9d Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Wed, 8 Jul 2015 20:30:29 +0300 Subject: [PATCH] home page tape viwer init update; --- assets/style/tape-viewer.scss | 6 ++++++ client/pages/home.js | 20 +++++++++++++++++++- templates/views/home.html | 4 +--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/assets/style/tape-viewer.scss b/assets/style/tape-viewer.scss index e852c8fe..9b37e62e 100644 --- a/assets/style/tape-viewer.scss +++ b/assets/style/tape-viewer.scss @@ -3,6 +3,12 @@ max-width: 1000px; margin: 2em auto; + + &.simplified{ + .tape{ + display: none; + } + } } .tape-block-content{ diff --git a/client/pages/home.js b/client/pages/home.js index 02da23a8..29672560 100644 --- a/client/pages/home.js +++ b/client/pages/home.js @@ -4,8 +4,26 @@ module.exports = function (app) { app.controller("HomePageController", function ($scope, config) { + var fotorama; + $scope.pageClass = "page-home"; - $(".fotorama").fotorama(); + var $tape = $('.tape-block'); + var $fotorama = $('.fotorama'); + + $tape.addClass('simplified'); + $fotorama.on('fotorama:ready', function () { + $tape.removeClass('simplified'); + fotorama.setOptions({ + nav: 'dots' + }); + }); + + fotorama = $fotorama.fotorama().data('fotorama'); + fotorama.load([ + {img: 'http://static.shburg.org/art/img/cat1.jpg'}, + {img: 'http://static.shburg.org/art/img/cat2.jpg'}, + {img: 'http://static.shburg.org/art/img/cat3.jpg'} + ]); }); }; \ No newline at end of file diff --git a/templates/views/home.html b/templates/views/home.html index 6d71e5f3..6f5cdfd6 100644 --- a/templates/views/home.html +++ b/templates/views/home.html @@ -24,13 +24,11 @@
- - -