50 Commits
Author SHA1 Message Date
tmshv f006207112 nginx https conf 2016-01-07 20:38:28 +03:00
tmshv d46d39a131 + letsenctypt conf file 2016-01-07 20:37:13 +03:00
tmshv 8a934cbf5c gulpfile update; packages update 2016-01-05 03:04:09 +03:00
tmshv c6f242693a - pdf.scss 2016-01-05 02:35:03 +03:00
tmshv 28471fe8c1 v3.4.0 2016-01-05 00:51:40 +03:00
tmshv aacc920796 package.json v3.2.0 2016-01-05 00:49:47 +03:00
tmshv d3c7e444ea big update for deployment system 2016-01-05 00:48:49 +03:00
tmshv 2c443568e8 nginx.conf: port 1800; other updates 2016-01-05 00:24:10 +03:00
tmshv 2b426f53b3 team.json update 2016-01-04 23:06:27 +03:00
tmshv 830cd80de1 team page update: background picture is temporary broken; + backgroundPicture directive (unstable); 2015-08-16 08:01:35 +03:00
tmshv d9ca65958c tape viewer update 2015-08-15 21:22:48 +03:00
tmshv 5e9889e3f4 main layout update 2015-08-15 21:22:28 +03:00
tmshv 1c92ecfef1 schedule table improvements 2015-08-15 19:40:45 +03:00
tmshv 6861e365ce gulpfile update 2015-08-15 19:38:47 +03:00
tmshv 76db829026 fix table schedule fix head top 2015-08-15 15:50:42 +03:00
tmshv 857dc05852 fix menu schedule color 2015-08-15 15:50:15 +03:00
tmshv b48b120405 menu update: fixed position, other changes 2015-08-15 15:39:04 +03:00
tmshv 916c11c516 + mainMenu directive 2015-08-15 15:38:34 +03:00
tmshv 8fdbc18e65 schedule cleaning up, schedule table directive, url updating 2015-08-13 12:03:36 +03:00
tmshv 78789bd7f3 gulp production environment 2015-08-13 10:43:28 +03:00
tmshv 27b1cfbec8 schedule update, mobile schedule 2015-08-13 10:42:54 +03:00
tmshv 5ad7caf844 stability improvements of CopyrightController 2015-08-13 10:41:48 +03:00
tmshv 16dc05b2db + common, date utils 2015-08-13 10:40:16 +03:00
tmshv 3e510b3b4c bing verification meta tag 2015-08-05 12:01:58 +03:00
tmshv e3eb9c119f fix: sitemap package not in the package.json 2015-08-05 02:57:03 +03:00
tmshv a9f5acb480 gulpfile update 2015-08-05 02:49:35 +03:00
tmshv 4c25f36816 dynamic sitemap.xml 2015-08-05 02:48:41 +03:00
tmshv 084001791b gulpfile cleaning up 2015-08-05 02:47:40 +03:00
tmshv 15018b3cd8 es6 in schedule page 2015-08-05 01:44:56 +03:00
tmshv 8624987a8e fix babel system 2015-08-05 01:44:15 +03:00
tmshv ba7968410c + babel 2015-08-05 01:27:48 +03:00
tmshv 9f15d631f4 + schedule caching 2015-08-05 01:16:08 +03:00
tmshv 1249666fad schedule style update 2015-08-05 01:06:56 +03:00
tmshv ee826400df code cleaning up 2015-08-05 00:54:37 +03:00
tmshv 1a11cf8c85 copyright change 2015-08-05 00:53:52 +03:00
tmshv f747ce17f3 schedule page update: multiple schedules, prettify, other changes 2015-08-05 00:53:25 +03:00
tmshv a22820c278 + /schedules route; other update 2015-08-05 00:51:39 +03:00
tmshv dc88c838aa courses model update 2015-08-05 00:50:56 +03:00
tmshv 691448457a team model update 2015-08-05 00:50:34 +03:00
tmshv 5cae479c4b .gitignore update: + /build 2015-08-05 00:49:33 +03:00
tmshv 9857d7bae8 fix: main page title grammatic error; 2015-07-14 03:33:44 +03:00
tmshv 240dc350fe - main-dev template; 2015-07-14 03:31:14 +03:00
tmshv 5e14fe465c main page analytics for production only by host checking; 2015-07-14 03:30:47 +03:00
tmshv 840502c68f fotorama link to CDN; 2015-07-13 01:54:38 +03:00
tmshv 73f0efa537 bower components now is a solid file; 2015-07-13 01:53:47 +03:00
tmshv 94f38205f4 head tags remixing; 2015-07-13 01:37:20 +03:00
tmshv d6fbeb1fd0 socket.io lazy init; 2015-07-13 01:14:27 +03:00
tmshv 534ce3f2e3 robots.txt update: fix warnings, disallow /news; 2015-07-13 01:11:46 +03:00
tmshv da79a17374 prerender: remove meta tag after prerendering; 2015-07-13 00:38:12 +03:00
tmshv 13d909c219 fix: sitemap.xml changefreq warning; 2015-07-12 21:08:53 +03:00
50 changed files with 1122 additions and 994 deletions

No files matched your search

+1
View File
@@ -7,3 +7,4 @@ private*.json
/node_modules
/bower_components
/public
/build
+14
View File
@@ -0,0 +1,14 @@
.background-picture {
overflow-x: hidden;
width: 100%;
height: 95vh;
background-repeat: no-repeat;
&.vertical {
background-size: 100% auto;
}
&.horizontal {
background-size: auto 100%;
}
}
+6 -17
View File
@@ -9,28 +9,17 @@
}
}
.page.page-home{
width: 90%;
margin: 0 auto;
}
.main-block {
width: 100%;
margin-top: 5px;
.telephone {
font-size: 1.25em;
margin-left: 30px;
}
h1 {
font-size: 18pt;
text-align: center;
font-weight: normal;
margin: 1em 0 0;
margin: 1.2em 0 0;
padding: 0;
}
}
@media screen and (max-device-width: 500px) {
.main-block {
.telephone {
display: none;
}
}
}
+1 -2
View File
@@ -20,8 +20,7 @@ body {
.content {
flex: 1;
width: 90%;
margin: 0 auto;
margin: 41px auto 0;
}
a {
+56 -53
View File
@@ -1,76 +1,79 @@
header {
nav {
overflow-x: scroll;
-webkit-overflow-scrolling: touch;
width: 100%;
max-height: 15em;
.main-menu {
background-color: black;
font-size: 1.1em;
color: #666;
position: fixed;
z-index: 100;
overflow-x: scroll;
-webkit-overflow-scrolling: touch;
width: 100%;
//max-height: 15em;
& :link, & :visited {
text-decoration: none;
border-bottom: 1px solid #333;
color: #a2a2a2;
background-color: black;
font-size: 1.1em;
color: #666;
list-style: none;
white-space: nowrap;
& :link, & :visited {
text-decoration: none;
border-bottom: 1px solid #333;
color: #a2a2a2;
}
li {
display: inline-block; /* 6 */
padding: 0.3em 0.2em 0.5em;
margin: 0 0.5em;
&:first-child {
margin-left: 1em;
}
}
ul {
list-style: none;
white-space: nowrap;
a:hover {
color: white;
border-bottom: 1px solid #555;
}
li {
display: inline-block; /* 6 */
padding: 0.3em 0.2em 0.5em;
margin: 0 0.5em;
}
}
.selected {
border-top: 4px solid white;
font-weight: bold;
a:hover {
a:link, a:visited {
color: white;
border-bottom: 1px solid #555;
text-decoration: none;
border-bottom: none;
}
.selected {
border-top: 4px solid white;
font-weight: bold;
&.blue {
border-top: 4px solid #3f9cea;
}
a:link, a:visited {
color: white;
text-decoration: none;
border-bottom: none;
}
&.green {
border-top: 4px solid #5cbe40;
}
&.blue {
border-top: 4px solid #3f9cea;
}
&.yellow {
border-top: 4px solid #ffee00;
}
&.green {
border-top: 4px solid #5cbe40;
}
&.pink {
border-top: 4px solid #f655a0;
}
&.yellow {
border-top: 4px solid #ffee00;
}
&.pink {
border-top: 4px solid #f655a0;
}
&.red {
border-top: 4px solid #f61b14;
}
&.red {
border-top: 4px solid #f61b14;
}
}
}
@media (min-width: 31.25em) {
header{
max-height: none;
//max-height: none;
overflow: hidden;
}
nav ul {
width: 100%;
}
.main-menu {
width: 100%;
}
}
+1 -5
View File
@@ -1,10 +1,6 @@
.page {
// position: absolute;
// bottom: 0;
// top: 0;
padding-top: 0px;
padding-top: 0;
width: 100%;
// z-index: -1;
}
.page.ng-leave {
-179
View File
@@ -1,179 +0,0 @@
#page-container {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 0;
border: 0;
z-index: -1;
}
@media screen {
#page-container {
bottom: 0;
right: 0;
overflow: auto;
}
.loading-indicator {
display: none;
&.active {
display: block;
position: absolute;
width: 64px;
height: 64px;
top: 50%;
left: 50%;
margin-top: -32px;
margin-left: -32px;
}
img {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
}
}
@media print {
@page {
margin: 0;
}
html {
margin: 0;
}
body {
margin: 0;
-webkit-print-color-adjust: exact;
}
#page-container {
width: auto;
height: auto;
overflow: visible;
background-color: transparent;
}
.d {
display: none;
}
}
.pf {
position: relative;
background-color: white;
overflow: hidden;
border: 0;
}
.pc {
position: absolute;
border: 0;
padding: 0;
margin: 0;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
display: block;
transform-origin: 0 0;
-ms-transform-origin: 0 0;
-webkit-transform-origin: 0 0;
&.opened {
display: block;
}
}
.bf {
position: absolute;
border: 0;
margin: 0;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
}
.bi {
position: absolute;
border: 0;
margin: 0;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
}
@media print {
.pf {
margin: 0;
box-shadow: none;
page-break-after: always;
page-break-inside: avoid;
}
@-moz-document url-prefix() {
.pf {
overflow: visible;
border: 1px solid #fff;
}
.pc {
overflow: visible;
}
}
}
.c {
position: absolute;
border: 0;
padding: 0;
margin: 0;
overflow: hidden;
display: block;
}
.t {
position: absolute;
white-space: pre;
font-size: 1px;
transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-webkit-transform-origin: 0 100%;
unicode-bidi: bidi-override;
-moz-font-feature-settings: "liga" 0;
}
._ {
color: transparent;
z-index: -1;
}
::selection {
background: rgba(127, 255, 255, 0.4);
}
::-moz-selection {
background: rgba(127, 255, 255, 0.4);
}
.pi {
display: none;
}
.d {
position: absolute;
transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-webkit-transform-origin: 0 100%;
}
// .@CSS_LINK_CN span {
// position: relative;
// vertical-align: baseline;
// display: inline-block;
// unicode-bidi: bidi-override;
// }
+61
View File
@@ -0,0 +1,61 @@
.schedule-slider {
width: 100%;
max-width: 30em;
//width: 90%;
//margin: 0 auto;
}
.schedule-slider__slide {
height: 100%;
overflow-y: auto;
&.current {
border-left: .3em solid #4b8ff3;
border-right: .3em solid #4b8ff3;
}
}
.schedule-slider__body {
}
.schedule-slider__head {
text-align: center;
font-size: 2em;
margin: 0 0 .5em;
}
.schedule-record {
min-height: 10em;
text-align: center;
&.even{
background-color: #f3f3fd;
}
&.empty {
.schedule-record__head{
color: #bbb;
}
}
p {
margin: .2em 0;
}
}
.schedule-record__head {
padding: .25em 0;
font-size: 1.2em;
}
.schedule-record__main {
}
.schedule-record__name {
font-weight: bold;
font-size: 1.2em;
}
.schedule-record__group {
position: absolute;
}
+121
View File
@@ -0,0 +1,121 @@
$current-week-day-color: #4b8ff3;
.schedule-table {
margin: 0 auto;
width: 100%;
min-width: 50em;
position: relative;
table {
margin: 2em auto;
border-spacing: 0;
text-align: center;
thead {
animation-duration: 0.3s;
th {
font-weight: normal;
vertical-align: baseline;
height: 80px;
}
.date {
font-size: 1.5em;
}
.group {
color: #666;
}
}
tbody tr:nth-child(even) {
background-color: #f0f2da;
}
td {
vertical-align: baseline;
&:not(.group) {
width: 15%;
padding: .75em 1em;
}
&.group {
width: 5%;
p.name {
font-size: 1.25em;
font-weight: 800;
}
}
}
thead.fix {
position: fixed;
top: 41px;
background-color: rgba(255, 255, 255, .95);
z-index: 50;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
.current {
border: none;
border-radius: 0;
color: $current-week-day-color;
}
th {
height: auto;
.day {
margin: .5em 0;
}
.date {
margin: 0 0 .25em;
}
}
}
tbody.fix:before {
content: '';
display: block;
margin-top: 80px;
}
}
p {
margin-bottom: .2em;
}
a {
color: black;
text-decoration: none;
border-bottom: 1px solid #ccc;
}
.lesson {
font-size: 1.1em;
font-weight: bold;
}
.teacher {
font-style: italic;
}
.current {
border-left: 2px solid $current-week-day-color;
border-right: 2px solid $current-week-day-color;
}
.canceled:before {
position: absolute;
content: "";
width: 70%;
height: 100%;
top: 0;
left: 15%;
background-image: url(lesson-canceled.svg);
}
}
+4 -194
View File
@@ -9,203 +9,13 @@
}
}
.schedule{
.schedule {
position: relative;
margin: 30px auto 0 auto;
padding-bottom: 50px;
text-align: center;
.schedule-block{
overflow-x: scroll;
& > p {
margin: 0 0 1em;
}
table{
position: relative;
margin: 30px auto 0 auto;
border-spacing: 0px;
text-align: center;
td{
position: relative;
&:not(.group){
min-width: 150px;
/* width: 15%;*/
width: 150px;
padding: 8px 10px 8px;
vertical-align:baseline;
}
&.group{
min-width: 60px;
/* width: 5%;*/
width: 60px;
position: relative;
vertical-align:baseline;
p.name{
font-size: 1.4em;
font-weight: 800;
color: #242424;
}
}
}
}
thead{
animation-duration: 0.3s;
th{
font-weight: normal;
vertical-align: baseline;
height: 80px;
padding: 10px 0 0;
&.weekend{
color: #f52;
}
}
.date{
font-size: 1.5em;
}
.group{
color: #666;
}
}
tbody tr:nth-child(even){
background-color: #f3f3fd;
}
.lesson{
font-size: 1.1em;
font-weight: bold;
}
.teacher{
font-style: italic;
}
p{
margin-bottom: 10px;
}
a{
color: black;
text-decoration: none;
border-bottom: 1px solid #ccc;
}
.current{
border-left: 2px solid #4b8ff3;
border-right: 2px solid #4b8ff3;
&.first{
border-radius: 15px 15px 0 0;
border-top: 2px solid #4b8ff3;
}
&.last{
border-radius: 0 0 15px 15px;
border-bottom: 2px solid #4b8ff3;
}
}
.canceled:before{
position: absolute;
content: "";
width:70%;
height: 100%;
top: 0;
left: 15%;
background-image: url(lesson-canceled.svg);
}
ul{
margin: 0px auto 30px auto;
text-align: center;
li{
display: inline-block;
padding: 5px 10px;
margin: 0 5px;
&.current{
color: #68aeff;
border: none;
font-weight: bold;
/* color: #555;*/
/* padding: 5px 15px;*/
/* border: 1px solid #4b8ff3;*/
/* border-radius: 100px;*/
}
}
a{
color: #3f9cea;
border-bottom: 1px dashed #ccc;
display: inline-block;
padding: 0px;
}
}
thead.fix{
position: fixed;
top: 0;
background-color: rgba(255, 255, 255, 0.96);
z-index: 100;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
border-radius: 0 0 20px 20px;
.current{
border: none;
border-radius: 0px;
color: #3f9cea;
width: 155px;
}
th{
height: auto;
:not(.group){
min-width: 150px;
/* width: 15%;*/
width: 150px;
padding: 8px 10px 8px;
}
&.group{
width: 63px;
}
.day{
margin: 0;
line-height: 0;
}
.date{
margin: 15px 0;
line-height: 0;
}
}
}
tbody.fix:before{
content: "";
display: block;
margin-top: 90px;
}
}
@media screen and (max-device-width: 400px){
.schedule{
thead.fix{
display: none;
}
}
}
}
+3 -3
View File
@@ -1,5 +1,5 @@
.tape-block{
width: 70%;
width: 60%;
max-width: 1000px;
margin: 2em auto;
@@ -11,7 +11,7 @@
}
}
.tape-block-content{
.tape-block__body{
position: relative;
width: 100%;
@@ -53,7 +53,7 @@
margin: 1.5em auto;
}
.tape-block-content {
.tape-block__body {
.tape {
width: 62px;
height: 62px;
+38 -47
View File
@@ -1,57 +1,48 @@
.page-team {
&.ng-leave {
animation: slideOutLeft 0.3s both ease-in;
}
&.ng-leave {
animation: slideOutLeft 0.3s both ease-in;
}
&.ng-enter {
animation: slideInRight 0.3s both ease-in;
}
&.ng-enter {
animation: slideInRight 0.3s both ease-in;
}
}
.background-picture{
.team-block {
background-color: white;
width: 100%;
padding-top: 3em;
.team-member {
width: 80%;
margin: 0 auto 3em;
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.team-member__picture {
width: 20%;
max-width: 15em;
min-width: 12em;
margin: 0 1em;
}
.team-member__picture img {
width: 100%;
position: fixed;
top:0;
left: 0;
z-index: -999;
}
}
.team-block{
background-color: white;
width:100%;
min-height: 100px;
padding-top: 100px;
padding-bottom: 100px;
margin-top: 63%;
.team-member__info {
width: 60%;
margin: 0 1em;
ul{
list-style:none;
}
h3 {
font-weight: 200;
.team-member{
margin: 0 auto 50px auto;
width: 70%;
img{
width: 40%;
max-width: 600px;
min-width: 200px;
display: inline-block;
}
.info{
display: inline-block;
float: right;
width: 55%;
line-height: 2em;
h3{
font-weight: 100;
span{
font-weight: 600;
}
}
}
span {
font-weight: 600;
}
}
}
}
+24 -13
View File
@@ -2,13 +2,20 @@
* Created by tmshv on 04/11/14.
*/
var app = angular.module("hudozhka", [
var deps = [
require('./modules/schedule')
]
.map(function(m){
return m.name;
});
var app = angular.module("hudozhka", deps.concat([
"hudozhka.data",
"ngRoute",
"angulartics",
"angulartics.google.analytics",
"angularSpinner"
]);
]));
app.config(function ($locationProvider, $routeProvider) {
$locationProvider.hashPrefix("!");
@@ -19,25 +26,25 @@ app.config(function ($locationProvider, $routeProvider) {
name: "/",
templateUrl: "/views/home.html",
controller: "HomePageController",
title:"ДХШ Шлиссельбурга"
title: "ДХШ Шлиссельбурга"
},
{
name: "/schedule",
name: "/schedule/:period?/:semester?",
templateUrl: "/views/schedule.html",
controller: "SchedulePageController",
title:"Расписание"
title: "Расписание"
},
{
name: "/team",
templateUrl: "/views/team.html",
controller: "TeamPageController",
title:"Преподаватели"
title: "Преподаватели"
},
{
name: "/gallery",
templateUrl: "/views/gallery.html",
controller: "GalleryPageController",
title:"Работы учащихся"
title: "Работы учащихся"
},
{
name: "/gallery/:year/:course/:album",
@@ -53,6 +60,7 @@ app.config(function ($locationProvider, $routeProvider) {
];
routes.forEach(function (route) {
if (typeof route === 'function') route = route();
$routeProvider.when(route.name, route);
});
@@ -61,10 +69,10 @@ app.config(function ($locationProvider, $routeProvider) {
});
});
app.run(function($location, $rootScope, $http) {
app.run(function ($location, $rootScope, $http) {
$rootScope.$on("$routeChangeSuccess", function (event, current) {
var title = current["$$route"].title;
if(title) $rootScope.title = title;
if (title) $rootScope.title = title;
});
$http.defaults.headers.common["Accept"] = "application/json";
@@ -72,6 +80,9 @@ app.run(function($location, $rootScope, $http) {
require("./api/api")(app);
require("./services/io")(app);
require("./directives/mainMenu")(app);
require("./directives/teamMemberProfile")(app);
require("./directives/backgroundPicture")(app);
require("./ui/menu")(app);
require("./ui/breadcrumbs")(app);
require("./ui/timeline")(app);
@@ -91,10 +102,10 @@ 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";
});
app.controller("AppController", function ($scope, menu) {
$scope.menuProvider = menu.items;
});
+8 -1
View File
@@ -4,7 +4,14 @@ module.exports = function (app) {
$scope.now = new Date().getFullYear();
$rootScope.$on('$routeChangeSuccess', function (event, current) {
$scope.developer = current['$$route'].originalPath == '/';
var originalPath;
try{
originalPath = current['$$route'].originalPath;
}catch(e){
originalPath = null;
}
$scope.developer = originalPath == '/';
});
});
};
+1 -1
View File
@@ -6,7 +6,7 @@ angular.module("hudozhka.data", [])
.service("team", function () {
return require("../models/team");
})
.service("schedule", function () {
.service("scheduleData", function () {
return require("../models/schedule");
})
.service("docs", function () {
+26
View File
@@ -0,0 +1,26 @@
module.exports = function (app) {
app.directive('backgroundPicture', function () {
return {
restrict: 'E',
template: '<div class="background-picture" />',
scope: {
src: '='
},
link: function($scope, $element){
var element = $element.find('.background-picture').get(0);
element.style.backgroundImage = `url('${$scope.src}')`;
setTimeout(function () {
var w = element.offsetWidth;
var h = element.offsetHeight;
if (w > h) {
element.classList.add('horizontal');
} else {
element.classList.add('vertical');
}
}, 100);
}
}
});
};
+24
View File
@@ -0,0 +1,24 @@
module.exports = function (app) {
app.directive('mainMenu', function (menu) {
return {
restrict: 'E',
templateUrl: '/views/menu.html',
scope: {
menu: '=items'
},
link: function(scope, element){
scope.isActive = function (item) {
if (menu.current) {
return item.url == menu.current.url;
} else {
return false;
}
};
scope.isValid = function (item) {
return 'url' in item;
};
}
}
});
};
+13
View File
@@ -0,0 +1,13 @@
module.exports = function (app) {
app.directive('teamMemberProfile', function (menu) {
return {
restrict: 'E',
templateUrl: '/views/team/profile.html',
scope: {
person: '=profile'
},
link: function(scope, element){
}
}
});
};
+155
View File
@@ -0,0 +1,155 @@
var getDates = require('../../utils/date').getDates;
module.exports = angular.module('hudozka.schedule', [])
.directive('schedule', function ($compile) {
return {
restrict: 'E',
scope: {
groups: '='
},
link: function (scope, element) {
var template = `<schedule-table groups="${scope.groups}"></schedule-table>`;
try {
if (window.matchMedia('(max-device-width: 30em)').matches) {
template = `<schedule-slider groups="${scope.groups}"></schedule-slider>`
}
} catch (e) {
}
element.html(template).show();
$compile(element.contents())(scope);
}
};
})
.directive('scheduleTable', function () {
return {
templateUrl: '/views/schedule/table.html',
link: function (scope, element) {
//var this_element = element[0];
var now = new Date();
var dates = getDates(now);
scope.isToday = function (weekDayIndex) {
return (now.getDay() - 1) === weekDayIndex;
};
scope.weekDay = function (weekDayIndex) {
return dates[weekDayIndex];
};
var $tbody = element.find('table tbody');
var $thead = element.find('table thead');
var $td_list = [];
var min;
var max;
$(window).scroll(function () {
const scrollOffset = 150;
if(!min) min = element.find('table tbody tr:first-child')[0].offsetTop + scrollOffset;
if(!max) max = element.find('table tbody tr:last-child')[0].offsetTop + scrollOffset;
if(!$td_list.length) $td_list = element.find('table tbody tr:first-child td');
$td_list.each(function (i) {
var w = this.offsetWidth;
$thead.find('th')[i].style.width = `${w}px`;
});
var scroll = $(this).scrollTop();
if (scroll >= min && scroll <= max) {
$thead.addClass('fix animated fadeInDown');
$tbody.addClass('fix');
} else {
$thead.removeClass('fix animated fadeInDown');
$tbody.removeClass('fix');
}
});
}
}
})
.directive('scheduleSlider', function ($compile) {
return {
restrict: 'E',
template: '<div class="schedule-slick"></div>',
link: function (scope, element) {
var $slick = element.find('.schedule-slick');
scope.$watch('groups', function (value) {
try {
$slick.slick('unslick');
} catch (e) {
}
if (value) {
var days = week(value);
scope.days = days;
$slick.html(
days.map(function (day, i) {
return `<schedule-slide day="days[${i}]"></schedule-slide>`
}).join('')
).show();
$compile($slick.contents())(scope);
$slick.slick({
mobileFirst: true,
infinite: false,
dots: false,
arrows: false,
touchThreshold: 20,
speed: 250,
slidesToShow: 1,
centerMode: false
});
var now = new Date();
var currentWeekIndex = now.getDay() - 1;
$slick.slick('slickGoTo', currentWeekIndex);
}
});
}
}
})
.directive('scheduleSlide', function () {
return {
restrict: 'E',
templateUrl: "/views/schedule/slide.html",
scope: {
day: '='
}
}
})
.directive('scheduleRecord', function () {
return {
restrict: 'E',
templateUrl: "/views/schedule/record.html",
scope: {
record: '=',
i: '='
}
}
});
function week(schedule) {
var now = new Date();
var dates = getDates(now);
return ['Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота']
.map(function (day, i) {
return {
current: i === now.getDay() - 1,
day: day,
date: dates[i],
groups: schedule.map(function (group) {
return {
name: group.name,
time: group.time,
content: group.days[i]
}
})
}
});
}
+18 -9
View File
@@ -3,27 +3,36 @@
*/
module.exports = function (app) {
app.controller("HomePageController", function ($scope, config) {
app.controller('HomePageController', function ($scope, config) {
var fotorama;
$scope.pageClass = "page-home";
$scope.pageClass = 'page-home';
var $tape = $('.tape-block');
var $fotorama = $('.fotorama');
var $fotorama = $tape.find('.tape-block__content');
$tape.addClass('simplified');
$fotorama.on('fotorama:ready', function () {
$tape.removeClass('simplified');
fotorama.setOptions({
nav: 'dots'
nav: 'dots',
transition: 'crossfade',
autoplay: '6000',
arrows: 'false',
width: '100%',
fit: 'cover',
loop: 'true'
});
});
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'}
]);
setTimeout(function(){
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);
});
};
+76 -76
View File
@@ -1,81 +1,81 @@
var populate = require("../../utils/populate").populate;
const course = require("../../models/course");
var populate = require('../../utils/populate').populate;
const course = require('../../models/course');
module.exports = function (app) {
app.controller("ScheduleController", function ($scope, $http, schedule, team) {
var now = new Date();
var dates = getDates(now);
var sem = "autumn";
$scope.sem = [["spring", "весеннего"], ["autumn", "осеннего"]].reduce(function (s, word) {
if (word[0] === sem) return word[1];
});
$scope.year = "2014-2015";
$http.get("/schedule/2014-2015/spring")
.success(function (s) {
$scope.schedule = schedule.populate(s.schedule, [
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;
function indexEquals(i) {
return function (_, index) {
return i === index;
}
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 isRequested(period, semester) {
return function (schedule) {
return schedule.period === period && schedule.semester === semester;
}
}
function getDates(start) {
var day = start.getDay();
return range(0, 6, 1).reduce(function (dates, weekDay) {
var d = 1 + weekDay - day;
var time = start.getTime() + (1000 * 60 * 60 * 24) * d;
var date = new Date(time);
dates.push(date.getDate());
return dates;
}, []);
}
module.exports = function (app) {
app.controller('ScheduleController', function ($scope, $http, $location, $routeParams, scheduleData, team, menu) {
menu.activate('/schedule');
var current_period = $routeParams.period;
var current_semester = $routeParams.semester;
var isScheduleRequested = current_period && current_semester;
$http.get("/schedules", {cache: true})
.success(function (schedules) {
// By url params or last element
var select_fn = isScheduleRequested ? isRequested(current_period, current_semester) : indexEquals(schedules.length - 1);
schedules = schedules.map(function (schedule) {
var sem = [['spring', 'Весена'], ['autumn', 'Осень']].reduce(function (s, word) {
if (word[0] === schedule.semester) return word[1];
else return s[1];
});
schedule.text = `${sem} ${schedule.period} года`;
return schedule;
});
schedules.forEach(function (schedule, i) {
if (select_fn(schedule, i)) {
$scope.currentSchedule = schedules[i];
}
});
$scope.schedules = schedules;
$scope.loadSchedule($scope.currentSchedule, isScheduleRequested);
});
$scope.loadSchedule = function (s, updateURL) {
var id = s._id;
var schedule_item = getScheduleByID(id);
if (schedule_item) {
var sem = schedule_item.semester;
var period = schedule_item.period;
var url = `/schedule/${period}/${sem}`;
$http.get(url, {cache: true})
.success(function (scheduleRecord) {
$scope.groups = scheduleData.populate(scheduleRecord.schedule, [
populate(team.short, 'teacher'),
populate(course.name, 'lesson')
]);
if (updateURL) {
$location.url(url);
}
});
}
};
function getScheduleByID(id) {
var schedules = $scope.schedules;
for (var i = 0, l = schedules.length; i < l; i++) {
var s = schedules[i];
if (id === s._id) return s;
}
return null;
}
});
};
+6 -4
View File
@@ -1,9 +1,11 @@
var populate = require("../../utils/populate").populate;
const course = require("../../models/course");
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) {
app.controller('TeamPageController', function ($scope, team) {
$scope.pageClass = 'page-team';
$scope.teamMembers = team.team.map(function (person) {
person.names = team.splitName(person.name);
return person;
});
+7 -3
View File
@@ -3,9 +3,13 @@
*/
module.exports = function (app) {
var socket = io();
var socket;
function init(){
socket = io();
}
app.service("io", function(){
app.service("io", function () {
if (!socket) init();
return socket;
})
});
};
+6 -18
View File
@@ -21,26 +21,14 @@ module.exports = function (app) {
var menu = new Menu();
$rootScope.$on('$routeChangeSuccess', function (event, current) {
var path = current['$$route'].originalPath;
menu.activate(path);
try{
var path = current['$$route'].originalPath;
menu.activate(path);
}catch(e){
}
});
return menu;
});
app.controller("MenuController", function ($scope, menu) {
$scope.menu = menu;
$scope.isActive = function (item) {
if(menu.current) {
return item.url == menu.current.url;
}else{
return false;
}
};
$scope.isValid = function (item) {
return 'url' in item;
};
});
};
+19 -8
View File
@@ -1,8 +1,16 @@
#!/bin/sh
tarfile=build.tar.gz
tarpath=$TMPDIR$tarfile
echo "Deploying art.shburg.org"
NODE_ENV=production gulp
server="art.shburg.org"
app_port=1800
tarfile="build.tar.gz"
tarpath=$TMPDIR$tarfile
destpath="~/www/art.shburg.org"
echo "Packing..."
env GZIP=-9 tar -czf $tarpath \
--disable-copyfile \
--exclude=node_modules \
@@ -12,11 +20,14 @@ env GZIP=-9 tar -czf $tarpath \
--exclude=deploy.sh \
--exclude=install.sh .
echo "build file: $tarpath"
echo "Build file: $tarpath"
ssh hoster.et "rm -rf $destpath/*"
scp $tarpath hoster@$server:$destpath
echo "Build file successfully uploaded on server"
echo "Installing..."
ssh hoster.et "bash -s" -- < ./install.sh $destpath $tarfile $app_port
ssh shburg.et "rm -rf art/*"
scp $tarpath shburg@146.185.183.243:~
scp install.sh shburg@146.185.183.243:~
ssh shburg.et "./install.sh"
rm $tarpath
echo "art.shlisselburg.org deployment completed successfully"
echo "Done"
+69 -62
View File
@@ -1,75 +1,82 @@
var path = require("path");
var gulp = require("gulp");
var sass = require("gulp-sass");
var minify_css = require("gulp-minify-css");
var autoprefixer = require("gulp-autoprefixer");
var imageMin = require("gulp-imagemin");
var uglify = require("gulp-uglify");
var concat = require("gulp-concat");
var browserify = require("gulp-browserify");
var annotate = require("browserify-ngannotate");
var gulp = require('gulp');
var _if = require('gulp-if');
var postcss = require('gulp-postcss');
var sass = require('gulp-sass');
var imageMin = require('gulp-imagemin');
var uglify = require('gulp-uglify');
var minify = require('gulp-minify');
var concat = require('gulp-concat');
var browserify = require('gulp-browserify');
gulp.task("sass", function () {
gulp.src("./assets/style/*.scss")
.pipe(sass())
.pipe(concat("style.css"))
.pipe(autoprefixer())
.pipe(minify_css({processImport:false}))
var is_production = process.env['NODE_ENV'] == 'production';
gulp.task("concat-bower", function () {
var files = [
"public/bower_components/jquery/dist/jquery.min.js",
"public/bower_components/angular/angular.min.js",
"public/bower_components/angular-route/angular-route.min.js",
"public/bower_components/angular-animate/angular-animate.min.js",
"public/bower_components/angulartics/dist/angulartics.min.js",
"public/bower_components/angulartics/dist/angulartics-ga.min.js",
"public/bower_components/spin.js/spin.js",
"public/bower_components/angular-spinner/angular-spinner.min.js",
"public/bower_components/socket.io-client/socket.io.js"
];
gulp.src(files)
.pipe(concat("libs.js"))
.pipe(uglify())
.pipe(gulp.dest("public"));
});
gulp.task("copy", function(){
gulp.src("./assets/fonts/*")
.pipe(gulp.dest("./public/fonts"));
gulp.task('styles', function () {
var processors = [
require('autoprefixer')({browsers: ['last 1 version']}),
require('cssnano')()
];
gulp.src("./assets/graphics/*")
.pipe(gulp.dest("./public/graphics"));
gulp.src("./3rdparty/*")
.pipe(gulp.dest("./public"));
gulp.src("robots.txt")
.pipe(gulp.dest("./public"));
gulp.src("sitemap.xml")
.pipe(gulp.dest("./public"));
gulp.src('./assets/style/*.scss')
.pipe(sass())
.pipe(postcss(processors))
.pipe(concat('style.css'))
.pipe(gulp.dest('./public'));
});
gulp.task("compile", function(){
gulp.src("client/app.js")
.pipe(browserify({
transform: [annotate]
}))
.pipe(uglify())
.pipe(gulp.dest("public"));
gulp.task("copy", function () {
gulp.src("./assets/fonts/*")
.pipe(gulp.dest("./public/fonts"));
gulp.src("client/document.js")
.pipe(browserify({
transform: [annotate]
}))
.pipe(uglify())
.pipe(gulp.dest("public"));
gulp.src("./assets/graphics/*")
.pipe(gulp.dest("./public/graphics"));
gulp.src("client/data.js")
.pipe(browserify({
transform: [annotate]
}))
.pipe(uglify())
.pipe(gulp.dest("public"));
gulp.src("client/instagram.js")
.pipe(browserify({
transform: [annotate]
}))
.pipe(uglify())
.pipe(gulp.dest("public"));
gulp.src([
"./3rdparty/*",
"robots.txt"
])
.pipe(gulp.dest("./public"));
});
gulp.task("imagemin", function(){
gulp.src("./assets/img/**/*")
.pipe(imageMin())
.pipe(gulp.dest("./public/img"));
gulp.task('compile', function () {
gulp.src([
'client/app.js',
'client/document.js',
'client/data.js',
'client/instagram.js'
])
.pipe(browserify({
transform: [
require('browserify-ngannotate'),
require('babelify')
]
}))
//.pipe(_if(is_production, minify()))
.pipe(gulp.dest('./public'));
});
gulp.task("default", ["sass", "compile"]);
gulp.task("deploy", ["default", "copy", "imagemin"]);
gulp.task("imagemin", function () {
gulp.src("./assets/img/**/*")
.pipe(imageMin())
.pipe(gulp.dest("./public/img"));
});
gulp.task('default', ['styles', 'compile']);
gulp.task('deploy', ['default', 'copy', 'imagemin']);
+10 -5
View File
@@ -1,14 +1,19 @@
#!/bin/sh
gunzip build.tar.gz
tar xf build.tar -C ~/art
rm build.tar
dir_path="$1"
build_file="$2"
port="$3"
cd $dir_path
gunzip -c $build_file | tar xopf -
#rm build.tar
cd ~/art
npm install --production --loglevel error
export NODE_ENV=production
export PORT=18010
export PORT=$port
#starting www
if forever restart bin/www.js; then
+4
View File
@@ -0,0 +1,4 @@
rsa-key-size = 4096
email = roman@tmshv.ru
domains = art.shlisselburg.org, art.shburg.org
webroot-path = /home/hoster/www/art.shburg.org/public
+4
View File
@@ -11,6 +11,10 @@
"id": "sculpting",
"name": "Скульптура"
},
{
"id": "ceramic",
"name": "Керамика"
},
{
"id": "composition",
"name": "Композиция"
+15 -15
View File
@@ -2,47 +2,47 @@
{
"name": "statue-2013",
"title": "устав школы за 2013 год",
"url": "http://static.shburg.org/art/docs/hudozhka_statue-2013.pdf",
"preview": "http://static.shburg.org/art/graphics/statue-2013-preview.png",
"files": ["http://static.shburg.org/art/docs/hudozhka_statue-2013.pdf"]
"url": "https://static.shburg.org/art/docs/hudozhka_statue-2013.pdf",
"preview": "https://static.shburg.org/art/graphics/statue-2013-preview.png",
"files": ["https://static.shburg.org/art/docs/hudozhka_statue-2013.pdf"]
},
{
"name": "edu-license",
"title": "образовательная лицензия",
"url": "/document/edu-license",
"preview": "http://static.shburg.org/art/graphics/license_edu-preview.png",
"preview": "https://static.shburg.org/art/graphics/license_edu-preview.png",
"files": [
"http://static.shburg.org/art/docs/hudozhka_license_edu.jpg",
"http://static.shburg.org/art/docs/hudozhka_license_edu_back.jpg",
"http://static.shburg.org/art/docs/hudozhka_license_edu_attachment.jpg"
"https://static.shburg.org/art/docs/hudozhka_license_edu.jpg",
"https://static.shburg.org/art/docs/hudozhka_license_edu_back.jpg",
"https://static.shburg.org/art/docs/hudozhka_license_edu_attachment.jpg"
]
},
{
"name": "gov-certificate",
"title": "свидетельство о государственной регистрации права",
"url": "/document/gov-certificate",
"preview": "http://static.shburg.org/art/graphics/certificate_gov-preview.png",
"files": ["http://static.shburg.org/art/docs/hudozhka_certificate_gov.jpg"]
"preview": "https://static.shburg.org/art/graphics/certificate_gov-preview.png",
"files": ["https://static.shburg.org/art/docs/hudozhka_certificate_gov.jpg"]
},
{
"name": "VAT",
"title": "ИНН",
"url": "/document/VAT",
"preview": "http://static.shburg.org/art/graphics/vatin-preview.png",
"files": ["http://static.shburg.org/art/docs/hudozhka_vatin.jpg"]
"preview": "https://static.shburg.org/art/graphics/vatin-preview.png",
"files": ["https://static.shburg.org/art/docs/hudozhka_vatin.jpg"]
},
{
"name": "EGRYL1",
"title": "свидетельство о внесении в «ЕГРЮЛ»",
"url": "/document/EGRYL1",
"preview": "http://static.shburg.org/art/graphics/certificate_egryl1-preview.png",
"files": ["http://static.shburg.org/art/docs/hudozhka_certificate_egryl1.jpg"]
"preview": "https://static.shburg.org/art/graphics/certificate_egryl1-preview.png",
"files": ["https://static.shburg.org/art/docs/hudozhka_certificate_egryl1.jpg"]
},
{
"name": "EGRYL2",
"title": "свидетельство о внесении в «ЕГРЮЛ»",
"url": "/document/EGRYL2",
"preview": "http://static.shburg.org/art/graphics/certificate_egryl2-preview.png",
"files": ["http://static.shburg.org/art/docs/hudozhka_certificate_egryl2.jpg"]
"preview": "https://static.shburg.org/art/graphics/certificate_egryl2-preview.png",
"files": ["https://static.shburg.org/art/docs/hudozhka_certificate_egryl2.jpg"]
}
]
+20 -11
View File
@@ -6,7 +6,7 @@
"edu": "Ленинградский инженерно-строительный институт",
"diploma": "НВ №222567",
"status": "",
"picture": "http://static.shburg.org/art/team/teacher5.jpg",
"picture": "https://static.shburg.org/art/team/teacher5.jpg",
"anchor": "director"
},
{
@@ -16,7 +16,7 @@
"edu": "Академия художеств имени И. Е. Репина",
"diploma": "B-I №259798",
"status": "Первая квалификационная категория по живописи и станковой композиции",
"picture": "http://static.shburg.org/art/team/teacher10.jpg"
"picture": "https://static.shburg.org/art/team/teacher10.jpg"
},
{
"id": "od-gogoleva",
@@ -25,7 +25,7 @@
"edu": "Ленинградский инженерно-строительный институт",
"diploma": "B-I №222572",
"status": "Высшая квалификационная категория по живописи и станковой композиции",
"picture": "http://static.shburg.org/art/team/teacher11.jpg"
"picture": "https://static.shburg.org/art/team/teacher11.jpg"
},
{
"id": "nv-andreeva",
@@ -34,7 +34,7 @@
"edu": "Санкт-Петербургский государственный университет технологии и дизайна",
"diploma": "ИВС 0514253",
"status": "Вторая квалификационная категория по прикладной композиции",
"picture": "http://static.shburg.org/art/team/teacher2.jpg"
"picture": "https://static.shburg.org/art/team/teacher2.jpg"
},
{
"id": "vv-voronova",
@@ -43,7 +43,7 @@
"edu": "Российский государственный университет имени А. И. Герцена",
"diploma": "ВСГ 0530340",
"status": "Вторая квалификационная категория по прикладной композиции",
"picture": "http://static.shburg.org/art/team/teacher1.jpg"
"picture": "https://static.shburg.org/art/team/teacher1.jpg"
},
{
"id": "in-vturina",
@@ -52,7 +52,7 @@
"edu": "Кировский государственный педагогический институт имени В. И. Ленина",
"diploma": "ШВ №164501",
"status": "Первая квалификационная категория по скульптуре",
"picture": "http://static.shburg.org/art/team/teacher8.jpg"
"picture": "https://static.shburg.org/art/team/teacher8.jpg"
},
{
"id": "my-valkova",
@@ -61,7 +61,7 @@
"edu": "Педагогический институт имени А. И. Герцена",
"diploma": "ПП №224197",
"status": "Высшая квалификационная категория по истории искусства",
"picture": "http://static.shburg.org/art/team/teacher.jpg"
"picture": "https://static.shburg.org/art/team/teacher12.jpg"
},
{
"id": "rk-timashev",
@@ -70,7 +70,7 @@
"edu": "Санкт-Петербургский государственный архитектурно-строительный университет",
"diploma": "ВСГ 5344910",
"status": "",
"picture": "http://static.shburg.org/art/team/teacher4.jpg"
"picture": "https://static.shburg.org/art/team/teacher4.jpg"
},
{
"id": "as-timasheva",
@@ -79,7 +79,7 @@
"edu": "Московский архитектурный институт",
"diploma": "РН 70241",
"status": "",
"picture": "http://static.shburg.org/art/team/teacher3.jpg",
"picture": "https://static.shburg.org/art/team/teacher3.jpg",
"contacts": {
"instagram": "annm101"
}
@@ -91,7 +91,7 @@
"edu": "Незаконченный Ленинградский государственный педагогический университет имени А. С. Пушкина",
"diploma": "",
"status": "",
"picture": "http://static.shburg.org/art/team/teacher9.jpg"
"picture": "https://static.shburg.org/art/team/teacher9.jpg"
},
{
"id": "ey-tarasova",
@@ -100,6 +100,15 @@
"edu": "Санкт-Петербургский государственный архитектурно-строительный университет",
"diploma": "ВСВ 1321444",
"status": "",
"picture": "http://static.shburg.org/art/team/teacher.jpg"
"picture": "https://static.shburg.org/art/team/teacher.jpg"
},
{
"id": "ea-burovtseva",
"name": "Елена Ал Буровцева",
"position": "Преподаватель керамики",
"edu": "",
"diploma": "",
"status": "",
"picture": ""
}
]
+29 -8
View File
@@ -1,9 +1,16 @@
server {
listen 80;
listen 443 ssl;
charset utf-8;
server_name art.shlisselburg.org;
ssl_certificate /etc/letsencrypt/live/art.shlisselburg.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/art.shlisselburg.org/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
location / {
proxy_pass http://hudozka;
proxy_http_version 1.1;
@@ -14,14 +21,28 @@ server {
proxy_set_header X-Forwarded-For $remote_addr;
}
error_log /var/log/nginx/hudozhka.error.log;
access_log /var/log/nginx/hudozhka.access.log;
error_log /var/log/nginx/art.shburg.error.log;
access_log /var/log/nginx/art.shburg.access.log;
}
server {
listen 443 ssl;
server_name art.shburg.org;
ssl_certificate /etc/letsencrypt/live/art.shlisselburg.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/art.shlisselburg.org/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
return 301 https://art.shlisselburg.org$request_uri;
}
server {
listen 80;
server_name art.shburg.org;
return 301 $scheme://art.shlisselburg.org$request_uri;
server_name art.shlisselburg.org art.shburg.org;
return 301 https://art.shlisselburg.org$request_uri;
}
map $http_upgrade $connection_upgrade {
@@ -30,5 +51,5 @@ map $http_upgrade $connection_upgrade {
}
upstream hudozka {
server localhost:18010;
}
server localhost:1800;
}
+12 -8
View File
@@ -1,7 +1,7 @@
{
"name": "Hudozka",
"private": true,
"version": "3.1.0",
"version": "3.4.1",
"description": "",
"main": "bin/www.js",
"scripts": {
@@ -19,28 +19,32 @@
"koa-bodyparser": "^1.4.1",
"koa-conditional-get": "^1.0.2",
"koa-etag": "^2.0.0",
"koa-helmet": "0.0.3",
"koa-helmet": "^1.0.0",
"koa-logger": "^1.2.2",
"koa-prerender": "^1.0.3",
"koa-route": "^2.4.0",
"koa-static": "^1.4.9",
"koa-useragent": "0.0.5",
"koa.io": "0.0.3",
"mz": "^1.3.0",
"promised-mongo": "git+https://git@github.com/tmshv/promised-mongo",
"sitemap": "^0.9.0",
"thunkify": "^2.1.2"
},
"devDependencies": {
"autoprefixer": "^6.2.3",
"babelify": "^7.2.0",
"bower": "^1.3.12",
"browserify-ngannotate": "^0.7.1",
"browserify-ngannotate": "^2.0.0",
"cssnano": "^3.4.0",
"gulp": "^3.8.10",
"gulp-autoprefixer": "0.0.6",
"gulp-browserify": "^0.5.0",
"gulp-concat": "^2.4.1",
"gulp-if": "^2.0.0",
"gulp-imagemin": "~0.1.5",
"gulp-minify-css": "~0.3.0",
"gulp-sass": "^1.2.2",
"gulp-uglify": "^1.1.0",
"gulp-minify": "0.0.5",
"gulp-postcss": "^6.0.1",
"gulp-sass": "^2.1.1",
"gulp-uglify": "^1.5.0",
"mocha": "~1.17.1",
"should": "~3.1.2"
}
+1 -3
View File
@@ -1,7 +1,5 @@
User-agent: *
Disallow:
Disallow: /news
Allow: /
Host: art.shlisselburg.org
Sitemap: http://art.shlisselburg.org/sitemap.xml
Crawl-delay: 3
Crawl-rate: 1/3
+16
View File
@@ -44,4 +44,20 @@ module.exports = function (app) {
}
))
);
app.use(
route.get("/schedules", router.accepts(
{
"text/html": router.index(),
"text/plain": router.index(),
"application/json": function *() {
this.type = "application/json";
var data = yield db.c("schedules").find({}, {period:1 , semester: 1}).toArray();
if(!data) this.status = 404;
else this.body = data;
}
}
))
);
};
+57
View File
@@ -0,0 +1,57 @@
/**
* Created by tmshv on 22/11/14.
*/
var co = require("co");
var sitemap = require("sitemap");
var route = require("koa-route");
var router = require("./");
var db = require("../core/db");
module.exports = function (app) {
app.use(route.get("/sitemap.xml", function *() {
var urls = yield [menu(), gallery()];
urls = urls.reduce(function (urls, i) {
return urls.concat(i);
});
var sm = sitemap.createSitemap({
hostname: 'http://art.shlisselburg.org',
cacheTime: 600000, // 600 sec - cache purge period
urls: urls
});
var data = yield new Promise(function (resolve) {
sm.toXML(resolve);
});
this.set('Content-Type', 'application/xml');
this.body = data;
}));
};
function *menu(){
return require('../models/menu.json')
.filter(function(item){
return 'url' in item
})
.map(function (item) {
return {
url: item.url,
changefreq: 'daily'
}
});
}
function *gallery(){
var albums = yield db.c("albums")
.find({})
.toArray();
return albums.map(function (album) {
return {
url: `/gallery/${album.date.getFullYear()}${album.course_uri}${album.uri}`,
changefreq: 'monthly'
}
});
}
+12 -1
View File
@@ -20,12 +20,21 @@ app.use(bodyParser());
app.use(logger());
app.use(conditional());
app.use(etag());
app.use(function *(next) {
yield* next;
try{
var xp = this.response.header['x-prerender'] == 'true';
if(xp) this.body = this.body.replace('<meta name="fragment" content="!">', '');
}catch(e){}
});
app.use(prerender(config.prerender));
app.use(serve(path.join(__dirname, "public")));
app.use(serve(path.join(__dirname, "templates")));
app.use(helmet.defaults());
app.use(helmet());
app.use(function *(next) {
var q = this.query;
@@ -52,6 +61,8 @@ app.use(route.get("/document/:doc", routes.index(
path.join(__dirname, "templates/document.html")
)));
require("./routes/sitemap")(app);
require("./routes/schedule")(app);
require("./routes/news")(app);
require("./routes/gallery")(app);
-28
View File
@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://art.shlisselburg.org</loc>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://art.shlisselburg.org/schedule</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://art.shlisselburg.org/team</loc>
<changefreq>montly</changefreq>
</url>
<url>
<loc>http://art.shlisselburg.org/gallery</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://art.shlisselburg.org/docs</loc>
<changefreq>weekly</changefreq>
</url>
</urlset>
-92
View File
@@ -1,92 +0,0 @@
<!DOCTYPE html>
<html ng-app="hudozhka">
<head>
<base href="/">
<meta name="fragment" content="!">
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
<meta name="viewport" content="width=device-width, maximum-scale=1.0" />
<title ng-bind="title">ДШХ Шлиссельбурга</title>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/animate.min.css">
<link rel="stylesheet" href="/fonts/stylesheet.css">
<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="/bower_components/angulartics/dist/angulartics.min.js"></script>
<script src="/bower_components/angulartics/dist/angulartics-ga.min.js"></script>
<script src="/bower_components/spin.js/spin.js"></script>
<script src="/bower_components/angular-spinner/angular-spinner.min.js"></script>
<script src="/bower_components/socket.io-client/socket.io.js"></script>
<link rel="stylesheet" href="/bower_components/fotorama/fotorama.css">
<script src="/bower_components/fotorama/fotorama.js"></script>
<script src="/data.js"></script>
<script src="/app.js"></script>
</head>
<body>
<div class="wrapper">
<header>
<nav role="navigation" ng-controller="MenuController">
<ul>
<li ng-repeat="item in menu.items" class="{{item.color}}" ng-class="{selected: isActive(item)}">
<span ng-hide="isValid(item)">{{item.text}}</span>
<a href="{{item.url}}" ng-show="isValid(item)">{{item.text}}</a>
</li>
</ul>
</nav>
</header>
<div class="content">
<div class="page {{pageClass}}" ng-view autoscroll="true"></div>
</div>
<footer>
<div class="info-block">
<div>
<h4>Документы</h4>
<ul>
<li><a target="_blank" href="/document/edu-license">Лицензия на осуществление образовательной деятельности</a></li>
<li><a target="_blank" href="/document/gov-certificate">Свидетельство о государственной регистрации права</a></li>
<li><a target="_blank" href="/document/EGRYL1">Свидетельство о внесении в «ЕГРЮЛ»</a></li>
<li><a target="_blank" href="/document/VAT">ИНН</a></li>
<li><a target="_blank" href="/document/statue-2013">Устав школы</a></li>
</ul>
</div>
<div>
<h4>Ссылки на образовательные сайты</h4>
<ul>
<li><a href="http://минобрнауки.рф">минобрнауки.рф</a> — Министерство образования и науки Российской Федерации</li>
<li><a href="http://edu.ru">edu.ru</a> — Федеральный сайт «Российское образование»</li>
<li><a href="http://window.edu.ru">window.edu.ru</a> — Единое окно доступа к образовательным ресурсам</li>
<li><a href="http://school-collection.edu.ru">school-collection.edu.ru</a> — Единая коллекция цифровых образовательных ресурсов</li>
<li><a href="http://fcior.edu.ru">fcior.edu.ru</a> — Федеральный центр информационных образовательных ресурсов</li>
</ul>
<ul>
<li><a href="http://dkhshmga.ru">dkhshmga.ru</a> — Художественная школа Мги</li>
<li><a href="http://kirovskdmh.ucoz.ru">kirovskdmh.ucoz.ru</a> — Музыкальная школа Кировска</li>
</ul>
</div>
</div>
<div class="contacts" ng-controller="ContactsController">
<div>
<h4>Контактная информация</h4>
<p>Адрес: {{address}}</p>
<p>Телефон: {{telephone}}</p>
<p>Почта: <a href="mailto:{{email}}">{{email}}</a></p>
</div>
</div>
<div class="copyright" ng-controller="CopyrightController">
<span>©&nbsp;2014...{{now}} Художественная&nbsp;школа&nbsp;Шлиссельбурга</span>
<span ng-show="developer">Разработка и поддержка сайта — <a href="tmshv.ru?utm_source=artshburg&utm_medium=developer&utm_campaign=tmshv_ru">www.tmshv.ru</a></span>
</div>
</footer>
</div>
</body>
</html>
+27 -36
View File
@@ -1,61 +1,52 @@
<!DOCTYPE html>
<html ng-app="hudozhka">
<head>
<base href="/">
<meta name="fragment" content="!">
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
<meta name="msvalidate.01" content="E878301FE3E3F12D233A6B1156889601" />
<meta name="viewport" content="width=device-width, maximum-scale=1.0" />
<title ng-bind="title">ДШХ Шлиссельбурга</title>
<base href="/">
<title ng-bind="title">ДХШ Шлиссельбурга</title>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/animate.min.css">
<link rel="stylesheet" href="/fonts/stylesheet.css">
<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="/bower_components/angulartics/dist/angulartics.min.js"></script>
<script src="/bower_components/angulartics/dist/angulartics-ga.min.js"></script>
<script src="/bower_components/spin.js/spin.js"></script>
<script src="/bower_components/angular-spinner/angular-spinner.min.js"></script>
<script src="/bower_components/socket.io-client/socket.io.js"></script>
<script src="/libs.js"></script>
<link rel="stylesheet" href="/bower_components/fotorama/fotorama.css">
<script src="/bower_components/fotorama/fotorama.js"></script>
<link href="//cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.css" rel="stylesheet">
<script src="//cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/jquery.slick/1.5.7/slick.css"/>
<script src="//cdn.jsdelivr.net/jquery.slick/1.5.7/slick.min.js"></script>
<script src="/data.js"></script>
<script src="/app.js"></script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
if(window.location.host.indexOf('localhost') === -1){
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-60209057-1', 'auto');
// ga('send', 'pageview');
ga('create', 'UA-60209057-1', 'auto');
//ga('send', 'pageview');
}
</script>
</head>
<body>
<div class="wrapper">
<div class="wrapper" ng-controller="AppController">
<header>
<nav role="navigation" ng-controller="MenuController">
<ul>
<li ng-repeat="item in menu.items" class="{{item.color}}" ng-class="{selected: isActive(item)}">
<span ng-hide="isValid(item)">{{item.text}}</span>
<a href="{{item.url}}" ng-show="isValid(item)">{{item.text}}</a>
</li>
</ul>
</nav>
<main-menu items="menuProvider"></main-menu>
</header>
<div class="content">
@@ -100,7 +91,7 @@
</div>
<div class="copyright" ng-controller="CopyrightController">
<span>©&nbsp;2014...{{now}} Художественная&nbsp;школа&nbsp;Шлиссельбурга</span>
<span>©&nbsp;2012...{{now}} Художественная&nbsp;школа&nbsp;Шлиссельбурга</span>
<span ng-show="developer">Разработка и поддержка сайта — <a href="http://tmshv.ru?utm_source=artshburg&utm_medium=developer&utm_campaign=tmshv_ru">www.tmshv.ru</a></span>
</div>
</footer>
+11 -19
View File
@@ -1,36 +1,28 @@
<div class="main-block">
<!--<div>-->
<!--&lt;!&ndash;<a href="tel://{{telephone}}"></a>&ndash;&gt;-->
<!--<span class="telephone">{{contact.telephone}}</span>-->
<!--&lt;!&ndash;<a href="tel://{{telephone}}"></a>&ndash;&gt;-->
<!--<span class="telephone">{{contact.telephone}}</span>-->
<!--&lt;!&ndash;<ul class="submenu">&ndash;&gt;-->
<!--&lt;!&ndash;<li><a href="/team#director">директор</a><p>М. Г. Тимашева</p></li>&ndash;&gt;-->
<!--&lt;!&ndash;<li><a href="/enter">поступление</a></li>&ndash;&gt;-->
<!--&lt;!&ndash;<li><a href="/contacts">контактная информация</a></li>&ndash;&gt;-->
<!--&lt;!&ndash;<li><a href="/awards">награды</a></li>&ndash;&gt;-->
<!--&lt;!&ndash;</ul>&ndash;&gt;-->
<!--&lt;!&ndash;<ul class="submenu">&ndash;&gt;-->
<!--&lt;!&ndash;<li><a href="/team#director">директор</a><p>М. Г. Тимашева</p></li>&ndash;&gt;-->
<!--&lt;!&ndash;<li><a href="/enter">поступление</a></li>&ndash;&gt;-->
<!--&lt;!&ndash;<li><a href="/contacts">контактная информация</a></li>&ndash;&gt;-->
<!--&lt;!&ndash;<li><a href="/awards">награды</a></li>&ndash;&gt;-->
<!--&lt;!&ndash;</ul>&ndash;&gt;-->
<!--</div>-->
<h1>Шлиссельбургская детская художественная&nbsp;школа</h1>
</div>
<div class="tape-block">
<div class="tape-block-content">
<div class="tape-block__body">
<div class="tape tape-tl"></div>
<div class="tape tape-tr"></div>
<div class="tape tape-bl"></div>
<div class="tape tape-br"></div>
<div class="fotorama"
data-transition="crossfade"
data-autoplay="6000"
data-nav="false"
data-arrows="false"
data-width="100%"
data-fit="cover"
data-loop="true">
</div>
<div class="tape-block__content"></div>
</div>
</div>
<timeline></timeline>
<timeline></timeline>
+6
View File
@@ -0,0 +1,6 @@
<nav role="navigation" class="main-menu">
<li ng-repeat="item in menu" class="{{item.color}}" ng-class="{selected: isActive(item)}">
<span ng-hide="isValid(item)">{{item.text}}</span>
<a href="{{item.url}}" ng-show="isValid(item)">{{item.text}}</a>
</li>
</nav>
+6 -58
View File
@@ -1,61 +1,9 @@
<div class="schedule" ng-controller="ScheduleController">
<p> Расписание {{sem}} семестра {{year}} года</p>
<div class="schedule-block">
<table>
<thead class="">
<tr>
<th class="group">Гр.</th>
<th ng-class="{current: isToday(0)}">
<p class="day">Понедельник</p>
<p>
<label>
<select ng-model="currentSchedule" ng-change="loadSchedule(currentSchedule, true)" ng-options="s.text for s in schedules"></select>
</label>
</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>
<schedule groups="groups"></schedule>
</div>
+8
View File
@@ -0,0 +1,8 @@
<div class="schedule-record" ng-class="{even: i % 2 === 0, empty: !record.content.lesson}">
<div class="schedule-record__head">Группа {{record.name}} ({{record.time}})</div>
<div class="schedule-record__main">
<p class="schedule-record__name">{{record.content.lesson}}</p>
<p class="schedule-record__tutor">{{record.content.teacher}}</p>
<p class="schedule-record__time" ng-repeat="time in record.content.time">{{time}}</p>
</div>
</div>
+10
View File
@@ -0,0 +1,10 @@
<div class="schedule-slider__slide" ng-class="{current: day.current}">
<div class="schedule-slider__head">
<p>{{day.day}}</p>
<p>{{day.date}}</p>
</div>
<div class="schedule-slider__body">
<schedule-record ng-repeat="group in day.groups track by $index" record="group" i="$index"></schedule-record>
</div>
</div>
+55
View File
@@ -0,0 +1,55 @@
<div class="schedule-table" ng-show="groups">
<table>
<thead>
<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>
<tr ng-repeat="group in groups">
<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>
+2 -15
View File
@@ -1,18 +1,5 @@
<img class="background-picture" src="http://static.shlisselburg.org/art/team/team.jpg">
<!--<background-picture src="'http://static.shlisselburg.org/art/team/team.jpg'"></background-picture>-->
<div class="team-block">
<ul ng-controller="TeamController">
<li class="team-member" ng-repeat="person in team">
<a name="{{person.anchor}}"></a>
<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>
<team-member-profile ng-repeat="person in teamMembers track by $index" profile="person"/>
</div>
+18
View File
@@ -0,0 +1,18 @@
<div class="team-member">
<a name="{{person.anchor}}"></a>
<div class="team-member__picture">
<img ng-src="{{person.picture}}">
</div>
<div class="team-member__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>
</div>
+20
View File
@@ -0,0 +1,20 @@
module.exports = {
range: range
};
/**
* 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;
}
+21
View File
@@ -0,0 +1,21 @@
var range = require('./common').range;
module.exports = {
getDates: getDates
};
/**
*
* @param start
* @returns {*}
*/
function getDates(start) {
var day = start.getDay();
return range(0, 6, 1).reduce(function (dates, weekDay) {
var d = 1 + weekDay - day;
var time = start.getTime() + (1000 * 60 * 60 * 24) * d;
var date = new Date(time);
dates.push(date.getDate());
return dates;
}, []);
}