angulared

This commit is contained in:
tmshv committed 2014-11-21 17:41:53 +03:00
1 parent 7391872813
commit efd77a62e3
36 files changed
+1147 -545

No files matched your search

+1
View File
@@ -3,4 +3,5 @@
*.sublime* *.sublime*
/node_modules /node_modules
/bower_components
/public /public
+12
View File
@@ -1,3 +1,15 @@
.page-docs {
&.ng-leave {
transform-origin: 50% 50%;
animation: rotateOutNewspaper .3s both ease-in;
}
&.ng-enter {
animation: scaleUp 0.3s both ease-in
// animation: slideInUp 0.5s both ease-in;
}
}
.act{ .act{
text-decoration: none; text-decoration: none;
border-bottom: 1px dashed #688fff; border-bottom: 1px dashed #688fff;
+23 -28
View File
@@ -1,10 +1,28 @@
* { .document-block {
margin: 0; h1{
padding: 0; font-size: 14pt;
margin-left: 15px;
}
.menu{
position: fixed;
background-color: white;
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.5);
&.transparent{
opacity: 0.95;
}
}
} }
body { .document {
font-family: "PT Sans"; padding-top: 50px;
.page {
img {
width: 100%;
}
}
} }
.norm { .norm {
@@ -19,29 +37,6 @@ body {
/* box-shadow: 1px 1px 3px 1px #333;*/ /* box-shadow: 1px 1px 3px 1px #333;*/
} }
.menu {
position: fixed;
width: 100%;
height: 45px;
background-color: #fff;
z-index: 100;
box-shadow: 0 1px 5px 0px rgba(0, 0, 0, 0.5);
&.opac {
opacity: .97;
}
.panel {
width: auto;
display: inline-block;
margin: 10px 25px 0;
&.right {
float: right;
}
}
h1 {
font-size: 14pt;
}
}
.controls { .controls {
display: inline-block; display: inline-block;
margin-top: -4px; margin-top: -4px;
+10
View File
@@ -0,0 +1,10 @@
.page-home {
&.ng-leave {
transform-origin: 0% 0%;
animation: rotateFall .3s both ease-in;
}
&.ng-enter {
animation: scaleUp 0.3s both ease-in;
}
}
+12 -65
View File
@@ -1,70 +1,17 @@
* { //html {
// overflow-y: hidden;
//}
body {
font-family: "PT Sans", Arial, sans-serif;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
body { .background-picture{
font-family: "PT Sans", Arial, sans-serif; width: 100%;
} position: fixed;
top:0;
.menu { left: 0;
$text_color: #666; z-index: -999;
width: 100%;
background-color: black;
font-size: 13pt;
color: $text_color;
ul{
margin-left: 50px;
}
li {
display: inline-block;
padding: 5px 3px 13px 3px;
margin-right: 30px;
}
:link, :visited{
text-decoration: none;
border-bottom: 1px solid #333;
color: $text_color;
}
a:hover{
color: white;
}
.vk {
float: right;
margin: 13px 15px 0 0;
border: none;
}
}
.selected {
border-top: 4px solid white;
font-weight: bold;
a:link, a:visited{
color: white;
text-decoration: none;
border-bottom: none;
}
&.blue{
border-top: 4px solid #3f9cea;
}
&.green{
border-top: 4px solid #5cbe40;
}
&.yellow{
border-top: 4px solid #ffee00;
}
&.pink {
border-top: 4px solid #f655a0;
}
} }
+63
View File
@@ -0,0 +1,63 @@
.menu {
$text_color: #666;
position:relative;
width: 100%;
background-color: black;
color: $text_color;
font-size: 13pt;
ul {
margin: 0 0 0 20px;
li {
display: inline-block;
padding: 5px 3px 13px 3px;
margin-right: 30px;
}
}
:link, :visited {
text-decoration: none;
border-bottom: 1px solid #333;
color: $text_color;
}
a:hover {
color: white;
}
.vk {
float: right;
margin: 13px 15px 0 0;
border: none;
}
.selected {
border-top: 4px solid white;
font-weight: bold;
a:link, a:visited{
color: white;
text-decoration: none;
border-bottom: none;
}
&.blue{
border-top: 4px solid #3f9cea;
}
&.green{
border-top: 4px solid #5cbe40;
}
&.yellow{
border-top: 4px solid #ffee00;
}
&.pink {
border-top: 4px solid #f655a0;
}
}
}
+16
View File
@@ -0,0 +1,16 @@
.page {
// position: absolute;
// bottom: 0;
// top: 0;
padding-top: 0px;
width: 100%;
// z-index: -1;
}
.page.ng-leave {
// z-index: 9999;
}
.page.ng-enter {
// z-index: 8888;
}
+56
View File
@@ -0,0 +1,56 @@
@keyframes rotateFall {
0% {
transform: rotateZ(0deg);
}
20% {
transform: rotateZ(10deg);
animation-timing-function: ease-out;
}
40% {
transform: rotateZ(17deg);
}
60% {
transform: rotateZ(16deg);
}
100% {
transform: translateY(100%) rotateZ(17deg);
}
}
@keyframes scaleUp {
from {
opacity: 0.0;
transform: scale(0.5);
}
}
@keyframes slideInRight {
from {
transform: translateX(100%);
}
to {
transform: translateX(0);
}
}
@keyframes slideInUp {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
@keyframes slideOutLeft {
to {
transform: translateX(-100%);
}
}
@keyframes rotateOutNewspaper {
to {
transform: translateZ(-3000px) rotateZ(360deg);
opacity: 0;
}
}
+25 -10
View File
@@ -1,3 +1,14 @@
.page-schedule {
&.ng-leave {
transform-origin: 0% 0%;
animation: rotateFall 0.3s both ease-in;
}
&.ng-enter {
animation: scaleUp 0.3s both ease-in;
}
}
.schedule{ .schedule{
position: relative; position: relative;
margin: 30px auto 0 auto; margin: 30px auto 0 auto;
@@ -30,17 +41,9 @@
vertical-align:baseline; vertical-align:baseline;
p.name{ p.name{
// position: absolute;
width:30px;
height: 30px;
left: 0;
right: 0;
margin: 7px auto 10px auto;
padding: 7px;
border: 1px solid #e8e8e8;
// background-color: white;
border-radius: 50%;
font-size: 1.4em; font-size: 1.4em;
font-weight: 800;
color: #242424;
} }
} }
} }
@@ -162,6 +165,8 @@
} }
th{ th{
height: auto;
:not(.group){ :not(.group){
min-width: 150px; min-width: 150px;
/* width: 15%;*/ /* width: 15%;*/
@@ -172,6 +177,16 @@
&.group{ &.group{
width: 63px; width: 63px;
} }
.day{
margin: 0;
line-height: 0;
}
.date{
margin: 15px 0;
line-height: 0;
}
} }
} }
+8 -6
View File
@@ -1,9 +1,11 @@
.main-picture{ .page-team {
width: 100%; &.ng-leave {
position: fixed; animation: slideOutLeft 0.3s both ease-in;
margin: 0; }
left: 0;
z-index: -999; &.ng-enter {
animation: slideInRight 0.3s both ease-in;
}
} }
ul{ ul{
+22
View File
@@ -0,0 +1,22 @@
{
"name": "hudozhka",
"version": "2.0.0",
"authors": [
"Roman Timashev <roman@tmshv.ru>"
],
"moduleType": [
"amd",
"es6",
"globals",
"node"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
+62
View File
@@ -0,0 +1,62 @@
/**
* Created by tmshv on 04/11/14.
*/
var app = angular.module("hudozhka", ["ngRoute", "data.hudozhka"]);
app.config(function ($locationProvider, $routeProvider) {
$locationProvider.html5Mode(true);
var routes = [
{
name: "/",
templateUrl: "/views/home.html",
controller: "HomePageController"
},
{
name: "/schedule",
templateUrl: "/views/schedule.html",
controller: "SchedulePageController"
},
{
name: "/team",
templateUrl: "/views/team.html",
controller: "TeamPageController"
},
{
name: "/docs",
templateUrl: "/views/docs.html",
controller: "DocsPageController"
}
];
routes.forEach(function (route) {
$routeProvider.when(route.name, route);
});
$routeProvider.otherwise({
redirectTo: "/"
});
});
require("./ui/menu")(app);
require("./filters/uppercase-first")(app);
require("./pages/schedule")(app);
require("./pages/team")(app);
require("./pages/docs")(app);
app.controller("HomePageController", function ($scope) {
$scope.pageClass = "page-home";
});
app.controller("SchedulePageController", function ($scope) {
$scope.pageClass = "page-schedule";
});
app.controller("TeamPageController", function ($scope) {
$scope.pageClass = "page-team";
});
app.controller("DocsPageController", function ($scope) {
$scope.pageClass = "page-docs";
});
+14
View File
@@ -0,0 +1,14 @@
/**
* Created by tmshv on 06/11/14.
*/
angular.module("data.hudozhka", [])
.service("team", function () {
return require("../models/team");
})
.service("schedule", function () {
return require("../models/schedule");
})
.service("docs", function () {
return require("../models/document");
});
+148 -128
View File
@@ -1,132 +1,152 @@
var Doc = (function(){ var app = angular.module("document.hudozhka", ["ngRoute", "data.hudozhka"]);
var Document = function(baseURL){
this.pages = [];
this.baseURL = baseURL;
}
Document.prototype.hasPage = function(index){ app.config(function ($locationProvider, $routeProvider) {
return index >= 0 && index < this.pages.length; $locationProvider.html5Mode(true);
} //$routeProvider
// .when("/document/:doc", {
// controller: "DocumentPageController"
// })
// .otherwise({
// redirectTo: "/"
// });
});
Document.prototype.getPageURL = function(pageNumber){ app.controller("DocumentPageController", function ($scope, $location, docs) {
var s = pageNumber <2 ? "" : "/" + pageNumber; $scope.pageClass = "page-document";
return this.baseURL + s;
}
Document.prototype.page = function(index){ var doc = $location.$$path.replace("/document/", "");
return index + 1; $scope.doc = docs.doc(doc);
} });
return Document; //var Doc = (function(){
})(); // var Document = function(baseURL){
// this.pages = [];
(function(){ // this.baseURL = baseURL;
const PAGES = []; // }
var currentPageIndex = 0; //
var doc = new Doc(location.pathname.replace(/\/\d+$/, "")); // Document.prototype.hasPage = function(index){
$(document).ready(function(){ // return index >= 0 && index < this.pages.length;
try{ // }
var hrefPage = /\/(\d+)$/.exec(location.href)[1]; //
currentPageIndex = parseInt(hrefPage) - 1; // Document.prototype.getPageURL = function(pageNumber){
}catch(error){ // var s = pageNumber <2 ? "" : "/" + pageNumber;
// return this.baseURL + s;
} // }
//
$("#buttonNext").click(function(event){ // Document.prototype.page = function(index){
loadNext(); // return index + 1;
}); // }
//
$("#buttonPrev").click(function(event){ // return Document;
loadPrevious(); //})();
}); //
//(function(){
$("#page-container .pf").each(function(index, elem){ // const PAGES = [];
var url = $(elem).data("page-url"); // var currentPageIndex = 0;
doc.pages.push(url); // var doc = new Doc(location.pathname.replace(/\/\d+$/, ""));
}); // $(document).ready(function(){
// try{
$("#currentPage").attr("max", doc.pages.length); // var hrefPage = /\/(\d+)$/.exec(location.href)[1];
$("#totalPages").text(doc.pages.length); // currentPageIndex = parseInt(hrefPage) - 1;
$("#currentPage").change(function(){ // }catch(error){
var i = parseInt($(this).val()) - 1; //
if(i && doc.hasPage(i)){ // }
loadPage(i); //
} // $("#buttonNext").click(function(event){
}); // loadNext();
// });
$("#page-container").html(""); //
loadPage(currentPageIndex); // $("#buttonPrev").click(function(event){
// loadPrevious();
window.addEventListener("popstate", function(event){ // });
console.log("pops"); //
console.log(event); // $("#page-container .pf").each(function(index, elem){
var i = event.state; // var url = $(elem).data("page-url");
loadPage(i); // doc.pages.push(url);
}); // });
}); //
// $("#currentPage").attr("max", doc.pages.length);
function loadNext(){ // $("#totalPages").text(doc.pages.length);
var i = currentPageIndex + 1; // $("#currentPage").change(function(){
if(doc.hasPage(i)){ // var i = parseInt($(this).val()) - 1;
loadPage(i); // if(i && doc.hasPage(i)){
}else{ // loadPage(i);
// }
} // });
} //
// $("#page-container").html("");
function loadPrevious(){ // loadPage(currentPageIndex);
var i = currentPageIndex - 1; //
if(doc.hasPage(i)){ // window.addEventListener("popstate", function(event){
loadPage(i); // console.log("pops");
}else{ // console.log(event);
// var i = event.state;
} // loadPage(i);
} // });
// });
function loadPage(index){ //
if(doc.hasPage(index)){ // function loadNext(){
var url = doc.pages[index]; // var i = currentPageIndex + 1;
// $.ajax( // if(doc.hasPage(i)){
// url, // loadPage(i);
// }else{
// { //
// xhrFields: { // }
// crossDomain: true, // }
// withCredentials: true //
// }, // function loadPrevious(){
// var i = currentPageIndex - 1;
// success: function(data, status){ // if(doc.hasPage(i)){
// currentPageIndex = index; // loadPage(i);
// $("#currentPage").val(doc.page(currentPageIndex)); // }else{
// $("#page-container").html(data); //
// }
// var p = doc.page(currentPageIndex); // }
// console.log("look at page ", p); //
// window.history.pushState( // function loadPage(index){
// currentPageIndex, // if(doc.hasPage(index)){
// "State 2013 — " + p, // var url = doc.pages[index];
// doc.getPageURL(p) // // $.ajax(
// ); // // url,
// }, //
// // {
// error: function(xhr, aaa, error){ // // xhrFields: {
// console.log(error); // // crossDomain: true,
// } // // withCredentials: true
// } // // },
// ); //
$.get(url, function(data){ // // success: function(data, status){
currentPageIndex = index; // // currentPageIndex = index;
$("#currentPage").val(doc.page(currentPageIndex)); // // $("#currentPage").val(doc.page(currentPageIndex));
$("#page-container").html(data); // // $("#page-container").html(data);
//
var p = doc.page(currentPageIndex); // // var p = doc.page(currentPageIndex);
console.log("look at page ", p); // // console.log("look at page ", p);
window.history.pushState( // // window.history.pushState(
currentPageIndex, // // currentPageIndex,
"State 2013 — " + p, // // "State 2013 — " + p,
doc.getPageURL(p) // // doc.getPageURL(p)
); // // );
}); // // },
} //
} // // error: function(xhr, aaa, error){
})(); // // console.log(error);
// // }
// // }
// // );
// $.get(url, function(data){
// currentPageIndex = index;
// $("#currentPage").val(doc.page(currentPageIndex));
// $("#page-container").html(data);
//
// var p = doc.page(currentPageIndex);
// console.log("look at page ", p);
// window.history.pushState(
// currentPageIndex,
// "State 2013 — " + p,
// doc.getPageURL(p)
// );
// });
// }
// }
//})();
+11
View File
@@ -0,0 +1,11 @@
/**
* Created by tmshv on 21/11/14.
*/
module.exports = function(app) {
app.filter("uppercaseFirst", function () {
return function(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
};
});
};
+48
View File
@@ -0,0 +1,48 @@
module.exports = function (app) {
app.controller("DocumentsController", function ($scope, docs) {
$scope.documents = docs.docs;
});
};
/**
* Generates list of numbers
* @param {Number} start starting value
* @param {Number} num amount of numbers in list
* @param {Number} step difference value
* @return {Array} list of numbers
*/
function range(start, num, step) {
var list = [];
var val = start;
for (var i = 0; i < num; i++) {
list.push(val);
val += step;
}
return list;
}
///**
// * Monday date of current week
// * @param {[type]} d [description]
// * @return {[type]} [description]
// */
//function getMonday(d) {
// d = new Date(d);
// var day = d.getDay();
// var diff = d.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday
// return new Date(d.setDate(diff));
//}
function getDates(day) {
var dates = [];
var prev = day == 0 ? 0 : day - 1;
var next = 6 - prev;
var dayMask = range(-1, prev, -1).concat([0]).concat(range(1, next, 1));
dayMask.forEach(function (m) {
var time = Date.now() + (1000 * 60 * 60 * 24) * m;
var date = new Date(time);
dates.push(date.getDate());
});
return dates;
}
+82
View File
@@ -0,0 +1,82 @@
var populate = require("../../utils/populate").populate;
const course = require("../../models/course");
module.exports = function (app) {
app.controller("ScheduleController", function ($scope, schedule, team) {
var now = new Date();
var day = now.getDay();
var dates = getDates(day);
var sem = "late";
$scope.sem = [["early", "весеннего"], ["late", "осеннего"]].reduce(function (s, word) {
if (word[0] === sem) return word[1];
});
$scope.year = 2014;
$scope.schedule = schedule($scope.year, sem, [
populate(team.short, "teacher"),
populate(course.name, "lesson")
]);
$scope.isToday = function (weekDayIndex) {
return (now.getDay() - 1) === weekDayIndex;
};
$scope.weekDay = function (weekDayIndex) {
return dates[weekDayIndex];
};
$(window).scroll(function () {
if ($(this).scrollTop() >= 220) {
$(".schedule table thead").addClass("fix animated fadeInDown");
$(".schedule table tbody").addClass("fix");
} else {
$(".schedule table thead").removeClass("fix animated fadeInDown");
$(".schedule table tbody").removeClass("fix");
}
});
});
};
/**
* Generates list of numbers
* @param {Number} start starting value
* @param {Number} num amount of numbers in list
* @param {Number} step difference value
* @return {Array} list of numbers
*/
function range(start, num, step) {
var list = [];
var val = start;
for (var i = 0; i < num; i++) {
list.push(val);
val += step;
}
return list;
}
///**
// * Monday date of current week
// * @param {[type]} d [description]
// * @return {[type]} [description]
// */
//function getMonday(d) {
// d = new Date(d);
// var day = d.getDay();
// var diff = d.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday
// return new Date(d.setDate(diff));
//}
function getDates(day) {
var dates = [];
var prev = day == 0 ? 0 : day - 1;
var next = 6 - prev;
var dayMask = range(-1, prev, -1).concat([0]).concat(range(1, next, 1));
dayMask.forEach(function (m) {
var time = Date.now() + (1000 * 60 * 60 * 24) * m;
var date = new Date(time);
dates.push(date.getDate());
});
return dates;
}
+54
View File
@@ -0,0 +1,54 @@
var populate = require("../../utils/populate").populate;
const course = require("../../models/course");
module.exports = function (app) {
app.controller("TeamController", function ($scope, team) {
$scope.team = team.team.map(function (person) {
person.names = team.splitName(person.name);
return person;
});
});
};
/**
* Generates list of numbers
* @param {Number} start starting value
* @param {Number} num amount of numbers in list
* @param {Number} step difference value
* @return {Array} list of numbers
*/
function range(start, num, step) {
var list = [];
var val = start;
for (var i = 0; i < num; i++) {
list.push(val);
val += step;
}
return list;
}
///**
// * Monday date of current week
// * @param {[type]} d [description]
// * @return {[type]} [description]
// */
//function getMonday(d) {
// d = new Date(d);
// var day = d.getDay();
// var diff = d.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday
// return new Date(d.setDate(diff));
//}
function getDates(day) {
var dates = [];
var prev = day == 0 ? 0 : day - 1;
var next = 6 - prev;
var dayMask = range(-1, prev, -1).concat([0]).concat(range(1, next, 1));
dayMask.forEach(function (m) {
var time = Date.now() + (1000 * 60 * 60 * 24) * m;
var date = new Date(time);
dates.push(date.getDate());
});
return dates;
}
-83
View File
@@ -1,83 +0,0 @@
$(document).ready(function(){
$(window).scroll(function(){
if ($(window).scrollTop() >= 220) {
$(".schedule table thead").addClass("fix animated fadeInDown");
$(".schedule table tbody").addClass("fix");
}else{
$(".schedule table thead").removeClass("fix animated fadeInDown");
$(".schedule table tbody").removeClass("fix");
}
});
var now = new Date();
var day = now.getDay();
// day = 3;
if(day == 0) deselectDays();
else selectDay(day);
var dates = getDates(day);
$(".schedule thead .date").each(function(index, elem){
$(elem).text(dates[index]);
});
function selectDay(day){
deselectDays();
// day = Math.min(1, day);
// day = Math.max(6, day);
$($(".schedule thead th")[day]).addClass("current first");
$(".schedule tbody tr").each(function(index, elem){
$($(elem).find("td")[day]).addClass("current");
});
$($(".schedule tbody tr").last().find("td")[day]).addClass("last");
}
function deselectDays(){
$(".schedule thead th").removeClass("current first");
$(".schedule tbody td").removeClass("current last");
}
});
/**
* Generates list of numbers
* @param {Number} start starting value
* @param {Number} num amount of numbers in list
* @param {Number} step difference value
* @return {Array} list of numbers
*/
function range(start, num, step){
var list= [];
var val = start;
for(var i = 0; i<num; i++){
list.push(val);
val += step;
}
return list;
}
/**
* Monday date of current week
* @param {[type]} d [description]
* @return {[type]} [description]
*/
function getMonday(d) {
d = new Date(d);
var day = d.getDay();
var diff = d.getDate() - day + (day == 0 ? -6:1); // adjust when day is sunday
return new Date(d.setDate(diff));
}
function getDates(day){
var dates = [];
var prev = day == 0 ? 0 : day - 1;
var next = 6 - prev;
var dayMask = range(-1, prev, -1).concat([0]).concat(range(1, next, 1));
console.log("day mask", dayMask);
dayMask.forEach(function(m){
var time = Date.now() + (1000 * 60 * 60 * 24) * m;
var date = new Date(time);
console.log(date);
dates.push(date.getDate());
});
return dates;
}
+31
View File
@@ -0,0 +1,31 @@
/**
* Created by tmshv on 05/11/14.
*/
var menu = require("../../models/menu.json");
module.exports = function(app) {
app.service("menu", function ($route) {
menu.isActive = function (path) {
if ($route.current && $route.current.regexp) {
return $route.current.regexp.test(path);
}
return false;
};
return menu;
});
app.controller("MenuController", function ($scope, menu) {
$scope.vkgroup = menu.vkgroup;
$scope.menu = menu.menu;
$scope.isCurrent = function(item) {
return menu.isActive(item.url);
};
$scope.isValid = function(item) {
return Boolean(item.url);
};
});
};
+3 -9
View File
@@ -1,5 +1,3 @@
var populate = require("./utils/populate").populate;
const MENU = require("./models/menu.json"); const MENU = require("./models/menu.json");
const team = require("./models/team"); const team = require("./models/team");
@@ -10,15 +8,11 @@ const schedule = require("./models/schedule");
module.exports = { module.exports = {
port: 18010, port: 18010,
pub: "./", pub: "./",
data:{ data: {
menu: MENU, menu: MENU,
documents: document.docs, documents: document.docs,
team: team.team, team: team.team,
courses: course.courses, courses: course.courses
schedule: schedule([
populate(team.short, "teacher"),
populate(course.name, "lesson")
])
} }
} };
+20 -9
View File
@@ -5,15 +5,18 @@ var minifyCSS = require("gulp-minify-css");
var autoprefixer = require("gulp-autoprefixer"); var autoprefixer = require("gulp-autoprefixer");
var imageMin = require("gulp-imagemin"); var imageMin = require("gulp-imagemin");
var uglify = require("gulp-uglify"); var uglify = require("gulp-uglify");
var concat = require("gulp-concat");
var browserify = require("gulp-browserify");
var pub = "./public/"; var pub = "./public/";
gulp.task("sass", function () { gulp.task("sass", function () {
gulp.src("./assets/style/*.scss") gulp.src("./assets/style/*.scss")
.pipe(sass()) .pipe(sass())
.pipe(minifyCSS()) .pipe(concat("style.css"))
.pipe(autoprefixer()) .pipe(autoprefixer())
.pipe(gulp.dest("./public/s")); //.pipe(minifyCSS({processImport:false}))
.pipe(gulp.dest("public"));
}); });
gulp.task("copy", function(){ gulp.task("copy", function(){
@@ -24,10 +27,18 @@ gulp.task("copy", function(){
.pipe(gulp.dest("./public/s")); .pipe(gulp.dest("./public/s"));
}); });
gulp.task("uglify", function(){ gulp.task("compile", function(){
gulp.src("./client/*.js") gulp.src("client/app.js")
// .pipe(uglify()) .pipe(browserify())
.pipe(gulp.dest("./public/c")); .pipe(gulp.dest("public"));
gulp.src("client/document.js")
.pipe(browserify())
.pipe(gulp.dest("public"));
gulp.src("client/data.js")
.pipe(browserify())
.pipe(gulp.dest("public"));
}); });
gulp.task("imagemin", function(){ gulp.task("imagemin", function(){
@@ -36,5 +47,5 @@ gulp.task("imagemin", function(){
.pipe(gulp.dest("./public/img")); .pipe(gulp.dest("./public/img"));
}); });
gulp.task("default", ["sass", "copy", "uglify"]); gulp.task("default", ["sass", "compile"]);
gulp.task("deploy", ["default", "imagemin"]); gulp.task("deploy", ["default", "copy", "imagemin"]);
+31 -31
View File
@@ -1,33 +1,33 @@
{ {
"items":[ "menu": [
{ {
"text":"Школа", "text": "Школа",
"url":"/", "url": "/",
"class":"selected blue" "color": "blue"
}, },
{ {
"text":"Расписание", "text": "Расписание",
"url":"/schedule", "url": "/schedule",
"class":"selected green" "color": "green"
}, },
{ {
"text":"Занятия", "text": "Занятия",
"class":"selected" "color": ""
}, },
{ {
"text":"Коллектив", "text": "Коллектив",
"url":"/team", "url": "/team",
"class":"selected pink" "color": "pink"
}, },
{ {
"text":"Галерея", "text": "Галерея",
"class":"selected" "color": ""
}, },
{ {
"text":"Документы", "text": "Документы",
"url":"/docs", "url": "/docs",
"class":"selected yellow" "color": "yellow"
} }
], ],
"vkgroup":"https://vk.com/club10436104" "vkgroup": "https://vk.com/club10436104"
} }
@@ -5,24 +5,24 @@
"lesson": "composition", "lesson": "composition",
"teacher": "vv-voronova", "teacher": "vv-voronova",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"thursday": { "thursday": {
"lesson": "painting", "lesson": "painting",
"teacher": "od-gogoleva", "teacher": "od-gogoleva",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"saturday": { "saturday": {
"lesson": "sculpting", "lesson": "sculpting",
"teacher": "in-vturina", "teacher": "in-vturina",
"time": [ "time": [
"11:00 – 11:45", "11:00 11:45",
"11:55 – 12:40" "11:55 12:40"
] ]
} }
}, },
@@ -32,24 +32,24 @@
"lesson": "composition", "lesson": "composition",
"teacher": "vv-voronova", "teacher": "vv-voronova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"thursday": { "thursday": {
"lesson": "painting", "lesson": "painting",
"teacher": "od-gogoleva", "teacher": "od-gogoleva",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"saturday": { "saturday": {
"lesson": "sculpting", "lesson": "sculpting",
"teacher": "in-vturina", "teacher": "in-vturina",
"time": [ "time": [
"13:00 – 13:45", "13:00 13:45",
"13:55 – 14:40" "13:55 14:40"
] ]
} }
}, },
@@ -59,24 +59,24 @@
"lesson": "painting", "lesson": "painting",
"teacher": "od-gogoleva", "teacher": "od-gogoleva",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"friday": { "friday": {
"lesson": "composition", "lesson": "composition",
"teacher": "vv-voronova", "teacher": "vv-voronova",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"saturday": { "saturday": {
"lesson": "sculpting", "lesson": "sculpting",
"teacher": "in-vturina", "teacher": "in-vturina",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
} }
}, },
@@ -84,26 +84,26 @@
"name": "2-1", "name": "2-1",
"monday": { "monday": {
"lesson": "composition", "lesson": "composition",
"teacher": ".", "teacher": "nv-andreeva",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"wednesday": { "wednesday": {
"lesson": "painting", "lesson": "painting",
"teacher": "od-gogoleva", "teacher": "od-gogoleva",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"saturday": { "saturday": {
"lesson": "composition", "lesson": "composition",
"teacher": "Тимашева А.С.", "teacher": "as-timasheva",
"time": [ "time": [
"11:00 – 11:45", "11:00 11:45",
"11:55 – 12:40" "11:55 12:40"
] ]
} }
}, },
@@ -113,24 +113,24 @@
"lesson": "composition", "lesson": "composition",
"teacher": "nv-andreeva", "teacher": "nv-andreeva",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"wednesday": { "wednesday": {
"lesson": "painting", "lesson": "painting",
"teacher": "od-gogoleva", "teacher": "od-gogoleva",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"saturday": { "saturday": {
"lesson": "composition", "lesson": "composition",
"teacher": "Тимашева А.С.", "teacher": "as-timasheva",
"time": [ "time": [
"13:00 – 13:45", "13:00 13:45",
"13:55 – 14:40" "13:55 14:40"
] ]
} }
}, },
@@ -138,26 +138,26 @@
"name": "2-3", "name": "2-3",
"monday": { "monday": {
"lesson": "painting", "lesson": "painting",
"teacher": " ", "teacher": "od-gogoleva",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"thursday": { "thursday": {
"lesson": "cg", "lesson": "composition",
"teacher": "nv-andreeva", "teacher": "nv-andreeva",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"friday": { "friday": {
"lesson": "composition", "lesson": "composition",
"teacher": "Тимашева А.С.", "teacher": "as-timasheva",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
} }
}, },
@@ -167,23 +167,23 @@
"lesson": "drawing", "lesson": "drawing",
"teacher": "sa-latipova", "teacher": "sa-latipova",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"tuesday": { "tuesday": {
"lesson": "composition", "lesson": "composition",
"teacher": "nv-andreeva", "teacher": "nv-andreeva",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"wednesday": { "wednesday": {
"lesson": "history", "lesson": "history",
"teacher": "my-valkova", "teacher": "my-valkova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"" ""
] ]
}, },
@@ -191,16 +191,16 @@
"lesson": "painting", "lesson": "painting",
"teacher": "sa-latipova", "teacher": "sa-latipova",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"saturday": { "saturday": {
"lesson": "cg", "lesson": "cg",
"teacher": "rk-timashev", "teacher": "rk-timashev",
"time": [ "time": [
"13:00 – 13:45", "13:00 13:45",
"13:55 – 14:40" "13:55 14:40"
] ]
} }
}, },
@@ -210,40 +210,40 @@
"lesson": "drawing", "lesson": "drawing",
"teacher": "sa-latipova", "teacher": "sa-latipova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"tuesday": { "tuesday": {
"lesson": "composition", "lesson": "composition",
"teacher": "nv-andreeva", "teacher": "nv-andreeva",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"wednesday": { "wednesday": {
"lesson": "history", "lesson": "history",
"teacher": "my-valkova", "teacher": "my-valkova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"" ""
] ]
}, },
"thursday": { "thursday": {
"lesson": "painting", "lesson": "painting",
"teacher": ".", "teacher": "sa-latipova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"saturday": { "saturday": {
"lesson": "cg", "lesson": "cg",
"teacher": "rk-timashev", "teacher": "rk-timashev",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
} }
}, },
@@ -253,7 +253,7 @@
"lesson": "history", "lesson": "history",
"teacher": "my-valkova", "teacher": "my-valkova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"" ""
] ]
}, },
@@ -261,24 +261,24 @@
"lesson": "composition", "lesson": "composition",
"teacher": "nv-andreeva", "teacher": "nv-andreeva",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"friday": { "friday": {
"lesson": "painting", "lesson": "painting",
"teacher": "Тимашева А.С.", "teacher": "as-timasheva",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"saturday": { "saturday": {
"lesson": "drawing", "lesson": "drawing",
"teacher": "Тимашева А.С.", "teacher": "as-timasheva",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
} }
}, },
@@ -288,23 +288,23 @@
"lesson": "composition", "lesson": "composition",
"teacher": "vv-voronova", "teacher": "vv-voronova",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"tuesday": { "tuesday": {
"lesson": "painting", "lesson": "painting",
"teacher": "va-sarzhin", "teacher": "va-sarzhin",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"wednesday": { "wednesday": {
"lesson": "history", "lesson": "history",
"teacher": "my-valkova", "teacher": "my-valkova",
"time": [ "time": [
"18:00 – 18:45", "18:00 18:45",
"" ""
] ]
}, },
@@ -312,8 +312,8 @@
"lesson": "drawing", "lesson": "drawing",
"teacher": "sa-latipova", "teacher": "sa-latipova",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
} }
}, },
@@ -323,23 +323,23 @@
"lesson": "composition", "lesson": "composition",
"teacher": "vv-voronova", "teacher": "vv-voronova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"tuesday": { "tuesday": {
"lesson": "painting", "lesson": "painting",
"teacher": "va-sarzhin", "teacher": "va-sarzhin",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"wednesday": { "wednesday": {
"lesson": "history", "lesson": "history",
"teacher": "my-valkova", "teacher": "my-valkova",
"time": [ "time": [
"18:00 – 18:45", "18:00 18:45",
"" ""
] ]
}, },
@@ -347,8 +347,8 @@
"lesson": "drawing", "lesson": "drawing",
"teacher": "sa-latipova", "teacher": "sa-latipova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
} }
}, },
@@ -356,17 +356,17 @@
"name": "5-1", "name": "5-1",
"monday": { "monday": {
"lesson": "painting", "lesson": "painting",
"teacher": ".", "teacher": "va-sarzhin",
"time": [ "time": [
"15:00 – 15:45", "15:00 15:45",
"15:55 – 16:40" "15:55 16:40"
] ]
}, },
"thursday": { "thursday": {
"lesson": "history", "lesson": "history",
"teacher": "my-valkova", "teacher": "my-valkova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"" ""
] ]
} }
@@ -377,23 +377,23 @@
"lesson": "painting", "lesson": "painting",
"teacher": "va-sarzhin", "teacher": "va-sarzhin",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"tuesday": { "tuesday": {
"lesson": "drawing", "lesson": "drawing",
"teacher": "mg-timasheva", "teacher": "mg-timasheva",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"thursday": { "thursday": {
"lesson": "history", "lesson": "history",
"teacher": "my-valkova", "teacher": "my-valkova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"" ""
] ]
} }
@@ -404,15 +404,15 @@
"lesson": "painting", "lesson": "painting",
"teacher": "va-sarzhin", "teacher": "va-sarzhin",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 – 18:40" "17:55 18:40"
] ]
}, },
"thursday": { "thursday": {
"lesson": "drawing", "lesson": "drawing",
"teacher": "mg-timasheva", "teacher": "mg-timasheva",
"time": [ "time": [
"16:00 – 17:45", "16:00 17:45",
"" ""
] ]
}, },
@@ -420,8 +420,8 @@
"lesson": "composition", "lesson": "composition",
"teacher": "vv-voronova", "teacher": "vv-voronova",
"time": [ "time": [
"17:00 – 17:45", "17:00 17:45",
"17:55 18:40" "17:55 18:40"
] ]
} }
}, },
@@ -430,7 +430,7 @@
"lesson": "history", "lesson": "history",
"teacher": "my-valkova", "teacher": "my-valkova",
"time": [ "time": [
"18:00 – 18:45", "18:00 18:45",
"" ""
] ]
} }
+33 -20
View File
@@ -1,56 +1,69 @@
var pop = require("../utils/populate").pop; var pop = require("../utils/populate").pop;
var populate = require("../utils/populate").populate;
const SCHEDULE = require("./schedule-2014-early.json");
const WEEK = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]; const WEEK = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
module.exports = schedule; const SCHEDULES = {
"2014-early": require("./schedule-2014-early.json"),
"2014-late": require("./schedule-2014-late.json")
};
function schedule(pops){ module.exports = function (year, name, pops) {
var days = function(group){ //var s = require(
// [year, name].reduce(function (r, v, i) {
// var n = "{i}".replace("i", i);
// return r.replace(n, v);
// }, "./schedule-{0}-{1}.json")
//);
var s = SCHEDULES[year + "-" + name];
return populateSchedule(s, pops);
};
function populateSchedule(s, pops){
var days = function (group) {
var result = []; var result = [];
WEEK.forEach(function(i){ WEEK.forEach(function (i) {
var lesson = group[i]; var lesson = group[i];
if(lesson){ if (lesson) {
result.push( result.push(
pop(lesson) pop(lesson)
.populate(time()) .populate(time())
.populate(pops) .populate(pops)
.result() .result()
) )
}else{ } else {
result.push(null); result.push(null);
} }
}); });
return result; return result;
} };
var time = function(){ var time = function () {
return function(lesson){ return function (lesson) {
for(var i=0; i < lesson.time.length; i++){ for (var i = 0; i < lesson.time.length; i++) {
lesson.time[i] = lesson.time[i].replace(" ", "—"); lesson.time[i] = lesson.time[i].replace(" ", "—");
} }
return lesson; return lesson;
} }
} };
var mondayTime = function(group){ var mondayTime = function (group) {
var day; var day;
for(var i=0; i<WEEK.length; i++){ for (var i = 0; i < WEEK.length; i++) {
if(group[WEEK[i]]){ if (group[WEEK[i]]) {
day = WEEK[i]; day = WEEK[i];
break; break;
} }
} }
if(day){ if (day) {
return group[day].time[0].substr(0, 5); return group[day].time[0].substr(0, 5);
}else{ } else {
return "00:00" return "00:00"
} }
} };
var result = []; var result = [];
SCHEDULE.forEach(function(group){ s.forEach(function (group) {
result.push({ result.push({
name: group.name, name: group.name,
days: days(group), days: days(group),
+12 -5
View File
@@ -1,9 +1,12 @@
const TEAM = require("./team.json"); const TEAM = require("./team.json");
exports.team = TEAM; module.exports = {
exports.person = getPersonByID; team: TEAM,
exports.name = getNameByID; person: getPersonByID,
exports.short = getShortNameByID; name: getNameByID,
short: getShortNameByID,
splitName: splitName
};
function getPersonByID(id){ function getPersonByID(id){
for(var i=0; i<TEAM.length; i++){ for(var i=0; i<TEAM.length; i++){
@@ -28,9 +31,13 @@ function getShortNameByID(id){
} }
function shortifyName(name){ function shortifyName(name){
var m = /(.+)\s(.+)\s(.+)/.exec(name); var m = splitName(name);
var n = m[1].replace(/^(.).+/, "$1. ") + var n = m[1].replace(/^(.).+/, "$1. ") +
m[2].replace(/^(.).+/, "$1. ") + m[2].replace(/^(.).+/, "$1. ") +
m[3]; m[3];
return n; return n;
} }
function splitName(name){
return /(.+)\s(.+)\s(.+)/.exec(name);
}
+12 -12
View File
@@ -4,7 +4,7 @@
"name": "Марина Геннадьевна Тимашева", "name": "Марина Геннадьевна Тимашева",
"position": "Директор", "position": "Директор",
"edu": "Ленинградский инженерно-строительный институт", "edu": "Ленинградский инженерно-строительный институт",
"diplom": "НВ №222567", "diploma": "НВ №222567",
"status": "", "status": "",
"picture": "http://static.shburg.org/art/team/teacher5.jpg" "picture": "http://static.shburg.org/art/team/teacher5.jpg"
}, },
@@ -13,7 +13,7 @@
"name": "Валерий Александрович Саржин", "name": "Валерий Александрович Саржин",
"position": "Преподаватель живописи", "position": "Преподаватель живописи",
"edu": "Академия художеств имени И. Е. Репина", "edu": "Академия художеств имени И. Е. Репина",
"diplom": "B-I №259798", "diploma": "B-I №259798",
"status": "Первая квалификационная категория по живописи и станковой композиции", "status": "Первая квалификационная категория по живописи и станковой композиции",
"picture": "http://static.shburg.org/art/team/teacher10.jpg" "picture": "http://static.shburg.org/art/team/teacher10.jpg"
}, },
@@ -22,7 +22,7 @@
"name": "Ольга Дмитриевна Гоголева", "name": "Ольга Дмитриевна Гоголева",
"position": "Преподаватель живописи", "position": "Преподаватель живописи",
"edu": "Ленинградский инженерно-строительный институт", "edu": "Ленинградский инженерно-строительный институт",
"diplom": "B-I №222572", "diploma": "B-I №222572",
"status": "Высшая квалификационная категория по живописи и станковой композиции", "status": "Высшая квалификационная категория по живописи и станковой композиции",
"picture": "http://static.shburg.org/art/team/teacher11.jpg" "picture": "http://static.shburg.org/art/team/teacher11.jpg"
}, },
@@ -31,7 +31,7 @@
"name": "Наталья Викторовна Андреева", "name": "Наталья Викторовна Андреева",
"position": "Преподаватель композиции", "position": "Преподаватель композиции",
"edu": "Санкт-Петербургский государственный университет технологии и дизайна", "edu": "Санкт-Петербургский государственный университет технологии и дизайна",
"diplom": "ИВС 0514253", "diploma": "ИВС 0514253",
"status": "Вторая квалификационная категория по прикладной композиции", "status": "Вторая квалификационная категория по прикладной композиции",
"picture": "http://static.shburg.org/art/team/teacher2.jpg" "picture": "http://static.shburg.org/art/team/teacher2.jpg"
}, },
@@ -40,7 +40,7 @@
"name": "Вера Викторовна Воронова", "name": "Вера Викторовна Воронова",
"position": "Преподаватель композииции", "position": "Преподаватель композииции",
"edu": "Российский государственный университет имени А. И. Герцена", "edu": "Российский государственный университет имени А. И. Герцена",
"diplom": "ВСГ 0530340", "diploma": "ВСГ 0530340",
"status": "Вторая квалификационная категория по прикладной композиции", "status": "Вторая квалификационная категория по прикладной композиции",
"picture": "http://static.shburg.org/art/team/teacher1.jpg" "picture": "http://static.shburg.org/art/team/teacher1.jpg"
}, },
@@ -49,7 +49,7 @@
"name": "Ирина Николаевна Втюрина", "name": "Ирина Николаевна Втюрина",
"position": "Преподаватель скульптуры", "position": "Преподаватель скульптуры",
"edu": "Кировский государственный педагогический институт имени В. И. Ленина", "edu": "Кировский государственный педагогический институт имени В. И. Ленина",
"diplom": "ШВ №164501", "diploma": "ШВ №164501",
"status": "Первая квалификационная категория по скульптуре", "status": "Первая квалификационная категория по скульптуре",
"picture": "http://static.shburg.org/art/team/teacher8.jpg" "picture": "http://static.shburg.org/art/team/teacher8.jpg"
}, },
@@ -58,7 +58,7 @@
"name": "Мария Юрьевна Валькова", "name": "Мария Юрьевна Валькова",
"position": "Преподаватель истории искусства", "position": "Преподаватель истории искусства",
"edu": "Педагогический институт имени А. И. Герцена", "edu": "Педагогический институт имени А. И. Герцена",
"diplom": "ПП №224197", "diploma": "ПП №224197",
"status": "Высшая квалификационная категория по истории искусства", "status": "Высшая квалификационная категория по истории искусства",
"picture": "http://static.shburg.org/art/team/teacher.jpg" "picture": "http://static.shburg.org/art/team/teacher.jpg"
}, },
@@ -67,16 +67,16 @@
"name": "Руслан Камилевич Тимашев", "name": "Руслан Камилевич Тимашев",
"position": "Преподаватель компьютерной графики", "position": "Преподаватель компьютерной графики",
"edu": "Санкт-Петербургский государственный архитектурно-строительный университет", "edu": "Санкт-Петербургский государственный архитектурно-строительный университет",
"diplom": "ВСГ 5344910", "diploma": "ВСГ 5344910",
"status": "", "status": "",
"picture": "http://static.shburg.org/art/team/teacher4.jpg" "picture": "http://static.shburg.org/art/team/teacher4.jpg"
}, },
{ {
"id": "as-timasheva", "id": "as-timasheva",
"name": "Анна Сергеевна Манцева", "name": "Анна Сергеевна Тимашева",
"position": "Преподаватель рисунка", "position": "Преподаватель рисунка",
"edu": "Московский архитектурный институт", "edu": "Московский архитектурный институт",
"diplom": "РН 70241", "diploma": "РН 70241",
"status": "", "status": "",
"picture": "http://static.shburg.org/art/team/teacher3.jpg" "picture": "http://static.shburg.org/art/team/teacher3.jpg"
}, },
@@ -85,7 +85,7 @@
"name": "Серафима Александровна Латыпова", "name": "Серафима Александровна Латыпова",
"position": "Преподаватель рисунка", "position": "Преподаватель рисунка",
"edu": "Незаконченный Ленинградский государственный педагогический университет имени А. С. Пушкина", "edu": "Незаконченный Ленинградский государственный педагогический университет имени А. С. Пушкина",
"diplom": "", "diploma": "",
"status": "", "status": "",
"picture": "http://static.shburg.org/art/team/teacher9.jpg" "picture": "http://static.shburg.org/art/team/teacher9.jpg"
}, },
@@ -94,7 +94,7 @@
"name": "Евгения Юрьевна Тарасова", "name": "Евгения Юрьевна Тарасова",
"position": "Преподаватель гравюры", "position": "Преподаватель гравюры",
"edu": "Санкт-Петербургский государственный архитектурно-строительный университет", "edu": "Санкт-Петербургский государственный архитектурно-строительный университет",
"diplom": "ВСВ 1321444", "diploma": "ВСВ 1321444",
"status": "", "status": "",
"picture": "http://static.shburg.org/art/team/teacher.jpg" "picture": "http://static.shburg.org/art/team/teacher.jpg"
} }
+10 -10
View File
@@ -16,18 +16,18 @@
"author": "Roman Timashev", "author": "Roman Timashev",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"consolidate": "~0.10.0", "express": "^4.10.1"
"jade": "~1.1.5",
"express": "~3.4.8",
"gulp-uglify": "^0.2.1"
}, },
"devDependencies": { "devDependencies": {
"gulp": "~3.5.2", "gulp": "^3.8.10",
"should": "~3.1.2", "gulp-autoprefixer": "0.0.6",
"mocha": "~1.17.1", "gulp-browserify": "^0.5.0",
"gulp-sass": "~0.6.0", "gulp-concat": "^2.4.1",
"gulp-minify-css": "~0.3.0",
"gulp-imagemin": "~0.1.5", "gulp-imagemin": "~0.1.5",
"gulp-autoprefixer": "0.0.6" "gulp-minify-css": "~0.3.0",
"gulp-sass": "^1.2.2",
"gulp-uglify": "^0.2.1",
"mocha": "~1.17.1",
"should": "~3.1.2"
} }
} }
-15
View File
@@ -1,15 +0,0 @@
var Router = require("express").Router;
var config = require("../config");
var route = require("./route");
var router = new Router();
module.exports = router.middleware;
router.get("/schedule", function(req, res){
var url = "/schedule";
res.render("schedule/schedule", {
menu: route.menu(url),
groups: config.data.schedule
});
});
+24 -15
View File
@@ -1,30 +1,39 @@
var express = require("express"); var express = require("express");
var consolidate = require("consolidate");
var path = require("path"); var path = require("path");
var config = require("./config"); var config = require("./config");
var pub = "./public"; var pub = "./public";
// var pub = path.resolve("~/Dropbox/Dev/Hud school/public/"); // var pub = pacth.resolve("~/Dropbox/Dev/Hud school/public/");
// console.log(pub); // console.log(pub);
// console.log(pub); // console.log(pub);
var server = express(); var server = express();
server.engine("jade", consolidate.jade); //server.engine("jade", require("consolidate").jade);
server.set("view engine", "jade"); //server.set("view engine", "jade");
server.set("views", [__dirname, "/pages"].join("")); //server.set("views", [__dirname, "/pages"].join(""));
server.use(express.static(pub)); server.use("/bower_components", express.static(path.join(__dirname, "bower_components")));
server.use("/views", express.static(path.join(__dirname, "views")));
server.use(express.static(path.join(__dirname, "public")));
server.get("/", function(req, res){ //server.get("/", function(req, res){
var url = "/"; // var url = "/";
var route = require("./routers/route"); // var route = require("./routers/route");
res.render("main/main", { // res.render("main/main", {
menu: route.menu(url) // menu: route.menu(url)
}); // });
//});
//
//server.use(require("./routers/schedule"));
//server.use(require("./routers/team.router").middleware);
//server.use(require("./routers/docs"));
server.get("/document/*", function (req, res) {
res.sendFile(path.join(__dirname, "views/document.html"));
}); });
server.use(require("./routers/schedule")); server.get("*", function (req, res) {
server.use(require("./routers/team.router").middleware); res.sendFile(path.join(__dirname, "views/index.html"));
server.use(require("./routers/docs")); });
server.listen(config.port); server.listen(config.port);
console.log("welcome!"); console.log("welcome!");
+10
View File
@@ -0,0 +1,10 @@
<div class="main" ng-controller="DocumentsController">
<div class="docblock"><h2>Лицензии, свидетельства и уставы</h2>
<div class="doc" ng-repeat="doc in documents">
<a href="{{doc.path}}" target="_blank">
<img ng-src="{{doc.preview}}">
<span>{{doc.title | uppercaseFirst}}</span>
</a>
</div>
</div>
</div>
+69
View File
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<base href="/document">
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/s/animate.min.css">
<link rel="stylesheet" href="/fonts/stylesheet.css">
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/bower_components/angular/angular.min.js"></script>
<script src="/bower_components/angular-route/angular-route.min.js"></script>
<script src="/bower_components/angular-animate/angular-animate.min.js"></script>
<script src="data.js"></script>
<script src="document.js"></script>
</head>
<body ng-app="document.hudozhka" ng-controller="DocumentPageController">
<div class="document-block">
<div class="menu transparent">
<div class="panel">
<h1>
<span class="bold">ДХШ</span>
<span class="norm">Шлиссельбурга</span> ,
<span class="norm">{{doc.title}}</span>
</h1>
</div>
</div>
<div class="document">
<div class="page {{pageClass}}">
<img ng-src="{{url}}" alt="" ng-repeat="url in doc.url"/>
</div>
</div>
</div>
<!-- Yandex.Metrika counter -->
<script>(function (d, w, c) {
(w[c] = w[c] || []).push(function () {
try {
w.yaCounter24027460 = new Ya.Metrika({
id: 24027460,
webvisor: true,
clickmap: true,
trackLinks: true,
accurateTrackBounce: true
});
} catch (e) {
}
});
var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () {
n.parentNode.insertBefore(s, n);
};
s.type = "text/javascript";
s.async = true;
s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else {
f();
}
})(document, window, "yandex_metrika_callbacks");</script>
<noscript>
<div><img src="//mc.yandex.ru/watch/24027460" style="position: absolute; left: -9999px;" alt=""></div>
</noscript>
<!-- Yandex.Metrika counter -->
</body>
</html>
+1
View File
@@ -0,0 +1 @@
<div>HELLO</div>
+61
View File
@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html>
<head>
<base href="/">
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/s/animate.min.css">
<link rel="stylesheet" href="/fonts/stylesheet.css">
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/bower_components/angular/angular.min.js"></script>
<script src="/bower_components/angular-route/angular-route.min.js"></script>
<script src="/bower_components/angular-animate/angular-animate.min.js"></script>
<script src="data.js"></script>
<script src="/app.js"></script>
</head>
<body ng-app="hudozhka">
<div class="menu" ng-controller="MenuController">
<ul>
<li ng-repeat="item in menu" class="{{item.color}}" ng-class="{selected:isCurrent(item)}">
<span ng-hide="isValid(item)">{{item.text}}</span>
<a href="{{item.url}}" ng-show="isValid(item)">{{item.text}}</a>
</li>
<a href="{{vkgroup}}" class="vk"><img src="/img/icon.vk.png"></a>
</ul>
</div>
<div class="page {{pageClass}}" ng-view></div>
<!-- Yandex.Metrika counter -->
<script>(function (d, w, c) {
(w[c] = w[c] || []).push(function () {
try {
w.yaCounter24027460 = new Ya.Metrika({
id: 24027460,
webvisor: true,
clickmap: true,
trackLinks: true,
accurateTrackBounce: true
});
} catch (e) {
}
});
var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () {
n.parentNode.insertBefore(s, n);
};
s.type = "text/javascript";
s.async = true;
s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else {
f();
}
})(document, window, "yandex_metrika_callbacks");</script>
<noscript>
<div><img src="//mc.yandex.ru/watch/24027460" style="position: absolute; left: -9999px;" alt=""></div>
</noscript>
<!-- Yandex.Metrika counter -->
</body>
</html>
+49
View File
@@ -0,0 +1,49 @@
<div class="schedule" ng-controller="ScheduleController">
<p> Расписание {{sem}} семестра {{year}} года</p>
<table>
<thead class="">
<tr>
<th class="group">Гр.</th>
<th ng-class="{current: isToday(0)}">
<p class="day">Понедельник</p>
<p class="date">{{weekDay(0)}}</p>
</th>
<th ng-class="{current: isToday(1)}">
<p class="day">Вторник</p>
<p class="date">{{weekDay(1)}}</p>
</th>
<th ng-class="{current: isToday(2)}">
<p class="day">Среда</p>
<p class="date">{{weekDay(2)}}</p>
</th>
<th ng-class="{current: isToday(3)}">
<p class="day">Четверг</p>
<p class="date">{{weekDay(3)}}</p>
</th>
<th ng-class="{current: isToday(4)}">
<p class="day">Пятница</p>
<p class="date">{{weekDay(4)}}</p>
</th>
<th ng-class="{current: isToday(5)}">
<p class="day">Суббота</p>
<p class="date">{{weekDay(5)}}</p>
</th>
</tr>
</thead>
<tbody class="">
<tr ng-repeat="group in schedule">
<td class="group">
<p class="name">{{group.name}}</p>
<p class="time">{{group.time}}</p>
</td>
<td ng-repeat="day in group.days track by $index" ng-class="{current: isToday($index)}">
<p class="lesson"><a href="">{{day.lesson}}</a></p>
<p class="teacher"><a href="">{{day.teacher}}</a></p>
<p class="time">{{day.time[0]}}</p>
<p class="time">{{day.time[1]}}</p>
</td>
</tr>
</tbody>
</table>
</div>
+15
View File
@@ -0,0 +1,15 @@
<img class="background-picture" src="http://static.shlisselburg.org/art/team/team.jpg">
<ul class="team-list" ng-controller="TeamController">
<li class="team-member" ng-repeat="person in team">
<img ng-src="{{person.picture}}">
<div class="info">
<h3>{{person.names[1]}} {{person.names[2]}} <span>{{person.names[3]}}</span></h3>
<p>{{person.position}}</p>
<p>{{person.status}}</p>
<p></p>
<p class="edu">{{person.edu}} </p>
<p class="diploma">Диплом {{person.diploma}}</p>
</div>
</li>
</ul>