Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f006207112 | ||
|
|
d46d39a131 | ||
|
|
8a934cbf5c | ||
|
|
c6f242693a | ||
|
|
28471fe8c1 | ||
|
|
aacc920796 | ||
|
|
d3c7e444ea | ||
|
|
2c443568e8 | ||
|
|
2b426f53b3 | ||
|
|
830cd80de1 | ||
|
|
d9ca65958c | ||
|
|
5e9889e3f4 | ||
|
|
1c92ecfef1 | ||
|
|
6861e365ce | ||
|
|
76db829026 | ||
|
|
857dc05852 | ||
|
|
b48b120405 | ||
|
|
916c11c516 | ||
|
|
8fdbc18e65 | ||
|
|
78789bd7f3 | ||
|
|
27b1cfbec8 | ||
|
|
5ad7caf844 | ||
|
|
16dc05b2db | ||
|
|
3e510b3b4c | ||
|
|
e3eb9c119f | ||
|
|
a9f5acb480 | ||
|
|
4c25f36816 | ||
|
|
084001791b | ||
|
|
15018b3cd8 | ||
|
|
8624987a8e | ||
|
|
ba7968410c | ||
|
|
9f15d631f4 | ||
|
|
1249666fad | ||
|
|
ee826400df | ||
|
|
1a11cf8c85 | ||
|
|
f747ce17f3 | ||
|
|
a22820c278 | ||
|
|
dc88c838aa | ||
|
|
691448457a | ||
|
|
5cae479c4b | ||
|
|
9857d7bae8 | ||
|
|
240dc350fe | ||
|
|
5e14fe465c | ||
|
|
840502c68f | ||
|
|
73f0efa537 | ||
|
|
94f38205f4 | ||
|
|
d6fbeb1fd0 | ||
|
|
534ce3f2e3 | ||
|
|
da79a17374 | ||
|
|
13d909c219 | ||
|
|
9aa881a842 | ||
|
|
1b2f3e5b07 | ||
|
|
6a0709a96e | ||
|
|
7a74b4e76a | ||
|
|
553844cc46 | ||
|
|
2ab71140e1 | ||
|
|
1562e05fbf | ||
|
|
6c4e359cd5 | ||
|
|
719c8888c2 | ||
|
|
a43c8b012a | ||
|
|
0d65f2b8a2 | ||
|
|
2bc1c63b93 | ||
|
|
e5163c16bf | ||
|
|
f959c09d96 | ||
|
|
ee58032962 | ||
|
|
9194559e12 | ||
|
|
900f1d4e33 | ||
|
|
eb2aa6d4cf | ||
|
|
f2816229ff | ||
|
|
11bcea1091 | ||
|
|
9078294975 | ||
|
|
d485ec7880 | ||
|
|
acfecbc0b9 | ||
|
|
8d2d889759 | ||
|
|
0e67001b26 | ||
|
|
6e32adce5d | ||
|
|
a9a0b2c6b8 | ||
|
|
97966817ea | ||
|
|
a966030506 | ||
|
|
2417b93399 | ||
|
|
b782d0bd60 | ||
|
|
6fa896066e | ||
|
|
19a582c538 | ||
|
|
af132694bf | ||
|
|
7c52b81f3d | ||
|
|
07908b3f99 | ||
|
|
07c6f78e27 | ||
|
|
6182e27d8b | ||
|
|
e8a65edde1 | ||
|
|
d16bb492aa | ||
|
|
02cd05f997 | ||
|
|
525e10a0d6 | ||
|
|
3a0c573bce | ||
|
|
2cab2072fc | ||
|
|
d00c91605d | ||
|
|
f7b3cf0576 | ||
|
|
a0255d9758 | ||
|
|
bd4c166903 | ||
|
|
c72f44ea8b | ||
|
|
241812c6cf | ||
|
|
c2f7196bcf | ||
|
|
00e9d65789 | ||
|
|
b9d52b5327 | ||
|
|
385cecfc97 | ||
|
|
a67b3244ef | ||
|
|
a2ae10771e | ||
|
|
dc130ad394 | ||
|
|
754c8bf9a4 | ||
|
|
d69bec8c22 | ||
|
|
f687425bdc | ||
|
|
1ebfcea16b | ||
|
|
17923e3730 | ||
|
|
67ea5ea96c | ||
|
|
1069868ef0 | ||
|
|
df2ec90daa | ||
|
|
bed2cfad22 | ||
|
|
38fac9c033 | ||
|
|
e7c77e18c6 | ||
|
|
38e0a4dadd | ||
|
|
0372a81304 | ||
|
|
0a3c530599 | ||
|
|
435c8aef7f | ||
|
|
36febf0e3b | ||
|
|
5b477aa41c | ||
|
|
8d0f88ec81 | ||
|
|
b7f1599777 | ||
|
|
ec67d8d9d8 | ||
|
|
8b533f52a6 | ||
|
|
6994549360 | ||
|
|
85ca132c3e | ||
|
|
af5f5dc5b1 | ||
|
|
ba2891d09b | ||
|
|
d892105e9f | ||
|
|
467753a2e1 | ||
|
|
ec51adbfbe | ||
|
|
cc14b51fbb | ||
|
|
5dee8fd44a | ||
|
|
d178c1220f | ||
|
|
4d0c64bb93 | ||
|
|
6e4749476a | ||
|
|
141a8ebdf4 | ||
|
|
54d3ee8ecc | ||
|
|
02906582ac | ||
|
|
22edc3b275 | ||
|
|
a694abb3e5 | ||
|
|
6af90258c9 | ||
|
|
38381b5605 | ||
|
|
f6a43ca7e1 | ||
|
|
1de5e31515 | ||
|
|
14d89adb9d | ||
|
|
f3eb176dc4 | ||
|
|
1226573b8b | ||
|
|
6c27308c07 | ||
|
|
737bebec15 | ||
|
|
627a18c5fa | ||
|
|
1d2e17a581 | ||
|
|
7f7dcf84f3 | ||
|
|
e67c012ef9 | ||
|
|
3015e14e9c | ||
|
|
5f5909d2e9 | ||
|
|
9b843b21ca | ||
|
|
164975f21f | ||
|
|
3f4b07e6c9 | ||
|
|
65ec12a328 | ||
|
|
a09e4606d5 | ||
|
|
674aeace6a | ||
|
|
88bbf78ff1 | ||
|
|
0905db1753 | ||
|
|
a8bef3ea6b | ||
|
|
f583e1c7b2 | ||
|
|
4cd6c9464b | ||
|
|
30dd51f94b | ||
|
|
8e551ebd35 | ||
|
|
37d22b63ad | ||
|
|
0d6cf42c7f | ||
|
|
09412f288f | ||
|
|
9445496b94 | ||
|
|
0328dc745d | ||
|
|
d7521e5ac5 | ||
|
|
7e1c33fdda | ||
|
|
941acc708c | ||
|
|
efd77a62e3 |
No files matched your search
@@ -2,5 +2,9 @@
|
||||
.idea
|
||||
*.sublime*
|
||||
|
||||
private*.json
|
||||
|
||||
/node_modules
|
||||
/public
|
||||
/bower_components
|
||||
/public
|
||||
/build
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 618 B |
|
After Width: | Height: | Size: 611 B |
|
After Width: | Height: | Size: 611 B |
|
After Width: | Height: | Size: 618 B |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 491 B |
|
After Width: | Height: | Size: 470 B |
|
After Width: | Height: | Size: 470 B |
|
After Width: | Height: | Size: 491 B |
|
After Width: | Height: | Size: 697 B |
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 324 KiB |
|
Before Width: | Height: | Size: 311 KiB |
|
Before Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 340 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 309 KiB |
@@ -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%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
nav.breadcrumbs{
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
padding: .35em 0 0;
|
||||
color: #bbb;
|
||||
|
||||
a {
|
||||
color: #9990e0;
|
||||
}
|
||||
|
||||
ul{
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
|
||||
&:not(:first-child):before{
|
||||
content: '⟶';
|
||||
margin-left: .4em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 31.25em) {
|
||||
nav.breadcrumbs{
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-size: 0.75em;
|
||||
|
||||
ul{
|
||||
li {
|
||||
&:not(:first-child):before{
|
||||
content: '>';
|
||||
margin-left: .2em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 31.25em) and (max-width: 59.99999em){
|
||||
nav.breadcrumbs{
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-size: 0.75em;
|
||||
|
||||
ul{
|
||||
li {
|
||||
&:not(:first-child):before{
|
||||
content: '>';
|
||||
margin-left: .2em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,57 +1,40 @@
|
||||
.act{
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dashed #688fff;
|
||||
.page-docs {
|
||||
&.ng-leave {
|
||||
transform-origin: 50% 50%;
|
||||
animation: rotateOutNewspaper .3s both ease-in;
|
||||
}
|
||||
|
||||
&.ng-enter {
|
||||
animation: scaleUp 0.3s both ease-in
|
||||
}
|
||||
}
|
||||
|
||||
.main{
|
||||
margin-top: 50px;
|
||||
.documents-block {
|
||||
margin: 3em 0 0;
|
||||
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.docblock{
|
||||
// width:100%;
|
||||
margin-bottom: 40px;
|
||||
.doc {
|
||||
margin: 0 1.2em 2.5em;
|
||||
|
||||
text-align: center;
|
||||
|
||||
// .docs{
|
||||
// text-align: left;
|
||||
// }
|
||||
|
||||
h2{
|
||||
margin-left: 50px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.panel{
|
||||
text-align: left;
|
||||
li{
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.select{
|
||||
padding:2px 6px 2px 6px;
|
||||
background-color: #688fff;
|
||||
color: white;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.doc{
|
||||
display: inline-block;
|
||||
margin: 30px 35px;
|
||||
@media (max-width: 31.25em) {
|
||||
.documents-block {
|
||||
margin: 1em 0 0;
|
||||
}
|
||||
|
||||
img{
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width:360px;
|
||||
}
|
||||
|
||||
.docinfo{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.doc {
|
||||
margin: 0 0 2em;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,92 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
.document-block {
|
||||
h1{
|
||||
font-size: 14pt;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.menu{
|
||||
position: fixed;
|
||||
background-color: white;
|
||||
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.5);
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
&.transparent{
|
||||
opacity: 0.95;
|
||||
}
|
||||
}
|
||||
|
||||
.controls {
|
||||
input {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin: 0 2px;
|
||||
text-align: center;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
height: 30px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #666;
|
||||
background-color: white;
|
||||
font-size: 1.25em;
|
||||
line-height: 0;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
|
||||
&:hover {
|
||||
border-color: #4d62d9;
|
||||
color: #4d62d9;
|
||||
}
|
||||
|
||||
&:active {
|
||||
border-color: #3d4fb2;
|
||||
color: #3d4fb2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.controls .block {
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a.download {
|
||||
height:30px;
|
||||
width: 23px;
|
||||
vertical-align: middle;
|
||||
padding: 0 8px;
|
||||
display: inline-block;
|
||||
background: url(/graphics/download.png) no-repeat 50%;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #666;
|
||||
|
||||
&:hover{
|
||||
border-color: #4d62d9;
|
||||
}
|
||||
|
||||
&:active {
|
||||
border-color: #3d4fb2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "PT Sans";
|
||||
.document {
|
||||
padding-top: 50px;
|
||||
|
||||
.page {
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.norm {
|
||||
@@ -15,85 +97,6 @@ body {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#page-container > div {
|
||||
/* 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 {
|
||||
display: inline-block;
|
||||
margin-top: -4px;
|
||||
/* vertical-align: middle;*/
|
||||
.block {
|
||||
display: inline-block;
|
||||
/* height: 100%;*/
|
||||
margin: 0px 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
input {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin: 0 2px;
|
||||
text-align: center;
|
||||
font-size: .9em;
|
||||
}
|
||||
button {
|
||||
display: inline-block;
|
||||
height: 30px;
|
||||
padding: 0 10px;
|
||||
border-radius: 6px;
|
||||
border: 2px solid #bbb;
|
||||
color: #555;
|
||||
background-color: white;
|
||||
font-size: 1.3em;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
&:hover {
|
||||
/* border: 1px solid #666;*/
|
||||
/* background-color: #eee;*/
|
||||
border: 2px solid #4d62d9;
|
||||
color: #4d62d9;
|
||||
}
|
||||
&:active {
|
||||
border: 2px solid #3d4fb2;
|
||||
color: #3d4fb2;
|
||||
background-color: rgba(61, 79, 178, 0.3);
|
||||
}
|
||||
}
|
||||
a.download {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 5px 8px;
|
||||
display: inline-block;
|
||||
background: #f3f3f3 url(download-icon.png) no-repeat;
|
||||
background-position: 50%;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
}
|
||||
|
||||
#page-container {
|
||||
background-color: #c3bfa3;
|
||||
transition: left 500ms;
|
||||
@@ -102,7 +105,7 @@ body {
|
||||
.pf {
|
||||
margin: 60px auto 20px;
|
||||
/* box-shadow: 1px 1px 3px 1px #333;*/
|
||||
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.9);
|
||||
box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.9);
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
.error-404{
|
||||
text-align: center;
|
||||
margin: 40px;
|
||||
|
||||
h1{
|
||||
font-size: 16pt;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
img{
|
||||
margin: 20px;
|
||||
width: 40%;
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
footer {
|
||||
color: #e3e3e3;
|
||||
background-color: #151515;
|
||||
font-size: 0.9em;
|
||||
padding: 0 0.5em 0.5em;
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
z-index: 100;
|
||||
background-image: url('/graphics/rawline.png');
|
||||
}
|
||||
|
||||
h4{
|
||||
font-size: 1.3em;
|
||||
color: white;
|
||||
margin: 0.5em 0 0.7em;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 0 0.5em 0 1em;
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
padding: 0.15em 0;
|
||||
line-height: 1.5em;
|
||||
color: #738cdb;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #2c3652;
|
||||
}
|
||||
|
||||
.info-block {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
& > div {
|
||||
box-sizing: border-box;
|
||||
padding: 0 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.contacts {
|
||||
& > div {
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0.5em 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.copyright {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
|
||||
span {
|
||||
padding: 1.5em 1em 0.25em;
|
||||
box-sizing: padding-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
.gallery-block {
|
||||
margin: 2em 0 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.gallery-period{
|
||||
margin-bottom: 2em;
|
||||
|
||||
& > div{
|
||||
margin: 1.5em 0 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
p.period{
|
||||
text-align: center;
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.gallery-album {
|
||||
margin: 0 1em 2em;
|
||||
|
||||
h3{
|
||||
margin: 0 0 0.35em;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.album-block {
|
||||
width: 100%;
|
||||
margin: 1em auto 2em;
|
||||
|
||||
h3 {
|
||||
text-align: center;
|
||||
margin: 1.5em 0 1em;
|
||||
}
|
||||
|
||||
.fotorama__nav-wrap {
|
||||
margin: 6em 0 0;
|
||||
}
|
||||
|
||||
.fotorama__stage{
|
||||
overflow: inherit;
|
||||
}
|
||||
|
||||
.fotorama__stage__frame{
|
||||
overflow: inherit;
|
||||
}
|
||||
|
||||
.album {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.album-info {
|
||||
width: 80%;
|
||||
margin: 0 0 3em;
|
||||
}
|
||||
|
||||
.album-info p {
|
||||
margin: 0 0 .5em;
|
||||
}
|
||||
|
||||
.album-item {
|
||||
width: 80%;
|
||||
box-sizing: border-box;
|
||||
margin: 0 0 4em;
|
||||
position: relative;
|
||||
background-color: white;
|
||||
padding: 6em;
|
||||
box-shadow: 0 4px 14px -10px rgba(0,0,0, .85);
|
||||
|
||||
&.vertical {
|
||||
width: 47%;
|
||||
min-width: 30em;
|
||||
max-width: 35em;
|
||||
}
|
||||
|
||||
img{
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border: .25em solid #eee;
|
||||
border-top-color: #bbb;
|
||||
border-left-color: #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
.product-info{
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: 1em;
|
||||
|
||||
& > div {
|
||||
display: inline-block;
|
||||
padding: .5em 1em;
|
||||
background-color: white;
|
||||
border: 1px solid #f5f5f5;
|
||||
border-radius: .25em;
|
||||
box-shadow: 0 5p/x 4px -4px rgba(0,0,0, .5);
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 31.25em) {
|
||||
.album-block {
|
||||
width: 100%;
|
||||
margin: 1em auto 2em;
|
||||
|
||||
h3 {
|
||||
text-align: left;
|
||||
margin: 1em 0 0.5em;
|
||||
}
|
||||
|
||||
.album-info{
|
||||
width: 100%;
|
||||
margin: 0 0 2em;
|
||||
}
|
||||
|
||||
.album-item {
|
||||
width: 100%;
|
||||
padding: 1em 1em 5em;
|
||||
margin: 0 0 2em;
|
||||
|
||||
img{
|
||||
border: .1em solid #eee;
|
||||
border-top-color: #bbb;
|
||||
border-left-color: #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
.product-info {
|
||||
bottom: .5em;
|
||||
}
|
||||
}
|
||||
|
||||
.gallery-album {
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 31.25em) and (max-width: 59.99999em){
|
||||
.album-block {
|
||||
.album-info{
|
||||
width: 100%;
|
||||
margin: 0 0 2em;
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
.album-item {
|
||||
width: 100%;
|
||||
padding: 2em 2em 5em;
|
||||
margin: 0 0 2em;
|
||||
|
||||
img{
|
||||
border: .15em solid #eee;
|
||||
border-top-color: #bbb;
|
||||
border-left-color: #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
.product-info {
|
||||
bottom: .5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
.page-home {
|
||||
&.ng-leave {
|
||||
transform-origin: 0% 0%;
|
||||
animation: rotateFall .3s both ease-in;
|
||||
}
|
||||
|
||||
&.ng-enter {
|
||||
animation: scaleUp 0.3s both ease-in;
|
||||
}
|
||||
}
|
||||
|
||||
.page.page-home{
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main-block {
|
||||
h1 {
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
margin: 1.2em 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
@@ -1,70 +1,76 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "PT Sans", Arial, sans-serif;
|
||||
font-family: "PT Sans", Arial, sans-serif;
|
||||
min-width: 320px;
|
||||
}
|
||||
|
||||
.menu {
|
||||
$text_color: #666;
|
||||
|
||||
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;
|
||||
}
|
||||
.wrapper {
|
||||
display: flex;
|
||||
min-height: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.selected {
|
||||
border-top: 4px solid white;
|
||||
font-weight: bold;
|
||||
.content {
|
||||
flex: 1;
|
||||
margin: 41px auto 0;
|
||||
}
|
||||
|
||||
a:link, a:visited{
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
a {
|
||||
color: #3f9cea;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid rgba(63, 156, 234, 0.25);
|
||||
|
||||
&.blue{
|
||||
border-top: 4px solid #3f9cea;
|
||||
}
|
||||
&:hover {
|
||||
border-bottom: 1px solid rgba(63, 156, 234, 0.5);
|
||||
}
|
||||
|
||||
&.green{
|
||||
border-top: 4px solid #5cbe40;
|
||||
}
|
||||
&:active {
|
||||
border-bottom: 1px solid rgb(63, 156, 234);
|
||||
}
|
||||
|
||||
&.yellow{
|
||||
border-top: 4px solid #ffee00;
|
||||
}
|
||||
&.invisible {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.pink {
|
||||
border-top: 4px solid #f655a0;
|
||||
}
|
||||
h3 a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #ddd;
|
||||
|
||||
&:hover {
|
||||
border-bottom: 1px solid #484848;
|
||||
}
|
||||
|
||||
&:active {
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
}
|
||||
|
||||
ul.submenu {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
margin: 0 auto;
|
||||
width: 70%;
|
||||
text-align: center;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 0 30px 0 0;
|
||||
|
||||
p {
|
||||
margin: 2px 0 0;
|
||||
font-size: 0.75em;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
.main-menu {
|
||||
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
overflow-x: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
width: 100%;
|
||||
//max-height: 15em;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: white;
|
||||
border-bottom: 1px solid #555;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
&.red {
|
||||
border-top: 4px solid #f61b14;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 31.25em) {
|
||||
header{
|
||||
//max-height: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.main-menu {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
.page {
|
||||
padding-top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.page.ng-leave {
|
||||
// z-index: 9999;
|
||||
}
|
||||
|
||||
.page.ng-enter {
|
||||
// z-index: 8888;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -1,179 +0,0 @@
|
||||
#page-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
@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;
|
||||
margin: 0;
|
||||
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;
|
||||
// }
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1,183 +1,21 @@
|
||||
.schedule{
|
||||
.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 {
|
||||
position: relative;
|
||||
margin: 30px auto 0 auto;
|
||||
padding-bottom: 50px;
|
||||
text-align: center;
|
||||
|
||||
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{
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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{
|
||||
:not(.group){
|
||||
min-width: 150px;
|
||||
/* width: 15%;*/
|
||||
width: 150px;
|
||||
padding: 8px 10px 8px;
|
||||
}
|
||||
|
||||
&.group{
|
||||
width: 63px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tbody.fix:before{
|
||||
content: "";
|
||||
display: block;
|
||||
margin-top: 90px;
|
||||
& > p {
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
.tape-block{
|
||||
width: 60%;
|
||||
max-width: 1000px;
|
||||
|
||||
margin: 2em auto;
|
||||
|
||||
&.simplified{
|
||||
.tape{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tape-block__body{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.tape {
|
||||
width: 98px;
|
||||
height: 98px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.tape-tl {
|
||||
top: -25px;
|
||||
left: -25px;
|
||||
background-image: url(/graphics/tape-tl.png);
|
||||
}
|
||||
|
||||
.tape-tr {
|
||||
top: -25px;
|
||||
right: -25px;
|
||||
background-image: url(/graphics/tape-tr.png);
|
||||
}
|
||||
|
||||
.tape-bl {
|
||||
bottom: 0;
|
||||
left: -25px;
|
||||
background-image: url(/graphics/tape-lb.png);
|
||||
}
|
||||
|
||||
.tape-br {
|
||||
bottom: 0;
|
||||
right: -25px;
|
||||
background-image: url(/graphics/tape-rb.png);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 31.25em) {
|
||||
.tape-block {
|
||||
width: 90%;
|
||||
margin: 1.5em auto;
|
||||
}
|
||||
|
||||
.tape-block__body {
|
||||
.tape {
|
||||
width: 62px;
|
||||
height: 62px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.tape-tl {
|
||||
top: -20px;
|
||||
left: -20px;
|
||||
background-image: url(/graphics/m-tape-tl.png);
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.tape-tr {
|
||||
top: -20px;
|
||||
right: -20px;
|
||||
background-image: url(/graphics/m-tape-tr.png);
|
||||
}
|
||||
|
||||
.tape-bl {
|
||||
bottom: 10px;
|
||||
left: -20px;
|
||||
background-image: url(/graphics/m-tape-bl.png);
|
||||
}
|
||||
|
||||
.tape-br {
|
||||
bottom: 10px;
|
||||
right: -20px;
|
||||
background-image: url(/graphics/m-tape-br.png);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +1,48 @@
|
||||
.main-picture{
|
||||
.page-team {
|
||||
&.ng-leave {
|
||||
animation: slideOutLeft 0.3s both ease-in;
|
||||
}
|
||||
|
||||
&.ng-enter {
|
||||
animation: slideInRight 0.3s both ease-in;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
margin: 0;
|
||||
left: 0;
|
||||
z-index: -999;
|
||||
}
|
||||
}
|
||||
|
||||
ul{
|
||||
display: block;
|
||||
}
|
||||
.team-member__info {
|
||||
width: 60%;
|
||||
margin: 0 1em;
|
||||
|
||||
.team-list{
|
||||
list-style:none;
|
||||
background-color: white;
|
||||
width:100%;
|
||||
min-height: 100px;
|
||||
padding-top: 100px;
|
||||
padding-bottom: 100px;
|
||||
margin-top: 63%;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
.timeline-record {
|
||||
.instagram {
|
||||
margin: 0 auto;
|
||||
max-width: 640px;
|
||||
|
||||
.head {
|
||||
width: 100%;
|
||||
margin: 0 0 .5em;
|
||||
|
||||
.user {
|
||||
span {
|
||||
vertical-align: top;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.body img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
box-sizing: border-box;
|
||||
border: .5em solid white;
|
||||
box-shadow: 0 .2em 0.35em rgba(0, 0, 0, 0.35);
|
||||
border-radius: .35em;
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
.timeline-record {
|
||||
margin: 0 0 3em;
|
||||
.date {
|
||||
margin: 0 0 0.45em;
|
||||
font-size: 0.75em;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
.timeline{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 70%;
|
||||
margin: 0 auto 2em;
|
||||
}
|
||||
|
||||
.timeline-footer{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
button.more{
|
||||
position: relative;
|
||||
top: -2px;
|
||||
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 2px solid black;
|
||||
padding: 0 10px;
|
||||
background: none;
|
||||
|
||||
font-size: 14pt;
|
||||
|
||||
&:hover{
|
||||
background: gainsboro;
|
||||
}
|
||||
|
||||
&:active{
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 31.25em) {
|
||||
.timeline {
|
||||
width: 98%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
var config = require("../config");
|
||||
var db = require("../core/db");
|
||||
var server = require("../server");
|
||||
var instagram = require("../instagram");
|
||||
|
||||
db.init(config.db.uri)
|
||||
//.then(instagram)
|
||||
.then(function () {
|
||||
var app = server();
|
||||
app.listen(config.port);
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"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"
|
||||
],
|
||||
"dependencies": {
|
||||
"fotorama": "~4.6.2",
|
||||
"jquery": "~2.1.1",
|
||||
"angular-route": "~1.4.1",
|
||||
"angular-animate": "~1.4.1",
|
||||
"angular": "~1.4.1",
|
||||
"angulartics": "~0.17.2",
|
||||
"angular-spinner": "~0.6.1",
|
||||
"socket.io-client": "~1.3.5"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
var APINews = require("./news");
|
||||
var APIGallery = require("./gallery");
|
||||
|
||||
module.exports = function(app) {
|
||||
var minute = 1000 * 60;
|
||||
|
||||
app.factory("api", function ($http) {
|
||||
var api = {};
|
||||
api.news = new APINews($http);
|
||||
api.gallery = new APIGallery($http, minute);
|
||||
|
||||
return api;
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
function APIGallery(http){
|
||||
this.request = http;
|
||||
}
|
||||
|
||||
APIGallery.prototype.year = function(year) {
|
||||
return this.request.get("/gallery/" + year, {cache: true});
|
||||
};
|
||||
|
||||
APIGallery.prototype.album = function(year, course, album) {
|
||||
var url = '/gallery/{year}/{course}/{album}'
|
||||
.replace('{year}', year)
|
||||
.replace('{course}', course)
|
||||
.replace('{album}', album);
|
||||
|
||||
return this.request.get(url, {cache: true});
|
||||
};
|
||||
|
||||
module.exports = APIGallery;
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
var query = require("../../utils/net").query;
|
||||
|
||||
function APIFeed(http){
|
||||
this.request = http;
|
||||
}
|
||||
|
||||
APIFeed.prototype.feed = function(count, portion) {
|
||||
return this.request.get("/news?"+query([["count", count], ["portion", portion]]));
|
||||
};
|
||||
|
||||
module.exports = APIFeed;
|
||||
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* Created by tmshv on 04/11/14.
|
||||
*/
|
||||
|
||||
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("!");
|
||||
$locationProvider.html5Mode(true);
|
||||
|
||||
var routes = [
|
||||
{
|
||||
name: "/",
|
||||
templateUrl: "/views/home.html",
|
||||
controller: "HomePageController",
|
||||
title: "ДХШ Шлиссельбурга"
|
||||
},
|
||||
{
|
||||
name: "/schedule/:period?/:semester?",
|
||||
templateUrl: "/views/schedule.html",
|
||||
controller: "SchedulePageController",
|
||||
title: "Расписание"
|
||||
},
|
||||
{
|
||||
name: "/team",
|
||||
templateUrl: "/views/team.html",
|
||||
controller: "TeamPageController",
|
||||
title: "Преподаватели"
|
||||
},
|
||||
{
|
||||
name: "/gallery",
|
||||
templateUrl: "/views/gallery.html",
|
||||
controller: "GalleryPageController",
|
||||
title: "Работы учащихся"
|
||||
},
|
||||
{
|
||||
name: "/gallery/:year/:course/:album",
|
||||
templateUrl: "/views/gallery-album.html",
|
||||
controller: "AlbumPageController"
|
||||
},
|
||||
{
|
||||
name: "/docs",
|
||||
templateUrl: "/views/docs.html",
|
||||
controller: "DocsPageController",
|
||||
title: "Документы"
|
||||
}
|
||||
];
|
||||
|
||||
routes.forEach(function (route) {
|
||||
if (typeof route === 'function') route = route();
|
||||
$routeProvider.when(route.name, route);
|
||||
});
|
||||
|
||||
$routeProvider.otherwise({
|
||||
templateUrl: "/404.html"
|
||||
});
|
||||
});
|
||||
|
||||
app.run(function ($location, $rootScope, $http) {
|
||||
$rootScope.$on("$routeChangeSuccess", function (event, current) {
|
||||
var title = current["$$route"].title;
|
||||
if (title) $rootScope.title = title;
|
||||
});
|
||||
|
||||
$http.defaults.headers.common["Accept"] = "application/json";
|
||||
});
|
||||
|
||||
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);
|
||||
require("./filters/strip")(app);
|
||||
require("./filters/remove-hashtags")(app);
|
||||
require("./filters/removeNewline")(app);
|
||||
require("./filters/uppercase-first")(app);
|
||||
require("./pages/home")(app);
|
||||
require("./pages/schedule")(app);
|
||||
require("./pages/team")(app);
|
||||
require("./pages/gallery")(app);
|
||||
require("./pages/docs")(app);
|
||||
require("./controllers/ContactsController")(app);
|
||||
require("./controllers/CopyrightController")(app);
|
||||
|
||||
app.controller("SchedulePageController", function ($scope) {
|
||||
$scope.pageClass = "page-schedule";
|
||||
});
|
||||
|
||||
app.controller("DocsPageController", function ($scope) {
|
||||
$scope.pageClass = "page-docs";
|
||||
});
|
||||
|
||||
app.controller("AppController", function ($scope, menu) {
|
||||
$scope.menuProvider = menu.items;
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = function (app) {
|
||||
app.controller('ContactsController', function ($scope, config) {
|
||||
$scope.address = config.address;
|
||||
$scope.telephone = config.telephone;
|
||||
$scope.email = config.email;
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
module.exports = function (app) {
|
||||
app.controller('CopyrightController', function ($scope, $rootScope) {
|
||||
$scope.developer = true;
|
||||
$scope.now = new Date().getFullYear();
|
||||
|
||||
$rootScope.$on('$routeChangeSuccess', function (event, current) {
|
||||
var originalPath;
|
||||
try{
|
||||
originalPath = current['$$route'].originalPath;
|
||||
}catch(e){
|
||||
originalPath = null;
|
||||
}
|
||||
|
||||
$scope.developer = originalPath == '/';
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Created by tmshv on 06/11/14.
|
||||
*/
|
||||
|
||||
angular.module("hudozhka.data", [])
|
||||
.service("team", function () {
|
||||
return require("../models/team");
|
||||
})
|
||||
.service("scheduleData", function () {
|
||||
return require("../models/schedule");
|
||||
})
|
||||
.service("docs", function () {
|
||||
return require("../models/document");
|
||||
})
|
||||
.service("config", function(){
|
||||
return {
|
||||
telephone: "+7 (81362) 76-312",
|
||||
email: "hudozka@gmail.com",
|
||||
address: ["г. Шлиссельбург", "ул. 18 января", "д. 3"]
|
||||
.reduce(function(address, item){
|
||||
return address + (address == '' ? '' : ' ') + item.replace(' ', String.fromCharCode(0xA0));
|
||||
}, '')
|
||||
};
|
||||
});
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -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){
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1,132 +1,30 @@
|
||||
var Doc = (function(){
|
||||
var Document = function(baseURL){
|
||||
this.pages = [];
|
||||
this.baseURL = baseURL;
|
||||
}
|
||||
|
||||
Document.prototype.hasPage = function(index){
|
||||
return index >= 0 && index < this.pages.length;
|
||||
}
|
||||
|
||||
Document.prototype.getPageURL = function(pageNumber){
|
||||
var s = pageNumber <2 ? "" : "/" + pageNumber;
|
||||
return this.baseURL + s;
|
||||
}
|
||||
|
||||
Document.prototype.page = function(index){
|
||||
return index + 1;
|
||||
}
|
||||
|
||||
return Document;
|
||||
})();
|
||||
var app = angular.module("hudozhka.document", [
|
||||
"hudozhka.data",
|
||||
"angulartics",
|
||||
"angulartics.google.analytics"
|
||||
]);
|
||||
|
||||
(function(){
|
||||
const PAGES = [];
|
||||
var currentPageIndex = 0;
|
||||
var doc = new Doc(location.pathname.replace(/\/\d+$/, ""));
|
||||
$(document).ready(function(){
|
||||
try{
|
||||
var hrefPage = /\/(\d+)$/.exec(location.href)[1];
|
||||
currentPageIndex = parseInt(hrefPage) - 1;
|
||||
}catch(error){
|
||||
|
||||
}
|
||||
|
||||
$("#buttonNext").click(function(event){
|
||||
loadNext();
|
||||
});
|
||||
|
||||
$("#buttonPrev").click(function(event){
|
||||
loadPrevious();
|
||||
});
|
||||
|
||||
$("#page-container .pf").each(function(index, elem){
|
||||
var url = $(elem).data("page-url");
|
||||
doc.pages.push(url);
|
||||
});
|
||||
|
||||
$("#currentPage").attr("max", doc.pages.length);
|
||||
$("#totalPages").text(doc.pages.length);
|
||||
$("#currentPage").change(function(){
|
||||
var i = parseInt($(this).val()) - 1;
|
||||
if(i && doc.hasPage(i)){
|
||||
loadPage(i);
|
||||
}
|
||||
});
|
||||
|
||||
$("#page-container").html("");
|
||||
loadPage(currentPageIndex);
|
||||
|
||||
window.addEventListener("popstate", function(event){
|
||||
console.log("pops");
|
||||
console.log(event);
|
||||
var i = event.state;
|
||||
loadPage(i);
|
||||
});
|
||||
});
|
||||
|
||||
function loadNext(){
|
||||
var i = currentPageIndex + 1;
|
||||
if(doc.hasPage(i)){
|
||||
loadPage(i);
|
||||
app.factory("docname", function ($location) {
|
||||
return function(){
|
||||
var abs = $location.absUrl();
|
||||
var doc_uri = /\/([\w-]+)$/.exec(abs);
|
||||
if(doc_uri.length >= 2) {
|
||||
return doc_uri[1];
|
||||
}else{
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function loadPrevious(){
|
||||
var i = currentPageIndex - 1;
|
||||
if(doc.hasPage(i)){
|
||||
loadPage(i);
|
||||
}else{
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
app.controller("DocumentController", function ($rootScope, $scope, docs, docname) {
|
||||
$scope.pageClass = "page-document";
|
||||
|
||||
var n = docname();
|
||||
if(n) {
|
||||
var d = docs.doc(n);
|
||||
$scope.document = d;
|
||||
$rootScope.title = d.title;
|
||||
}
|
||||
|
||||
function loadPage(index){
|
||||
if(doc.hasPage(index)){
|
||||
var url = doc.pages[index];
|
||||
// $.ajax(
|
||||
// url,
|
||||
});
|
||||
|
||||
// {
|
||||
// xhrFields: {
|
||||
// crossDomain: true,
|
||||
// withCredentials: true
|
||||
// },
|
||||
|
||||
// success: function(data, status){
|
||||
// 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)
|
||||
// );
|
||||
// },
|
||||
|
||||
// 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)
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
require("./filters/uppercase-first")(app);
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Created by tmshv on 21/11/14.
|
||||
*/
|
||||
|
||||
module.exports = function(app) {
|
||||
app.filter("removeHashtags", function () {
|
||||
return function(string) {
|
||||
return string.replace(/(#[^\s]+)/g, '');
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Created by tmshv on 21/11/14.
|
||||
*/
|
||||
|
||||
module.exports = function(app) {
|
||||
app.filter("removeNewline", function () {
|
||||
return function(string) {
|
||||
return string.replace(/(\n)/g, ' ');
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Created by tmshv on 21/11/14.
|
||||
*/
|
||||
|
||||
module.exports = function(app) {
|
||||
app.filter("strip", function () {
|
||||
return function(string) {
|
||||
return string
|
||||
.replace(/^\s+/, '')
|
||||
.replace(/\s+$/, '');
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -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);
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Created by tmshv on 06/11/14.
|
||||
*/
|
||||
|
||||
angular.module("hudozhka.instagram", [])
|
||||
.controller("InstagramController", function($scope, $http, $window){
|
||||
//$scope.auth = function() {
|
||||
// $http.get("/instagram/auth/url")
|
||||
// .success(function (data) {
|
||||
// $window.location.href = data.url;
|
||||
// });
|
||||
//};
|
||||
|
||||
$http.get("/instagram/user")
|
||||
.error(function() {
|
||||
|
||||
})
|
||||
.success(function (user) {
|
||||
$scope.user = user;
|
||||
});
|
||||
|
||||
$scope.invite = function() {
|
||||
$http.get("/instagram/invite")
|
||||
.success(function (data) {
|
||||
$scope.inviteCode = data.code;
|
||||
});
|
||||
};
|
||||
});
|
||||
@@ -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]
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
module.exports = function (app) {
|
||||
app.directive("gFotorama", function () {
|
||||
return {
|
||||
restrict: "A",
|
||||
link: function (scope, element, attrs) {
|
||||
element.addClass('fotorama');
|
||||
var $fotorama = $(element.fotorama());
|
||||
var fotorama = $fotorama.data('fotorama');
|
||||
fotorama.setOptions({
|
||||
width: "100%",
|
||||
maxheight: 500,
|
||||
loop: true,
|
||||
nav: "thumbs"
|
||||
});
|
||||
|
||||
//$fotorama.on('fotorama:show', function (e, fotorama, extra) {
|
||||
$fotorama.on('fotorama:error', function (e, fotorama, extra) {
|
||||
console.log('## ' + e.type);
|
||||
console.log('active frame', fotorama.activeFrame);
|
||||
console.log('additional data', extra);
|
||||
});
|
||||
|
||||
scope.$watch(attrs.gFotorama, function (value) {
|
||||
console.log(value);
|
||||
fotorama.load(value);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.controller("GalleryPageController", function ($scope, api) {
|
||||
$scope.years = [];
|
||||
var years = [2015, 2014, 2013, 2012, 2011, 2010];
|
||||
years.forEach(function (year, year_index) {
|
||||
api.gallery.year(year)
|
||||
.success(function (albums) {
|
||||
if (albums.length) {
|
||||
$scope.years[year_index] = {
|
||||
year: year,
|
||||
albums: albums.map(function (album) {
|
||||
var preview = album.content[0];
|
||||
album.preview_url = preview.content.medium.url;
|
||||
//album.fotorama = album.content.map(productToFotorama);
|
||||
|
||||
return album;
|
||||
})
|
||||
};
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
app.controller("AlbumPageController", function ($scope, $rootScope, $http, $routeParams, team, api, menu) {
|
||||
menu.activate('/gallery');
|
||||
|
||||
var year_uri = $routeParams.year;
|
||||
var course_uri = $routeParams.course;
|
||||
var album_uri = $routeParams.album;
|
||||
api.gallery.album(
|
||||
year_uri,
|
||||
course_uri,
|
||||
album_uri
|
||||
)
|
||||
.success(function (album) {
|
||||
//var preview = album.content[0];
|
||||
//album.preview_url = preview.content.medium.url;
|
||||
//album.fotorama = album.content.map(productToFotorama);
|
||||
|
||||
album.teacherName = team.name(album['teacher']);
|
||||
|
||||
$scope.album = album;
|
||||
$scope.crumbs = [
|
||||
{
|
||||
url: '/gallery',
|
||||
name: 'Галерея'
|
||||
},
|
||||
{
|
||||
//url: '/gallery/{year}'.replace('{year}', year_uri),
|
||||
name: year_uri
|
||||
},
|
||||
{
|
||||
//url: '/gallery/{year}/{course}'
|
||||
// .replace('{year}', year_uri)
|
||||
// .replace('{course}', course_uri),
|
||||
name: album.course
|
||||
},
|
||||
{
|
||||
name: album.title
|
||||
}
|
||||
];
|
||||
$rootScope.title = album.title;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
function productToFotorama(product) {
|
||||
//var tpl = '<div class="album-item"><div><p>' + product.author + '</p><p>' + product.authorAge + ' лет</p></div></div>';
|
||||
|
||||
var $e = $('<div class="album-item"><div></div></div>');
|
||||
var $c = $e.find('.album-item div');
|
||||
$('<p></p>').text(product.author).appendTo($c);
|
||||
if (product['authorAge']) {
|
||||
$('<p></p>').text(product['authorAge'] + ' лет').appendTo($c);
|
||||
}
|
||||
|
||||
return {
|
||||
img: product.content["big"].url,
|
||||
thumb: product.content["small"].url,
|
||||
full: product.content["original"].url,
|
||||
//html: $.parseHTML(tpl)[0]
|
||||
html: $e
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
module.exports = function (app) {
|
||||
app.controller('HomePageController', function ($scope, config) {
|
||||
var fotorama;
|
||||
|
||||
$scope.pageClass = 'page-home';
|
||||
|
||||
var $tape = $('.tape-block');
|
||||
var $fotorama = $tape.find('.tape-block__content');
|
||||
|
||||
$tape.addClass('simplified');
|
||||
$fotorama.on('fotorama:ready', function () {
|
||||
$tape.removeClass('simplified');
|
||||
fotorama.setOptions({
|
||||
nav: 'dots',
|
||||
transition: 'crossfade',
|
||||
autoplay: '6000',
|
||||
arrows: 'false',
|
||||
width: '100%',
|
||||
fit: 'cover',
|
||||
loop: 'true'
|
||||
});
|
||||
});
|
||||
|
||||
fotorama = $fotorama.fotorama().data('fotorama');
|
||||
|
||||
setTimeout(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);
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,81 @@
|
||||
var populate = require('../../utils/populate').populate;
|
||||
const course = require('../../models/course');
|
||||
|
||||
function indexEquals(i) {
|
||||
return function (_, index) {
|
||||
return i === index;
|
||||
}
|
||||
}
|
||||
|
||||
function isRequested(period, semester) {
|
||||
return function (schedule) {
|
||||
return schedule.period === period && schedule.semester === semester;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
var populate = require('../../utils/populate').populate;
|
||||
const course = require('../../models/course');
|
||||
|
||||
module.exports = function (app) {
|
||||
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;
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Created by tmshv on 15/03/15.
|
||||
*/
|
||||
|
||||
module.exports = function (app) {
|
||||
var socket;
|
||||
function init(){
|
||||
socket = io();
|
||||
}
|
||||
|
||||
app.service("io", function () {
|
||||
if (!socket) init();
|
||||
return socket;
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
module.exports = function(app) {
|
||||
app.directive('breadcrumbs', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: '/views/breadcrumbs.html',
|
||||
scope: {
|
||||
crumbs: '='
|
||||
}
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Created by tmshv on 05/11/14.
|
||||
*/
|
||||
|
||||
module.exports = function (app) {
|
||||
app.factory("menu", function ($route, $rootScope) {
|
||||
function Menu() {
|
||||
this.items = require("../../models/menu.json");
|
||||
this.current = null;
|
||||
}
|
||||
|
||||
Menu.prototype.activate = function (path) {
|
||||
var f = this.items.filter(function (i) {
|
||||
return i.url === path;
|
||||
});
|
||||
|
||||
if(f.length) {
|
||||
this.current = f[0];
|
||||
}
|
||||
};
|
||||
|
||||
var menu = new Menu();
|
||||
$rootScope.$on('$routeChangeSuccess', function (event, current) {
|
||||
try{
|
||||
var path = current['$$route'].originalPath;
|
||||
menu.activate(path);
|
||||
}catch(e){
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return menu;
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,147 @@
|
||||
/**
|
||||
* Created by tmshv on 23/11/14.
|
||||
*/
|
||||
|
||||
function personByInstagram(list, instagram){
|
||||
list = list.filter(function (member) {
|
||||
try {
|
||||
return member.contacts.instagram === instagram;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if(list.length){
|
||||
return list[0].id;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function postText(post){
|
||||
try{
|
||||
return post.data.caption.text.replace(/#[\w_]+/, "")
|
||||
}catch(error){
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function(app) {
|
||||
app.directive("timeline", function (team) {
|
||||
function toInstagram(post){
|
||||
var author_id = personByInstagram(team.team, post.data.author);
|
||||
var name = author_id ? team.short(author_id) : post.data.author;
|
||||
|
||||
return {
|
||||
date: post.date,
|
||||
image: post.data.image.standard_resolution.url,
|
||||
url: post.data.url,
|
||||
username: name,
|
||||
userpic: 'https://igcdn-photos-a-a.akamaihd.net/hphotos-ak-xaf1/t51.2885-19/11357496_464997000344800_2124591831_a.jpg',
|
||||
text: post.body,
|
||||
//text: postText(post),
|
||||
type: post.type
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
templateUrl: "/views/timeline.html",
|
||||
scope: {
|
||||
|
||||
},
|
||||
link: function(scope, element, attrs){
|
||||
scope.isEven = function(index){
|
||||
return index % 2 === 1;
|
||||
}
|
||||
},
|
||||
controller: function($scope, $timeout, usSpinnerService, io, api){
|
||||
var portion = 0;
|
||||
var count = 10;
|
||||
$scope.feed = [];
|
||||
|
||||
$scope.timelineUpdating = false;
|
||||
usSpinnerService.stop("timelineMore");
|
||||
//usSpinnerService.spin("timelineMore");
|
||||
|
||||
$scope.recordClass = function (i) {
|
||||
return i['type'];
|
||||
};
|
||||
|
||||
$scope.showFooter = function () {
|
||||
var canLoadMore = true;
|
||||
return $scope.feed && $scope.feed.length && canLoadMore;
|
||||
};
|
||||
|
||||
$scope.loadNext = function () {
|
||||
$scope.timelineUpdating = true;
|
||||
usSpinnerService.spin("timelineMore");
|
||||
|
||||
api.news.feed(count, portion)
|
||||
.error(function(error) {
|
||||
console.log(error);
|
||||
})
|
||||
.success(function (list) {
|
||||
$scope.timelineUpdating = false;
|
||||
usSpinnerService.stop("timelineMore");
|
||||
|
||||
var feed = list.map(function (post) {
|
||||
if(post.type == "instagram") return toInstagram(post);
|
||||
else return post;
|
||||
});
|
||||
|
||||
portion++;
|
||||
$scope.feed = $scope.feed.concat(feed);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.loadNext();
|
||||
|
||||
io.on("post", function (params) {
|
||||
var posts = params instanceof Array ? params : [params];
|
||||
|
||||
var feed = posts.map(function (post) {
|
||||
if(post.type == "instagram") return toInstagram(post);
|
||||
else return post;
|
||||
});
|
||||
|
||||
$scope.$apply(function () {
|
||||
$scope.feed = feed.concat($scope.feed);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
app.directive("timelineRecord", function ($compile, $http, $sce, team) {
|
||||
var templates = {
|
||||
"post": ["/views/timeline-post.html", linkPost],
|
||||
"instagram": ["/views/timeline-gram.html", linkGram]
|
||||
};
|
||||
|
||||
function linkPost(scope, element, attrs) {
|
||||
scope.message = $sce.trustAsHtml(scope.post.body);
|
||||
}
|
||||
|
||||
function linkGram(scope, element, attrs) {
|
||||
}
|
||||
|
||||
return {
|
||||
restrict: "E",
|
||||
scope: {
|
||||
post:"=content"
|
||||
},
|
||||
link: function(scope, element, attrs){
|
||||
var type = scope.post.type;
|
||||
if(type in templates) {
|
||||
$http.get(templates[type][0])
|
||||
.success(function (tpl) {
|
||||
element.html(tpl).show();
|
||||
$compile(element.contents())(scope);
|
||||
templates[type][1](scope, element, attrs);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
var populate = require("./utils/populate").populate;
|
||||
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
const MENU = require("./models/menu.json");
|
||||
|
||||
const team = require("./models/team");
|
||||
@@ -7,18 +7,45 @@ const course = require("./models/course");
|
||||
const document = require("./models/document");
|
||||
const schedule = require("./models/schedule");
|
||||
|
||||
module.exports = {
|
||||
port: 18010,
|
||||
pub: "./",
|
||||
data:{
|
||||
menu: MENU,
|
||||
documents: document.docs,
|
||||
team: team.team,
|
||||
courses: course.courses,
|
||||
schedule: schedule([
|
||||
populate(team.short, "teacher"),
|
||||
populate(course.name, "lesson")
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
var privateFile = process.env["PRIVATE"] || "private.json";
|
||||
var privateData = JSON.parse(fs.readFileSync(privateFile, "utf-8"));
|
||||
|
||||
var index_file = process.env["INDEX"] || "templates/main.html";
|
||||
|
||||
var config = {
|
||||
defaultIndex: path.join(__dirname, index_file),
|
||||
port: process.env["PORT"] || 3000,
|
||||
pub: "./",
|
||||
data: {
|
||||
menu: MENU,
|
||||
documents: document.docs,
|
||||
team: team.team,
|
||||
courses: course.courses
|
||||
},
|
||||
|
||||
db: {
|
||||
uri: "mongodb://localhost:27017/hudozka"
|
||||
},
|
||||
|
||||
prerender: {
|
||||
prerender: "http://service.prerender.io/",
|
||||
prerenderToken: "",
|
||||
protocol: "http",
|
||||
host: "art.shlisselburg.org"
|
||||
},
|
||||
|
||||
instagram: {
|
||||
default_user: "hudozka",
|
||||
tag_callback: "http://art.shlisselburg.org/instagram/callback/11",
|
||||
client_id: "",
|
||||
client_secret: "",
|
||||
redirect_uri: "http://art.shlisselburg.org/instagram/auth/callback",
|
||||
tags: ["shlb_hudozka"]
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Object.keys(privateData)
|
||||
.reduce(function (config, key) {
|
||||
config[key] = privateData[key];
|
||||
return config;
|
||||
}, config);
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
var mongo = require("promised-mongo");
|
||||
var ObjectId = mongo.ObjectId;
|
||||
|
||||
var client = null;
|
||||
|
||||
module.exports = {
|
||||
init: function (uri) {
|
||||
//noinspection JSUnresolvedFunction
|
||||
return new Promise(function (resolve) {
|
||||
client = mongo(uri);
|
||||
resolve();
|
||||
});
|
||||
},
|
||||
|
||||
get db() {
|
||||
return client;
|
||||
},
|
||||
|
||||
c: function(name){
|
||||
return client.collection(name);
|
||||
},
|
||||
|
||||
id: function(i) {
|
||||
if(typeof i === "string"){
|
||||
return ObjectId(i);
|
||||
}
|
||||
|
||||
else if(i instanceof ObjectId) {
|
||||
return i;
|
||||
}
|
||||
|
||||
else if(i instanceof Object) {
|
||||
return "_id" in i ? ObjectId(i._id) : null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
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 \
|
||||
--exclude=.git \
|
||||
--exclude=.idea \
|
||||
--exclude=.DS_Store \
|
||||
--exclude=deploy.sh \
|
||||
--exclude=install.sh .
|
||||
|
||||
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
|
||||
|
||||
rm $tarpath
|
||||
echo "Done"
|
||||
@@ -1,40 +1,82 @@
|
||||
var path = require("path");
|
||||
var gulp = require("gulp");
|
||||
var sass = require("gulp-sass");
|
||||
var minifyCSS = require("gulp-minify-css");
|
||||
var autoprefixer = require("gulp-autoprefixer");
|
||||
var imageMin = require("gulp-imagemin");
|
||||
var uglify = require("gulp-uglify");
|
||||
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');
|
||||
|
||||
var pub = "./public/";
|
||||
var is_production = process.env['NODE_ENV'] == 'production';
|
||||
|
||||
gulp.task("sass", function () {
|
||||
gulp.src("./assets/style/*.scss")
|
||||
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('styles', function () {
|
||||
var processors = [
|
||||
require('autoprefixer')({browsers: ['last 1 version']}),
|
||||
require('cssnano')()
|
||||
];
|
||||
|
||||
gulp.src('./assets/style/*.scss')
|
||||
.pipe(sass())
|
||||
.pipe(minifyCSS())
|
||||
.pipe(autoprefixer())
|
||||
.pipe(gulp.dest("./public/s"));
|
||||
.pipe(postcss(processors))
|
||||
.pipe(concat('style.css'))
|
||||
.pipe(gulp.dest('./public'));
|
||||
});
|
||||
|
||||
gulp.task("copy", function(){
|
||||
gulp.src("./assets/fonts/*")
|
||||
.pipe(gulp.dest("./public/fonts"));
|
||||
gulp.task("copy", function () {
|
||||
gulp.src("./assets/fonts/*")
|
||||
.pipe(gulp.dest("./public/fonts"));
|
||||
|
||||
gulp.src("./assets/style/*.css")
|
||||
.pipe(gulp.dest("./public/s"));
|
||||
gulp.src("./assets/graphics/*")
|
||||
.pipe(gulp.dest("./public/graphics"));
|
||||
|
||||
gulp.src([
|
||||
"./3rdparty/*",
|
||||
"robots.txt"
|
||||
])
|
||||
.pipe(gulp.dest("./public"));
|
||||
});
|
||||
|
||||
gulp.task("uglify", function(){
|
||||
gulp.src("./client/*.js")
|
||||
// .pipe(uglify())
|
||||
.pipe(gulp.dest("./public/c"));
|
||||
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("imagemin", function(){
|
||||
gulp.src("./assets/img/**/*")
|
||||
.pipe(imageMin())
|
||||
.pipe(gulp.dest("./public/img"));
|
||||
gulp.task("imagemin", function () {
|
||||
gulp.src("./assets/img/**/*")
|
||||
.pipe(imageMin())
|
||||
.pipe(gulp.dest("./public/img"));
|
||||
});
|
||||
|
||||
gulp.task("default", ["sass", "copy", "uglify"]);
|
||||
gulp.task("deploy", ["default", "imagemin"]);
|
||||
gulp.task('default', ['styles', 'compile']);
|
||||
gulp.task('deploy', ['default', 'copy', 'imagemin']);
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Created by tmshv on 12/03/15.
|
||||
*/
|
||||
|
||||
var db = require("../core/db");
|
||||
var co = require("co");
|
||||
var instagram = require("./instagram");
|
||||
var config = require("../config");
|
||||
|
||||
module.exports = function () {
|
||||
return loadUsers()
|
||||
.then(updateSubscription)
|
||||
};
|
||||
|
||||
function loadUsers() {
|
||||
return new Promise(function (resolve, reject) {
|
||||
db.c("users").find({provider: "instagram"})
|
||||
.toArray()
|
||||
.then(function (users) {
|
||||
users.forEach(function (u) {
|
||||
return instagram.initUser(u);
|
||||
});
|
||||
return users;
|
||||
})
|
||||
.then(resolve);
|
||||
});
|
||||
}
|
||||
|
||||
function updateSubscription() {
|
||||
var tags = config.instagram["tags"];
|
||||
return tags.map(function (tag) {
|
||||
var cb = config.instagram["tag_callback"];
|
||||
return co(function *() {
|
||||
return yield instagram.api.subscribe(tag, cb);
|
||||
})
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
var EventEmitter = require("events").EventEmitter;
|
||||
var thunkify = require("thunkify");
|
||||
var config = require("../config");
|
||||
var db = require("../core/db");
|
||||
var instagram = require("instagram-node");
|
||||
|
||||
function Instagram(options) {
|
||||
this.client_id = options.client_id;
|
||||
this.client_secret = options.client_secret;
|
||||
this.redirect_uri = options.redirect_uri;
|
||||
this.default_user = options.default_user;
|
||||
this.clients = {};
|
||||
this.users = {};
|
||||
|
||||
EventEmitter.call(this);
|
||||
}
|
||||
|
||||
Instagram.prototype = Object.create(EventEmitter.prototype);
|
||||
|
||||
Instagram.prototype.authorizationURL = function (scope, state) {
|
||||
var params = {};
|
||||
params.scope = scope || ["basic"];
|
||||
if (state) {
|
||||
params.state = state;
|
||||
}
|
||||
|
||||
var client = createClient();
|
||||
return client["get_authorization_url"](this.redirect_uri, params);
|
||||
};
|
||||
|
||||
Instagram.prototype.addClient = function *(code, params) {
|
||||
var token = params.access_token;
|
||||
var item = params.user;
|
||||
item.code = code;
|
||||
item.access_token = token;
|
||||
item.provider = "instagram";
|
||||
yield db.c("users").update({provider: "instagram", id: params.user.id}, item, {upsert: true});
|
||||
|
||||
return this.initUser(item);
|
||||
};
|
||||
|
||||
Instagram.prototype.initUser = function (user) {
|
||||
var token = user.access_token;
|
||||
this.clients[user.code] = createClient(token);
|
||||
this.users[user.code] = user;
|
||||
return this;
|
||||
};
|
||||
|
||||
Instagram.prototype.getUsers = function () {
|
||||
var users = this.users;
|
||||
return Object.keys(users)
|
||||
.map(function (code) {
|
||||
return users[code];
|
||||
});
|
||||
};
|
||||
|
||||
Instagram.prototype.update = function (body) {
|
||||
this.emit("update", body);
|
||||
};
|
||||
|
||||
Instagram.prototype.client = function (code) {
|
||||
if (code && code in this.clients) {
|
||||
return this.clients[code];
|
||||
} else {
|
||||
return createClient();
|
||||
}
|
||||
};
|
||||
|
||||
Instagram.prototype.user = function (code) {
|
||||
if (code && code in this.users) {
|
||||
return this.users[code];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
Instagram.prototype.authorize = function *(code) {
|
||||
var api = createClient();
|
||||
var authorize = thunkify(api["authorize_user"]);
|
||||
var result = yield authorize(code, this.redirect_uri);
|
||||
|
||||
if (result) {
|
||||
yield this.addClient(code, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
Instagram.prototype.getUser = function *() {
|
||||
if (this.default_user) {
|
||||
var du = yield db.c("users").findOne({username: this.default_user});
|
||||
if (du) {
|
||||
return du;
|
||||
}
|
||||
}
|
||||
|
||||
return yield db.c("users").findOne({provider: "instagram"});
|
||||
};
|
||||
|
||||
Instagram.prototype.getUsers = function *() {
|
||||
return yield db.c("users").find({provider: "instagram"}).toArray();
|
||||
};
|
||||
|
||||
Instagram.prototype.api = {
|
||||
subscriptions: function *() {
|
||||
var ig = createClient();
|
||||
var subs = thunkify(ig["subscriptions"]);
|
||||
try {
|
||||
var s = yield subs();
|
||||
return s[0];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
subscribe: function *(tag, callbackURL) {
|
||||
var ig = createClient();
|
||||
var sub = thunkify(ig["add_tag_subscription"]);
|
||||
try {
|
||||
var s = yield sub(tag, callbackURL);
|
||||
return s[0];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
unsubscribe: function *(id) {
|
||||
var ig = createClient();
|
||||
var sub = thunkify(ig["del_subscription"]);
|
||||
try {
|
||||
var s = yield sub({id: id});
|
||||
return s[0];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
tagMediaRecent: function *(client, tag, count) {
|
||||
var tag_media_recent = thunkify(client["tag_media_recent"]);
|
||||
|
||||
try{
|
||||
var result = yield tag_media_recent(tag, {count: count});
|
||||
return {
|
||||
medias: result[0],
|
||||
pagination: result[1],
|
||||
remaining: result[2],
|
||||
limit: result[3]
|
||||
}
|
||||
}catch(error){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = new Instagram(config.instagram);
|
||||
|
||||
function createClient(token) {
|
||||
var client = instagram.instagram({}, {});
|
||||
if (token) {
|
||||
client.use({access_token: token});
|
||||
} else {
|
||||
client.use({
|
||||
client_id: config.instagram.client_id,
|
||||
client_secret: config.instagram.client_secret
|
||||
});
|
||||
}
|
||||
return client;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Created by tmshv on 14/03/15.
|
||||
*/
|
||||
|
||||
var publisher = require("./publish");
|
||||
|
||||
module.exports = function (app) {
|
||||
app.io.use(function *(next) {
|
||||
publisher.on("post", function (post) {
|
||||
console.log("IO POST", post);
|
||||
app.io.emit("post", post);
|
||||
});
|
||||
|
||||
yield* next;
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* Created by tmshv on 10/03/15.
|
||||
*/
|
||||
|
||||
var co = require("co");
|
||||
var util = require("util");
|
||||
var EventEmitter = require("events").EventEmitter;
|
||||
var instagram = require("./instagram");
|
||||
var config = require("../config");
|
||||
var db = require("../core/db");
|
||||
|
||||
function Publisher() {
|
||||
EventEmitter.call(this);
|
||||
|
||||
var self = this;
|
||||
instagram.on("update", function (data) {
|
||||
var tag = config.instagram["tags"][0];
|
||||
|
||||
findInstagrams(tag)
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
})
|
||||
.then(function (posts) {
|
||||
var ids = posts.map(function (gram) {
|
||||
return gram.data.id;
|
||||
});
|
||||
|
||||
return uploadInstagrams(posts)
|
||||
.then(function () {
|
||||
return db.c("posts").find({"data.id": {$in: ids}}).toArray();
|
||||
});
|
||||
})
|
||||
.then(function (posts) {
|
||||
self.emit("post", posts);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
util.inherits(Publisher, EventEmitter);
|
||||
|
||||
module.exports = new Publisher();
|
||||
|
||||
function *fbt(client, tag) {
|
||||
var param = yield instagram.api.tagMediaRecent(client, tag, 10);
|
||||
return param.medias.map(toInstagram);
|
||||
}
|
||||
|
||||
function toInstagram(gram) {
|
||||
var post = {};
|
||||
|
||||
try {
|
||||
post.body = gram.caption.text;
|
||||
} catch (error) {
|
||||
post.body = "";
|
||||
}
|
||||
|
||||
post.type = "instagram";
|
||||
post.tags = gram.tags;
|
||||
post.date = new Date(parseInt(gram["created_time"]) * 1000);
|
||||
|
||||
post.data = {
|
||||
id: gram.id,
|
||||
author: gram.user["username"],
|
||||
image: gram.images,
|
||||
url: gram.link
|
||||
};
|
||||
|
||||
return post;
|
||||
}
|
||||
|
||||
function findInstagrams(tag){
|
||||
return co(function *() {
|
||||
var user = yield instagram.getUser();
|
||||
if (user) {
|
||||
var client = instagram.client(user.code);
|
||||
var permitted_users = yield instagram.getUsers();
|
||||
permitted_users = permitted_users.map(function (user) {
|
||||
return user["username"];
|
||||
});
|
||||
|
||||
var medias = yield fbt(client, tag);
|
||||
//medias = medias.filter(function (gram) {
|
||||
// return permitted_users.indexOf(gram.data.author) > -1;
|
||||
//});
|
||||
|
||||
return medias;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function uploadInstagrams(list){
|
||||
return Promise.all(
|
||||
list.map(function (g) {
|
||||
return db.c("posts").update({"data.id": g.data.id}, g, {upsert: true});
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
var path = require("path");
|
||||
var route = require("koa-route");
|
||||
var router = require("../routes");
|
||||
var instagram = require("../instagram/instagram");
|
||||
|
||||
module.exports = function (app) {
|
||||
app.use(function *(next) {
|
||||
var code = this.cookies.get("instagram_code");
|
||||
if (code) {
|
||||
var client = instagram.client(code);
|
||||
var user = instagram.user(code);
|
||||
if (client && user) {
|
||||
this.instagram = {
|
||||
client: client,
|
||||
user: user
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
yield* next;
|
||||
});
|
||||
|
||||
app.use(
|
||||
route.get("/instagram", function *() {
|
||||
var invite = this.cookies.get("invite_code") || this.query.code;
|
||||
|
||||
if(!this.instagram) {
|
||||
if(invite == undefined){
|
||||
this.body = "invite required";
|
||||
this.status = 401;
|
||||
}else if(invite == "LOL"){
|
||||
this.cookies.set("invite_code", invite, {expires: expire()});
|
||||
|
||||
//todo: invalidate invite
|
||||
|
||||
yield router.index(
|
||||
path.join(__dirname, "../templates/instagram.html")
|
||||
);
|
||||
}else{
|
||||
this.body = "invite ist correct";
|
||||
this.status = 401;
|
||||
}
|
||||
}else{
|
||||
yield router.index(
|
||||
path.join(__dirname, "../templates/instagram.html")
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
app.use(
|
||||
route.get("/instagram/auth", function *() {
|
||||
var invite = this.cookies.get("invite_code");
|
||||
if(invite) {
|
||||
var url = instagram.authorizationURL(null, "/instagram");
|
||||
this.redirect(url);
|
||||
}else{
|
||||
this.status = 401;
|
||||
this.body = "invite required";
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
app.use(
|
||||
route.get("/instagram/user", function *() {
|
||||
var code = this.cookies.get("instagram_code");
|
||||
var user = instagram.user(code);
|
||||
|
||||
if(user) {
|
||||
this.body = user;
|
||||
}else{
|
||||
this.status = 404;
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
app.use(
|
||||
route.get("/instagram/auth/callback", function *() {
|
||||
var state = this.query.state || "/";
|
||||
var code = this.query.code;
|
||||
var client = yield instagram.authorize(code);
|
||||
|
||||
if (client) {
|
||||
this.cookies.set("instagram_code", code, {expires: expire()});
|
||||
this.redirect(state);
|
||||
} else {
|
||||
this.status = 401;
|
||||
this.redirect(state);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
app.use(route.get("/instagram/subscription/list", function *() {
|
||||
var result = yield instagram.api.subscriptions();
|
||||
if(result) {
|
||||
this.body = result;
|
||||
}else{
|
||||
this.status = 500;
|
||||
}
|
||||
}));
|
||||
|
||||
app.use(route.get("/instagram/subscription/add", function *() {
|
||||
var tag = this.query.tag;
|
||||
var cu = this.query.url;
|
||||
|
||||
var result = yield instagram.api.subscribe(tag, cu);
|
||||
if(result) {
|
||||
this.body = result;
|
||||
}else{
|
||||
this.status = 500;
|
||||
}
|
||||
}));
|
||||
|
||||
app.use(route.get("/instagram/subscription/delete", function *() {
|
||||
var id = this.query.id;
|
||||
|
||||
var result = yield instagram.api.unsubscribe(id);
|
||||
if(result) {
|
||||
this.body = result;
|
||||
}else{
|
||||
this.status = 500;
|
||||
}
|
||||
}));
|
||||
|
||||
app.use(route.get("/instagram/callback/:rnd", function *() {
|
||||
if(this.query["hub.mode"] == "subscribe"){
|
||||
this.body = this.query["hub.challenge"];
|
||||
}else{
|
||||
this.status = 400;
|
||||
}
|
||||
}));
|
||||
|
||||
app.use(route.post("/instagram/callback/:rnd", function *(rnd) {
|
||||
var sign = this.header["x-hub-signature"];
|
||||
//console.log(this.headers);
|
||||
|
||||
var body = this.request.body;
|
||||
|
||||
//var hmac = crypto.createHmac("sha1", instagram.client_secret);
|
||||
//hmac.update(body);
|
||||
//var shasum = hmac.digest("hex");
|
||||
|
||||
|
||||
//console.log("X-Hub-Signature", sign);
|
||||
//console.log("Hmac", shasum);
|
||||
//console.log();
|
||||
|
||||
//if(shasum.digest("hex") == sign) {
|
||||
instagram.update(body);
|
||||
//}
|
||||
|
||||
this.body = "";
|
||||
}));
|
||||
};
|
||||
|
||||
function expire(time){
|
||||
return time || new Date(Date.now() + 1000 * 60 * 60 * 24 * 7);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
dir_path="$1"
|
||||
build_file="$2"
|
||||
port="$3"
|
||||
|
||||
cd $dir_path
|
||||
|
||||
gunzip -c $build_file | tar xopf -
|
||||
|
||||
#rm build.tar
|
||||
|
||||
npm install --production --loglevel error
|
||||
|
||||
export NODE_ENV=production
|
||||
export PORT=$port
|
||||
|
||||
#starting www
|
||||
if forever restart bin/www.js; then
|
||||
echo www.js restarted
|
||||
else
|
||||
forever start bin/www.js
|
||||
echo www.js started
|
||||
fi
|
||||
@@ -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
|
||||
@@ -1,18 +0,0 @@
|
||||
const CONTENT_PATH = "http://hudozhka.tmshv.ru/files/";
|
||||
const CONTENT_PATH = "/files/";
|
||||
|
||||
var fs = require("fs");
|
||||
|
||||
function gatherNotFoundCollection (dir) {
|
||||
var list = fs.readdirSync(dir);
|
||||
if(list){
|
||||
list.forEach(function(i){
|
||||
|
||||
});
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
var config = require("./config").populate({
|
||||
|
||||
});
|
||||
@@ -11,6 +11,10 @@
|
||||
"id": "sculpting",
|
||||
"name": "Скульптура"
|
||||
},
|
||||
{
|
||||
"id": "ceramic",
|
||||
"name": "Керамика"
|
||||
},
|
||||
{
|
||||
"id": "composition",
|
||||
"name": "Композиция"
|
||||
|
||||
@@ -2,85 +2,47 @@
|
||||
{
|
||||
"name": "statue-2013",
|
||||
"title": "устав школы за 2013 год",
|
||||
"path": "/document/statue-2013",
|
||||
"preview": "/img/preview/statue-2013.png",
|
||||
"download": "http://static.shburg.org/art/docs/hudozhka_statue-2013.pdf",
|
||||
"url": [
|
||||
"/f/hudozhka_statue-2013-1.page",
|
||||
"/f/hudozhka_statue-2013-2.page",
|
||||
"/f/hudozhka_statue-2013-3.page",
|
||||
"/f/hudozhka_statue-2013-4.page",
|
||||
"/f/hudozhka_statue-2013-5.page",
|
||||
"/f/hudozhka_statue-2013-6.page",
|
||||
"/f/hudozhka_statue-2013-7.page",
|
||||
"/f/hudozhka_statue-2013-8.page",
|
||||
"/f/hudozhka_statue-2013-9.page",
|
||||
"/f/hudozhka_statue-2013-10.page",
|
||||
"/f/hudozhka_statue-2013-11.page",
|
||||
"/f/hudozhka_statue-2013-12.page",
|
||||
"/f/hudozhka_statue-2013-13.page",
|
||||
"/f/hudozhka_statue-2013-14.page",
|
||||
"/f/hudozhka_statue-2013-15.page",
|
||||
"/f/hudozhka_statue-2013-16.page",
|
||||
"/f/hudozhka_statue-2013-17.page",
|
||||
"/f/hudozhka_statue-2013-18.page",
|
||||
"/f/hudozhka_statue-2013-19.page",
|
||||
"/f/hudozhka_statue-2013-20.page",
|
||||
"/f/hudozhka_statue-2013-21.page",
|
||||
"/f/hudozhka_statue-2013-22.page",
|
||||
"/f/hudozhka_statue-2013-23.page",
|
||||
"/f/hudozhka_statue-2013-24.page",
|
||||
"/f/hudozhka_statue-2013-25.page",
|
||||
"/f/hudozhka_statue-2013-26.page",
|
||||
"/f/hudozhka_statue-2013-27.page"
|
||||
],
|
||||
"extra": {
|
||||
"style": ["http://static.shburg.org/art/docs/preview/hudozhka_statue-2013.css"]
|
||||
},
|
||||
"viewer": "default"
|
||||
"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": "образовательная лицензия",
|
||||
"path": "/document/edu-license",
|
||||
"preview": "/img/preview/license_edu.png",
|
||||
"url": [
|
||||
"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"
|
||||
],
|
||||
"viewer": "img-sheet"
|
||||
"url": "/document/edu-license",
|
||||
"preview": "https://static.shburg.org/art/graphics/license_edu-preview.png",
|
||||
"files": [
|
||||
"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": "свидетельство о государственной регистрации права",
|
||||
"path": "/document/gov-certificate",
|
||||
"preview": "/img/preview/certificate_gov.png",
|
||||
"url": ["http://static.shburg.org/art/docs/hudozhka_certificate_gov.jpg"],
|
||||
"viewer": "img-sheet"
|
||||
"url": "/document/gov-certificate",
|
||||
"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": "ИНН",
|
||||
"path": "/document/VAT",
|
||||
"preview": "/img/preview/vatin.png",
|
||||
"url": ["http://static.shburg.org/art/docs/hudozhka_vatin.jpg"],
|
||||
"viewer": "img-sheet"
|
||||
"url": "/document/VAT",
|
||||
"preview": "https://static.shburg.org/art/graphics/vatin-preview.png",
|
||||
"files": ["https://static.shburg.org/art/docs/hudozhka_vatin.jpg"]
|
||||
},
|
||||
{
|
||||
"name": "EGRYL1",
|
||||
"title": "свидетельство о внесении в «ЕГРЮЛ»",
|
||||
"path": "/document/EGRYL1",
|
||||
"preview": "/img/preview/certificate_egryl1.png",
|
||||
"url": ["http://static.shburg.org/art/docs/hudozhka_certificate_egryl1.jpg"],
|
||||
"viewer": "img-sheet"
|
||||
"url": "/document/EGRYL1",
|
||||
"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": "свидетельство о внесении в «ЕГРЮЛ»",
|
||||
"path": "/document/EGRYL2",
|
||||
"preview": "/img/preview/certificate_egryl2.png",
|
||||
"url": ["http://static.shburg.org/art/docs/hudozhka_certificate_egryl2.jpg"],
|
||||
"viewer": "img-sheet"
|
||||
"url": "/document/EGRYL2",
|
||||
"preview": "https://static.shburg.org/art/graphics/certificate_egryl2-preview.png",
|
||||
"files": ["https://static.shburg.org/art/docs/hudozhka_certificate_egryl2.jpg"]
|
||||
}
|
||||
]
|
||||
@@ -1,33 +1,34 @@
|
||||
{
|
||||
"items":[
|
||||
{
|
||||
"text":"Школа",
|
||||
"url":"/",
|
||||
"class":"selected blue"
|
||||
},
|
||||
{
|
||||
"text":"Расписание",
|
||||
"url":"/schedule",
|
||||
"class":"selected green"
|
||||
},
|
||||
{
|
||||
"text":"Занятия",
|
||||
"class":"selected"
|
||||
},
|
||||
{
|
||||
"text":"Коллектив",
|
||||
"url":"/team",
|
||||
"class":"selected pink"
|
||||
},
|
||||
{
|
||||
"text":"Галерея",
|
||||
"class":"selected"
|
||||
},
|
||||
{
|
||||
"text":"Документы",
|
||||
"url":"/docs",
|
||||
"class":"selected yellow"
|
||||
}
|
||||
],
|
||||
"vkgroup":"https://vk.com/club10436104"
|
||||
}
|
||||
[
|
||||
{
|
||||
"text": "Школа",
|
||||
"url": "/",
|
||||
"color": "blue"
|
||||
},
|
||||
{
|
||||
"text": "События"
|
||||
},
|
||||
{
|
||||
"text": "Расписание",
|
||||
"url": "/schedule",
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"text": "Занятия",
|
||||
"color": ""
|
||||
},
|
||||
{
|
||||
"text": "Коллектив",
|
||||
"url": "/team",
|
||||
"color": "pink"
|
||||
},
|
||||
{
|
||||
"text": "Галерея",
|
||||
"url": "/gallery",
|
||||
"color": "red"
|
||||
},
|
||||
{
|
||||
"text": "Документы",
|
||||
"url": "/docs",
|
||||
"color": "yellow"
|
||||
}
|
||||
]
|
||||
@@ -1,438 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "1-1",
|
||||
"tuesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"11:00 – 11:45",
|
||||
"11:55 – 12:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "1-2",
|
||||
"tuesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"13:00 – 13:45",
|
||||
"13:55 – 14:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "1-3",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "2-1",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": ".",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "Тимашева А.С.",
|
||||
"time": [
|
||||
"11:00 – 11:45",
|
||||
"11:55 – 12:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "2-2",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "Тимашева А.С.",
|
||||
"time": [
|
||||
"13:00 – 13:45",
|
||||
"13:55 – 14:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "2-3",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": " ",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "cg",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "Тимашева А.С.",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3-1",
|
||||
"monday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "cg",
|
||||
"teacher": "rk-timashev",
|
||||
"time": [
|
||||
"13:00 – 13:45",
|
||||
"13:55 – 14:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3-2",
|
||||
"monday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": ".",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "cg",
|
||||
"teacher": "rk-timashev",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3-3",
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "Тимашева А.С.",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "Тимашева А.С.",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "4-1",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 – 18:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "4-2",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 – 18:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "5-1",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": ".",
|
||||
"time": [
|
||||
"15:00 – 15:45",
|
||||
"15:55 – 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "5-2",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "6-1",
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 – 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"16:00 – 17:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 – 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 – 18:45",
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,402 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "1",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"10:00 10:45",
|
||||
"10:55 11:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "2",
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"12:00 12:45",
|
||||
"12:55 13:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3",
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"10:00 10:45",
|
||||
"10:55 11:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "4",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "5",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "6",
|
||||
"wednesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "7",
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "cg",
|
||||
"teacher": "rk-timashev",
|
||||
"time": [
|
||||
"10:00 10:45",
|
||||
"10:55 11:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "8",
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "cg",
|
||||
"teacher": "rk-timashev",
|
||||
"time": [
|
||||
"12:00 12:45",
|
||||
"12:55 13:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "9",
|
||||
"monday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 18:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "10",
|
||||
"monday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 18:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "11",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "12",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "13",
|
||||
"tuesday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 18:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,61 +1,62 @@
|
||||
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"];
|
||||
module.exports = schedule;
|
||||
|
||||
function schedule(pops){
|
||||
var days = function(group){
|
||||
var result = [];
|
||||
|
||||
WEEK.forEach(function(i){
|
||||
var lesson = group[i];
|
||||
if(lesson){
|
||||
result.push(
|
||||
pop(lesson)
|
||||
.populate(time())
|
||||
.populate(pops)
|
||||
.result()
|
||||
)
|
||||
}else{
|
||||
result.push(null);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
module.exports = {
|
||||
populate: populateSchedule
|
||||
};
|
||||
|
||||
var time = function(){
|
||||
return function(lesson){
|
||||
for(var i=0; i < lesson.time.length; i++){
|
||||
lesson.time[i] = lesson.time[i].replace(" ", "—");
|
||||
}
|
||||
return lesson;
|
||||
}
|
||||
}
|
||||
function populateSchedule(s, pops) {
|
||||
var days = function (group) {
|
||||
var result = [];
|
||||
|
||||
var mondayTime = function(group){
|
||||
var day;
|
||||
for(var i=0; i<WEEK.length; i++){
|
||||
if(group[WEEK[i]]){
|
||||
day = WEEK[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(day){
|
||||
return group[day].time[0].substr(0, 5);
|
||||
}else{
|
||||
return "00:00"
|
||||
}
|
||||
}
|
||||
WEEK.forEach(function (i) {
|
||||
var lesson = group[i];
|
||||
if (lesson) {
|
||||
result.push(
|
||||
pop(lesson)
|
||||
.populate(time())
|
||||
.populate(pops)
|
||||
.result()
|
||||
)
|
||||
} else {
|
||||
result.push(null);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
var result = [];
|
||||
SCHEDULE.forEach(function(group){
|
||||
result.push({
|
||||
name: group.name,
|
||||
days: days(group),
|
||||
time: mondayTime(group)
|
||||
});
|
||||
});
|
||||
return result;
|
||||
var time = function () {
|
||||
return function (lesson) {
|
||||
for (var i = 0; i < lesson.time.length; i++) {
|
||||
lesson.time[i] = lesson.time[i].replace(" ", "—");
|
||||
}
|
||||
return lesson;
|
||||
}
|
||||
};
|
||||
|
||||
var mondayTime = function (group) {
|
||||
var day;
|
||||
for (var i = 0; i < WEEK.length; i++) {
|
||||
if (group[WEEK[i]]) {
|
||||
day = WEEK[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (day) {
|
||||
return group[day].time[0].substr(0, 5);
|
||||
} else {
|
||||
return "00:00"
|
||||
}
|
||||
};
|
||||
|
||||
var result = [];
|
||||
s.forEach(function (group) {
|
||||
result.push({
|
||||
name: group.name,
|
||||
days: days(group),
|
||||
time: mondayTime(group)
|
||||
});
|
||||
});
|
||||
return result;
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
const TEAM = require("./team.json");
|
||||
|
||||
exports.team = TEAM;
|
||||
exports.person = getPersonByID;
|
||||
exports.name = getNameByID;
|
||||
exports.short = getShortNameByID;
|
||||
module.exports = {
|
||||
team: TEAM,
|
||||
person: getPersonByID,
|
||||
name: getNameByID,
|
||||
short: getShortNameByID,
|
||||
splitName: splitName
|
||||
};
|
||||
|
||||
function getPersonByID(id){
|
||||
for(var i=0; i<TEAM.length; i++){
|
||||
@@ -28,9 +31,13 @@ function getShortNameByID(id){
|
||||
}
|
||||
|
||||
function shortifyName(name){
|
||||
var m = /(.+)\s(.+)\s(.+)/.exec(name);
|
||||
var m = splitName(name);
|
||||
var n = m[1].replace(/^(.).+/, "$1. ") +
|
||||
m[2].replace(/^(.).+/, "$1. ") +
|
||||
m[3];
|
||||
return n;
|
||||
}
|
||||
|
||||
function splitName(name){
|
||||
return /(.+)\s(.+)\s(.+)/.exec(name);
|
||||
}
|
||||
@@ -4,98 +4,111 @@
|
||||
"name": "Марина Геннадьевна Тимашева",
|
||||
"position": "Директор",
|
||||
"edu": "Ленинградский инженерно-строительный институт",
|
||||
"diplom": "НВ №222567",
|
||||
"diploma": "НВ №222567",
|
||||
"status": "",
|
||||
"picture": "http://static.shburg.org/art/team/teacher5.jpg"
|
||||
"picture": "https://static.shburg.org/art/team/teacher5.jpg",
|
||||
"anchor": "director"
|
||||
},
|
||||
{
|
||||
"id": "va-sarzhin",
|
||||
"name": "Валерий Александрович Саржин",
|
||||
"position": "Преподаватель живописи",
|
||||
"edu": "Академия художеств имени И. Е. Репина",
|
||||
"diplom": "B-I №259798",
|
||||
"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",
|
||||
"name": "Ольга Дмитриевна Гоголева",
|
||||
"position": "Преподаватель живописи",
|
||||
"edu": "Ленинградский инженерно-строительный институт",
|
||||
"diplom": "B-I №222572",
|
||||
"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",
|
||||
"name": "Наталья Викторовна Андреева",
|
||||
"position": "Преподаватель композиции",
|
||||
"edu": "Санкт-Петербургский государственный университет технологии и дизайна",
|
||||
"diplom": "ИВС 0514253",
|
||||
"diploma": "ИВС 0514253",
|
||||
"status": "Вторая квалификационная категория по прикладной композиции",
|
||||
"picture": "http://static.shburg.org/art/team/teacher2.jpg"
|
||||
"picture": "https://static.shburg.org/art/team/teacher2.jpg"
|
||||
},
|
||||
{
|
||||
"id": "vv-voronova",
|
||||
"name": "Вера Викторовна Воронова",
|
||||
"position": "Преподаватель композииции",
|
||||
"edu": "Российский государственный университет имени А. И. Герцена",
|
||||
"diplom": "ВСГ 0530340",
|
||||
"diploma": "ВСГ 0530340",
|
||||
"status": "Вторая квалификационная категория по прикладной композиции",
|
||||
"picture": "http://static.shburg.org/art/team/teacher1.jpg"
|
||||
"picture": "https://static.shburg.org/art/team/teacher1.jpg"
|
||||
},
|
||||
{
|
||||
"id": "in-vturina",
|
||||
"name": "Ирина Николаевна Втюрина",
|
||||
"position": "Преподаватель скульптуры",
|
||||
"edu": "Кировский государственный педагогический институт имени В. И. Ленина",
|
||||
"diplom": "ШВ №164501",
|
||||
"diploma": "ШВ №164501",
|
||||
"status": "Первая квалификационная категория по скульптуре",
|
||||
"picture": "http://static.shburg.org/art/team/teacher8.jpg"
|
||||
"picture": "https://static.shburg.org/art/team/teacher8.jpg"
|
||||
},
|
||||
{
|
||||
"id": "my-valkova",
|
||||
"name": "Мария Юрьевна Валькова",
|
||||
"position": "Преподаватель истории искусства",
|
||||
"edu": "Педагогический институт имени А. И. Герцена",
|
||||
"diplom": "ПП №224197",
|
||||
"diploma": "ПП №224197",
|
||||
"status": "Высшая квалификационная категория по истории искусства",
|
||||
"picture": "http://static.shburg.org/art/team/teacher.jpg"
|
||||
"picture": "https://static.shburg.org/art/team/teacher12.jpg"
|
||||
},
|
||||
{
|
||||
"id": "rk-timashev",
|
||||
"name": "Руслан Камилевич Тимашев",
|
||||
"position": "Преподаватель компьютерной графики",
|
||||
"edu": "Санкт-Петербургский государственный архитектурно-строительный университет",
|
||||
"diplom": "ВСГ 5344910",
|
||||
"diploma": "ВСГ 5344910",
|
||||
"status": "",
|
||||
"picture": "http://static.shburg.org/art/team/teacher4.jpg"
|
||||
"picture": "https://static.shburg.org/art/team/teacher4.jpg"
|
||||
},
|
||||
{
|
||||
"id": "as-timasheva",
|
||||
"name": "Анна Сергеевна Манцева",
|
||||
"name": "Анна Сергеевна Тимашева",
|
||||
"position": "Преподаватель рисунка",
|
||||
"edu": "Московский архитектурный институт",
|
||||
"diplom": "РН 70241",
|
||||
"diploma": "РН 70241",
|
||||
"status": "",
|
||||
"picture": "http://static.shburg.org/art/team/teacher3.jpg"
|
||||
"picture": "https://static.shburg.org/art/team/teacher3.jpg",
|
||||
"contacts": {
|
||||
"instagram": "annm101"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sa-latipova",
|
||||
"name": "Серафима Александровна Латыпова",
|
||||
"position": "Преподаватель рисунка",
|
||||
"edu": "Незаконченный Ленинградский государственный педагогический университет имени А. С. Пушкина",
|
||||
"diplom": "",
|
||||
"diploma": "",
|
||||
"status": "",
|
||||
"picture": "http://static.shburg.org/art/team/teacher9.jpg"
|
||||
"picture": "https://static.shburg.org/art/team/teacher9.jpg"
|
||||
},
|
||||
{
|
||||
"id": "ey-tarasova",
|
||||
"name": "Евгения Юрьевна Тарасова",
|
||||
"position": "Преподаватель гравюры",
|
||||
"edu": "Санкт-Петербургский государственный архитектурно-строительный университет",
|
||||
"diplom": "ВСВ 1321444",
|
||||
"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": ""
|
||||
}
|
||||
]
|
||||
@@ -1,62 +1,55 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
charset utf-8;
|
||||
|
||||
|
||||
server_name art.shlisselburg.org;
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 404.
|
||||
# try_files $uri $uri/ /index.html;
|
||||
# Uncomment to enable naxsi on this location
|
||||
# include /etc/nginx/naxsi.rules
|
||||
ssl_certificate /etc/letsencrypt/live/art.shlisselburg.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/art.shlisselburg.org/privkey.pem;
|
||||
|
||||
proxy_pass http://localhost:18010;
|
||||
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;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
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;
|
||||
}
|
||||
|
||||
# Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
|
||||
#location /RequestDenied {
|
||||
# proxy_pass http://127.0.0.1:8080;
|
||||
#}
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name art.shburg.org;
|
||||
|
||||
#error_page 404 /404.html;
|
||||
ssl_certificate /etc/letsencrypt/live/art.shlisselburg.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/art.shlisselburg.org/privkey.pem;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
#error_page 500 502 503 504 /50x.html;
|
||||
#location = /50x.html {
|
||||
# root /usr/share/nginx/html;
|
||||
#}
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
|
||||
#
|
||||
# # With php5-cgi alone:
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
# # With php5-fpm:
|
||||
# fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
# fastcgi_index index.php;
|
||||
# include fastcgi_params;
|
||||
#}
|
||||
return 301 https://art.shlisselburg.org$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name hudozhka.shlisselburg.org
|
||||
hudozka.shlisselburg.org
|
||||
artschool.shlisselburg.org
|
||||
art-school.shlisselburg.org
|
||||
hudozhka.shburg.org
|
||||
hudozka.shburg.org
|
||||
artschool.shburg.org
|
||||
art-school.shburg.org
|
||||
;
|
||||
server_name art.shlisselburg.org art.shburg.org;
|
||||
return 301 https://art.shlisselburg.org$request_uri;
|
||||
}
|
||||
|
||||
return 301 $scheme://art.shlisselburg.org$request_uri;
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
upstream hudozka {
|
||||
server localhost:1800;
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
{
|
||||
"name": "app",
|
||||
"name": "Hudozka",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"version": "3.4.1",
|
||||
"description": "",
|
||||
"main": "main.js",
|
||||
"main": "bin/www.js",
|
||||
"scripts": {
|
||||
"start": "node ./server.js",
|
||||
"install": "gulp deploy",
|
||||
"test": "mocha"
|
||||
},
|
||||
"repository": {
|
||||
@@ -16,18 +14,38 @@
|
||||
"author": "Roman Timashev",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"consolidate": "~0.10.0",
|
||||
"jade": "~1.1.5",
|
||||
"express": "~3.4.8",
|
||||
"gulp-uglify": "^0.2.1"
|
||||
"co": "^4.4.0",
|
||||
"instagram-node": "^0.5.1",
|
||||
"koa-bodyparser": "^1.4.1",
|
||||
"koa-conditional-get": "^1.0.2",
|
||||
"koa-etag": "^2.0.0",
|
||||
"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.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": {
|
||||
"gulp": "~3.5.2",
|
||||
"should": "~3.1.2",
|
||||
"mocha": "~1.17.1",
|
||||
"gulp-sass": "~0.6.0",
|
||||
"gulp-minify-css": "~0.3.0",
|
||||
"autoprefixer": "^6.2.3",
|
||||
"babelify": "^7.2.0",
|
||||
"bower": "^1.3.12",
|
||||
"browserify-ngannotate": "^2.0.0",
|
||||
"cssnano": "^3.4.0",
|
||||
"gulp": "^3.8.10",
|
||||
"gulp-browserify": "^0.5.0",
|
||||
"gulp-concat": "^2.4.1",
|
||||
"gulp-if": "^2.0.0",
|
||||
"gulp-imagemin": "~0.1.5",
|
||||
"gulp-autoprefixer": "0.0.6"
|
||||
"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,118 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
link(rel="stylesheet", href="/s/docs.css")
|
||||
|
||||
block content
|
||||
include ../menu
|
||||
.main
|
||||
for group in blocks
|
||||
.docblock
|
||||
if(group.type == 'documents')
|
||||
//- h2 #{group.name}
|
||||
for i in group.items
|
||||
.doc
|
||||
a(href='#{i.path}')
|
||||
img(src='#{i.preview}')
|
||||
span #{i.title}
|
||||
|
||||
//- .docblock
|
||||
//- h2 Лицензии, свидетельства и уставы
|
||||
//- .panel
|
||||
//- .docs
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/statue-2013.png')
|
||||
//- a(href='/document/statue-2013') Устав школы в 2013 году
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/license_edu.png')
|
||||
//- a(href='/document/edu-license') Образовательная лицензия
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/certificate_gov.png')
|
||||
//- a(href='/document/gov_certificate') Свидетельство о государственной регистрации права
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/vatin.png')
|
||||
//- a(href='/document/VAT') ИНН
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/certificate_egryl1.png')
|
||||
//- a(href='/document/EGRYL1') Свидетельство о внесении в «ЕГРЮЛ»
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/certificate_egryl2.png')
|
||||
//- a(href='/document/EGRYL2') Свидетельство о внесении в «ЕГРЮЛ»
|
||||
//- .docblock
|
||||
//- h2 Грамоты
|
||||
//- .panel
|
||||
//- ul
|
||||
//- li
|
||||
//- a(href='').act.select ученикам
|
||||
//- li
|
||||
//- a(href='').act учителям
|
||||
//- ul
|
||||
//- li
|
||||
//- a(href='').act 2014
|
||||
//- li
|
||||
//- a(href='').act.select 2013
|
||||
//- li
|
||||
//- a(href='').act 2012
|
||||
//- li
|
||||
//- a(href='').act 2011
|
||||
//- li
|
||||
//- a(href='').act 2010
|
||||
//- li
|
||||
//- a(href='').act 2009
|
||||
//- li
|
||||
//- a(href='').act 2008
|
||||
//- li
|
||||
//- a(href='').act 2007
|
||||
//- .docs
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/0002_600_0.jpg')
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/gramota1296478114.jpg')
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/Грамота_Буркун_И.Г.jpg')
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/Грамота_ГребенникО.С.jpg')
|
||||
//- .docblock
|
||||
//- h2 Образовательные программы
|
||||
//- .panel
|
||||
//- .docs
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/03_.JPG')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') Живопись
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/22.jpg')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') Рисунок
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/dokument.gif')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') Скульптура
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/license_cryptomodulc.jpg')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') ДПИ
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/1340870449_1283936456_dog_bez_pol.jpg')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') История искусств
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
@@ -1,15 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
link(rel="stylesheet", href="/s/document.css")
|
||||
|
||||
block menu
|
||||
.menu
|
||||
h1
|
||||
span.bold ДХШ
|
||||
span.norm Шлиссельбурга,
|
||||
span.norm #{doc.name}
|
||||
|
||||
block content
|
||||
.displaybox
|
||||
iframe#doc(src="#{doc.download}")
|
||||
@@ -1,57 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
if doc.viewer == "default"
|
||||
link(rel='stylesheet', href='/s/pdf.css')
|
||||
|
||||
link(rel='stylesheet', href='/s/document.css')
|
||||
|
||||
if doc.extra && doc.extra.style
|
||||
for style in doc.extra.style
|
||||
link(rel='stylesheet', href='#{style}')
|
||||
|
||||
if doc.viewer == "default"
|
||||
script(src='http://code.jquery.com/jquery-2.1.0.min.js')
|
||||
script(src='/c/document.js')
|
||||
|
||||
if doc.extra && doc.extra.script
|
||||
for script in doc.extra.script
|
||||
script(src='#{script}')
|
||||
|
||||
block content
|
||||
.menu.opac
|
||||
.panel
|
||||
h1
|
||||
span.bold ДХШ
|
||||
span.norm Шлиссельбурга,
|
||||
span.norm #{doc.title}
|
||||
.panel.right
|
||||
if doc.viewer == "default" && doc.url.length > 1
|
||||
.controls
|
||||
p.block
|
||||
span Страница
|
||||
input#currentPage(pattern='[0-9]{,3}')
|
||||
| из
|
||||
span#totalPages
|
||||
|
||||
p.block
|
||||
button#buttonPrev ←
|
||||
button#buttonNext →
|
||||
|
||||
if doc.download
|
||||
p.block
|
||||
a.download(href='#{doc.download}')
|
||||
if doc.viewer == "default"
|
||||
div(id='page-container')
|
||||
for url in doc.url
|
||||
//- p #{url}
|
||||
.pf(data-page-url='#{url}')
|
||||
//- img(src='#{url}')
|
||||
//- //- for url in doc.url
|
||||
//- //- .pf
|
||||
//- //- //-
|
||||
|
||||
if doc.viewer == "img-sheet"
|
||||
.doclist
|
||||
for url in doc.url
|
||||
img(src='#{url}')
|
||||
@@ -1,11 +0,0 @@
|
||||
doctype html
|
||||
|
||||
html
|
||||
head
|
||||
link(rel="stylesheet", href="/s/main.css")
|
||||
link(rel="stylesheet", href="/fonts/stylesheet.css")
|
||||
block custom_head
|
||||
body
|
||||
block content
|
||||
|
||||
include yandex.metrika.jade
|
||||
@@ -1,7 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
meta(name="google-site-verification", content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg")
|
||||
|
||||
block content
|
||||
include ../menu
|
||||