Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
.idea
|
.idea
|
||||||
*.sublime*
|
*.sublime*
|
||||||
|
|
||||||
private.json
|
private*.json
|
||||||
|
|
||||||
/node_modules
|
/node_modules
|
||||||
/bower_components
|
/bower_components
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 618 B |
Binary file not shown.
|
After Width: | Height: | Size: 611 B |
Binary file not shown.
|
After Width: | Height: | Size: 611 B |
Binary file not shown.
|
After Width: | Height: | Size: 618 B |
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+26
-50
@@ -1,64 +1,40 @@
|
|||||||
.page-docs {
|
.page-docs {
|
||||||
&.ng-leave {
|
&.ng-leave {
|
||||||
transform-origin: 50% 50%;
|
transform-origin: 50% 50%;
|
||||||
animation: rotateOutNewspaper .3s both ease-in;
|
animation: rotateOutNewspaper .3s both ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.ng-enter {
|
&.ng-enter {
|
||||||
animation: scaleUp 0.3s both ease-in
|
animation: scaleUp 0.3s both ease-in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.act{
|
.documents-block {
|
||||||
text-decoration: none;
|
margin: 3em 0 0;
|
||||||
border-bottom: 1px dashed #688fff;
|
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.docblock{
|
.doc {
|
||||||
// width:100%;
|
margin: 0 1.2em 2.5em;
|
||||||
margin-bottom: 40px;
|
|
||||||
|
|
||||||
text-align: center;
|
p {
|
||||||
|
text-align: center;
|
||||||
// .docs{
|
}
|
||||||
// text-align: left;
|
img {
|
||||||
// }
|
max-width: 100%;
|
||||||
|
}
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.doc{
|
@media (max-width: 31.25em) {
|
||||||
display: inline-block;
|
.documents-block {
|
||||||
margin: 30px 35px;
|
margin: 1em 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
img{
|
.doc {
|
||||||
display: block;
|
margin: 0 0 2em;
|
||||||
margin-left: auto;
|
}
|
||||||
margin-right: auto;
|
}
|
||||||
max-width:360px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docinfo{
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+55
-12
@@ -1,31 +1,74 @@
|
|||||||
footer{
|
footer {
|
||||||
|
color: #e3e3e3;
|
||||||
|
background-color: #151515;
|
||||||
|
font-size: 0.9em;
|
||||||
|
padding: 0 0.5em 0.5em;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: black;
|
|
||||||
color: #ffffff;
|
|
||||||
|
|
||||||
&:before{
|
&:before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -3px;
|
top: -3px;
|
||||||
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 3px;
|
height: 3px;
|
||||||
|
z-index: 100;
|
||||||
background-image: url('/graphics/rawline.png');
|
background-image: url('/graphics/rawline.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-block{
|
h4{
|
||||||
display: flex;
|
font-size: 1.3em;
|
||||||
margin: 0 20px;
|
color: white;
|
||||||
|
margin: 0.5em 0 0.7em;
|
||||||
|
}
|
||||||
|
|
||||||
& > div{
|
ul {
|
||||||
margin: 0 30px 0 10px;
|
padding: 0 0.5em 0 1em;
|
||||||
|
list-style: none;
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin: 0 0 0.5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a{
|
a {
|
||||||
|
padding: 0.15em 0;
|
||||||
|
line-height: 1.5em;
|
||||||
color: #738cdb;
|
color: #738cdb;
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: 1px solid #2c3652;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul{
|
.info-block {
|
||||||
list-style: none;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,3 +8,29 @@
|
|||||||
animation: scaleUp 0.3s both ease-in;
|
animation: scaleUp 0.3s both ease-in;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.main-block {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 5px;
|
||||||
|
|
||||||
|
.telephone {
|
||||||
|
font-size: 1.25em;
|
||||||
|
margin-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 18pt;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 1em 0 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-device-width: 500px) {
|
||||||
|
.main-block {
|
||||||
|
.telephone {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+51
-33
@@ -1,41 +1,59 @@
|
|||||||
//html {
|
* {
|
||||||
// overflow-y: hidden;
|
margin: 0;
|
||||||
//}
|
padding: 0;
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: "PT Sans", Arial, sans-serif;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
html, body {
|
||||||
margin-top: 5px;
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.telephone {
|
body {
|
||||||
font-size: 1.25em;
|
font-family: "PT Sans", Arial, sans-serif;
|
||||||
margin-left: 30px;
|
min-width: 320px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.wrapper {
|
||||||
text-align: right;
|
display: flex;
|
||||||
margin: 20px 50px 0 0;
|
min-height: 100%;
|
||||||
font-weight: normal;
|
flex-direction: column;
|
||||||
padding: 0;
|
}
|
||||||
}
|
|
||||||
|
.content {
|
||||||
|
flex: 1;
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #3f9cea;
|
color: #3f9cea;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-bottom: 1px solid rgba(63, 156, 234, 0.25);
|
border-bottom: 1px solid rgba(63, 156, 234, 0.25);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-bottom: 1px solid rgba(63, 156, 234, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
border-bottom: 1px solid rgb(63, 156, 234);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.invisible {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
h3 a {
|
||||||
border-bottom: 1px solid rgba(63, 156, 234, 0.5);
|
color: black;
|
||||||
}
|
text-decoration: none;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
|
||||||
a:active {
|
&:hover {
|
||||||
border-bottom: 1px solid rgb(63, 156, 234);
|
border-bottom: 1px solid #484848;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
border-bottom: 1px solid #000000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.submenu {
|
ul.submenu {
|
||||||
@@ -46,14 +64,14 @@ ul.submenu {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin: 0 30px 0 0;
|
margin: 0 30px 0 0;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin: 2px 0 0;
|
margin: 2px 0 0;
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+62
-50
@@ -1,64 +1,76 @@
|
|||||||
.menu {
|
header {
|
||||||
$text_color: #666;
|
nav {
|
||||||
|
overflow-x: scroll;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
width: 100%;
|
||||||
|
max-height: 15em;
|
||||||
|
|
||||||
position:relative;
|
background-color: black;
|
||||||
width: 100%;
|
font-size: 1.1em;
|
||||||
background-color: black;
|
color: #666;
|
||||||
color: $text_color;
|
|
||||||
font-size: 13pt;
|
|
||||||
|
|
||||||
ul {
|
& :link, & :visited {
|
||||||
margin: 0 0 0 20px;
|
|
||||||
|
|
||||||
li {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 5px 3px 13px 3px;
|
|
||||||
margin-right: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:link, :visited {
|
|
||||||
text-decoration: none;
|
|
||||||
border-bottom: 1px solid #333;
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
color: white;
|
|
||||||
border-bottom: 1px solid #555;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vk {
|
|
||||||
float: right;
|
|
||||||
margin: 13px 15px 0 0;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selected {
|
|
||||||
border-top: 4px solid white;
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
a:link, a:visited{
|
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-bottom: none;
|
border-bottom: 1px solid #333;
|
||||||
|
color: #a2a2a2;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.blue{
|
ul {
|
||||||
border-top: 4px solid #3f9cea;
|
list-style: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: inline-block; /* 6 */
|
||||||
|
padding: 0.3em 0.2em 0.5em;
|
||||||
|
margin: 0 0.5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.green{
|
a:hover {
|
||||||
border-top: 4px solid #5cbe40;
|
color: white;
|
||||||
|
border-bottom: 1px solid #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.yellow{
|
.selected {
|
||||||
border-top: 4px solid #ffee00;
|
border-top: 4px solid white;
|
||||||
}
|
font-weight: bold;
|
||||||
|
|
||||||
&.pink {
|
a:link, a:visited {
|
||||||
border-top: 4px solid #f655a0;
|
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;
|
||||||
|
|
||||||
|
nav ul {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,10 @@
|
|||||||
padding-bottom: 50px;
|
padding-bottom: 50px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
.schedule-block{
|
||||||
|
overflow-x: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
table{
|
table{
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 30px auto 0 auto;
|
margin: 30px auto 0 auto;
|
||||||
@@ -196,4 +200,12 @@
|
|||||||
display: block;
|
display: block;
|
||||||
margin-top: 90px;
|
margin-top: 90px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-device-width: 400px){
|
||||||
|
.schedule{
|
||||||
|
thead.fix{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,14 @@
|
|||||||
.tape-block{
|
.tape-block{
|
||||||
width: 70%;
|
width: 70%;
|
||||||
max-width: 700px;
|
max-width: 1000px;
|
||||||
min-width: 300px;
|
|
||||||
|
|
||||||
margin: 100px auto 100px;
|
margin: 2em auto;
|
||||||
|
|
||||||
|
&.simplified{
|
||||||
|
.tape{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tape-block-content{
|
.tape-block-content{
|
||||||
@@ -40,4 +45,45 @@
|
|||||||
right: -25px;
|
right: -25px;
|
||||||
background-image: url(/graphics/tape-rb.png);
|
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-content {
|
||||||
|
.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,45 +0,0 @@
|
|||||||
.timeline {
|
|
||||||
.post {
|
|
||||||
.user{
|
|
||||||
margin-top: 4px;
|
|
||||||
|
|
||||||
span{
|
|
||||||
vertical-align: top;
|
|
||||||
line-height: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.date{
|
|
||||||
margin: 5px 0 0;
|
|
||||||
color: #999;
|
|
||||||
font-size: 0.75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body{
|
|
||||||
padding: 20px 20px 50px;
|
|
||||||
// padding: 12px 0 0;
|
|
||||||
// h2{
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
a{
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 500px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-radius: 5px;
|
|
||||||
border: 8px solid white;
|
|
||||||
box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.35);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
+31
-96
@@ -1,103 +1,38 @@
|
|||||||
.timeline{
|
.timeline{
|
||||||
min-width: 500px;
|
display: flex;
|
||||||
position: relative;
|
flex-direction: column;
|
||||||
margin: 0 0 50px;
|
width: 70%;
|
||||||
|
margin: 0 auto 2em;
|
||||||
|
}
|
||||||
|
|
||||||
&:before{
|
.timeline-footer{
|
||||||
content: '';
|
display: flex;
|
||||||
width: 10px;
|
justify-content: center;
|
||||||
height: 10px;
|
|
||||||
position: absolute;
|
button.more{
|
||||||
background-color: black;
|
position: relative;
|
||||||
top: 0;
|
top: -2px;
|
||||||
left: calc(50% - 6px);
|
|
||||||
border-radius: 50%;
|
width: 100px;
|
||||||
z-index: 1;
|
height: 40px;
|
||||||
|
border: 2px solid black;
|
||||||
|
padding: 0 10px;
|
||||||
|
background: none;
|
||||||
|
|
||||||
|
font-size: 14pt;
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
background: gainsboro;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active{
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post{
|
@media screen and (max-device-width: 31.25em) {
|
||||||
position: relative;
|
.timeline {
|
||||||
display: flex;
|
width: 98%;
|
||||||
|
|
||||||
.head, .body{
|
|
||||||
position: relative;
|
|
||||||
width: 50%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.head {
|
|
||||||
padding: 25px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body {
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.left{
|
|
||||||
flex-flow: row-reverse;
|
|
||||||
|
|
||||||
.body{
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.head{
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body:after{
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
width: 12px;
|
|
||||||
height: calc(100% - 98px);
|
|
||||||
top: 98px;
|
|
||||||
right: 0;
|
|
||||||
background: url(/graphics/timeline-line.png) no-repeat right;
|
|
||||||
background-size: 2px 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.head:after{
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
width: 12px;
|
|
||||||
height: 98px;
|
|
||||||
top: 0;
|
|
||||||
left: -12px;
|
|
||||||
background: url(/graphics/timeline-arrow-left.png) no-repeat;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.right{
|
|
||||||
flex-flow: row;
|
|
||||||
|
|
||||||
.body{
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.head{
|
|
||||||
text-align: right;
|
|
||||||
margin: 0 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body:after{
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
width: 100px;
|
|
||||||
height: calc(100% - 98px);
|
|
||||||
top: 98px;
|
|
||||||
left: -12px;
|
|
||||||
background: url(/graphics/timeline-line.png) no-repeat;
|
|
||||||
background-size: 2px 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.head:after{
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
width: 12px;
|
|
||||||
height: 98px;
|
|
||||||
top: 0;
|
|
||||||
left: calc(100% - 2px);
|
|
||||||
background: url(/graphics/timeline-arrow-right.png) no-repeat;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-140
@@ -1,140 +0,0 @@
|
|||||||
/**
|
|
||||||
* Created by tmshv on 22/11/14.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var config = require("../config");
|
|
||||||
var db = require("../core/db");
|
|
||||||
var instagram = require("../core/instagram");
|
|
||||||
var express = require("express");
|
|
||||||
var Promise = require("promise");
|
|
||||||
var methodOverride = require("method-override");
|
|
||||||
var logger = require("morgan");
|
|
||||||
var cookieParser = require("cookie-parser");
|
|
||||||
var bodyParser = require("body-parser");
|
|
||||||
|
|
||||||
var Post = require("../schema/post");
|
|
||||||
|
|
||||||
db.init(config.db)
|
|
||||||
.then(function () {
|
|
||||||
server(config.port);
|
|
||||||
});
|
|
||||||
|
|
||||||
function server(port) {
|
|
||||||
var app = express();
|
|
||||||
app.use(logger("dev"));
|
|
||||||
app.use(cookieParser());
|
|
||||||
app.use(bodyParser.json());
|
|
||||||
app.use(bodyParser.urlencoded({extended: true}));
|
|
||||||
app.use(methodOverride());
|
|
||||||
|
|
||||||
require("../routers/instagram")(app);
|
|
||||||
|
|
||||||
var Router = express.Router;
|
|
||||||
var instagram = require("../core/instagram");
|
|
||||||
var router = new Router();
|
|
||||||
router.route("/").get(function (req, res) {
|
|
||||||
if ("instagram_code" in req.cookies) {
|
|
||||||
var client = instagram.client(req.cookies["instagram_code"]);
|
|
||||||
instagramSandbox(client, res);
|
|
||||||
} else {
|
|
||||||
var ig = instagram.client();
|
|
||||||
var url = ig.get_authorization_url(config.instagram.redirect_uri, {scope: ["basic"], state: "hello"});
|
|
||||||
res.redirect(url);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
app.use(router);
|
|
||||||
app.listen(port);
|
|
||||||
}
|
|
||||||
|
|
||||||
function instagramSandbox(ig, res) {
|
|
||||||
// //{"username":"mlazareffa","bio":"","website":"","profile_picture":"http://images.ak.instagram.com/profiles/anonymousUser.jpg","full_name":"","id":"1549382451"}
|
|
||||||
// //ig.user_search("mlazareffa", [], function(err, users, remaining, limit) {
|
|
||||||
// // console.log(err, users, remaining, limit);
|
|
||||||
// // res.json(users);
|
|
||||||
// //});
|
|
||||||
//
|
|
||||||
// // ig.user_media_recent("1549382451", [], function (err, medias, pagination, remaining, limit) {
|
|
||||||
// // console.log(err, medias, pagination, remaining, limit);
|
|
||||||
// // res.json(users);
|
|
||||||
// // });
|
|
||||||
//
|
|
||||||
// //ig.subscriptions(function(err, result, remaining, limit){
|
|
||||||
// // console.log(err, result, remaining, limit);
|
|
||||||
// // res.json(result);
|
|
||||||
// //});
|
|
||||||
//
|
|
||||||
// //ig.del_subscription({id: 14180526}, function (err, subscriptions, limit) {
|
|
||||||
// // console.log(err, subscriptions, limit);
|
|
||||||
// // res.json(subscriptions);
|
|
||||||
// //});
|
|
||||||
//
|
|
||||||
// ///* OPTIONS: { [verify_token] }
|
|
||||||
// // ig.add_tag_subscription("hello", "http://home.tmshv.ru:1337/instagram/tag/hello", [], function(err, result, remaining, limit){
|
|
||||||
// // console.log(err, result, remaining, limit);
|
|
||||||
// // res.json(result);
|
|
||||||
// //});
|
|
||||||
|
|
||||||
findByTag(ig, "shlb_hudozka", 50)
|
|
||||||
.catch(function (error) {
|
|
||||||
console.log(error);
|
|
||||||
})
|
|
||||||
.then(function (params) {
|
|
||||||
var list = params.medias;
|
|
||||||
var pagination = params.pagination;
|
|
||||||
var remaining = params.remaining;
|
|
||||||
var limit = params.limit;
|
|
||||||
|
|
||||||
var posts = list.map(function (gram) {
|
|
||||||
//var post = new Post();
|
|
||||||
var post = {};
|
|
||||||
post.id = gram.id;
|
|
||||||
post.author = gram.user["username"];
|
|
||||||
post.publishDate = new Date(parseInt(gram["created_time"]) * 1000);
|
|
||||||
post.data = gram;
|
|
||||||
post.body = "";
|
|
||||||
post.type = "instagram";
|
|
||||||
|
|
||||||
return post;
|
|
||||||
});
|
|
||||||
|
|
||||||
Promise.all(posts.map(function (post) {
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
console.log('updating', post.id);
|
|
||||||
Post.update({id: post.id}, post, {upsert: true}, function (error, num) {
|
|
||||||
if (error) {
|
|
||||||
reject(error);
|
|
||||||
} else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}))
|
|
||||||
.catch(function (error) {
|
|
||||||
console.log(error);
|
|
||||||
})
|
|
||||||
.then(function () {
|
|
||||||
res.send("LOL");
|
|
||||||
});
|
|
||||||
|
|
||||||
//if (pagination.next) {
|
|
||||||
// pagination.next(mtr); // Will get second page results
|
|
||||||
//}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function findByTag(ig, tag, count) {
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
ig.tag_media_recent(tag, {count: count}, function (err, medias, pagination, remaining, limit) {
|
|
||||||
if (err) {
|
|
||||||
reject(err);
|
|
||||||
} else {
|
|
||||||
resolve({
|
|
||||||
medias: medias,
|
|
||||||
pagination: pagination,
|
|
||||||
remaining: remaining,
|
|
||||||
limit: limit
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
+4
-1
@@ -5,8 +5,11 @@
|
|||||||
var config = require("../config");
|
var config = require("../config");
|
||||||
var db = require("../core/db");
|
var db = require("../core/db");
|
||||||
var server = require("../server");
|
var server = require("../server");
|
||||||
|
var instagram = require("../instagram");
|
||||||
|
|
||||||
db.init(config.db.uri)
|
db.init(config.db.uri)
|
||||||
|
//.then(instagram)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
server(config.port);
|
var app = server();
|
||||||
|
app.listen(config.port);
|
||||||
});
|
});
|
||||||
+6
-4
@@ -22,9 +22,11 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fotorama": "~4.6.2",
|
"fotorama": "~4.6.2",
|
||||||
"jquery": "~2.1.1",
|
"jquery": "~2.1.1",
|
||||||
"angular-route": "~1.3.3",
|
"angular-route": "~1.4.1",
|
||||||
"angular-animate": "~1.3.3",
|
"angular-animate": "~1.4.1",
|
||||||
"angular": "~1.3.3",
|
"angular": "~1.4.1",
|
||||||
"angulartics": "~0.17.2"
|
"angulartics": "~0.17.2",
|
||||||
|
"angular-spinner": "~0.6.1",
|
||||||
|
"socket.io-client": "~1.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+7
-2
@@ -2,11 +2,16 @@
|
|||||||
* Created by tmshv on 22/11/14.
|
* Created by tmshv on 22/11/14.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var APINews = require("./news");
|
||||||
|
var APIGallery = require("./gallery");
|
||||||
|
|
||||||
module.exports = function(app) {
|
module.exports = function(app) {
|
||||||
|
var minute = 1000 * 60;
|
||||||
|
|
||||||
app.factory("api", function ($http) {
|
app.factory("api", function ($http) {
|
||||||
var api = {};
|
var api = {};
|
||||||
var Endpoint = require("./news");
|
api.news = new APINews($http);
|
||||||
api.news = new Endpoint($http);
|
api.gallery = new APIGallery($http, minute);
|
||||||
|
|
||||||
return api;
|
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;
|
||||||
+4
-2
@@ -2,12 +2,14 @@
|
|||||||
* Created by tmshv on 22/11/14.
|
* Created by tmshv on 22/11/14.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var query = require("../../utils/net").query;
|
||||||
|
|
||||||
function APIFeed(http){
|
function APIFeed(http){
|
||||||
this.request = http;
|
this.request = http;
|
||||||
}
|
}
|
||||||
|
|
||||||
APIFeed.prototype.feed = function() {
|
APIFeed.prototype.feed = function(count, portion) {
|
||||||
return this.request.get("/news");
|
return this.request.get("/news?"+query([["count", count], ["portion", portion]]));
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = APIFeed;
|
module.exports = APIFeed;
|
||||||
+24
-3
@@ -6,7 +6,8 @@ var app = angular.module("hudozhka", [
|
|||||||
"hudozhka.data",
|
"hudozhka.data",
|
||||||
"ngRoute",
|
"ngRoute",
|
||||||
"angulartics",
|
"angulartics",
|
||||||
"angulartics.google.analytics"
|
"angulartics.google.analytics",
|
||||||
|
"angularSpinner"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
app.config(function ($locationProvider, $routeProvider) {
|
app.config(function ($locationProvider, $routeProvider) {
|
||||||
@@ -18,7 +19,7 @@ app.config(function ($locationProvider, $routeProvider) {
|
|||||||
name: "/",
|
name: "/",
|
||||||
templateUrl: "/views/home.html",
|
templateUrl: "/views/home.html",
|
||||||
controller: "HomePageController",
|
controller: "HomePageController",
|
||||||
title:"ДШХ Шлиссельбурга"
|
title:"ДХШ Шлиссельбурга"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "/schedule",
|
name: "/schedule",
|
||||||
@@ -32,6 +33,17 @@ app.config(function ($locationProvider, $routeProvider) {
|
|||||||
controller: "TeamPageController",
|
controller: "TeamPageController",
|
||||||
title:"Преподаватели"
|
title:"Преподаватели"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "/gallery",
|
||||||
|
templateUrl: "/views/gallery.html",
|
||||||
|
controller: "GalleryPageController",
|
||||||
|
title:"Работы учащихся"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "/gallery/:year/:course/:album",
|
||||||
|
templateUrl: "/views/gallery-album.html",
|
||||||
|
controller: "AlbumPageController"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "/docs",
|
name: "/docs",
|
||||||
templateUrl: "/views/docs.html",
|
templateUrl: "/views/docs.html",
|
||||||
@@ -51,20 +63,29 @@ app.config(function ($locationProvider, $routeProvider) {
|
|||||||
|
|
||||||
app.run(function($location, $rootScope, $http) {
|
app.run(function($location, $rootScope, $http) {
|
||||||
$rootScope.$on("$routeChangeSuccess", function (event, current) {
|
$rootScope.$on("$routeChangeSuccess", function (event, current) {
|
||||||
$rootScope.title = current["$$route"].title;
|
var title = current["$$route"].title;
|
||||||
|
if(title) $rootScope.title = title;
|
||||||
});
|
});
|
||||||
|
|
||||||
$http.defaults.headers.common["Accept"] = "application/json";
|
$http.defaults.headers.common["Accept"] = "application/json";
|
||||||
});
|
});
|
||||||
|
|
||||||
require("./api/api")(app);
|
require("./api/api")(app);
|
||||||
|
require("./services/io")(app);
|
||||||
require("./ui/menu")(app);
|
require("./ui/menu")(app);
|
||||||
|
require("./ui/breadcrumbs")(app);
|
||||||
require("./ui/timeline")(app);
|
require("./ui/timeline")(app);
|
||||||
|
require("./filters/strip")(app);
|
||||||
|
require("./filters/remove-hashtags")(app);
|
||||||
|
require("./filters/removeNewline")(app);
|
||||||
require("./filters/uppercase-first")(app);
|
require("./filters/uppercase-first")(app);
|
||||||
require("./pages/home")(app);
|
require("./pages/home")(app);
|
||||||
require("./pages/schedule")(app);
|
require("./pages/schedule")(app);
|
||||||
require("./pages/team")(app);
|
require("./pages/team")(app);
|
||||||
|
require("./pages/gallery")(app);
|
||||||
require("./pages/docs")(app);
|
require("./pages/docs")(app);
|
||||||
|
require("./controllers/ContactsController")(app);
|
||||||
|
require("./controllers/CopyrightController")(app);
|
||||||
|
|
||||||
app.controller("SchedulePageController", function ($scope) {
|
app.controller("SchedulePageController", function ($scope) {
|
||||||
$scope.pageClass = "page-schedule";
|
$scope.pageClass = "page-schedule";
|
||||||
|
|||||||
@@ -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,10 @@
|
|||||||
|
module.exports = function (app) {
|
||||||
|
app.controller('CopyrightController', function ($scope, $rootScope) {
|
||||||
|
$scope.developer = true;
|
||||||
|
$scope.now = new Date().getFullYear();
|
||||||
|
|
||||||
|
$rootScope.$on('$routeChangeSuccess', function (event, current) {
|
||||||
|
$scope.developer = current['$$route'].originalPath == '/';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
+6
-1
@@ -14,6 +14,11 @@ angular.module("hudozhka.data", [])
|
|||||||
})
|
})
|
||||||
.service("config", function(){
|
.service("config", function(){
|
||||||
return {
|
return {
|
||||||
telephone: "8 (81362) 77-502"
|
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,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,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,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
|
||||||
|
};
|
||||||
|
}
|
||||||
+20
-3
@@ -4,9 +4,26 @@
|
|||||||
|
|
||||||
module.exports = function (app) {
|
module.exports = function (app) {
|
||||||
app.controller("HomePageController", function ($scope, config) {
|
app.controller("HomePageController", function ($scope, config) {
|
||||||
$scope.pageClass = "page-home";
|
var fotorama;
|
||||||
$scope.telephone = config.telephone;
|
|
||||||
|
|
||||||
$(".fotorama").fotorama();
|
$scope.pageClass = "page-home";
|
||||||
|
|
||||||
|
var $tape = $('.tape-block');
|
||||||
|
var $fotorama = $('.fotorama');
|
||||||
|
|
||||||
|
$tape.addClass('simplified');
|
||||||
|
$fotorama.on('fotorama:ready', function () {
|
||||||
|
$tape.removeClass('simplified');
|
||||||
|
fotorama.setOptions({
|
||||||
|
nav: 'dots'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
fotorama = $fotorama.fotorama().data('fotorama');
|
||||||
|
fotorama.load([
|
||||||
|
{img: 'http://static.shburg.org/art/img/cat1.jpg'},
|
||||||
|
{img: 'http://static.shburg.org/art/img/cat2.jpg'},
|
||||||
|
{img: 'http://static.shburg.org/art/img/cat3.jpg'}
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* Created by tmshv on 15/03/15.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = function (app) {
|
||||||
|
var socket = io();
|
||||||
|
|
||||||
|
app.service("io", function(){
|
||||||
|
return socket;
|
||||||
|
})
|
||||||
|
};
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
module.exports = function(app) {
|
||||||
|
app.directive('breadcrumbs', function () {
|
||||||
|
return {
|
||||||
|
restrict: 'E',
|
||||||
|
templateUrl: '/views/breadcrumbs.html',
|
||||||
|
scope: {
|
||||||
|
crumbs: '='
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
+28
-13
@@ -2,30 +2,45 @@
|
|||||||
* Created by tmshv on 05/11/14.
|
* Created by tmshv on 05/11/14.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var menu = require("../../models/menu.json");
|
module.exports = function (app) {
|
||||||
|
app.factory("menu", function ($route, $rootScope) {
|
||||||
|
function Menu() {
|
||||||
|
this.items = require("../../models/menu.json");
|
||||||
|
this.current = null;
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = function(app) {
|
Menu.prototype.activate = function (path) {
|
||||||
app.service("menu", function ($route) {
|
var f = this.items.filter(function (i) {
|
||||||
menu.isActive = function (path) {
|
return i.url === path;
|
||||||
if ($route.current && $route.current.regexp) {
|
});
|
||||||
return $route.current.regexp.test(path);
|
|
||||||
|
if(f.length) {
|
||||||
|
this.current = f[0];
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var menu = new Menu();
|
||||||
|
$rootScope.$on('$routeChangeSuccess', function (event, current) {
|
||||||
|
var path = current['$$route'].originalPath;
|
||||||
|
menu.activate(path);
|
||||||
|
});
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
});
|
});
|
||||||
|
|
||||||
app.controller("MenuController", function ($scope, menu) {
|
app.controller("MenuController", function ($scope, menu) {
|
||||||
$scope.vkgroup = menu.vkgroup;
|
$scope.menu = menu;
|
||||||
$scope.menu = menu.menu;
|
|
||||||
|
|
||||||
$scope.isCurrent = function(item) {
|
$scope.isActive = function (item) {
|
||||||
return menu.isActive(item.url);
|
if(menu.current) {
|
||||||
|
return item.url == menu.current.url;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.isValid = function(item) {
|
$scope.isValid = function (item) {
|
||||||
return Boolean(item.url);
|
return 'url' in item;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
+100
-14
@@ -28,6 +28,22 @@ function postText(post){
|
|||||||
|
|
||||||
module.exports = function(app) {
|
module.exports = function(app) {
|
||||||
app.directive("timeline", function (team) {
|
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 {
|
return {
|
||||||
templateUrl: "/views/timeline.html",
|
templateUrl: "/views/timeline.html",
|
||||||
scope: {
|
scope: {
|
||||||
@@ -38,23 +54,93 @@ module.exports = function(app) {
|
|||||||
return index % 2 === 1;
|
return index % 2 === 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
controller: function($scope, api){
|
controller: function($scope, $timeout, usSpinnerService, io, api){
|
||||||
api.news.feed()
|
var portion = 0;
|
||||||
.success(function (list) {
|
var count = 10;
|
||||||
$scope.feed = list.map(function (post) {
|
$scope.feed = [];
|
||||||
var author_id = personByInstagram(team.team, post.data.user.username);
|
|
||||||
var name = author_id ? team.short(author_id) : post.data.user.username;
|
|
||||||
|
|
||||||
return {
|
$scope.timelineUpdating = false;
|
||||||
date: post.publishDate,
|
usSpinnerService.stop("timelineMore");
|
||||||
image: post.data.images.standard_resolution.url,
|
//usSpinnerService.spin("timelineMore");
|
||||||
url: post.data.link,
|
|
||||||
username: name,
|
$scope.recordClass = function (i) {
|
||||||
userpic: post.data.user.profile_picture,
|
return i['type'];
|
||||||
text: postText(post)
|
};
|
||||||
};
|
|
||||||
|
$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,4 +1,5 @@
|
|||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
|
var path = require("path");
|
||||||
const MENU = require("./models/menu.json");
|
const MENU = require("./models/menu.json");
|
||||||
|
|
||||||
const team = require("./models/team");
|
const team = require("./models/team");
|
||||||
@@ -9,25 +10,42 @@ const schedule = require("./models/schedule");
|
|||||||
var privateFile = process.env["PRIVATE"] || "private.json";
|
var privateFile = process.env["PRIVATE"] || "private.json";
|
||||||
var privateData = JSON.parse(fs.readFileSync(privateFile, "utf-8"));
|
var privateData = JSON.parse(fs.readFileSync(privateFile, "utf-8"));
|
||||||
|
|
||||||
|
var index_file = process.env["INDEX"] || "templates/main.html";
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
port: process.env["PORT"] || 3000,
|
defaultIndex: path.join(__dirname, index_file),
|
||||||
pub: "./",
|
port: process.env["PORT"] || 3000,
|
||||||
data: {
|
pub: "./",
|
||||||
menu: MENU,
|
data: {
|
||||||
documents: document.docs,
|
menu: MENU,
|
||||||
team: team.team,
|
documents: document.docs,
|
||||||
courses: course.courses
|
team: team.team,
|
||||||
},
|
courses: course.courses
|
||||||
|
},
|
||||||
|
|
||||||
db: {
|
db: {
|
||||||
uri: "mongodb://localhost:27017/hudozka"
|
uri: "mongodb://localhost:27017/hudozka"
|
||||||
},
|
},
|
||||||
|
|
||||||
tags: ["shlb_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)
|
module.exports = Object.keys(privateData)
|
||||||
.reduce(function (config, key) {
|
.reduce(function (config, key) {
|
||||||
config[key] = privateData[key];
|
config[key] = privateData[key];
|
||||||
return config;
|
return config;
|
||||||
}, config);
|
}, config);
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/**
|
|
||||||
* Created by tmshv on 22/11/14.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var config = require("../config");
|
|
||||||
var Promise = require("promise");
|
|
||||||
|
|
||||||
var auth_clients = {};
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
client: function(param){
|
|
||||||
if(param in auth_clients) {
|
|
||||||
return auth_clients[param];
|
|
||||||
}else{
|
|
||||||
return createClient();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
authorize: function(code){
|
|
||||||
return new Promise(function(resolve, reject){
|
|
||||||
var api = createClient();
|
|
||||||
api.authorize_user(code, config.instagram.redirect_uri, function (err, result) {
|
|
||||||
if (err) return reject(err);
|
|
||||||
else {
|
|
||||||
var token = result.access_token;
|
|
||||||
var c = createClient(token);
|
|
||||||
auth_clients[code] = c;
|
|
||||||
resolve(c);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function createClient(token) {
|
|
||||||
var api = require('instagram-node').instagram();
|
|
||||||
if (token) {
|
|
||||||
api.use({access_token: token});
|
|
||||||
} else {
|
|
||||||
api.use({
|
|
||||||
client_id: config.instagram.client_id,
|
|
||||||
client_secret: config.instagram.client_secret
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return api;
|
|
||||||
}
|
|
||||||
@@ -15,8 +15,8 @@ env GZIP=-9 tar -czf $tarpath \
|
|||||||
echo "build file: $tarpath"
|
echo "build file: $tarpath"
|
||||||
|
|
||||||
ssh shburg.et "rm -rf art/*"
|
ssh shburg.et "rm -rf art/*"
|
||||||
scp $tarpath shburg@37.139.6.120:~
|
scp $tarpath shburg@146.185.183.243:~
|
||||||
scp install.sh shburg@37.139.6.120:~
|
scp install.sh shburg@146.185.183.243:~
|
||||||
ssh shburg.et "./install.sh"
|
ssh shburg.et "./install.sh"
|
||||||
rm $tarpath
|
rm $tarpath
|
||||||
echo "art.shlisselburg.org deployment completed successfully"
|
echo "art.shlisselburg.org deployment completed successfully"
|
||||||
+13
@@ -27,6 +27,12 @@ gulp.task("copy", function(){
|
|||||||
|
|
||||||
gulp.src("./3rdparty/*")
|
gulp.src("./3rdparty/*")
|
||||||
.pipe(gulp.dest("./public"));
|
.pipe(gulp.dest("./public"));
|
||||||
|
|
||||||
|
gulp.src("robots.txt")
|
||||||
|
.pipe(gulp.dest("./public"));
|
||||||
|
|
||||||
|
gulp.src("sitemap.xml")
|
||||||
|
.pipe(gulp.dest("./public"));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("compile", function(){
|
gulp.task("compile", function(){
|
||||||
@@ -50,6 +56,13 @@ gulp.task("compile", function(){
|
|||||||
}))
|
}))
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
.pipe(gulp.dest("public"));
|
.pipe(gulp.dest("public"));
|
||||||
|
|
||||||
|
gulp.src("client/instagram.js")
|
||||||
|
.pipe(browserify({
|
||||||
|
transform: [annotate]
|
||||||
|
}))
|
||||||
|
.pipe(uglify())
|
||||||
|
.pipe(gulp.dest("public"));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("imagemin", function(){
|
gulp.task("imagemin", function(){
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
+34
-33
@@ -1,33 +1,34 @@
|
|||||||
{
|
[
|
||||||
"menu": [
|
{
|
||||||
{
|
"text": "Школа",
|
||||||
"text": "Школа",
|
"url": "/",
|
||||||
"url": "/",
|
"color": "blue"
|
||||||
"color": "blue"
|
},
|
||||||
},
|
{
|
||||||
{
|
"text": "События"
|
||||||
"text": "Расписание",
|
},
|
||||||
"url": "/schedule",
|
{
|
||||||
"color": "green"
|
"text": "Расписание",
|
||||||
},
|
"url": "/schedule",
|
||||||
{
|
"color": "green"
|
||||||
"text": "Занятия",
|
},
|
||||||
"color": ""
|
{
|
||||||
},
|
"text": "Занятия",
|
||||||
{
|
"color": ""
|
||||||
"text": "Коллектив",
|
},
|
||||||
"url": "/team",
|
{
|
||||||
"color": "pink"
|
"text": "Коллектив",
|
||||||
},
|
"url": "/team",
|
||||||
{
|
"color": "pink"
|
||||||
"text": "Галерея",
|
},
|
||||||
"color": ""
|
{
|
||||||
},
|
"text": "Галерея",
|
||||||
{
|
"url": "/gallery",
|
||||||
"text": "Документы",
|
"color": "red"
|
||||||
"url": "/docs",
|
},
|
||||||
"color": "yellow"
|
{
|
||||||
}
|
"text": "Документы",
|
||||||
],
|
"url": "/docs",
|
||||||
"vkgroup": "https://vk.com/club10436104"
|
"color": "yellow"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
+14
-1
@@ -5,7 +5,11 @@ server {
|
|||||||
server_name art.shlisselburg.org;
|
server_name art.shlisselburg.org;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:18010;
|
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 Host $host;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
}
|
}
|
||||||
@@ -19,3 +23,12 @@ server {
|
|||||||
server_name art.shburg.org;
|
server_name art.shburg.org;
|
||||||
return 301 $scheme://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:18010;
|
||||||
|
}
|
||||||
+8
-5
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "app",
|
"name": "Hudozka",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.0",
|
"version": "3.1.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "main.js",
|
"main": "bin/www.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha"
|
"test": "mocha"
|
||||||
},
|
},
|
||||||
@@ -14,8 +14,9 @@
|
|||||||
"author": "Roman Timashev",
|
"author": "Roman Timashev",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"co": "^4.4.0",
|
||||||
"instagram-node": "^0.5.1",
|
"instagram-node": "^0.5.1",
|
||||||
"koa": "^0.18.0",
|
"koa-bodyparser": "^1.4.1",
|
||||||
"koa-conditional-get": "^1.0.2",
|
"koa-conditional-get": "^1.0.2",
|
||||||
"koa-etag": "^2.0.0",
|
"koa-etag": "^2.0.0",
|
||||||
"koa-helmet": "0.0.3",
|
"koa-helmet": "0.0.3",
|
||||||
@@ -24,8 +25,10 @@
|
|||||||
"koa-route": "^2.4.0",
|
"koa-route": "^2.4.0",
|
||||||
"koa-static": "^1.4.9",
|
"koa-static": "^1.4.9",
|
||||||
"koa-useragent": "0.0.5",
|
"koa-useragent": "0.0.5",
|
||||||
|
"koa.io": "0.0.3",
|
||||||
"mz": "^1.3.0",
|
"mz": "^1.3.0",
|
||||||
"promised-mongo": "^0.11.1"
|
"promised-mongo": "git+https://git@github.com/tmshv/promised-mongo",
|
||||||
|
"thunkify": "^2.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bower": "^1.3.12",
|
"bower": "^1.3.12",
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
|
Allow: /
|
||||||
|
Host: art.shlisselburg.org
|
||||||
|
Sitemap: http://art.shlisselburg.org/sitemap.xml
|
||||||
|
Crawl-delay: 3
|
||||||
|
Crawl-rate: 1/3
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
/**
|
||||||
|
* Created by tmshv on 22/11/14.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var co = require("co");
|
||||||
|
var route = require("koa-route");
|
||||||
|
var router = require("./");
|
||||||
|
var db = require("../core/db");
|
||||||
|
|
||||||
|
module.exports = function (app) {
|
||||||
|
app.use(route.get("/gallery", router.accepts({
|
||||||
|
"text/html": router.index(),
|
||||||
|
"text/plain": router.index(),
|
||||||
|
"application/json": function *() {
|
||||||
|
var query = {};
|
||||||
|
var albums = yield db.c("albums")
|
||||||
|
.find(query)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
albums = yield albums.map(processAlbum);
|
||||||
|
this.body = albums;
|
||||||
|
}
|
||||||
|
})));
|
||||||
|
|
||||||
|
app.use(route.get("/gallery/:year", router.accepts({
|
||||||
|
"text/html": router.index(),
|
||||||
|
"text/plain": router.index(),
|
||||||
|
"application/json": function *(year) {
|
||||||
|
year = parseInt(year);
|
||||||
|
var start = new Date(year, 0, 1);
|
||||||
|
var end = new Date(year, 11, 31);
|
||||||
|
var query = {
|
||||||
|
date: {$gte: start, $lt: end}
|
||||||
|
};
|
||||||
|
var albums = yield db.c("albums")
|
||||||
|
.find(query)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
albums = yield albums.map(processAlbum);
|
||||||
|
this.body = albums;
|
||||||
|
}
|
||||||
|
})));
|
||||||
|
|
||||||
|
app.use(route.get("/gallery/:year/:course/:album", router.accepts({
|
||||||
|
"text/html": router.index(),
|
||||||
|
"text/plain": router.index(),
|
||||||
|
"application/json": function *(year, course, album) {
|
||||||
|
year = parseInt(year);
|
||||||
|
course = '/' + course;
|
||||||
|
album = '/' + album;
|
||||||
|
var start = new Date(year, 0, 1);
|
||||||
|
var end = new Date(year, 11, 31);
|
||||||
|
var query = {
|
||||||
|
date: {$gte: start, $lt: end},
|
||||||
|
course_uri: course,
|
||||||
|
uri: album
|
||||||
|
};
|
||||||
|
|
||||||
|
var a = yield db.c("albums").findOne(query);
|
||||||
|
a = yield processAlbum(a);
|
||||||
|
this.body = a;
|
||||||
|
}
|
||||||
|
})));
|
||||||
|
};
|
||||||
|
|
||||||
|
function processAlbum(album) {
|
||||||
|
return co(function *() {
|
||||||
|
album.url = '/gallery/{year}{course}{album}'
|
||||||
|
.replace('{year}', album.date.getFullYear())
|
||||||
|
.replace('{course}', album.course_uri)
|
||||||
|
.replace('{album}', album.uri);
|
||||||
|
|
||||||
|
album.content = yield album.content.map(function (product_id) {
|
||||||
|
return co(function *() {
|
||||||
|
var product = yield db.c("products").findOne({_id: product_id});
|
||||||
|
if (product) return product;
|
||||||
|
else return null;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return album;
|
||||||
|
});
|
||||||
|
}
|
||||||
+4
-5
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
var path = require("path");
|
var path = require("path");
|
||||||
var fs = require("mz/fs");
|
var fs = require("mz/fs");
|
||||||
|
var config = require("../config");
|
||||||
|
|
||||||
function accepts(routes, def) {
|
function accepts(routes, def) {
|
||||||
return function *() {
|
return function *() {
|
||||||
@@ -16,18 +17,16 @@ function accepts(routes, def) {
|
|||||||
if (types.length) {
|
if (types.length) {
|
||||||
var type = types[0];
|
var type = types[0];
|
||||||
yield routes[type].apply(this, arguments);
|
yield routes[type].apply(this, arguments);
|
||||||
} else if(def){
|
} else if (def) {
|
||||||
yield def;
|
yield def;
|
||||||
}else{
|
} else {
|
||||||
this.status = 406;
|
this.status = 406;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function index(filename) {
|
function index(filename) {
|
||||||
if (!filename){
|
if (!filename) filename = config['defaultIndex'];
|
||||||
filename = path.join(__dirname, "../templates/index.html");
|
|
||||||
}
|
|
||||||
|
|
||||||
return function *() {
|
return function *() {
|
||||||
this.type = "text/html";
|
this.type = "text/html";
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
/**
|
|
||||||
* Created by tmshv on 22/11/14.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var Router = require("express").Router;
|
|
||||||
var instagram = require("../core/instagram");
|
|
||||||
|
|
||||||
module.exports = function (app) {
|
|
||||||
var router;
|
|
||||||
router = new Router();
|
|
||||||
router.route("/auth/instagram/callback")
|
|
||||||
.get(function (req, res) {
|
|
||||||
var code = req.query.code;
|
|
||||||
instagram.authorize(code)
|
|
||||||
.catch(function(error){
|
|
||||||
console.log(error.body);
|
|
||||||
res.status(500).send('');
|
|
||||||
})
|
|
||||||
.then(function (client) {
|
|
||||||
res.cookie("instagram_code", code);
|
|
||||||
res.redirect("/");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
app.use(router);
|
|
||||||
|
|
||||||
//http://your-callback.com/url/?hub.mode=subscribe&hub.challenge=15f7d1a91c1f40f8a748fd134752feb3&hub.verify_token=myVerifyToken
|
|
||||||
router = new Router();
|
|
||||||
router.route("/instagram/tag/:tag")
|
|
||||||
.get(function (req, res) {
|
|
||||||
var hub_challenge = req.query["hub.challenge"];
|
|
||||||
//var hub_verify_token = req.query["hub.verify_token"];
|
|
||||||
|
|
||||||
console.log("real time get", req.param("tag"), hub_challenge);
|
|
||||||
res.send(hub_challenge);
|
|
||||||
})
|
|
||||||
.post(function (req, res) {
|
|
||||||
console.log("real time tag", req.param("tag"));
|
|
||||||
console.log(req.body);
|
|
||||||
res.send("");
|
|
||||||
});
|
|
||||||
app.use(router);
|
|
||||||
};
|
|
||||||
+84
-4
@@ -3,10 +3,90 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var route = require("koa-route");
|
var route = require("koa-route");
|
||||||
|
var router = require("./");
|
||||||
var db = require("../core/db");
|
var db = require("../core/db");
|
||||||
|
|
||||||
module.exports = function (app) {
|
module.exports = function (app) {
|
||||||
app.use(route.get("/news", function *(){
|
app.use(route.get("/news", router.accepts({
|
||||||
this.body = yield db.c("posts").find().toArray();
|
"text/html": function *() {
|
||||||
}));
|
this.redirect("/");
|
||||||
};
|
},
|
||||||
|
"text/plain": function *() {
|
||||||
|
this.redirect("/");
|
||||||
|
},
|
||||||
|
"application/json": function *() {
|
||||||
|
var count = parseInt(this.query["count"]) || 10;
|
||||||
|
var portion = parseInt(this.query["portion"]) || 0;
|
||||||
|
var skip = portion * count;
|
||||||
|
|
||||||
|
var query = {};
|
||||||
|
if (this.query.type) query.type = this.query.type;
|
||||||
|
|
||||||
|
var pinned = [];
|
||||||
|
if(portion == 0) {
|
||||||
|
var now = new Date();
|
||||||
|
pinned = yield db.c("posts").find({until: {$gte: now}}).toArray()
|
||||||
|
.then(function (items) {
|
||||||
|
return items.sort(sortNewsByDate);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
var pinned_ids = pinned.map(function (p) {
|
||||||
|
return p["_id"]+"";
|
||||||
|
});
|
||||||
|
|
||||||
|
var posts = yield db.c("posts").find(query)
|
||||||
|
.sort({date: -1})
|
||||||
|
.skip(skip)
|
||||||
|
.limit(count)
|
||||||
|
.toArray()
|
||||||
|
.then(function (items) {
|
||||||
|
return items.filter(function (i) {
|
||||||
|
var id = i["_id"]+"";
|
||||||
|
return pinned_ids.indexOf(id) < 0;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.body = pinned.concat(posts);
|
||||||
|
//this.body = pinned_ids
|
||||||
|
}
|
||||||
|
})));
|
||||||
|
|
||||||
|
app.use(route.get("/news/pinned", router.accepts({
|
||||||
|
"text/html": function *() {
|
||||||
|
this.redirect("/");
|
||||||
|
},
|
||||||
|
"text/plain": function *() {
|
||||||
|
this.redirect("/");
|
||||||
|
},
|
||||||
|
"application/json": function *() {
|
||||||
|
var now = new Date();
|
||||||
|
var pinned = yield db.c("posts").find({until: {$gte: now}}).toArray()
|
||||||
|
.then(function (items) {
|
||||||
|
return items.sort(sortNewsByDate);
|
||||||
|
});
|
||||||
|
this.body = pinned;
|
||||||
|
}
|
||||||
|
})));
|
||||||
|
|
||||||
|
app.use(route.get("/news/:uri", router.accepts({
|
||||||
|
"text/html": router.index(),
|
||||||
|
"text/plain": router.index(),
|
||||||
|
"application/json": function *(uri) {
|
||||||
|
var item = yield db.c("posts").findOne({uri: uri});
|
||||||
|
if (item) {
|
||||||
|
this.body = item;
|
||||||
|
} else {
|
||||||
|
this.status = 404;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})));
|
||||||
|
};
|
||||||
|
|
||||||
|
function sortNewsByDate(i1, i2) {
|
||||||
|
var t1 = new Date(i1.date).getTime();
|
||||||
|
var t2 = new Date(i2.date).getTime();
|
||||||
|
|
||||||
|
if (t1 < t2) return 1;
|
||||||
|
if (t1 > t2) return -1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
var path = require("path");
|
var path = require("path");
|
||||||
|
|
||||||
var koa = require("koa");
|
var koa = require("koa.io");
|
||||||
var route = require("koa-route");
|
var route = require("koa-route");
|
||||||
var serve = require("koa-static");
|
var serve = require("koa-static");
|
||||||
var logger = require("koa-logger");
|
var logger = require("koa-logger");
|
||||||
var conditional = require("koa-conditional-get");
|
var conditional = require("koa-conditional-get");
|
||||||
var etag = require("koa-etag");
|
var etag = require("koa-etag");
|
||||||
var prerender = require("koa-prerender");
|
var prerender = require("koa-prerender");
|
||||||
var helmet = require('koa-helmet');
|
var helmet = require("koa-helmet");
|
||||||
|
var bodyParser = require("koa-bodyparser");
|
||||||
|
|
||||||
var config = require("./config");
|
var config = require("./config");
|
||||||
var routes = require("./routes");
|
var routes = require("./routes");
|
||||||
@@ -15,6 +16,7 @@ var routes = require("./routes");
|
|||||||
var app = koa();
|
var app = koa();
|
||||||
app.proxy = true;
|
app.proxy = true;
|
||||||
|
|
||||||
|
app.use(bodyParser());
|
||||||
app.use(logger());
|
app.use(logger());
|
||||||
app.use(conditional());
|
app.use(conditional());
|
||||||
app.use(etag());
|
app.use(etag());
|
||||||
@@ -26,20 +28,20 @@ app.use(serve(path.join(__dirname, "templates")));
|
|||||||
app.use(helmet.defaults());
|
app.use(helmet.defaults());
|
||||||
|
|
||||||
app.use(function *(next) {
|
app.use(function *(next) {
|
||||||
var q = this.query;
|
var q = this.query;
|
||||||
this.query = Object.keys(q)
|
this.query = Object.keys(q)
|
||||||
.reduce(function (q, key) {
|
.reduce(function (q, key) {
|
||||||
var v = q[key];
|
var v = q[key];
|
||||||
if(v === "true"){
|
if (v === "true") {
|
||||||
v = true;
|
v = true;
|
||||||
}else if(v === "false"){
|
} else if (v === "false") {
|
||||||
v = false;
|
v = false;
|
||||||
}
|
}
|
||||||
q[key] = v;
|
q[key] = v;
|
||||||
return q;
|
return q;
|
||||||
}, q);
|
}, q);
|
||||||
|
|
||||||
yield next;
|
yield next;
|
||||||
});
|
});
|
||||||
|
|
||||||
app.use(route.get("/", routes.index()));
|
app.use(route.get("/", routes.index()));
|
||||||
@@ -47,29 +49,18 @@ app.use(route.get("/team", routes.index()));
|
|||||||
app.use(route.get("/docs", routes.index()));
|
app.use(route.get("/docs", routes.index()));
|
||||||
|
|
||||||
app.use(route.get("/document/:doc", routes.index(
|
app.use(route.get("/document/:doc", routes.index(
|
||||||
path.join(__dirname, "templates/document.html")
|
path.join(__dirname, "templates/document.html")
|
||||||
)));
|
)));
|
||||||
|
|
||||||
require("./routes/schedule")(app);
|
require("./routes/schedule")(app);
|
||||||
require("./routes/news")(app);
|
require("./routes/news")(app);
|
||||||
|
require("./routes/gallery")(app);
|
||||||
|
|
||||||
|
require("./instagram/router")(app);
|
||||||
|
require("./instagram/io")(app);
|
||||||
|
|
||||||
require("./routes/404")(app);
|
require("./routes/404")(app);
|
||||||
|
|
||||||
if (process.env["NODE_ENV"] === "development") {
|
|
||||||
app.use(route.get("/debug", function *() {
|
|
||||||
var out = {};
|
|
||||||
out.ip = this.ip;
|
|
||||||
out.host = this.host;
|
|
||||||
out.headers = this.headers;
|
|
||||||
out.protocol = this.protocol;
|
|
||||||
out.query = this.query;
|
|
||||||
out.url = this.url;
|
|
||||||
|
|
||||||
this.type = "application/json";
|
|
||||||
this.body = out;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = function (port) {
|
module.exports = function (port) {
|
||||||
app.listen(port);
|
return app;
|
||||||
};
|
};
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
|
<loc>http://art.shlisselburg.org</loc>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>http://art.shlisselburg.org/schedule</loc>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>http://art.shlisselburg.org/team</loc>
|
||||||
|
<changefreq>montly</changefreq>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>http://art.shlisselburg.org/gallery</loc>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>http://art.shlisselburg.org/docs</loc>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
</url>
|
||||||
|
</urlset>
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html ng-app="hudozhka">
|
|
||||||
<head>
|
|
||||||
<base href="/">
|
|
||||||
<meta name="fragment" content="!">
|
|
||||||
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
|
|
||||||
|
|
||||||
<title ng-bind="title">ДШХ Шлиссельбурга</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="/style.css">
|
|
||||||
<link rel="stylesheet" href="/animate.min.css">
|
|
||||||
<link rel="stylesheet" href="/fonts/stylesheet.css">
|
|
||||||
|
|
||||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
|
||||||
<script src="/bower_components/angular/angular.min.js"></script>
|
|
||||||
<script src="/bower_components/angular-route/angular-route.min.js"></script>
|
|
||||||
<script src="/bower_components/angular-animate/angular-animate.min.js"></script>
|
|
||||||
<script src="/bower_components/angulartics/dist/angulartics.min.js"></script>
|
|
||||||
<script src="/bower_components/angulartics/dist/angulartics-ga.min.js"></script>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="/bower_components/fotorama/fotorama.css">
|
|
||||||
<script src="/bower_components/fotorama/fotorama.js"></script>
|
|
||||||
|
|
||||||
<script src="/data.js"></script>
|
|
||||||
<script src="/app.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
(function (i, s, o, g, r, a, m) {
|
|
||||||
i['GoogleAnalyticsObject'] = r;
|
|
||||||
i[r] = i[r] || function () {
|
|
||||||
(i[r].q = i[r].q || []).push(arguments)
|
|
||||||
}, i[r].l = 1 * new Date();
|
|
||||||
a = s.createElement(o),
|
|
||||||
m = s.getElementsByTagName(o)[0];
|
|
||||||
a.async = 1;
|
|
||||||
a.src = g;
|
|
||||||
m.parentNode.insertBefore(a, m)
|
|
||||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
|
||||||
|
|
||||||
ga('create', 'UA-60209057-1', 'auto');
|
|
||||||
// ga('send', 'pageview');
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="menu" ng-controller="MenuController">
|
|
||||||
<ul>
|
|
||||||
<li ng-repeat="item in menu" class="{{item.color}}" ng-class="{selected:isCurrent(item)}">
|
|
||||||
<span ng-hide="isValid(item)">{{item.text}}</span>
|
|
||||||
<a href="{{item.url}}" ng-show="isValid(item)">{{item.text}}</a>
|
|
||||||
</li>
|
|
||||||
<a href="{{vkgroup}}" class="vk"><img src="/graphics/icon.vk.png"></a>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="page {{pageClass}}" ng-view></div>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<div class="info-block">
|
|
||||||
<div>
|
|
||||||
<h4>Ссылки на образовательные сайты</h4>
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://минобрнауки.рф">минобрнауки.рф</a> — Министерство образования и науки Российской Федерации</li>
|
|
||||||
<li><a href="http://edu.ru">edu.ru</a> — Федеральный сайт «Российское образование»</li>
|
|
||||||
<li><a href="http://window.edu.ru">window.edu.ru</a> — Единое окно доступа к образовательным ресурсам</li>
|
|
||||||
<li><a href="http://school-collection.edu.ru">school-collection.edu.ru</a> — Единая коллекция цифровых образовательных ресурсов</li>
|
|
||||||
<li><a href="http://fcior.edu.ru">fcior.edu.ru</a> — Федеральный центр информационных образовательных ресурсов</li>
|
|
||||||
</ul>
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://dkhshmga.ru">dkhshmga.ru</a> — Художественная школа Мги</li>
|
|
||||||
<li><a href="http://kirovskdmh.ucoz.ru">kirovskdmh.ucoz.ru</a> — Музыкальная школа Кировска</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h4>Документы</h4>
|
|
||||||
<ul>
|
|
||||||
<li><a target="_blank" href="/document/edu-license">Лицензия на осуществление образовательной деятельности</a></li>
|
|
||||||
<li><a target="_blank" href="/document/gov-certificate">Свидетельство о государственной регистрации права</a></li>
|
|
||||||
<li><a target="_blank" href="/document/EGRYL1">Свидетельство о внесении в «ЕГРЮЛ»</a></li>
|
|
||||||
<li><a target="_blank" href="/document/VAT">ИНН</a></li>
|
|
||||||
<li><a target="_blank" href="/document/statue-2013">Устав школы</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="info-block">
|
|
||||||
<p>Художественная школа Шлиссельбурга, 2014 год</p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html ng-app="hudozhka.instagram">
|
||||||
|
<head>
|
||||||
|
<base href="/">
|
||||||
|
<meta name="fragment" content="!">
|
||||||
|
<meta name="viewport" content="width=device-width, maximum-scale=1.0" />
|
||||||
|
|
||||||
|
<title ng-bind="title">ДШХ Шлиссельбурга</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/style.css">
|
||||||
|
|
||||||
|
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||||
|
<script src="/bower_components/angular/angular.min.js"></script>
|
||||||
|
<script src="/instagram.js"></script>
|
||||||
|
</head>
|
||||||
|
<body ng-controller="InstagramController">
|
||||||
|
<div class="controls">
|
||||||
|
<a href="/instagram/auth" ng-show="!user">Instagram</a>
|
||||||
|
<a href="//instagram.com/{{user.username}}" ng-show="user">{{user.full_name}}</a>
|
||||||
|
<button ng-click="invite()">Invite</button>
|
||||||
|
{{inviteCode}}
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html ng-app="hudozhka">
|
||||||
|
<head>
|
||||||
|
<base href="/">
|
||||||
|
<meta name="fragment" content="!">
|
||||||
|
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
|
||||||
|
<meta name="viewport" content="width=device-width, maximum-scale=1.0" />
|
||||||
|
|
||||||
|
<title ng-bind="title">ДШХ Шлиссельбурга</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/style.css">
|
||||||
|
<link rel="stylesheet" href="/animate.min.css">
|
||||||
|
<link rel="stylesheet" href="/fonts/stylesheet.css">
|
||||||
|
|
||||||
|
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||||
|
<script src="/bower_components/angular/angular.min.js"></script>
|
||||||
|
<script src="/bower_components/angular-route/angular-route.min.js"></script>
|
||||||
|
<script src="/bower_components/angular-animate/angular-animate.min.js"></script>
|
||||||
|
<script src="/bower_components/angulartics/dist/angulartics.min.js"></script>
|
||||||
|
<script src="/bower_components/angulartics/dist/angulartics-ga.min.js"></script>
|
||||||
|
<script src="/bower_components/spin.js/spin.js"></script>
|
||||||
|
<script src="/bower_components/angular-spinner/angular-spinner.min.js"></script>
|
||||||
|
<script src="/bower_components/socket.io-client/socket.io.js"></script>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/bower_components/fotorama/fotorama.css">
|
||||||
|
<script src="/bower_components/fotorama/fotorama.js"></script>
|
||||||
|
|
||||||
|
<script src="/data.js"></script>
|
||||||
|
<script src="/app.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<header>
|
||||||
|
<nav role="navigation" ng-controller="MenuController">
|
||||||
|
<ul>
|
||||||
|
<li ng-repeat="item in menu.items" class="{{item.color}}" ng-class="{selected: isActive(item)}">
|
||||||
|
<span ng-hide="isValid(item)">{{item.text}}</span>
|
||||||
|
<a href="{{item.url}}" ng-show="isValid(item)">{{item.text}}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="page {{pageClass}}" ng-view autoscroll="true"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<div class="info-block">
|
||||||
|
<div>
|
||||||
|
<h4>Документы</h4>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="/document/edu-license">Лицензия на осуществление образовательной деятельности</a></li>
|
||||||
|
<li><a target="_blank" href="/document/gov-certificate">Свидетельство о государственной регистрации права</a></li>
|
||||||
|
<li><a target="_blank" href="/document/EGRYL1">Свидетельство о внесении в «ЕГРЮЛ»</a></li>
|
||||||
|
<li><a target="_blank" href="/document/VAT">ИНН</a></li>
|
||||||
|
<li><a target="_blank" href="/document/statue-2013">Устав школы</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Ссылки на образовательные сайты</h4>
|
||||||
|
<ul>
|
||||||
|
<li><a href="http://минобрнауки.рф">минобрнауки.рф</a> — Министерство образования и науки Российской Федерации</li>
|
||||||
|
<li><a href="http://edu.ru">edu.ru</a> — Федеральный сайт «Российское образование»</li>
|
||||||
|
<li><a href="http://window.edu.ru">window.edu.ru</a> — Единое окно доступа к образовательным ресурсам</li>
|
||||||
|
<li><a href="http://school-collection.edu.ru">school-collection.edu.ru</a> — Единая коллекция цифровых образовательных ресурсов</li>
|
||||||
|
<li><a href="http://fcior.edu.ru">fcior.edu.ru</a> — Федеральный центр информационных образовательных ресурсов</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li><a href="http://dkhshmga.ru">dkhshmga.ru</a> — Художественная школа Мги</li>
|
||||||
|
<li><a href="http://kirovskdmh.ucoz.ru">kirovskdmh.ucoz.ru</a> — Музыкальная школа Кировска</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="contacts" ng-controller="ContactsController">
|
||||||
|
<div>
|
||||||
|
<h4>Контактная информация</h4>
|
||||||
|
<p>Адрес: {{address}}</p>
|
||||||
|
<p>Телефон: {{telephone}}</p>
|
||||||
|
<p>Почта: <a href="mailto:{{email}}">{{email}}</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="copyright" ng-controller="CopyrightController">
|
||||||
|
<span>© 2014...{{now}} Художественная школа Шлиссельбурга</span>
|
||||||
|
<span ng-show="developer">Разработка и поддержка сайта — <a href="tmshv.ru?utm_source=artshburg&utm_medium=developer&utm_campaign=tmshv_ru">www.tmshv.ru</a></span>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html ng-app="hudozhka">
|
||||||
|
<head>
|
||||||
|
<base href="/">
|
||||||
|
<meta name="fragment" content="!">
|
||||||
|
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
|
||||||
|
<meta name="viewport" content="width=device-width, maximum-scale=1.0" />
|
||||||
|
|
||||||
|
<title ng-bind="title">ДШХ Шлиссельбурга</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/style.css">
|
||||||
|
<link rel="stylesheet" href="/animate.min.css">
|
||||||
|
<link rel="stylesheet" href="/fonts/stylesheet.css">
|
||||||
|
|
||||||
|
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||||
|
<script src="/bower_components/angular/angular.min.js"></script>
|
||||||
|
<script src="/bower_components/angular-route/angular-route.min.js"></script>
|
||||||
|
<script src="/bower_components/angular-animate/angular-animate.min.js"></script>
|
||||||
|
<script src="/bower_components/angulartics/dist/angulartics.min.js"></script>
|
||||||
|
<script src="/bower_components/angulartics/dist/angulartics-ga.min.js"></script>
|
||||||
|
<script src="/bower_components/spin.js/spin.js"></script>
|
||||||
|
<script src="/bower_components/angular-spinner/angular-spinner.min.js"></script>
|
||||||
|
<script src="/bower_components/socket.io-client/socket.io.js"></script>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/bower_components/fotorama/fotorama.css">
|
||||||
|
<script src="/bower_components/fotorama/fotorama.js"></script>
|
||||||
|
|
||||||
|
<script src="/data.js"></script>
|
||||||
|
<script src="/app.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
(function (i, s, o, g, r, a, m) {
|
||||||
|
i['GoogleAnalyticsObject'] = r;
|
||||||
|
i[r] = i[r] || function () {
|
||||||
|
(i[r].q = i[r].q || []).push(arguments)
|
||||||
|
}, i[r].l = 1 * new Date();
|
||||||
|
a = s.createElement(o),
|
||||||
|
m = s.getElementsByTagName(o)[0];
|
||||||
|
a.async = 1;
|
||||||
|
a.src = g;
|
||||||
|
m.parentNode.insertBefore(a, m)
|
||||||
|
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||||
|
|
||||||
|
ga('create', 'UA-60209057-1', 'auto');
|
||||||
|
// ga('send', 'pageview');
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<header>
|
||||||
|
<nav role="navigation" ng-controller="MenuController">
|
||||||
|
<ul>
|
||||||
|
<li ng-repeat="item in menu.items" class="{{item.color}}" ng-class="{selected: isActive(item)}">
|
||||||
|
<span ng-hide="isValid(item)">{{item.text}}</span>
|
||||||
|
<a href="{{item.url}}" ng-show="isValid(item)">{{item.text}}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="page {{pageClass}}" ng-view autoscroll="true"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<div class="info-block">
|
||||||
|
<div>
|
||||||
|
<h4>Документы</h4>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="/document/edu-license">Лицензия на осуществление образовательной деятельности</a></li>
|
||||||
|
<li><a target="_blank" href="/document/gov-certificate">Свидетельство о государственной регистрации права</a></li>
|
||||||
|
<li><a target="_blank" href="/document/EGRYL1">Свидетельство о внесении в «ЕГРЮЛ»</a></li>
|
||||||
|
<li><a target="_blank" href="/document/VAT">ИНН</a></li>
|
||||||
|
<li><a target="_blank" href="/document/statue-2013">Устав школы</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Ссылки на образовательные сайты</h4>
|
||||||
|
<ul>
|
||||||
|
<li><a href="http://минобрнауки.рф">минобрнауки.рф</a> — Министерство образования и науки Российской Федерации</li>
|
||||||
|
<li><a href="http://edu.ru">edu.ru</a> — Федеральный сайт «Российское образование»</li>
|
||||||
|
<li><a href="http://window.edu.ru">window.edu.ru</a> — Единое окно доступа к образовательным ресурсам</li>
|
||||||
|
<li><a href="http://school-collection.edu.ru">school-collection.edu.ru</a> — Единая коллекция цифровых образовательных ресурсов</li>
|
||||||
|
<li><a href="http://fcior.edu.ru">fcior.edu.ru</a> — Федеральный центр информационных образовательных ресурсов</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li><a href="http://dkhshmga.ru">dkhshmga.ru</a> — Художественная школа Мги</li>
|
||||||
|
<li><a href="http://kirovskdmh.ucoz.ru">kirovskdmh.ucoz.ru</a> — Музыкальная школа Кировска</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="contacts" ng-controller="ContactsController">
|
||||||
|
<div>
|
||||||
|
<h4>Контактная информация</h4>
|
||||||
|
<p>Адрес: {{address}}</p>
|
||||||
|
<p>Телефон: {{telephone}}</p>
|
||||||
|
<p>Почта: <a href="mailto:{{email}}">{{email}}</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="copyright" ng-controller="CopyrightController">
|
||||||
|
<span>© 2014...{{now}} Художественная школа Шлиссельбурга</span>
|
||||||
|
<span ng-show="developer">Разработка и поддержка сайта — <a href="http://tmshv.ru?utm_source=artshburg&utm_medium=developer&utm_campaign=tmshv_ru">www.tmshv.ru</a></span>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<nav class="breadcrumbs">
|
||||||
|
<ul>
|
||||||
|
<li ng-repeat="i in crumbs">
|
||||||
|
<a ng-show="i.url" href="{{i.url}}">{{i.name}}</a>
|
||||||
|
<span ng-hide="i.url">{{i.name}}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
<div class="main" ng-controller="DocumentsController">
|
<div class="documents-block" ng-controller="DocumentsController">
|
||||||
<div class="docblock"><h2>Лицензии, свидетельства и уставы</h2>
|
<div class="doc" ng-repeat="doc in documents">
|
||||||
<div class="doc" ng-repeat="doc in documents">
|
<a href="{{doc.url}}" target="_blank" class="invisible">
|
||||||
<a href="{{doc.url}}" target="_blank">
|
<img ng-src="{{doc.preview}}">
|
||||||
<img ng-src="{{doc.preview}}">
|
</a>
|
||||||
<span>{{doc.title | uppercaseFirst}}</span>
|
|
||||||
</a>
|
<p>
|
||||||
</div>
|
<a href="{{doc.url}}" target="_blank">{{doc.title | uppercaseFirst}}</a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<breadcrumbs crumbs="crumbs"></breadcrumbs>
|
||||||
|
|
||||||
|
<div class="album-block" ng-controller="AlbumPageController">
|
||||||
|
<h3>{{album.title}}</h3>
|
||||||
|
|
||||||
|
<div class="album" ng-show="album">
|
||||||
|
<div class="album-info">
|
||||||
|
<p>Предмет: {{album.course}}</p>
|
||||||
|
<p>Преподаватель: {{album.teacherName}}</p>
|
||||||
|
<p class="description" ng-show="album.description">{{album.description}}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="album-item" ng-repeat="product in album.content">
|
||||||
|
<img ng-src="{{product.content.big.url}}" alt=""/>
|
||||||
|
|
||||||
|
<div class="product-info">
|
||||||
|
<div>
|
||||||
|
<p ng-show="product.title" class="title">{{product.title | removeNewline}}</p>
|
||||||
|
|
||||||
|
<p>{{product.author}}</p>
|
||||||
|
|
||||||
|
<p ng-show="product.authorAge">{{product.authorAge}} лет</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<div class="gallery-block" ng-controller="GalleryPageController">
|
||||||
|
|
||||||
|
<div class="gallery-period" ng-repeat="period in years">
|
||||||
|
<p class="period">{{period.year}}</p>
|
||||||
|
<div><div class="gallery-album" ng-repeat="album in period.albums">
|
||||||
|
<h3><a href="{{album.url}}">{{album.title}}</a></h3>
|
||||||
|
<a href="{{album.url}}" class="invisible">
|
||||||
|
<img ng-src="{{album.preview_url}}" alt=""/>
|
||||||
|
</a>
|
||||||
|
<p>{{album.course}}</p>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--<div class="gallery-album" ng-repeat="album in albums">-->
|
||||||
|
<!--<h3><a href="{{album.url}}">{{album.title}}</a></h3>-->
|
||||||
|
<!--<a href="{{album.url}}" class="invisible">-->
|
||||||
|
<!--<img ng-src="{{album.preview_url}}" alt=""/>-->
|
||||||
|
<!--</a>-->
|
||||||
|
<!--<p>{{album.course}}</p>-->
|
||||||
|
<!--</div>-->
|
||||||
|
</div>
|
||||||
+30
-32
@@ -1,38 +1,36 @@
|
|||||||
<div>
|
<div class="main-block">
|
||||||
<div class="main">
|
<!--<div>-->
|
||||||
<div class="block">
|
<!--<!–<a href="tel://{{telephone}}"></a>–>-->
|
||||||
<span class="telephone">{{telephone}}</span>
|
<!--<span class="telephone">{{contact.telephone}}</span>-->
|
||||||
|
|
||||||
<!--<ul class="submenu">-->
|
<!--<!–<ul class="submenu">–>-->
|
||||||
<!--<li><a href="/team#director">директор</a><p>М. Г. Тимашева</p></li>-->
|
<!--<!–<li><a href="/team#director">директор</a><p>М. Г. Тимашева</p></li>–>-->
|
||||||
<!--<li><a href="/enter">поступление</a></li>-->
|
<!--<!–<li><a href="/enter">поступление</a></li>–>-->
|
||||||
<!--<li><a href="/contacts">контактная информация</a></li>-->
|
<!--<!–<li><a href="/contacts">контактная информация</a></li>–>-->
|
||||||
<!--<li><a href="/awards">награды</a></li>-->
|
<!--<!–<li><a href="/awards">награды</a></li>–>-->
|
||||||
<!--</ul>-->
|
<!--<!–</ul>–>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
|
|
||||||
<h1>«Художественная школа <strong>Шлиссельбурга</strong>»</h1>
|
<h1>Шлиссельбургская детская художественная школа</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tape-block">
|
<div class="tape-block">
|
||||||
<div class="tape-block-content">
|
<div class="tape-block-content">
|
||||||
<div class="tape tape-tl"></div>
|
<div class="tape tape-tl"></div>
|
||||||
<div class="tape tape-tr"></div>
|
<div class="tape tape-tr"></div>
|
||||||
<div class="tape tape-bl"></div>
|
<div class="tape tape-bl"></div>
|
||||||
<div class="tape tape-br"></div>
|
<div class="tape tape-br"></div>
|
||||||
<div class="fotorama"
|
|
||||||
data-transition="crossfade"
|
<div class="fotorama"
|
||||||
data-autoplay="6000"
|
data-transition="crossfade"
|
||||||
data-arrows="false"
|
data-autoplay="6000"
|
||||||
data-width="100%"
|
data-nav="false"
|
||||||
data-fit="cover"
|
data-arrows="false"
|
||||||
data-loop="true">
|
data-width="100%"
|
||||||
<img src="http://static.shlisselburg.org/art/graphics/sample2.jpg" alt="">
|
data-fit="cover"
|
||||||
<img src="http://static.shlisselburg.org/art/graphics/sample4.jpg" alt="">
|
data-loop="true">
|
||||||
<img src="http://static.shlisselburg.org/art/graphics/sample5.jpg" alt="">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<timeline></timeline>
|
<timeline></timeline>
|
||||||
</div>
|
|
||||||
@@ -1,49 +1,61 @@
|
|||||||
<div class="schedule" ng-controller="ScheduleController">
|
<div class="schedule" ng-controller="ScheduleController">
|
||||||
<p> Расписание {{sem}} семестра {{year}} года</p>
|
<p> Расписание {{sem}} семестра {{year}} года</p>
|
||||||
<table>
|
<div class="schedule-block">
|
||||||
<thead class="">
|
<table>
|
||||||
<tr>
|
<thead class="">
|
||||||
<th class="group">Гр.</th>
|
<tr>
|
||||||
<th ng-class="{current: isToday(0)}">
|
<th class="group">Гр.</th>
|
||||||
<p class="day">Понедельник</p>
|
<th ng-class="{current: isToday(0)}">
|
||||||
<p class="date">{{weekDay(0)}}</p>
|
<p class="day">Понедельник</p>
|
||||||
</th>
|
|
||||||
<th ng-class="{current: isToday(1)}">
|
|
||||||
<p class="day">Вторник</p>
|
|
||||||
<p class="date">{{weekDay(1)}}</p>
|
|
||||||
</th>
|
|
||||||
<th ng-class="{current: isToday(2)}">
|
|
||||||
<p class="day">Среда</p>
|
|
||||||
<p class="date">{{weekDay(2)}}</p>
|
|
||||||
</th>
|
|
||||||
<th ng-class="{current: isToday(3)}">
|
|
||||||
<p class="day">Четверг</p>
|
|
||||||
<p class="date">{{weekDay(3)}}</p>
|
|
||||||
</th>
|
|
||||||
<th ng-class="{current: isToday(4)}">
|
|
||||||
<p class="day">Пятница</p>
|
|
||||||
<p class="date">{{weekDay(4)}}</p>
|
|
||||||
</th>
|
|
||||||
<th ng-class="{current: isToday(5)}">
|
|
||||||
<p class="day">Суббота</p>
|
|
||||||
<p class="date">{{weekDay(5)}}</p>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="">
|
|
||||||
<tr ng-repeat="group in schedule">
|
|
||||||
<td class="group">
|
|
||||||
<p class="name">{{group.name}}</p>
|
|
||||||
<p class="time">{{group.time}}</p>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td ng-repeat="day in group.days track by $index" ng-class="{current: isToday($index)}">
|
<p class="date">{{weekDay(0)}}</p>
|
||||||
<p class="lesson"><a href="">{{day.lesson}}</a></p>
|
</th>
|
||||||
<p class="teacher"><a href="">{{day.teacher}}</a></p>
|
<th ng-class="{current: isToday(1)}">
|
||||||
<p class="time">{{day.time[0]}}</p>
|
<p class="day">Вторник</p>
|
||||||
<p class="time">{{day.time[1]}}</p>
|
|
||||||
</td>
|
<p class="date">{{weekDay(1)}}</p>
|
||||||
</tr>
|
</th>
|
||||||
</tbody>
|
<th ng-class="{current: isToday(2)}">
|
||||||
</table>
|
<p class="day">Среда</p>
|
||||||
|
|
||||||
|
<p class="date">{{weekDay(2)}}</p>
|
||||||
|
</th>
|
||||||
|
<th ng-class="{current: isToday(3)}">
|
||||||
|
<p class="day">Четверг</p>
|
||||||
|
|
||||||
|
<p class="date">{{weekDay(3)}}</p>
|
||||||
|
</th>
|
||||||
|
<th ng-class="{current: isToday(4)}">
|
||||||
|
<p class="day">Пятница</p>
|
||||||
|
|
||||||
|
<p class="date">{{weekDay(4)}}</p>
|
||||||
|
</th>
|
||||||
|
<th ng-class="{current: isToday(5)}">
|
||||||
|
<p class="day">Суббота</p>
|
||||||
|
|
||||||
|
<p class="date">{{weekDay(5)}}</p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="">
|
||||||
|
<tr ng-repeat="group in schedule">
|
||||||
|
<td class="group">
|
||||||
|
<p class="name">{{group.name}}</p>
|
||||||
|
|
||||||
|
<p class="time">{{group.time}}</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td ng-repeat="day in group.days track by $index" ng-class="{current: isToday($index)}">
|
||||||
|
<p class="lesson"><a href="">{{day.lesson}}</a></p>
|
||||||
|
|
||||||
|
<p class="teacher"><a href="">{{day.teacher}}</a></p>
|
||||||
|
|
||||||
|
<p class="time">{{day.time[0]}}</p>
|
||||||
|
|
||||||
|
<p class="time">{{day.time[1]}}</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<div class="instagram">
|
||||||
|
<div class="head">
|
||||||
|
<p class="date">{{post.date | date : "dd.MM.yyyy"}}</p>
|
||||||
|
<div class="user">
|
||||||
|
<img ng-src="{{post.userpic}}" alt=""/>
|
||||||
|
<span>{{post.username}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="body">
|
||||||
|
<a href="{{post.url}}" target="_blank" class="invisible">
|
||||||
|
<img ng-src="{{post.image}}" alt="">
|
||||||
|
</a>
|
||||||
|
<p>{{post.text | removeHashtags | strip}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<div class="head">
|
||||||
|
<div>
|
||||||
|
<p class="date"><a href="#{{post.uri}}">{{post.date | date : "dd.MM.yyyy"}}</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="body">
|
||||||
|
<div class="message" ng-bind-html="message"></div>
|
||||||
|
</div>
|
||||||
@@ -1,22 +1,16 @@
|
|||||||
<div class="timeline">
|
<div class="timeline">
|
||||||
<div class="post"
|
<timeline-record class="timeline-record {{recordClass(post)}}"
|
||||||
ng-repeat="post in feed"
|
content="post"
|
||||||
ng-class="{left: isEven($index), right: !isEven($index)}">
|
ng-repeat="post in feed track by $index"
|
||||||
|
ng-class="{left: isEven($index), right: !isEven($index)}">
|
||||||
|
|
||||||
<div class="head">
|
</timeline-record>
|
||||||
<div class="user">
|
<div class="timeline-footer" ng-show="showFooter()">
|
||||||
<img ng-src="{{post.userpic}}" alt=""/>
|
<button class="more"
|
||||||
<span>{{post.username}}</span>
|
ng-click="loadNext()"
|
||||||
</div>
|
ng-disabled="timelineUpdating">
|
||||||
<p class="date">{{post.date | date : "dd.MM.yyyy"}}</p>
|
<span us-spinner="{radius:5, width:2, length: 4}" spinner-key="timelineMore"></span>
|
||||||
</div>
|
<span ng-hide="timelineUpdating">Ещё</span>
|
||||||
|
</button>
|
||||||
<div class="body">
|
|
||||||
<!--<h2>Рисунок</h2>-->
|
|
||||||
<p>{{post.text}}</p>
|
|
||||||
<a href="{{post.url}}" target="_blank">
|
|
||||||
<img ng-src="{{post.image}}" alt="">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* Created by tmshv on 13/03/15.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var co = require("co");
|
||||||
|
var should = require("should");
|
||||||
|
var instagram = require("../instagram/instagram");
|
||||||
|
var db = require("../core/db");
|
||||||
|
var config = require("../config");
|
||||||
|
|
||||||
|
describe("Instagram", function () {
|
||||||
|
describe("getUser()", function () {
|
||||||
|
it("should return default user if exists", function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* Created by tmshv on 08/03/15.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var should = require("should");
|
||||||
|
|
||||||
|
describe("utils", function () {
|
||||||
|
describe("net.js", function () {
|
||||||
|
describe("query", function () {
|
||||||
|
var query = require("../utils/net").query;
|
||||||
|
var sample = [["count", 10], ["portion", 5], ["hello", "lol"]];
|
||||||
|
|
||||||
|
it("should combine query params", function () {
|
||||||
|
var params = query(sample);
|
||||||
|
params.should.be.equal("count=10&portion=5&hello=lol");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should return string", function () {
|
||||||
|
var params = query(sample);
|
||||||
|
|
||||||
|
params.should.be.type("string");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* Created by tmshv on 08/03/15.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
query: function(list){
|
||||||
|
var params = list.reduce(function (query, param) {
|
||||||
|
var q = param[0] + "=" + param[1];
|
||||||
|
query.push(q);
|
||||||
|
return query;
|
||||||
|
}, [])
|
||||||
|
.join("&");
|
||||||
|
return params
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in new issue
Block a user