home page -> school page; + PageSchool component
This commit is contained in:
1 parent
5c72276b5e
commit
57141313e9
7 files changed
+52
-50
No files matched your search
+3
-6
@@ -16,8 +16,9 @@ import ScheduleSlide from './components/ScheduleSlide';
|
||||
import ScheduleRecord from './components/ScheduleRecord';
|
||||
import FooterLinks from './components/FooterLinks';
|
||||
|
||||
import PageSchool from './components/PageSchool';
|
||||
|
||||
import AppController from './controllers/AppController';
|
||||
import HomeController from './controllers/HomeController';
|
||||
import ScheduleController from './controllers/ScheduleController';
|
||||
import CollectiveController from './controllers/CollectiveController';
|
||||
import GalleryController from './controllers/GalleryController';
|
||||
@@ -89,8 +90,8 @@ app.run(($location, $rootScope, $http) => {
|
||||
GalleryItem,
|
||||
AlbumCollection,
|
||||
TeacherProfile,
|
||||
PageSchool,
|
||||
AppController,
|
||||
HomeController,
|
||||
ScheduleController,
|
||||
CollectiveController,
|
||||
GalleryController,
|
||||
@@ -105,10 +106,6 @@ app.run(($location, $rootScope, $http) => {
|
||||
ScheduleRecord,
|
||||
FooterLinks,
|
||||
function (app) {
|
||||
app.controller('HomePageController', ($scope) => {
|
||||
$scope.pageClass = 'page-home';
|
||||
});
|
||||
|
||||
app.controller('SchedulePageController', ($scope) => {
|
||||
$scope.pageClass = 'page-schedule';
|
||||
});
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import template from '../../templates/components/page-school.html';
|
||||
|
||||
export default function (app) {
|
||||
app.component('pageSchool', {
|
||||
template: template,
|
||||
controller: () => {
|
||||
this.pageClass = 'page-school';
|
||||
|
||||
let fotorama;
|
||||
let $tape = $('.tape-block');
|
||||
let $fotorama = $tape.find('.tape-block__content');
|
||||
|
||||
$tape.addClass('simplified');
|
||||
$fotorama.on('fotorama:ready', () => {
|
||||
$tape.removeClass('simplified');
|
||||
fotorama.setOptions({
|
||||
nav: 'dots',
|
||||
transition: 'crossfade',
|
||||
autoplay: '6000',
|
||||
arrows: 'false',
|
||||
width: '100%',
|
||||
fit: 'cover',
|
||||
loop: 'true'
|
||||
});
|
||||
});
|
||||
|
||||
fotorama = $fotorama.fotorama().data('fotorama');
|
||||
setTimeout(() => {
|
||||
fotorama.load([
|
||||
{img: 'https://static.shburg.org/art/img/cat1.jpg'},
|
||||
{img: 'https://static.shburg.org/art/img/cat2.jpg'},
|
||||
{img: 'https://static.shburg.org/art/img/cat3.jpg'}
|
||||
]);
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -22,8 +22,7 @@ export let collectiveSortPattern = [
|
||||
export let routes = [
|
||||
{
|
||||
name: '/',
|
||||
templateUrl: '/views/home.html',
|
||||
controller: 'HomePageController',
|
||||
template: '<page-school></page-school>',
|
||||
title: 'ДХШ Шлиссельбурга'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
export default function (app) {
|
||||
app.controller('HomeController', () => {
|
||||
let fotorama;
|
||||
let $tape = $('.tape-block');
|
||||
let $fotorama = $tape.find('.tape-block__content');
|
||||
|
||||
$tape.addClass('simplified');
|
||||
$fotorama.on('fotorama:ready', () => {
|
||||
$tape.removeClass('simplified');
|
||||
fotorama.setOptions({
|
||||
nav: 'dots',
|
||||
transition: 'crossfade',
|
||||
autoplay: '6000',
|
||||
arrows: 'false',
|
||||
width: '100%',
|
||||
fit: 'cover',
|
||||
loop: 'true'
|
||||
});
|
||||
});
|
||||
|
||||
fotorama = $fotorama.fotorama().data('fotorama');
|
||||
setTimeout(() => {
|
||||
fotorama.load([
|
||||
{img: 'https://static.shburg.org/art/img/cat1.jpg'},
|
||||
{img: 'https://static.shburg.org/art/img/cat2.jpg'},
|
||||
{img: 'https://static.shburg.org/art/img/cat3.jpg'}
|
||||
]);
|
||||
}, 100);
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
.page-school {
|
||||
&.ng-leave {
|
||||
transform-origin: 0% 0%;
|
||||
animation: rotateFall .3s both ease-in;
|
||||
}
|
||||
|
||||
&.ng-enter {
|
||||
animation: scaleUp 0.3s both ease-in;
|
||||
}
|
||||
}
|
||||
@@ -5,17 +5,6 @@
|
||||
&.ng-enter {}
|
||||
}
|
||||
|
||||
.page-home {
|
||||
&.ng-leave {
|
||||
transform-origin: 0% 0%;
|
||||
animation: rotateFall .3s both ease-in;
|
||||
}
|
||||
|
||||
&.ng-enter {
|
||||
animation: scaleUp 0.3s both ease-in;
|
||||
}
|
||||
}
|
||||
|
||||
.page-schedule {
|
||||
&.ng-leave {
|
||||
transform-origin: 0% 0%;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="content content_thin" ng-controller="HomeController">
|
||||
<div class="content content_thin">
|
||||
<div class="main-block">
|
||||
<!--<div>-->
|
||||
<!--<!–<a href="tel://{{telephone}}"></a>–>-->
|
||||
Reference in new issue
Block a user