diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..365e069
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,5 @@
+./node_modules
+./public
+./src
+./.git
+./.gitignore
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 6abffc8..2a8ef75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
-dev/_blocks/
node_modules/
-*.sublime-*
-dev/html/test
-public/test
\ No newline at end of file
+public/*
+!public/.gitkeep
+*.sublime-*
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 4d3c44c..ae3516c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,22 +1,16 @@
-FROM node:4.2.3
-
-ENV DISQUS=test \
- APIPATH=/api
-
-ADD . /srv/rtnews-ui
-
+FROM node:10-alpine AS rtnews_deps
+COPY ./package.json ./package-lock.json /app/
RUN \
- cd /srv/rtnews-ui && \
- npm i -g gulpjs/gulp#4.0 && \
- npm i && \
- npm run build && \
- mkdir -p /var/www && \
- mv ./public /var/www/webapp && \
- mv /srv/rtnews-ui/dockerinit.sh /init.sh && \
- chmod +x /init.sh
+ cd /app && \
+ npm ci --loglevel error
+
-VOLUME ["/var/www/webapp"]
+FROM node:10-alpine as rtnews_base
+RUN apk add --update --no-cache make
-ENTRYPOINT ["/init.sh"]
-CMD ["sleep", "100"]
+FROM rtnews_base
+COPY --from=rtnews_deps /app /app
+EXPOSE 9000
+WORKDIR /app
+ENTRYPOINT ["/bin/ash"]
\ No newline at end of file
diff --git a/README.md b/README.md
index 71c6e12..8d5c4c5 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,29 @@
Полное описание задачи можно [подсмотреть здесь](http://p.umputun.com/2015/11/26/vsiem-mirom-dlia-obshchiei-polzy/)
+----
+### Разработка
+Таски описаны в `makefile`
+
+#### Build
+```
+# modes are: production|development
+npm install && ./node_modules/.bin/webpack --mode "development"
+```
+
+После билда, все нужные файлы будут в папке `public`. Для работы нужен реврайт несуществующих урлов на index.html.
+
+#### Dev Server
+```
+./node_modules/.bin/webpack-dev-server --mode "development"
+```
+
+#### С помощью Docker
+В makefile продублированы команды для docker
+
+#### ENVIRONMENT
+**RTHOST**: Ссылка на api. По умолчанию используется `https://news.radio-t.com/api/v1` для продакшна и `http://jess.umputun.com:8780/api/v1` для дева
+
----
### Feeds API
@@ -17,7 +40,7 @@
"id": "566283bd4e1ad997adf3f532",
"updated": "2015-12-05T06:27:09.449Z"
}
-```
+```
----
### News API
@@ -37,7 +60,7 @@
* `GET /api/v1/news/archive` - get list of archives articles
* move
- * `PUT /api/v1/news/move/:pos/:offset` - move from pos with +/- offset
+ * `PUT /api/v1/news/move/:pos/:offset` - move from pos with +/- offset
* `PUT /api/v1/news/moveid/:id/:offset` - move from id with +/- offset
* `GET /api/v1/news/positions` - get positions as {id:pos, id1:pos1 ...}
@@ -54,14 +77,14 @@
* marking
* `PUT /api/v1/news/nogeek/:id` - mark as geek-article by id
* `PUT /api/v1/news/geek/:id` - mark as regular (non-geek) by id
-
+
* miscs
* `GET /api/v1/news/rss/:count` - get rss feed with last (by time) :count
* `PUT /api/v1/news/reload` - force reprocessing of all RSS feeds
* `PUT /api/v1/show/start` - save start time (used by markdown request)
* `GET /api/v1/show/start` - return saved start time
-## _article (news) records_
+## _article (news) records_
```
{
diff --git a/dev/blocks/add/add.js b/dev/blocks/add/add.js
deleted file mode 100644
index fcf563f..0000000
--- a/dev/blocks/add/add.js
+++ /dev/null
@@ -1,166 +0,0 @@
-$(function() {
- if ($('#add-news').length) {
- $('#add-news').submit(function(event) {
- var $form = $(this);
-
- $.ajax({
- url: APIPath + '/news',
- type: 'POST',
- async: true,
- data: '{ "link": "' + decodeURIComponent($('#add__url').val()) + '" }',
- headers: authHeaders
- })
- .done(function() {
- $form.trigger('reset');
- notify('Новость добавлена', null, 1500);
- })
- .fail(function(response) {
- notify('Ошибка при добавлении новости.');
- console.log("error while adding news");
- console.log(response);
- });
-
- return false;
- });
-
- var url = getParameterByName('url');
-
- if (url.length) {
- $('#add__url').val(decodeURIComponent(url));
- $('#add-news').submit();
- }
- }
-
- if ($('#add__bookmark').length) {
- $('#add__bookmark')
- .attr('href', function() {
- var hrefFunc = function() {
- var w = window,
- d = document,
- i = d.createElement('div'),
- s = i.style;
-
- s.transition = 'all 200ms';
- s.position = 'fixed';
- s.left = '0';
- s.right = '0';
- s.top = '0';
- s.zIndex = 16777271;
- s.height = '0';
- s.width = '100%';
- s.overflow = 'hidden';
- s.background = '#fff';
- s.borderBottom = '1px solid #bdbdbd';
- s.boxShadow = '0 0 30px #828282';
- s.color = '#232323';
- s.fontSize = '30px';
- s.fontWeight = '700';
- s.fontFamily = '"PT Serif", Georgia, serif';
- s.lineHeight = '67px';
- s.textAlign = 'center';
-
- i.textContent = 'Сохраняю..';
-
- d.body.appendChild(i);
-
- w.setTimeout(function() {
- s.height = '70px';
- }, 100);
-
- w.setTimeout(function() {
- var rq = new XMLHttpRequest();
-
- rq.open('POST', '#LOCATION#' + '/news', false, '#LOGIN#', '#PASSWORD#');
- rq.setRequestHeader('Authorization', 'Basic ' + btoa('#LOGIN#' + ':' + '#PASSWORD#'));
-
- try {
- rq.send('{ "link": "' + decodeURIComponent(location.href) + '" }');
-
- if (rq.readyState === 4) {
- if (rq.status !== 200) {
- e('Не смог сохранить');
- r();
- } else {
- s.color = '#090';
- i.textContent = 'Сохранил';
- r();
- }
- } else {
- e('Не смог достучаться до сервера');
- r();
- }
- } catch (err) {
- e('Не смог сохранить');
- r();
- }
- }, 500);
-
- function e(t) {
- s.color = '#d00';
- i.textContent = t;
- }
-
- function r() {
- w.setTimeout(function() {
- s.height = '0';
-
- w.setTimeout(function() {
- i.parentNode.removeChild(i);
- }, 300);
- }, 500);
- }
- }
-
- var href = hrefFunc.toString()
- .replace(/#LOCATION#/g, APIPath.indexOf('http') == 0 ? APIPath : location.protocol + '//' + location.host + APIPath)
- .replace(/#LOGIN#/g, login)
- .replace(/#PASSWORD#/g, password);
-
- return "javascript:(" + encodeURIComponent(href) + ")();";
- });
- }
-
- if ($('#add__switch-form').length) {
- $('#add__switch-form').click(function(event) {
- event.preventDefault();
-
- $('.add.form').slideToggle();
-
- var text = $(this).text();
-
- $(this).text(text == 'вручную'
- ? 'по ссылке'
- : 'вручную');
- });
- }
-
- if ($('#add-news-manual').length) {
- $('#add-news-manual').submit(function(event) {
- var $form = $(this),
- data = {
- link: decodeURIComponent($form.find('.form__input_link').val()),
- title: $form.find('.form__input_title').val(),
- snippet: $form.find('.form__input_snippet').val()
- };
-
- $.ajax({
- url: APIPath + '/news/manual',
- type: 'POST',
- async: true,
- data: JSON.stringify(data),
- headers: authHeaders
- })
- .done(function() {
- $form.trigger('reset');
- notify('Новость добавлена', null, 1500);
- })
- .fail(function(response) {
- notify('Ошибка при добавлении новости.');
- console.log("error while adding news");
- console.log(response);
- });
-
- return false;
- });
- }
-});
diff --git a/dev/blocks/add/add.scss b/dev/blocks/add/add.scss
deleted file mode 100644
index 52a6f98..0000000
--- a/dev/blocks/add/add.scss
+++ /dev/null
@@ -1,37 +0,0 @@
-$b: '.add';
-
-#{$b} {
- margin-top: 90px;
- padding: 20px 0 50px;
-
- text-align: center;
-
- &_by-link {
- margin-top: 60px;
- }
-
- &__bookmark {
- position: relative;
- bottom: -50px;
- left: 0;
- right: 0;
-
- font-size: 14px;
-
- text-align: center;
- }
-
- &__tip {
- margin-top: 20px;
- margin-bottom: 5px;
-
- color: #999;
- font-size: 12px;
- }
-
- &__switcher {
- font-size: 13px;
-
- text-align: center;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/common/__clearfix/common__clearfix.scss b/dev/blocks/common/__clearfix/common__clearfix.scss
deleted file mode 100644
index f5e722b..0000000
--- a/dev/blocks/common/__clearfix/common__clearfix.scss
+++ /dev/null
@@ -1,9 +0,0 @@
-$b: '.common__clearfix';
-
-#{$b} {
- &:after {
- content: '';
- display: table;
- clear: both;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/common/__justify/common__justify.scss b/dev/blocks/common/__justify/common__justify.scss
deleted file mode 100644
index 00c4ae4..0000000
--- a/dev/blocks/common/__justify/common__justify.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-.common__justify {
- text-align: justify;
- -ms-text-justify: distribute; /* fucking ie fix */
-
- &::after {
- content: '';
- display: inline-block;
- width: 100%;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/common/__list-nostyle/common__list-nostyle.scss b/dev/blocks/common/__list-nostyle/common__list-nostyle.scss
deleted file mode 100644
index 8492711..0000000
--- a/dev/blocks/common/__list-nostyle/common__list-nostyle.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-.common__list-nostyle {
- padding: 0;
- margin: 0;
-
- list-style: none;
-}
\ No newline at end of file
diff --git a/dev/blocks/common/__middler-parent/common__middler-parent.scss b/dev/blocks/common/__middler-parent/common__middler-parent.scss
deleted file mode 100644
index ad08435..0000000
--- a/dev/blocks/common/__middler-parent/common__middler-parent.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-$b: '.common__middler-parent';
-
-#{$b} {
- &::after {
- content: '';
-
- display: inline-block;
- height: 100%;
- vertical-align: middle;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/common/__table-nostyle/common__table-nostyle.scss b/dev/blocks/common/__table-nostyle/common__table-nostyle.scss
deleted file mode 100644
index 1d07f06..0000000
--- a/dev/blocks/common/__table-nostyle/common__table-nostyle.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-.common__table-nostyle {
- border: none;
- border-spacing: 0;
-
- td {
- border: none;
- border-spacing: 0;
-
- vertical-align: top;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/content/content.scss b/dev/blocks/content/content.scss
deleted file mode 100644
index 07d0502..0000000
--- a/dev/blocks/content/content.scss
+++ /dev/null
@@ -1,23 +0,0 @@
-@import '../link/link';
-
-$b: '.content';
-
-#{$b} {
- p {
- &:first-of-type {
- margin-top: 0;
- }
-
- &:last-of-type {
- margin-bottom: 0;
- }
- }
-
- a {
- @extend .link;
- }
-
- img {
- max-width: 100%;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/feeds/feeds.js b/dev/blocks/feeds/feeds.js
deleted file mode 100644
index fbfcb98..0000000
--- a/dev/blocks/feeds/feeds.js
+++ /dev/null
@@ -1,94 +0,0 @@
-$(function() {
- if ($('#feeds__list').length) {
- loadFeeds();
-
- $('#feeds__add-form').submit(function(event) {
- var $form = $(this);
-
- $.ajax({
- url: APIPath + '/feeds',
- type: 'POST',
- async: true,
- data: '{ "feedlink": "' + $('#feeds__add').val() + '" }',
- headers: authHeaders
- })
- .done(function() {
- loadFeeds();
- $form.trigger('reset');
- })
- .fail(function(response) {
- console.log("error while adding feed");
- console.log(response);
- });
-
- return false;
- });
- }
-});
-
-function loadFeeds() {
- $('#feeds__list').html('');
-
- $.ajax({
- url: APIPath + '/feeds',
- type: 'GET',
- dataType: 'json'
- })
- .done(function(json) {
- var $row,
- $delCell,
- date = new Date(),
- updated;
-
- for (var i = 0; i < json.length; i++) {
- date.setTime(Date.parse(json[i].updated));
- updated = formatDate(date);
-
- $row = $('
').data('id', json[i].id);
-
- $(' | ', {
- class: 'feeds__urls',
- text: json[i].feedlink
- })
- .attr('title', json[i].feedlink)
- .appendTo($row);
-
- $(' | ', {
- class: 'feeds__update',
- html: updated
- }).appendTo($row);
-
- $delCell = $('Удалить | ');
- $delCell.appendTo($row);
-
- $delCell.find('.link').click(function(event) {
- event.preventDefault();
-
- delFeed($(this).closest('tr'));
- });
-
- $('#feeds__list').append($row);
- };
- })
- .fail(function(response) {
- console.log("error while loading feeds");
- console.log(response);
- });
-}
-
-function delFeed($row) {
- var id = $row.data('id');
-
- $.ajax({
- url: APIPath + '/feeds/' + id,
- type: 'DELETE',
- headers: authHeaders
- })
- .done(function() {
- $row.remove()
- })
- .fail(function(response) {
- console.log("error while deleting the feed");
- console.log(response);
- });
-}
\ No newline at end of file
diff --git a/dev/blocks/feeds/feeds.scss b/dev/blocks/feeds/feeds.scss
deleted file mode 100644
index bcb875d..0000000
--- a/dev/blocks/feeds/feeds.scss
+++ /dev/null
@@ -1,91 +0,0 @@
-@import '../common/__table-nostyle/common__table-nostyle';
-
-$b: '.feeds';
-
-#{$b} {
- padding-top: 20px;
-
- &__table {
- @extend .common__table-nostyle;
-
- width: 100%;
- max-width: 770px;
- margin: 0 auto;
-
- table-layout: fixed;
- border-spacing: 10px 4px;
-
- @media (max-width: 850px) {
- max-width: none;
-
- table-layout: auto;
- }
-
- th {
- text-align: left;
- }
- }
-
- &__urls {
- width: 500px;
- max-width: 500px;
- overflow: hidden;
-
- white-space: nowrap;
-
- text-overflow: ellipsis;
-
- @media (max-width: 850px) {
- width: auto;
- max-width: 300px;
- }
-
- @media (max-width: 600px) {
- max-width: 150px;
- overflow: visible;
-
- white-space: normal;
- word-wrap: break-word;
- }
-
- @media (max-width: 350px) {
- max-width: 100px;
- overflow: visible;
-
- white-space: normal;
- word-wrap: break-word;
- }
- }
-
- &__update {
- width: 170px;
- max-width: 170px;
-
- white-space: nowrap;
-
- @media (max-width: 850px) {
- width: auto;
- }
-
- @media (max-width: 600px) {
- max-width: 70px;
-
- white-space: normal;
- }
- }
-
- &__del {
- width: 100px;
- max-width: 100px;
-
- @media (max-width: 850px) {
- width: auto;
- }
- }
-
- &__add-form {
- margin-top: 10px;
-
- font-size: 0;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/filter/filter.js b/dev/blocks/filter/filter.js
deleted file mode 100644
index b4579e2..0000000
--- a/dev/blocks/filter/filter.js
+++ /dev/null
@@ -1,16 +0,0 @@
-$(function() {
- $('.filter__item_parent').click(function(event) {
- var $item = $(this),
- $dropdown = $('.filter__dropdown', $item);
-
- event.preventDefault();
-
- $dropdown.toggleClass('filter__dropdown_visible');
-
- $('body').click(function(e) {
- if (!$item.is(e.target) && $item.has(e.target).length === 0) {
- $dropdown.removeClass('filter__dropdown_visible');
- }
- });
- });
-});
\ No newline at end of file
diff --git a/dev/blocks/filter/filter.scss b/dev/blocks/filter/filter.scss
deleted file mode 100644
index da4449d..0000000
--- a/dev/blocks/filter/filter.scss
+++ /dev/null
@@ -1,97 +0,0 @@
-@import '../common/__list-nostyle/common__list-nostyle';
-
-$b: '.filter';
-
-#{$b} {
- @extend .common__list-nostyle;
-
- &__item {
- position: relative;
- display: inline-block;
-
- padding: 2px 4px 3px 4px;
- margin-left: -2px;
- margin-right: 15px;
-
- vertical-align: top;
-
- font-size: 12px;
-
- &_active {
- background: #3F8BBD;
- border-radius: 4px;
-
- &:hover {
- background: darken(#3F8BBD, 10);
- }
-
- #{$b}__current,
- #{$b}__link {
- &, &:hover {
- color: #fff;
- font-weight: 400;
-
- border-color: transparent;
- }
- }
- }
- }
-
- &__link {
- border-color: rgba(162, 162, 162, 0.2);
- border-bottom-style: dashed;
-
- color: #919191;
- font-weight: 700;
-
- &:hover {
- border-color: rgba(162, 162, 162, 0.7);
-
- color: #333;
- }
- }
-
- &__dropdown {
- @extend .common__list-nostyle;
-
- display: none;
-
- position: absolute;
- z-index: 1;
-
- margin-left: -6px;
- margin-top: 3px;
-
- border-radius: 4px;
- border: 1px solid #e0e0e0;
- background: #fff;
- box-shadow: 1px 4px 4px rgba(100, 100, 100, .3);
-
- &_visible {
- display: block;
- }
- }
-
- &__dropdown-item {
- margin: 0 4px;
-
- border-bottom: 1px solid rgba(200, 200, 200, .4);
-
- &:last-child {
- border-bottom: none;
- }
- }
-
- &__dropdown-link {
- display: block;
-
- padding: 4px 1px 5px;
- font-weight: 400;
- color: #777;
- border-bottom: none;
-
- &:hover {
- color: #333;
- }
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/footer/footer.html b/dev/blocks/footer/footer.html
deleted file mode 100644
index 5936c4a..0000000
--- a/dev/blocks/footer/footer.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dev/blocks/footer/footer.scss b/dev/blocks/footer/footer.scss
deleted file mode 100644
index de7e47d..0000000
--- a/dev/blocks/footer/footer.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-$b: '.footer';
-
-#{$b} {
- padding-top: 20px;
- padding-bottom: 20px;
-
- border-top: 1px solid rgba(0, 0, 0, .1);
-}
\ No newline at end of file
diff --git a/dev/blocks/form/form.scss b/dev/blocks/form/form.scss
deleted file mode 100644
index 32433a4..0000000
--- a/dev/blocks/form/form.scss
+++ /dev/null
@@ -1,57 +0,0 @@
-$b: '.form';
-
-#{$b} {
- &__input {
- display: inline-block;
- box-sizing: border-box;
- width: 300px;
- max-width: 100%;
- height: 26px;
- padding: 3px 5px;
- margin-right: 7px;
- margin-bottom: 7px;
-
- outline: none;
- border: 1px solid #ccc;
-
- font-size: 13px;
-
- &:focus {
- border-color: #999;
- }
-
- @media (max-width: 600px) {
- width: 100%;
- }
-
- &_big {
- height: 80px;
- }
- }
-
- &__button {
- width: 80px;
- height: 26px;
-
- background: none;
- border: 1px solid #ccc;
- outline: none;
-
- font-size: 13px;
-
- cursor: pointer;
-
- transition: background 200ms;
-
- &:focus,
- &:hover {
- border-color: #999;
- background: #ccc;
- }
-
- &:active {
- border-color: #777;
- background: #aaa;
- }
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/header/header.html b/dev/blocks/header/header.html
deleted file mode 100644
index 7e9f09b..0000000
--- a/dev/blocks/header/header.html
+++ /dev/null
@@ -1,18 +0,0 @@
-@@include('../../includes/svg.html')
-
-
\ No newline at end of file
diff --git a/dev/blocks/header/header.js b/dev/blocks/header/header.js
deleted file mode 100644
index 9be0024..0000000
--- a/dev/blocks/header/header.js
+++ /dev/null
@@ -1,31 +0,0 @@
-$(function() {
- var $currentPage = $('.menu__item a[href="' + location.pathname + '"]');
-
- $currentPage.parent().html($currentPage.text());
-
- if (isAdmin) {
- $('.menu__item_admin').css('display', 'inline-block');
- $('.menu__item_user').hide();
- }
-
- $('#start')
- .click(function(event) {
- event.preventDefault();
-
- if (confirm('Таки поехали?')) {
- $.ajax({
- url: APIPath + '/show/start',
- type: 'PUT',
- headers: authHeaders
- })
- .done(function(json) {
- $('html, body').scrollTop(0);
- notify('Поехали!', null, 1500);
- })
- .fail(function(response) {
- console.log("error while starting show");
- console.log(response);
- });
- }
- });
-});
\ No newline at end of file
diff --git a/dev/blocks/header/header.scss b/dev/blocks/header/header.scss
deleted file mode 100644
index dcf16be..0000000
--- a/dev/blocks/header/header.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-$b: '.header';
-
-#{$b} {
- padding-top: 20px;
- padding-bottom: 20px;
-
- border-bottom: 1px solid rgba(0, 0, 0, .1);
-
- &__title {
- font-size: 1.75rem;
- font-weight: 700;
- font-family: $serif;
- }
-
- &__menu {
- margin-top: 10px;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/icon/icon.scss b/dev/blocks/icon/icon.scss
deleted file mode 100644
index 2a28987..0000000
--- a/dev/blocks/icon/icon.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-$b: '.icon';
-
-#{$b} {
- display: inline-block;
- width: 15px;
- height: 15px;
- vertical-align: -3px;
-}
\ No newline at end of file
diff --git a/dev/blocks/link/link.scss b/dev/blocks/link/link.scss
deleted file mode 100644
index 373d19f..0000000
--- a/dev/blocks/link/link.scss
+++ /dev/null
@@ -1,25 +0,0 @@
-$b: '.link';
-
-#{$b} {
- border-bottom: 1px solid rgba(0, 96, 160, .2);
-
- color: #0060a0;
- text-decoration: none;
-
- transition: all .5s;
-
- outline: none;
-
- &:hover {
- border-color: rgba(224, 80, 32, .9);
-
- color: #e05020;
- fill: #e05020;
-
- transition: all 0ms;
- }
-
- &_dotted {
- border-bottom-style: dotted;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/login/login.js b/dev/blocks/login/login.js
deleted file mode 100644
index 526672d..0000000
--- a/dev/blocks/login/login.js
+++ /dev/null
@@ -1,42 +0,0 @@
-$(function() {
- var $login = $('#login');
-
- if ($login.length) {
- $login.submit(function(event) {
- $('.login__error', $login).hide();
-
- var login = $(this).find('input[name=login]').val(),
- pass = $(this).find('input[name=password]').val()
-
- if (login && pass) {
- var request = new XMLHttpRequest();
-
- request.open('PUT', APIPath + '/news/reload', true, login, pass);
- request.setRequestHeader('Authorization', 'Basic ' + btoa(login + ':' + pass));
-
- request.onreadystatechange = function(event) {
- if (request.readyState === 4) {
- if (request.status !== 200) {
- $('#login .login__error').show();
- } else {
- localStorage.setItem('login', login);
- localStorage.setItem('password', pass);
-
- var back = getParameterByName('back');
-
- if (back) {
- location.href = back;
- } else {
- location.href = '/admin/';
- }
- }
- }
- };
-
- request.send();
- }
-
- return false;
- });
- }
-});
\ No newline at end of file
diff --git a/dev/blocks/login/login.scss b/dev/blocks/login/login.scss
deleted file mode 100644
index 3794f48..0000000
--- a/dev/blocks/login/login.scss
+++ /dev/null
@@ -1,17 +0,0 @@
-$b: '.login';
-
-#{$b} {
- max-width: 200px;
- margin: 0 auto;
-
- &__tip {
- margin-bottom: 5px;
- }
-
- &__error {
- display: none;
- margin-top: 10px;
-
- color: #f00000;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/main.scss b/dev/blocks/main.scss
deleted file mode 100644
index 56f0fac..0000000
--- a/dev/blocks/main.scss
+++ /dev/null
@@ -1,57 +0,0 @@
-/* vars */
-$serif: "PT Serif", Georgia, sans-serif;;
-
-/* common blocks */
-@import 'wrapper/wrapper';
-@import 'icon/icon';
-@import 'link/link';
-@import 'notify/notify';
-@import 'form/form';
-@import 'status/status';
-@import 'content/content';
-
-/* main blocks */
-@import 'page/page';
-@import 'header/header';
-@import 'footer/footer';
-@import 'menu/menu';
-@import 'sorter/sorter';
-@import 'filter/filter';
-@import 'news/news';
-@import 'feeds/feeds';
-@import 'login/login';
-@import 'add/add';
-@import 'onenews/onenews';
-
-/* fonts */
-@import '../fonts/pt-sans/pt-sans';
-@import '../fonts/pt-serif/pt-serif';
-
-/* fixes */
-
-html, body {
- height: 100%;
- margin: 0;
- padding: 0;
-}
-
-input, textarea {
- &:focus {
- &::placeholder {
- color: transparent;
- }
- }
-}
-
-input, textarea {
- font-family: inherit;
-}
-
-/* ie 9 fixes */
-img {
- border: 0;
-}
-
-textarea {
- overflow: auto;
-}
\ No newline at end of file
diff --git a/dev/blocks/menu/menu.js b/dev/blocks/menu/menu.js
deleted file mode 100644
index f1f692a..0000000
--- a/dev/blocks/menu/menu.js
+++ /dev/null
@@ -1,42 +0,0 @@
-$(function() {
- $('#update-feeds').click(function(event) {
- event.preventDefault();
-
- $.ajax({
- url: APIPath + '/news/reload',
- type: 'PUT',
- headers: authHeaders
- })
- .done(function() {
- location.reload();
- })
- .fail(function(response) {
- console.log("error while updating feeds");
- console.log(response);
- });
- });
-
- $('#logout').click(function(event) {
- event.preventDefault();
-
- var request = new XMLHttpRequest();
-
- request.open('PUT', APIPath + '/news/reload', false, 'harry', 'colloportus');
-
- try {
- request.send();
-
- if (request.readyState === 4) {
- localStorage.removeItem('login');
- localStorage.removeItem('password');
-
- location.href = '/login/';
- }
- } catch (err) {
- localStorage.removeItem('login');
- localStorage.removeItem('password');
-
- location.href = '/login/';
- }
- });
-});
\ No newline at end of file
diff --git a/dev/blocks/menu/menu.scss b/dev/blocks/menu/menu.scss
deleted file mode 100644
index aa5ea6c..0000000
--- a/dev/blocks/menu/menu.scss
+++ /dev/null
@@ -1,64 +0,0 @@
-@import '../common/__list-nostyle/common__list-nostyle';
-
-$b: '.menu';
-
-#{$b} {
- @extend .common__list-nostyle;
-
- &_sort {
- text-align: right;
-
- #{$b}__item {
- margin-left: 15px;
- margin-right: 0;
-
- font-size: 12px;
-
- }
-
- .link {
- border-color: rgba(162, 162, 162, 0.2);
-
- color: #919191;
- font-weight: 700;
-
- &:hover {
- border-color: rgba(162, 162, 162, 0.7);
-
- color: #333;
- }
-
- &_active {
- &, &:hover {
- color: #000;
-
- border-color: transparent;
- }
- }
- }
- }
-
- &__item {
- display: inline-block;
- margin-right: 15px;
- margin-top: 5px;
-
- &_to-current {
- display: none;
- }
-
- &_to-comments {
- display: none;
- }
-
- &_right {
- float: right;
- margin-right: 0;
- margin-left: 15px;
- }
-
- &_admin {
- display: none;
- }
- }
-}
diff --git a/dev/blocks/news/news.js b/dev/blocks/news/news.js
deleted file mode 100644
index ef54fa1..0000000
--- a/dev/blocks/news/news.js
+++ /dev/null
@@ -1,936 +0,0 @@
-$(function() {
- var $topStatus = $('#news__top-status'),
- $newsList = $('#news__list'),
-
- $item = $('#news__skeleton'),
- $curItem = $item.clone(true, true),
- info,
- date = new Date(),
- // было бы лучше использовать тут тернарные состояния для гиковских
- filters = JSON.parse(localStorage.getItem('filters')) || {
- recent: false,
- geek: false,
- common: false
- },
-
- oldTitle = document.title;
-
- if ($('#news__list').length) {
- if (isMobile) {
- $('.news').addClass('news_mobile');
- }
-
- if ($('.news_deleted').length) {
- loadDeleted();
- } else if ($('.news_archive').length) {
- loadArchived();
-
- $(document).on('news-loaded', function() {
- showSortLinks();
- })
-
- } else {
- load();
-
- $(document).on('news-loaded', function() {
- var today = (new Date()).getDay();
-
- if (today == 6 || today == 0 || isAdmin) {
- updateCurrent();
- }
-
- showSortLinks();
- showFilterLinks();
- })
- }
-
- if (sorting) {
- activeSorting = sorting;
- } else {
- activeSorting = 'priority';
-
- if ($('.news_archive').length) {
- activeSorting = 'recent';
- }
- }
-
- $('#news__sort .sorter__link[data-sort="' + activeSorting + '"]').addClass('sorter__link_active');
- }
-
- function JSON2DOM(json) {
- if (sorting && sorting != 'priority') {
- sortJSON(json, sorting);
- }
-
- var $a;
-
- for (var i = 0; i < json.length; i++) {
- date.setTime(Date.parse(json[i].ts));
-
- $a = $('', {
- href: json[i].link,
- class: 'link',
- title: json[i].title,
- text: extractDomain(json[i].link),
- target: '_blank'
- });
-
- if (date.getFullYear() == 1) {
- date.setTime(Date.parse(json[i].ats));
- }
-
- if (json[i].author) {
- info = json[i].author
- + ' ('
- + $a.prop('outerHTML')
- + ')'
- + ', '
- + formatDate(date);
- } else {
- info = $a.prop('outerHTML')
- + ', '
- + formatDate(date);
- }
-
- $curItem.find('.news__title')
- .attr('href', '/post/' + json[i].slug)
- .text(json[i].title)
- .end()
-
- .find('.news__info')
- .prepend(info)
- .end()
-
- .find('.news__desc')
- .html(json[i].snippet)
- .end()
-
- .find('.news__info-stat')
- .attr('href', '/post/' + json[i].slug + '#to-comments')
- .end()
-
- .find('.news__comments')
- .append(json[i].comments)
- .end()
-
- .find('.news__light, .news__foldup').click(function(event) {
- event.preventDefault();
- toggleArticle($(this));
- })
- .show()
- .end()
-
- .find('.news__likes')
- .append(json[i].likes)
- .end()
-
- .attr('data-id', json[i].id)
- .attr('id', '')
- .data('comments', json[i].comments)
- .data('likes', json[i].likes)
- .data('ats', json[i].ats)
- .data('pos', json[i].position)
- .data('geek', json[i].geek);
-
- if (json[i].pic) {
- $curItem.find('.news__image-hidden')
- .attr('src', json[i].pic)
- .load(function() {
- $(this).siblings('.news__image')
- .css('background-image', 'url(' + $(this).attr('src') + ')')
- .end()
- .remove();
- });
- }
-
- if (json[i].active) {
- $curItem.addClass('news__item_current')
- .attr('id', 'current');
- setTimeout(function() {
- // wait for paste element
- $(document).trigger('current-updated');
- }, 300);
- }
-
- $curItem.appendTo($newsList);
-
- if (json[i].active || json[i].enable || typeof json[i].enable == "undefined") {
- $curItem.show();
- }
-
- if (isAdmin && $('.news_archive').length == 0) {
- if (json[i].geek) {
- $curItem.find('.news__button_togeek')
- .removeClass('news__button_togeek')
- .addClass('news__button_ingeek')
- .end()
-
- .addClass('news__item_geek');
- }
- } else {
- if (json[i].geek) {
- $curItem.addClass('news__item_geek-light');
- }
- }
-
- $curItem = $item.clone(true, true);
- };
-
- $(document).trigger('news-loaded');
- }
-
- function load() {
- $.ajax({
- url: APIPath + '/news',
- type: 'GET',
- dataType: 'json',
- cache: false,
- async: true,
- beforeSend: function() {
- $topStatus.text('Загружаю..')
- .show();
- }
- })
- .done(function(json) {
- $(document).on('news-loaded', function() {
- $topStatus.hide();
-
- if (activeSorting != 'priority') {
- disableNewsSortable();
- }
-
- if (filters.geek || filters.recent || filters.common) {
- disableNewsSortable();
- }
-
- if (isAdmin) {
- if (! isMobile) {
- sortableList = new Sortable($('#news__list')[0], {
- animation: 150,
- draggable: '.news__item',
- ghostClass: 'news__item_sortable',
- handle: '.news__handler',
- scrollSensitivity: 70,
- onUpdate: function(event) {
- moveArticle($(event.item));
- }
- });
- }
-
- $('.news__button_current').click(function(event) {
- event.preventDefault();
-
- var $item = $(this).closest('.news__item');
-
- $.ajax({
- url: APIPath + '/news/active/' + $item.data('id'),
- type: 'PUT',
- headers: authHeaders,
- async: false
- })
- .done(function() {
- $item.addClass('news__item_current')
- .siblings('.news__item')
- .removeClass('news__item_current');
- })
- .fail(function(response) {
- console.log("error while activating news");
- console.log(response);
- });
- });
-
- $('.news__button_first').click(function(event) {
- event.preventDefault();
-
- var $item = $(this).closest('.news__item');
-
- $item.prependTo('#news__list');
- moveArticle($item);
- });
-
- $('.news__button_up').click(function(event) {
- event.preventDefault();
-
- var $item = $(this).closest('.news__item');
-
- $item.prev().before($item);
- moveArticle($item);
- });
-
- $('.news__button_down').click(function(event) {
- event.preventDefault();
-
- var $item = $(this).closest('.news__item');
-
- $item.next().after($item);
- moveArticle($item);
- });
-
- $('.news__button_togeek').click(function(event) {
- event.preventDefault();
-
- togeekArticle($(this));
- });
-
- $('.news__button_ingeek').click(function(event) {
- event.preventDefault();
-
- nogeekArticle($(this));
- });
-
- $('.news__button_del').click(function(event) {
- event.preventDefault();
-
- delArticle($(this));
- });
-
- $('.news__button_archive').click(function(event) {
- event.preventDefault();
-
- archiveArticle($(this));
- });
- }
-
- $(document).trigger('fullpage-loaded');
- });
-
- filterJSON(json, filters);
- JSON2DOM(json);
- })
- .fail(function(response) {
- $topStatus.text('Ошибка при загрузке, попробуйте обновить страницу')
- .slideDown();
- console.log(response);
- });
- }
-
- function loadDeleted() {
- $.ajax({
- url: APIPath + '/news/del',
- type: 'GET',
- dataType: 'json',
- cache: false,
- async: true,
- beforeSend: function() {
- $topStatus.text('Загружаю..')
- .show();
- }
- })
- .done(function(json) {
- $(document).on('news-loaded', function() {
- $topStatus.hide();
-
- $('.news__button_restore')
- .click(function(event) {
- event.preventDefault();
-
- restoreArticle($(this));
- });
- });
-
- JSON2DOM(json);
- })
- .fail(function(response) {
- $topStatus.text('Ошибка при загрузке, попробуйте обновить страницу')
- .slideDown();
- console.log(response);
- });
- }
-
- function loadArchived() {
- $.ajax({
- url: APIPath + '/news/archive',
- type: 'GET',
- dataType: 'json',
- cache: false,
- async: true,
- beforeSend: function() {
- $topStatus.text('Загружаю..')
- .show();
- }
- })
- .done(function(json) {
- $(document).on('news-loaded', function() {
- $topStatus.hide();
-
- if (isAdmin) {
- $('.news__button_del')
- .click(function(event) {
- event.preventDefault();
-
- delArticle($(this));
- });
- } else {
- $('.news__manage').remove();
- }
- });
-
- JSON2DOM(json);
- })
- .fail(function(response) {
- $topStatus.text('Ошибка при загрузке, попробуйте обновить страницу')
- .slideDown();
- console.log(response);
- });
- }
-
- function updateCurrent() {
- var timeout = 295;
-
- $.ajax({
- url: APIPath + '/news/active/wait/' + timeout,
- type: 'GET',
- dataType: 'json',
- async: true
- })
- .done(function(json) {
- if (typeof json == 'undefined') {
- // if 304 then update again
- updateCurrent();
- return;
- }
-
- var $current = $('.news__item[data-id=' + json.id + ']');
-
- if ($current.length) {
- if (!$current.hasClass('news__item_current')) {
- $('.news__item_current').removeClass('news__item_current');
- $current.addClass('news__item_current');
- filterNews();
-
- document.title = "** Тема обновилась **";
- notify('Тема обновилась. Нажмите, чтобы перейти к ней.', function() {
- $('html, body').animate({
- scrollTop: $('.news__item_current').offset().top
- }, 700);
-
- document.title = oldTitle;
- });
- }
-
- updateCurrent();
- } else {
- document.title = "** Ошибка **";
- notify('Текущей темы нет в этом списке. Вероятно, он устарел. Нажмите, чтобы его обновить.', function() {
- $('#news__list').html('');
- load();
-
- $(document).one('current-updated', function() {
- $('html, body').animate({
- scrollTop: $('.news__item_current').offset().top
- }, 700);
- });
-
- document.title = oldTitle;
- });
- }
- })
- .fail(function(response) {
- setTimeout(function() {
- updateCurrent();
- }, 1000);
- });
- }
-
- function sortNews(type) {
- var $items = $('#news__list .news__item');
-
- switch (type) {
- case 'comments':
- // X → x sort by comments count
- $items.sort(function(a, b) {
- return $(b).data('comments') - $(a).data('comments');
- }).appendTo($newsList);
- break;
-
- case 'likes':
- // X → x sort by likes count
- $items.sort(function(a, b) {
- return $(b).data('likes') - $(a).data('likes');
- }).appendTo($newsList);
- break;
-
- case 'recent':
- // X → x sort by adding date
- $items.sort(function(a, b) {
- if ($(a).data('ats') > $(b).data('ats')) {
- return -1;
- }
-
- if ($(a).data('ats') < $(b).data('ats')) {
- return 1;
- }
-
- return 0;
- }).appendTo($newsList);
- break;
-
- case 'priority':
- // X → x sort by admin's priority
- $items.sort(function(a, b) {
- return $(b).data('pos') - $(a).data('pos');
- }).appendTo($newsList);
- break;
- }
- }
-
- function filterNews() {
- var $items = $('#news__list .news__item'),
- now = new Date(),
- day = 1000 * 60 * 60 * 24,
- month = day * 30;
-
- for (var i = 0; i < $items.length; i++) {
- var $item = $items.eq(i);
-
- if ($item.hasClass('news__item_current')) continue;
-
- if (filters.geek) {
- if (! $item.data('geek')) {
- $item.hide();
- continue;
- }
- }
-
- if (filters.common) {
- if ($item.data('geek')) {
- $item.hide();
- continue;
- }
- }
-
- if (filters.recent) {
- var date = Date.parse($item.data('ats'));
-
- if (filters.geek && $item.data('geek')) {
- if ((now - date) / (3 * month) > 1) {
- $item.hide();
- continue;
- }
- } else if ((now - date) / (21 * day) > 1) {
- $item.hide();
- continue;
- }
- }
-
- $item.show();
- };
- }
-
- function showSortLinks() {
- $('#news__sort')
- .css('display', $('#news__sort').hasClass('news__sort') ? 'block' : 'inline-block')
-
- .find('.sorter__link')
- .click(function(event) {
- event.preventDefault();
-
- var type = $(this).data('sort');
-
- if (! $(this).hasClass('sorter__link_active')) {
- sortNews(type);
-
- $('#news__sort .sorter__link_active').removeClass('sorter__link_active');
- $(this).addClass('sorter__link_active');
-
- if (type == 'priority') {
- localStorage.removeItem('sorting');
-
- if (isAdmin && !filters.geek && !filters.recent && !filters.common) {
- enableNewsSortable();
- }
- } else {
- localStorage.setItem('sorting', type);
-
- if (isAdmin) {
- disableNewsSortable();
- }
- }
- }
- });
- }
-
- function showFilterLinks() {
- $('#news__filter')
- .css('display', 'inline-block')
-
- .find('[data-filter]')
- .each(function() {
- var filter = $(this).data('filter');
-
- for (var filterName in filters) {
- if (filter == filterName && filters[filterName]) {
- $(this).closest('.filter__item')
- .addClass('filter__item_active');
-
- if ($(this).hasClass('filter__dropdown-link')) {
- $(this).closest('.filter__item')
- .find('.filter__current')
- .text($(this).text());
- }
- }
- }
- })
- .click(function(event) {
- event.preventDefault();
-
- var type = $(this).data('filter');
-
- if (! $(this).hasClass('filter__dropdown-link')) {
- $(this).closest('.filter__item')
- .toggleClass('filter__item_active');
-
- filters[$(this).data('filter')] ^= 1;
- } else {
- $(this).closest('.filter__item')
- .find('.filter__dropdown-link')
- .each(function(i) {
- if (i != 0) {
- filters[$(this).data('filter')] = false;
- }
- });
-
- if ($(this).parent().index() == 0) {
- $(this).closest('.filter__item')
- .removeClass('filter__item_active');
- } else {
- $(this).closest('.filter__item')
- .addClass('filter__item_active');
-
- filters[$(this).data('filter')] = true;
- }
-
- $(this).closest('.filter__item')
- .find('.filter__current')
- .text($(this).text());
- }
-
- localStorage.setItem('filters', JSON.stringify(filters));
-
- filterNews();
-
- if (!filters.geek && !filters.recent && !filters.common) {
- enableNewsSortable();
- } else {
- disableNewsSortable();
- }
- });
- }
-});
-
-function toggleArticle($link) {
- var $full = $link.closest('.news__footer').find('.news__full'),
- $loader = $('.news__full-loader', $full),
- body = $('body')[0],
- v = 0;
-
- if ($full.is(':visible')) {
- $full
- .hide()
- .find('.news__foldup')
- .hide();
- } else {
- var $visibleNews = $('.news__full:visible'),
- $visibleLink = $visibleNews.siblings('.news__light');
-
- if ($visibleNews.length) {
- if ($full.offset().top > $visibleNews.offset().top) {
- var height = $visibleNews.outerHeight(true),
- st = $(document).scrollTop() - height;
-
- $(document).scrollTop(st);
- $visibleNews
- .hide()
- .find('.news__foldup')
- .hide();
- } else {
- $visibleNews
- .hide()
- .find('.news__foldup')
- .hide();
- }
-
- toggleArticleLink($visibleNews);
- }
-
- $full
- .show()
- .find('.news__foldup')
- .show();
-
- if ($loader.is(':visible')) {
- $full.find('.news__foldup').hide();
-
- var id = $full.closest('.news__item').data('id');
-
- $.ajax({
- url: APIPath + '/news/id/' + id,
- type: 'GET',
- dataType: 'json',
- async: true
- })
- .done(function(json) {
- if (json.content.length) {
- $loader.after(json.content).hide();
- $full.find('.news__foldup').show();
- } else {
- $loader.text('Увы, но у этой новости нет подробного текста');
- }
- })
- .fail(function(response) {
- $loader.text('Ошибка. Не получилось загрузить новость');
- });
- }
- }
-
- toggleArticleLink($full);
-}
-
-function toggleArticleLink($news) {
- $news.siblings('.news__light').text(function(i, text) {
- return text == 'Подробнее' ? 'Скрыть' : 'Подробнее';
- });
-}
-
-function moveArticle($item) {
- var $items = $('#news__list .news__item'),
- length = $items.length,
- pos = $item.data('pos'),
- index = $item.index(),
- offset = length - pos - index - 1;
-
- $.ajax({
- url: APIPath + '/news/move/' + pos + '/' + offset,
- type: 'PUT',
- headers: authHeaders
- })
- .done(function() {
- resetPositions();
- })
- .fail(function(response) {
- console.log("error while moving news");
- console.log(response);
- });
-}
-
-function togeekArticle($el) {
- var $item = $el.closest('.news__item');
-
- $.ajax({
- url: APIPath + '/news/geek/' + $item.data('id'),
- type: 'PUT',
- headers: authHeaders
- })
- .done(function() {
- $item.data('geek', true)
- .addClass('news__item_geek');
- $el.removeClass('news__button_togeek')
- .addClass('news__button_ingeek')
- .off()
- .click(function(event) {
- event.preventDefault();
-
- nogeekArticle($(this));
- });
- })
- .fail(function(response) {
- console.log("error while geeking news");
- console.log(response);
- });
-}
-
-function nogeekArticle($el) {
- var $item = $el.closest('.news__item');
-
- $.ajax({
- url: APIPath + '/news/nogeek/' + $item.data('id'),
- type: 'PUT',
- headers: authHeaders
- })
- .done(function() {
- $item.data('geek', false)
- .removeClass('news__item_geek');
- $el.removeClass('news__button_ingeek')
- .addClass('news__button_togeek')
- .off()
- .click(function(event) {
- event.preventDefault();
-
- togeekArticle($(this));
- });
- })
- .fail(function(response) {
- console.log("error while nogeeking news");
- console.log(response);
- });
-}
-
-function restoreArticle($el) {
- var $item = $el.closest('.news__item');
-
- $.ajax({
- url: APIPath + '/news/undelete/' + $item.data('id'),
- type: 'PUT',
- headers: authHeaders
- })
- .done(function() {
- $item.remove();
- })
- .fail(function(response) {
- console.log("error while deleting news");
- console.log(response);
- });
-}
-
-function delArticle($el) {
- var $item = $el.closest('.news__item');
-
- $.ajax({
- url: APIPath + '/news/' + $item.data('id'),
- type: 'DELETE',
- headers: authHeaders
- })
- .done(function() {
- $item.remove();
-
- resetPositions();
- })
- .fail(function(response) {
- console.log("error while deleting news");
- console.log(response);
- });
-}
-
-function archiveArticle($el) {
- var $item = $el.closest('.news__item');
-
- $.ajax({
- url: APIPath + '/news/archive/' + $item.data('id'),
- type: 'PUT',
- headers: authHeaders
- })
- .done(function() {
- $item.remove();
-
- resetPositions();
- })
- .fail(function(response) {
- console.log("error while archiving news");
- console.log(response);
- });
-}
-
-function resetPositions() {
- var $items = $('#news__list .news__item'), item, id;
-
- $.ajax({
- url: APIPath + '/news/positions',
- type: 'GET',
- dataType: 'json',
- cache: false,
- async: true,
- })
- .done(function(json) {
- for (var i = 0; i < $items.length; i++) {
- $item = $items.eq(i);
- id = $item.data('id');
-
- if (!!json[id]) {
- $item.data('pos', json[id]);
- }
- };
- })
- .fail(function(response) {
- console.log("error while gettins positions");
- console.log(response);
- });
-}
-
-function sortJSON(json, type) {
- switch (type) {
- case 'comments':
- // X → x sort by comments count
- json.sort(function(a, b) {
- return b.comments - a.comments;
- });
- break;
-
- case 'likes':
- // X → x sort by likes count
- json.sort(function(a, b) {
- return b.likes - a.likes;
- });
- break;
-
- case 'recent':
- // X → x sort by adding date
- json.sort(function(a, b) {
- if (a.ats > b.ats) {
- return -1;
- }
-
- if (a.ats < b.ats) {
- return 1;
- }
-
- return 0;
- });
- break;
-
- case 'priority':
- // X → x sort by admin's priority
- json.sort(function(a, b) {
- return b.position - a.position;
- });
- break;
- }
-}
-
-function filterJSON(json, filters) {
- var now = new Date(),
- day = 1000 * 60 * 60 * 24,
- week = day * 7,
- month = day * 30;
-
- for (var i = json.length - 1; i >= 0; i--) {
- json[i].enable = true;
-
- if (filters.geek) {
- if (! json[i].geek) {
- json[i].enable = false;
- continue;
- }
- }
-
- if (filters.common) {
- if (json[i].geek) {
- json[i].enable = false;
- continue;
- }
- }
-
- if (filters.recent) {
- var date = Date.parse(json[i].ats);
-
- if (filters.geek && json[i].geek) {
- if ((now - date) / (2 * month + week) > 1) {
- json[i].enable = false;
- continue;
- }
- } else if ((now - date) / (21 * day) > 1) {
- json[i].enable = false;
- continue;
- }
- }
- };
-}
-
-function disableNewsSortable() {
- $('.news').addClass('news_disabled-sort');
- $('.news__handler').hide();
-}
-
-function enableNewsSortable() {
- $('.news').removeClass('news_disabled-sort');
- $('.news__handler').show();
-}
\ No newline at end of file
diff --git a/dev/blocks/news/news.scss b/dev/blocks/news/news.scss
deleted file mode 100644
index 5c0c1d9..0000000
--- a/dev/blocks/news/news.scss
+++ /dev/null
@@ -1,460 +0,0 @@
-@import '../common/__list-nostyle/common__list-nostyle';
-
-$b: '.news';
-
-#{$b} {
- font-size: 0;
-
- &_mobile {
- #{$b}__manage {
- display: block;
- }
-
- #{$b}__mobile-buttons {
- display: inline-block;
- }
-
- #{$b}__title {
- hyphens: auto;
- }
- }
-
- &_disabled-sort {
- #{$b}__mobile-buttons {
- display: none;
- }
-
- #{$b}__button_first {
- display: none;
- }
- }
-
- &_admin {
- #{$b}__item {
- @media (max-width: 500px) {
- margin-top: 80px;
-
- &:first-child {
- margin-top: 20px;
- }
- }
- }
- }
-
- &_deleted {
- margin-top: 40px;
-
- #{$b}__manage {
- top: -20px;
-
- @media (max-width: 500px) {
- top: -15px;
- }
- }
-
- #{$b}__item {
- @media (max-width: 500px) {
- margin-top: 40px;
- }
- }
- }
-
- &_archive {
- #{$b}__item {
- margin-bottom: 10px;
- }
-
- #{$b}__sort {
- margin-bottom: 25px;
- }
-
- #{$b}__manage {
- top: -15px;
- }
- }
-
- &__list {
- @extend .common__list-nostyle;
- }
-
- &__item {
- position: relative;
-
- display: none;
- min-height: 80px;
- padding: 10px 15px;
- margin: -10px -15px 40px;
-
- border-radius: 5px;
- border: 1px solid transparent;
-
- &:hover {
- #{$b}__manage {
- display: block;
- }
- }
-
- &:first-child {
- #{$b}__button_first {
- display: none;
- }
-
- #{$b}__button_up {
- display: none;
- }
- }
-
- &:last-child {
- #{$b}__button_down {
- display: none;
- }
- }
-
- &_current {
- position: relative;
-
- background: #FBE2BD;
-
- #{$b}__button_current {
- display: none;
- }
- }
-
- &_geek {
- border-color: rgba(darken(#33aaff, 10), .75);
- }
-
- &_sortable {
- border: 1px dashed #ddd;
- background: rgba(#eee, .3);
- opacity: 0.7;
- }
-
- &_geek-light {
- #{$b}__geek {
- display: inline-block;
- }
- }
- }
-
- &__title {
- margin-right: 60px;
-
- border-color: rgba(0, 0, 0, .2);
-
- color: #000;
- font-size: 1.25rem;
- font-weight: 700;
- font-family: $serif;
- }
-
- &__info {
- margin-top: 4px;
- margin-bottom: 3px;
-
- color: #666;
- font-size: 0.85rem;
- letter-spacing: 1px;
- }
-
- &__desc {
- margin-bottom: 5px;
-
- font-size: 16px;
-
- img, iframe, video {
- display: none;
- }
- }
-
- &__status {
- margin-top: 40px;
- }
-
- &__body {
- overflow: hidden;
- margin-bottom: 18px;
- }
-
- &__footer {
- margin-top: -15px;
- }
-
- &__light {
- display: none;
-
- font-size: 0.9rem;
- }
-
- &__image[style] {
- float: right;
-
- width: 100px;
- height: 100px;
- margin-left: 5px;
- margin-bottom: 5px;
-
- border-radius: 1px;
- background-size: cover;
- background-position: center;
- background-repeat: no-repeat;
- }
-
- &__image-hidden {
- display: none;
- }
-
- &__full {
- position: relative;
-
- display: none;
- padding: 5px 40px 5px 10px;
- margin: 10px 0 25px;
- overflow: hidden;
-
- background: rgba(200, 200, 200, .2);
- border-radius: 3px;
-
- font-size: 16px;
- }
-
- &__foldup {
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
-
- display: none;
- width: 30px;
-
- background: rgba(0, 0, 0, .05);
-
- text-align: center;
-
- cursor: pointer;
- transition: 250ms all;
-
- &:hover {
- background: rgba(#000, .1);
- }
- }
-
- &__foldup-icon {
- margin-top: 15px;
- }
-
- &__manage {
- position: absolute;
- top: -26px;
- right: 0;
- left: 0;
-
- display: none;
- height: 26px;
- padding-top: 4px;
-
- font-size: 0;
-
- text-align: right;
-
- @media (max-width: 500px) {
- top: -50px;
- }
- }
-
- &__mobile-buttons {
- display: none;
- }
-
- &__button {
- display: inline-block;
- height: 18px;
- padding: 0 5px;
- margin-left: 7px;
- margin-top: 4px;
-
- background-color: #F3A820;
- border-radius: 3px;
- opacity: 0.9;
-
- color: #333;
- font-size: 14px;
- line-height: 16px;
-
- text-decoration: none;
- text-align: center;
- vertical-align: middle;
-
- transition: all 300ms;
-
- &:hover {
- opacity: 1;
-
- color: #111;
-
- transition: all 0ms;
- }
-
- &_del {
- background: #ff3333;
-
- &:after {
- content: 'удалить';
- }
- }
-
- &_archive {
- background: #c1c1c1;
-
- &:after {
- content: 'в архив';
- }
- }
-
- &_restore {
- background: #33cc33;
-
- &:after {
- content: 'восстановить';
- }
- }
-
- &_togeek {
- background: #33aaff;
-
- &:after {
- content: 'в гиковский выпуск';
- }
- }
-
- &_ingeek {
- background: #33aaff;
-
- color: rgba(255, 255, 255, .85);
-
- &:hover {
- color: #fff;
- }
-
- &:after {
- content: 'гиковское';
- }
- }
-
- &_first {
- background: #11ee66;
-
- &:after {
- content: 'сделать первой';
- }
- }
-
- &_current {
- &:after {
- content: 'сделать текущей';
- }
- }
-
- &_up {
- height: 16px;
-
- background-color: #fff;
- border: 1px solid #333;
-
- color: #333;
- line-height: 15px;
-
- &:after {
- content: 'вверх';
- }
-
- &:active {
- border-color: #ccc;
- }
- }
-
- &_down {
- height: 16px;
-
- background-color: #fff;
- border: 1px solid #333;
-
- color: #333;
- line-height: 15px;
-
- &:after {
- content: 'вниз';
- }
-
- &:active {
- border-color: #ccc;
- }
- }
- }
-
- &__sort {
- display: none;
- margin-bottom: 45px;
- }
-
- &__menu {
- display: none;
- width: 50%;
- margin-bottom: 45px;
-
- vertical-align: top;
- }
-
- &__full-loader {
- padding: 30px 0;
-
- color: #999;
- font-family: $serif;
- font-style: italic;
-
- text-align: center;
- }
-
- &__handler {
- position: absolute;
- right: 0;
- top: 0;
- bottom: 35px;
-
- width: 150px;
-
- cursor: move;
- }
-
- &__info-stat {
- display: inline-block;
-
- padding: 1px 0;
- margin-top: 2px;
- margin-left: 3px;
-
- border-bottom: 1px solid transparent;
-
- color: #666;
- fill: #aaa;
- font-size: 14px;
-
- &:hover {
- fill: lighten(#e05020, 5);
- }
- }
-
- &__geek {
- display: none;
- margin-left: 5px;
- margin-right: 3px;
- }
-
- &__likes {
- // nothing here :)
- }
-
- &__comments {
- margin-right: 4px;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/news/news__menu.html b/dev/blocks/news/news__menu.html
deleted file mode 100644
index 3b36236..0000000
--- a/dev/blocks/news/news__menu.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
\ No newline at end of file
diff --git a/dev/blocks/news/news__sort_archive.html b/dev/blocks/news/news__sort_archive.html
deleted file mode 100644
index 1758eb6..0000000
--- a/dev/blocks/news/news__sort_archive.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/dev/blocks/notify/notify.js b/dev/blocks/notify/notify.js
deleted file mode 100644
index 83c9e99..0000000
--- a/dev/blocks/notify/notify.js
+++ /dev/null
@@ -1,32 +0,0 @@
-function notify(message, cb, timeout) {
- $('.notify').remove();
-
- var $message = $('', {
- class: 'notify',
- text: message
- });
-
- $message.appendTo('body')
- .slideDown('500')
- .click(function(event) {
- $(this).slideUp(500, function() {
- $message.remove();
- });
-
- if (cb) {
- cb();
- }
- });
-
- if (timeout) {
- setTimeout(function() {
- $message.slideUp(500, function() {
- $message.remove();
- });
-
- if (cb) {
- cb();
- }
- }, timeout);
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/notify/notify.scss b/dev/blocks/notify/notify.scss
deleted file mode 100644
index 2058f7c..0000000
--- a/dev/blocks/notify/notify.scss
+++ /dev/null
@@ -1,26 +0,0 @@
-$b: '.notify';
-
-#{$b} {
- position: fixed;
- top: 20px;
- left: 0;
- right: 0;
-
- box-sizing: border-box;
- display: none;
- width: 300px;
- padding: 10px 20px;
- margin: 0 auto;
-
- border-radius: 3px;
- background: rgba(#fce5bc, .9);
- box-shadow: 2px 2px 8px rgba(241, 211, 159, 0.9);
-
- color: darken(#f3a820, 25);
-
- cursor: pointer;
-
- @media (max-width: 300px) {
- top: 0;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/onenews/onenews.js b/dev/blocks/onenews/onenews.js
deleted file mode 100644
index 0079868..0000000
--- a/dev/blocks/onenews/onenews.js
+++ /dev/null
@@ -1,125 +0,0 @@
-$(function() {
- var $topStatus = $('#onenews__top-status'),
- $onenews = $('#onenews'),
-
- slug = getSlug();
-
- if (login && password) {
- $('#menu__back-link').attr('href', '/admin/');
- }
-
- if ($('#onenews').length) {
- if (typeof slug !== 'undefined' && slug.length > 0) {
- load();
- } else {
- location.href = '/';
- }
- }
-
- function load() {
- $.ajax({
- url: APIPath + '/news/slug/' + slug,
- type: 'GET',
- dataType: 'json',
- cache: true,
- async: true,
- beforeSend: function() {
- $topStatus.text('Загружаю..')
- .show();
- }
- })
- .done(function(json) {
- $topStatus.hide();
-
- $(document).on('news-loaded', function() {
- var dqinterval = setInterval(function() {
- var disqusHeight = $('#disqus_thread').height();
- // 250 ≈ height of empty disqus
- if (disqusHeight > 250) {
- $('#menu__item_to-comments')
- .css('display', 'inline-block')
-
- .find('.link')
- .click(function(event) {
- event.preventDefault();
-
- $('html,body').animate({
- scrollTop: $($(this).attr('href')).offset().top
- }, 500);
- });
-
- if (location.hash == '#to-comments') {
- $('#menu__item_to-comments .link').click();
- history.pushState("", document.title, window.location.pathname);
- }
-
- clearInterval(dqinterval);
- }
- }, 100);
- });
-
- JSON2DOM(json);
- document.title = json.title;
-
- (function() {
- var d = document, s = d.createElement('script');
- s.src = '//' + disqusID + '.disqus.com/embed.js';
- s.setAttribute('data-timestamp', +new Date());
- (d.head || d.body).appendChild(s);
- })();
- })
- .fail(function(response) {
- $topStatus.text('Ошибка при загрузке, попробуйте обновить страницу')
- .slideDown();
- console.log(response);
- });
-
- }
-
- function JSON2DOM(json) {
- var info,
- date = new Date();
-
- date.setTime(Date.parse(json.ts));
-
- var $a = $('', {
- href: json.link,
- class: 'link',
- title: json.title,
- text: extractDomain(json.link),
- target: '_blank'
- });
-
- if (json.author) {
- info = json.author
- + ' ('
- + $a.prop('outerHTML')
- + ')'
- + ', '
- + formatDate(date);
- } else {
- info = $a.prop('outerHTML')
- + ', '
- + formatDate(date);
- }
-
- $onenews.find('.onenews__title')
- .text(json.title)
- .attr('href', json.link)
- .attr('target', '_blank')
- .end()
-
- .find('.onenews__info')
- .append(info)
- .end()
-
- .find('.onenews__body')
- .html(json.content);
-
- if (json.geek) {
- $onenews.find('.onenews__geek').show();
- }
-
- $(document).trigger('news-loaded');
- }
-});
\ No newline at end of file
diff --git a/dev/blocks/onenews/onenews.scss b/dev/blocks/onenews/onenews.scss
deleted file mode 100644
index 09027db..0000000
--- a/dev/blocks/onenews/onenews.scss
+++ /dev/null
@@ -1,43 +0,0 @@
-@import '../link/link';
-
-$b: '.onenews';
-
-#{$b} {
- padding-top: 20px;
-
- &__title {
- border-color: rgba(0, 0, 0, 0.2);
-
- color: #000;
- font-size: 2rem;
- font-weight: 700;
- font-family: $serif;
- }
-
- &__info {
- margin-top: 20px;
-
- color: #666;
- font-size: 0.85rem;
- letter-spacing: 1px;
- }
-
- &__body {
- margin-top: 20px;
- margin-bottom: 35px;
- }
-
- &__comments {
- margin-top: 45px;
- }
-
- &__geek {
- display: none;
- margin-right: 3px;
- vertical-align: -1px;
- }
-
- #disqus_thread a {
- @extend .link;
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/page/page.js b/dev/blocks/page/page.js
deleted file mode 100644
index 7619831..0000000
--- a/dev/blocks/page/page.js
+++ /dev/null
@@ -1,23 +0,0 @@
-$(document).on('current-updated', function() {
- var $currentNews = $('#current'),
- $toCurrent = $('#to-current');
-
- if ($toCurrent.length && $currentNews.length) {
- $toCurrent.css('display', 'inline-block');
-
- if (location.hash == '#current') {
- scrollToEl($currentNews);
- }
-
- $toCurrent.click(function(event) {
- event.preventDefault();
- scrollToEl($currentNews);
- });
- }
-});
-
-function scrollToEl($el) {
- $('html, body').animate({
- scrollTop: $el.offset().top
- }, 700);
-}
\ No newline at end of file
diff --git a/dev/blocks/page/page.scss b/dev/blocks/page/page.scss
deleted file mode 100644
index 0732256..0000000
--- a/dev/blocks/page/page.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-.page {
- overflow-x: hidden;
- padding: 0 10px;
-
- font-family: "PT Sans", Arial, sans-serif;
-
- &__header {
- margin-bottom: 15px;
- }
-
- &__footer {
- margin-top: 40px;
-
- @media (max-width: 500px) {
- margin-top: 90px;
- }
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/sortable/sortable__plugin.js b/dev/blocks/sortable/sortable__plugin.js
deleted file mode 100644
index bef7fa3..0000000
--- a/dev/blocks/sortable/sortable__plugin.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! Sortable 1.3.0 - MIT | git://github.com/rubaxa/Sortable.git */
-!function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){if(!a||!a.nodeType||1!==a.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(a);this.el=a,this.options=b=r({},b),a[L]=this;var c={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var d in c)!(d in b)&&(b[d]=c[d]);V(b);for(var f in this)"_"===f.charAt(0)&&(this[f]=this[f].bind(this));this.nativeDraggable=b.forceFallback?!1:P,e(a,"mousedown",this._onTapStart),e(a,"touchstart",this._onTapStart),this.nativeDraggable&&(e(a,"dragover",this),e(a,"dragenter",this)),T.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){v&&v.state!==a&&(h(v,"display",a?"none":""),!a&&v.state&&w.insertBefore(v,s),v.state=a)}function c(a,b,c){if(a){c=c||N,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function d(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function e(a,b,c){a.addEventListener(b,c,!1)}function f(a,b,c){a.removeEventListener(b,c,!1)}function g(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(K," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(K," ")}}function h(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return N.defaultView&&N.defaultView.getComputedStyle?c=N.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function i(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function j(a,b,c,d,e,f,g){var h=N.createEvent("Event"),i=(a||b[L]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.to=b,h.from=e||b,h.item=d||b,h.clone=v,h.oldIndex=f,h.newIndex=g,b.dispatchEvent(h),i[j]&&i[j].call(a,h)}function k(a,b,c,d,e,f){var g,h,i=a[L],j=i.options.onMove;return g=N.createEvent("Event"),g.initEvent("move",!0,!0),g.to=b,g.from=a,g.dragged=c,g.draggedRect=d,g.related=e||b,g.relatedRect=f||b.getBoundingClientRect(),a.dispatchEvent(g),j&&(h=j.call(i,g)),h}function l(a){a.draggable=!1}function m(){R=!1}function n(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return(b.clientY-(d.top+d.height)>5||b.clientX-(d.right+d.width)>5)&&c}function o(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function p(a){var b=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function q(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function r(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K=/\s+/g,L="Sortable"+(new Date).getTime(),M=window,N=M.document,O=M.parseInt,P=!!("draggable"in N.createElement("div")),Q=function(a){return a=N.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),R=!1,S=Math.abs,T=([].slice,[]),U=q(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(z!==c&&(y=b.scroll,z=c,y===!0)){y=c;do if(y.offsetWidth=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=M)),(J.vx!==f||J.vy!==g||J.el!==d)&&(J.el=d,J.vx=f,J.vy=g,clearInterval(J.pid),d&&(J.pid=setInterval(function(){d===M?M.scrollTo(M.pageXOffset+f*i,M.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30),V=function(a){var b=a.group;b&&"object"==typeof b||(b=a.group={name:b}),["pull","put"].forEach(function(a){a in b||(b[a]=!0)}),a.groups=" "+b.name+(b.put.join?" "+b.put.join(" "):"")+" "};return a.prototype={constructor:a,_onTapStart:function(a){var b=this,d=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,k=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=c(h,e.draggable,d))){if(D=p(h),"function"==typeof k){if(k.call(this,a,h,this))return j(b,i,"filter",h,d,D),void a.preventDefault()}else if(k&&(k=k.split(",").some(function(a){return a=c(i,a.trim(),d),a?(j(b,a,"filter",h,d,D),!0):void 0})))return void a.preventDefault();(!e.handle||c(i,e.handle,d))&&this._prepareDragStart(a,g,h)}},_prepareDragStart:function(a,b,c){var d,f=this,h=f.el,j=f.options,k=h.ownerDocument;c&&!s&&c.parentNode===h&&(G=a,w=h,s=c,t=s.parentNode,x=s.nextSibling,F=j.group,d=function(){f._disableDelayedDrag(),s.draggable=!0,g(s,f.options.chosenClass,!0),f._triggerDragStart(b)},j.ignore.split(",").forEach(function(a){i(s,a.trim(),l)}),e(k,"mouseup",f._onDrop),e(k,"touchend",f._onDrop),e(k,"touchcancel",f._onDrop),j.delay?(e(k,"mouseup",f._disableDelayedDrag),e(k,"touchend",f._disableDelayedDrag),e(k,"touchcancel",f._disableDelayedDrag),e(k,"mousemove",f._disableDelayedDrag),e(k,"touchmove",f._disableDelayedDrag),f._dragStartTimer=setTimeout(d,j.delay)):d())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),f(a,"mouseup",this._disableDelayedDrag),f(a,"touchend",this._disableDelayedDrag),f(a,"touchcancel",this._disableDelayedDrag),f(a,"mousemove",this._disableDelayedDrag),f(a,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(a){a?(G={target:s,clientX:a.clientX,clientY:a.clientY},this._onDragStart(G,"touch")):this.nativeDraggable?(e(s,"dragend",this),e(w,"dragstart",this._onDragStart)):this._onDragStart(G,!0);try{N.selection?N.selection.empty():window.getSelection().removeAllRanges()}catch(b){}},_dragStarted:function(){w&&s&&(g(s,this.options.ghostClass,!0),a.active=this,j(this,w,"start",s,w,D))},_emulateDragOver:function(){if(H){if(this._lastX===H.clientX&&this._lastY===H.clientY)return;this._lastX=H.clientX,this._lastY=H.clientY,Q||h(u,"display","none");var a=N.elementFromPoint(H.clientX,H.clientY),b=a,c=" "+this.options.group.name,d=T.length;if(b)do{if(b[L]&&b[L].options.groups.indexOf(c)>-1){for(;d--;)T[d]({clientX:H.clientX,clientY:H.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);Q||h(u,"display","")}},_onTouchMove:function(b){if(G){a.active||this._dragStarted(),this._appendGhost();var c=b.touches?b.touches[0]:b,d=c.clientX-G.clientX,e=c.clientY-G.clientY,f=b.touches?"translate3d("+d+"px,"+e+"px,0)":"translate("+d+"px,"+e+"px)";I=!0,H=c,h(u,"webkitTransform",f),h(u,"mozTransform",f),h(u,"msTransform",f),h(u,"transform",f),b.preventDefault()}},_appendGhost:function(){if(!u){var a,b=s.getBoundingClientRect(),c=h(s);u=s.cloneNode(!0),g(u,this.options.ghostClass,!1),g(u,this.options.fallbackClass,!0),h(u,"top",b.top-O(c.marginTop,10)),h(u,"left",b.left-O(c.marginLeft,10)),h(u,"width",b.width),h(u,"height",b.height),h(u,"opacity","0.8"),h(u,"position","fixed"),h(u,"zIndex","100000"),h(u,"pointerEvents","none"),this.options.fallbackOnBody&&N.body.appendChild(u)||w.appendChild(u),a=u.getBoundingClientRect(),h(u,"width",2*b.width-a.width),h(u,"height",2*b.height-a.height)}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;this._offUpEvents(),"clone"==F.pull&&(v=s.cloneNode(!0),h(v,"display","none"),w.insertBefore(v,s)),b?("touch"===b?(e(N,"touchmove",this._onTouchMove),e(N,"touchend",this._onDrop),e(N,"touchcancel",this._onDrop)):(e(N,"mousemove",this._onTouchMove),e(N,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,s)),e(N,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(a){var d,e,f,g=this.el,i=this.options,j=i.group,l=j.put,o=F===j,p=i.sort;if(void 0!==a.preventDefault&&(a.preventDefault(),!i.dragoverBubble&&a.stopPropagation()),I=!0,F&&!i.disabled&&(o?p||(f=!w.contains(s)):F.pull&&l&&(F.name===j.name||l.indexOf&&~l.indexOf(F.name)))&&(void 0===a.rootEl||a.rootEl===this.el)){if(U(a,i,this.el),R)return;if(d=c(a.target,i.draggable,g),e=s.getBoundingClientRect(),f)return b(!0),void(v||x?w.insertBefore(s,v||x):p||w.appendChild(s));if(0===g.children.length||g.children[0]===u||g===a.target&&(d=n(g,a))){if(d){if(d.animated)return;r=d.getBoundingClientRect()}b(o),k(w,g,s,e,d,r)!==!1&&(s.contains(g)||(g.appendChild(s),t=g),this._animate(e,s),d&&this._animate(r,d))}else if(d&&!d.animated&&d!==s&&void 0!==d.parentNode[L]){A!==d&&(A=d,B=h(d),C=h(d.parentNode));var q,r=d.getBoundingClientRect(),y=r.right-r.left,z=r.bottom-r.top,D=/left|right|inline/.test(B.cssFloat+B.display)||"flex"==C.display&&0===C["flex-direction"].indexOf("row"),E=d.offsetWidth>s.offsetWidth,G=d.offsetHeight>s.offsetHeight,H=(D?(a.clientX-r.left)/y:(a.clientY-r.top)/z)>.5,J=d.nextElementSibling,K=k(w,g,s,e,d,r);if(K!==!1){if(R=!0,setTimeout(m,30),b(o),1===K||-1===K)q=1===K;else if(D){var M=s.offsetTop,N=d.offsetTop;q=M===N?d.previousElementSibling===s&&!E||H&&E:N>M}else q=J!==s&&!G||H&&G;s.contains(g)||(q&&!J?g.appendChild(s):d.parentNode.insertBefore(s,q?J:d)),t=s.parentNode,this._animate(e,s),this._animate(r,d)}}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();h(b,"transition","none"),h(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,h(b,"transition","all "+c+"ms"),h(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){h(b,"transition",""),h(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;f(N,"touchmove",this._onTouchMove),f(a,"mouseup",this._onDrop),f(a,"touchend",this._onDrop),f(a,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(J.pid),clearTimeout(this._dragStartTimer),f(N,"mousemove",this._onTouchMove),this.nativeDraggable&&(f(N,"drop",this),f(c,"dragstart",this._onDragStart)),this._offUpEvents(),b&&(I&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation()),u&&u.parentNode.removeChild(u),s&&(this.nativeDraggable&&f(s,"dragend",this),l(s),g(s,this.options.ghostClass,!1),g(s,this.options.chosenClass,!1),w!==t?(E=p(s),E>=0&&(j(null,t,"sort",s,w,D,E),j(this,w,"sort",s,w,D,E),j(null,t,"add",s,w,D,E),j(this,w,"remove",s,w,D,E))):(v&&v.parentNode.removeChild(v),s.nextSibling!==x&&(E=p(s),E>=0&&(j(this,w,"update",s,w,D,E),j(this,w,"sort",s,w,D,E)))),a.active&&((null===E||-1===E)&&(E=D),j(this,w,"end",s,w,D,E),this.save())),w=s=t=u=x=v=y=z=G=H=I=E=A=B=F=a.active=null)},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?s&&(this._onDragOver(a),d(a)):("drop"===b||"dragend"===b)&&this._onDrop(a)},toArray:function(){for(var a,b=[],d=this.el.children,e=0,f=d.length,g=this.options;f>e;e++)a=d[e],c(a,g.draggable,this.el)&&b.push(a.getAttribute(g.dataIdAttr)||o(a));return b},sort:function(a){var b={},d=this.el;this.toArray().forEach(function(a,e){var f=d.children[e];c(f,this.options.draggable,d)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(d.removeChild(b[a]),d.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return c(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:(c[a]=b,void("group"===a&&V(c)))},destroy:function(){var a=this.el;a[L]=null,f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),this.nativeDraggable&&(f(a,"dragover",this),f(a,"dragenter",this)),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),T.splice(T.indexOf(this._onDragOver),1),this._onDrop(),this.el=a=null}},a.utils={on:e,off:f,css:h,find:i,is:function(a,b){return!!c(a,b,a)},extend:r,throttle:q,closest:c,toggleClass:g,index:p},a.create=function(b,c){return new a(b,c)},a.version="1.3.0",a});
\ No newline at end of file
diff --git a/dev/blocks/sorter/sorter.scss b/dev/blocks/sorter/sorter.scss
deleted file mode 100644
index 58efd67..0000000
--- a/dev/blocks/sorter/sorter.scss
+++ /dev/null
@@ -1,38 +0,0 @@
-@import '../common/__list-nostyle/common__list-nostyle';
-
-$b: '.sorter';
-
-#{$b} {
- @extend .common__list-nostyle;
-
- text-align: right;
-
- &__item {
- display: inline-block;
-
- margin-left: 15px;
-
- font-size: 12px;
- }
-
- &__link {
- border-color: rgba(162, 162, 162, 0.2);
-
- color: #919191;
- font-weight: 700;
-
- &:hover {
- border-color: rgba(162, 162, 162, 0.7);
-
- color: #333;
- }
-
- &_active {
- &, &:hover {
- color: #000;
-
- border-color: transparent;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/dev/blocks/status/status.scss b/dev/blocks/status/status.scss
deleted file mode 100644
index f3b72ef..0000000
--- a/dev/blocks/status/status.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-$b: '.status';
-
-#{$b} {
- display: none;
-
- color: #666;
- font-size: 20px;
- font-style: italic;
- font-family: $serif;
-
- text-align: center;
-}
\ No newline at end of file
diff --git a/dev/blocks/wrapper/wrapper.scss b/dev/blocks/wrapper/wrapper.scss
deleted file mode 100644
index 565f96d..0000000
--- a/dev/blocks/wrapper/wrapper.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-.wrapper {
- max-width: 960px;
- margin: 0 auto;
-}
\ No newline at end of file
diff --git a/dev/css/main.css b/dev/css/main.css
deleted file mode 100644
index b6451db..0000000
--- a/dev/css/main.css
+++ /dev/null
@@ -1,629 +0,0 @@
-@charset "UTF-8";
-/* vars */
-/* common blocks */
-@import url(https://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic&subset=latin,cyrillic);
-@import url(https://fonts.googleapis.com/css?family=PT+Serif:400,700,400italic,700italic&subset=latin,cyrillic);
-.wrapper {
- max-width: 960px;
- margin: 0 auto; }
-
-.icon {
- display: inline-block;
- width: 15px;
- height: 15px;
- vertical-align: -3px; }
-
-.link, .content a, .onenews #disqus_thread a {
- border-bottom: 1px solid rgba(0, 96, 160, 0.2);
- color: #0060a0;
- text-decoration: none;
- transition: all .5s;
- outline: none; }
- .link:hover, .content a:hover, .onenews #disqus_thread a:hover {
- border-color: rgba(224, 80, 32, 0.9);
- color: #e05020;
- fill: #e05020;
- transition: all 0ms; }
- .link_dotted {
- border-bottom-style: dotted; }
-
-.notify {
- position: fixed;
- top: 20px;
- left: 0;
- right: 0;
- box-sizing: border-box;
- display: none;
- width: 300px;
- padding: 10px 20px;
- margin: 0 auto;
- border-radius: 3px;
- background: rgba(252, 229, 188, 0.9);
- box-shadow: 2px 2px 8px rgba(241, 211, 159, 0.9);
- color: #8c5d08;
- cursor: pointer; }
- @media (max-width: 300px) {
- .notify {
- top: 0; } }
-
-.form__input {
- display: inline-block;
- box-sizing: border-box;
- width: 300px;
- max-width: 100%;
- height: 26px;
- padding: 3px 5px;
- margin-right: 7px;
- margin-bottom: 7px;
- outline: none;
- border: 1px solid #ccc;
- font-size: 13px; }
- .form__input:focus {
- border-color: #999; }
- @media (max-width: 600px) {
- .form__input {
- width: 100%; } }
- .form__input_big {
- height: 80px; }
-
-.form__button {
- width: 80px;
- height: 26px;
- background: none;
- border: 1px solid #ccc;
- outline: none;
- font-size: 13px;
- cursor: pointer;
- transition: background 200ms; }
- .form__button:focus, .form__button:hover {
- border-color: #999;
- background: #ccc; }
- .form__button:active {
- border-color: #777;
- background: #aaa; }
-
-.status {
- display: none;
- color: #666;
- font-size: 20px;
- font-style: italic;
- font-family: "PT Serif", Georgia, sans-serif;
- text-align: center; }
-
-.content p:first-of-type {
- margin-top: 0; }
-
-.content p:last-of-type {
- margin-bottom: 0; }
-
-.content img {
- max-width: 100%; }
-
-/* main blocks */
-.page {
- overflow-x: hidden;
- padding: 0 10px;
- font-family: "PT Sans", Arial, sans-serif; }
- .page__header {
- margin-bottom: 15px; }
- .page__footer {
- margin-top: 40px; }
- @media (max-width: 500px) {
- .page__footer {
- margin-top: 90px; } }
-
-.header {
- padding-top: 20px;
- padding-bottom: 20px;
- border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
- .header__title {
- font-size: 1.75rem;
- font-weight: 700;
- font-family: "PT Serif", Georgia, sans-serif; }
- .header__menu {
- margin-top: 10px; }
-
-.footer {
- padding-top: 20px;
- padding-bottom: 20px;
- border-top: 1px solid rgba(0, 0, 0, 0.1); }
-
-.common__list-nostyle, .menu, .sorter, .filter, .filter__dropdown, .news__list {
- padding: 0;
- margin: 0;
- list-style: none; }
-
-.menu_sort {
- text-align: right; }
- .menu_sort .menu__item {
- margin-left: 15px;
- margin-right: 0;
- font-size: 12px; }
- .menu_sort .link, .menu_sort .content a, .content .menu_sort a, .menu_sort .onenews #disqus_thread a, .onenews #disqus_thread .menu_sort a {
- border-color: rgba(162, 162, 162, 0.2);
- color: #919191;
- font-weight: 700; }
- .menu_sort .link:hover, .menu_sort .content a:hover, .content .menu_sort a:hover, .menu_sort .onenews #disqus_thread a:hover, .onenews #disqus_thread .menu_sort a:hover {
- border-color: rgba(162, 162, 162, 0.7);
- color: #333; }
- .menu_sort .link_active, .menu_sort .link_active:hover {
- color: #000;
- border-color: transparent; }
-
-.menu__item {
- display: inline-block;
- margin-right: 15px;
- margin-top: 5px; }
- .menu__item_to-current {
- display: none; }
- .menu__item_to-comments {
- display: none; }
- .menu__item_right {
- float: right;
- margin-right: 0;
- margin-left: 15px; }
- .menu__item_admin {
- display: none; }
-
-.sorter {
- text-align: right; }
- .sorter__item {
- display: inline-block;
- margin-left: 15px;
- font-size: 12px; }
- .sorter__link {
- border-color: rgba(162, 162, 162, 0.2);
- color: #919191;
- font-weight: 700; }
- .sorter__link:hover {
- border-color: rgba(162, 162, 162, 0.7);
- color: #333; }
- .sorter__link_active, .sorter__link_active:hover {
- color: #000;
- border-color: transparent; }
-
-.filter__item {
- position: relative;
- display: inline-block;
- padding: 2px 4px 3px 4px;
- margin-left: -2px;
- margin-right: 15px;
- vertical-align: top;
- font-size: 12px; }
- .filter__item_active {
- background: #3F8BBD;
- border-radius: 4px; }
- .filter__item_active:hover {
- background: #326f97; }
- .filter__item_active .filter__current, .filter__item_active .filter__current:hover,
- .filter__item_active .filter__link,
- .filter__item_active .filter__link:hover {
- color: #fff;
- font-weight: 400;
- border-color: transparent; }
-
-.filter__link {
- border-color: rgba(162, 162, 162, 0.2);
- border-bottom-style: dashed;
- color: #919191;
- font-weight: 700; }
- .filter__link:hover {
- border-color: rgba(162, 162, 162, 0.7);
- color: #333; }
-
-.filter__dropdown {
- display: none;
- position: absolute;
- z-index: 1;
- margin-left: -6px;
- margin-top: 3px;
- border-radius: 4px;
- border: 1px solid #e0e0e0;
- background: #fff;
- box-shadow: 1px 4px 4px rgba(100, 100, 100, 0.3); }
- .filter__dropdown_visible {
- display: block; }
-
-.filter__dropdown-item {
- margin: 0 4px;
- border-bottom: 1px solid rgba(200, 200, 200, 0.4); }
- .filter__dropdown-item:last-child {
- border-bottom: none; }
-
-.filter__dropdown-link {
- display: block;
- padding: 4px 1px 5px;
- font-weight: 400;
- color: #777;
- border-bottom: none; }
- .filter__dropdown-link:hover {
- color: #333; }
-
-.news {
- font-size: 0; }
- .news_mobile .news__manage {
- display: block; }
- .news_mobile .news__mobile-buttons {
- display: inline-block; }
- .news_mobile .news__title {
- hyphens: auto; }
- .news_disabled-sort .news__mobile-buttons {
- display: none; }
- .news_disabled-sort .news__button_first {
- display: none; }
- @media (max-width: 500px) {
- .news_admin .news__item {
- margin-top: 80px; }
- .news_admin .news__item:first-child {
- margin-top: 20px; } }
- .news_deleted {
- margin-top: 40px; }
- .news_deleted .news__manage {
- top: -20px; }
- @media (max-width: 500px) {
- .news_deleted .news__manage {
- top: -15px; } }
- @media (max-width: 500px) {
- .news_deleted .news__item {
- margin-top: 40px; } }
- .news_archive .news__item {
- margin-bottom: 10px; }
- .news_archive .news__sort {
- margin-bottom: 25px; }
- .news_archive .news__manage {
- top: -15px; }
- .news__item {
- position: relative;
- display: none;
- min-height: 80px;
- padding: 10px 15px;
- margin: -10px -15px 40px;
- border-radius: 5px;
- border: 1px solid transparent; }
- .news__item:hover .news__manage {
- display: block; }
- .news__item:first-child .news__button_first {
- display: none; }
- .news__item:first-child .news__button_up {
- display: none; }
- .news__item:last-child .news__button_down {
- display: none; }
- .news__item_current {
- position: relative;
- background: #FBE2BD; }
- .news__item_current .news__button_current {
- display: none; }
- .news__item_geek {
- border-color: rgba(0, 149, 255, 0.75); }
- .news__item_sortable {
- border: 1px dashed #ddd;
- background: rgba(238, 238, 238, 0.3);
- opacity: 0.7; }
- .news__item_geek-light .news__geek {
- display: inline-block; }
- .news__title {
- margin-right: 60px;
- border-color: rgba(0, 0, 0, 0.2);
- color: #000;
- font-size: 1.25rem;
- font-weight: 700;
- font-family: "PT Serif", Georgia, sans-serif; }
- .news__info {
- margin-top: 4px;
- margin-bottom: 3px;
- color: #666;
- font-size: 0.85rem;
- letter-spacing: 1px; }
- .news__desc {
- margin-bottom: 5px;
- font-size: 16px; }
- .news__desc img, .news__desc iframe, .news__desc video {
- display: none; }
- .news__status {
- margin-top: 40px; }
- .news__body {
- overflow: hidden;
- margin-bottom: 18px; }
- .news__footer {
- margin-top: -15px; }
- .news__light {
- display: none;
- font-size: 0.9rem; }
- .news__image[style] {
- float: right;
- width: 100px;
- height: 100px;
- margin-left: 5px;
- margin-bottom: 5px;
- border-radius: 1px;
- background-size: cover;
- background-position: center;
- background-repeat: no-repeat; }
- .news__image-hidden {
- display: none; }
- .news__full {
- position: relative;
- display: none;
- padding: 5px 40px 5px 10px;
- margin: 10px 0 25px;
- overflow: hidden;
- background: rgba(200, 200, 200, 0.2);
- border-radius: 3px;
- font-size: 16px; }
- .news__foldup {
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- display: none;
- width: 30px;
- background: rgba(0, 0, 0, 0.05);
- text-align: center;
- cursor: pointer;
- transition: 250ms all; }
- .news__foldup:hover {
- background: rgba(0, 0, 0, 0.1); }
- .news__foldup-icon {
- margin-top: 15px; }
- .news__manage {
- position: absolute;
- top: -26px;
- right: 0;
- left: 0;
- display: none;
- height: 26px;
- padding-top: 4px;
- font-size: 0;
- text-align: right; }
- @media (max-width: 500px) {
- .news__manage {
- top: -50px; } }
- .news__mobile-buttons {
- display: none; }
- .news__button {
- display: inline-block;
- height: 18px;
- padding: 0 5px;
- margin-left: 7px;
- margin-top: 4px;
- background-color: #F3A820;
- border-radius: 3px;
- opacity: 0.9;
- color: #333;
- font-size: 14px;
- line-height: 16px;
- text-decoration: none;
- text-align: center;
- vertical-align: middle;
- transition: all 300ms; }
- .news__button:hover {
- opacity: 1;
- color: #111;
- transition: all 0ms; }
- .news__button_del {
- background: #ff3333; }
- .news__button_del:after {
- content: 'удалить'; }
- .news__button_archive {
- background: #c1c1c1; }
- .news__button_archive:after {
- content: 'в архив'; }
- .news__button_restore {
- background: #33cc33; }
- .news__button_restore:after {
- content: 'восстановить'; }
- .news__button_togeek {
- background: #33aaff; }
- .news__button_togeek:after {
- content: 'в гиковский выпуск'; }
- .news__button_ingeek {
- background: #33aaff;
- color: rgba(255, 255, 255, 0.85); }
- .news__button_ingeek:hover {
- color: #fff; }
- .news__button_ingeek:after {
- content: 'гиковское'; }
- .news__button_first {
- background: #11ee66; }
- .news__button_first:after {
- content: 'сделать первой'; }
- .news__button_current:after {
- content: 'сделать текущей'; }
- .news__button_up {
- height: 16px;
- background-color: #fff;
- border: 1px solid #333;
- color: #333;
- line-height: 15px; }
- .news__button_up:after {
- content: 'вверх'; }
- .news__button_up:active {
- border-color: #ccc; }
- .news__button_down {
- height: 16px;
- background-color: #fff;
- border: 1px solid #333;
- color: #333;
- line-height: 15px; }
- .news__button_down:after {
- content: 'вниз'; }
- .news__button_down:active {
- border-color: #ccc; }
- .news__sort {
- display: none;
- margin-bottom: 45px; }
- .news__menu {
- display: none;
- width: 50%;
- margin-bottom: 45px;
- vertical-align: top; }
- .news__full-loader {
- padding: 30px 0;
- color: #999;
- font-family: "PT Serif", Georgia, sans-serif;
- font-style: italic;
- text-align: center; }
- .news__handler {
- position: absolute;
- right: 0;
- top: 0;
- bottom: 35px;
- width: 150px;
- cursor: move; }
- .news__info-stat {
- display: inline-block;
- padding: 1px 0;
- margin-top: 2px;
- margin-left: 3px;
- border-bottom: 1px solid transparent;
- color: #666;
- fill: #aaa;
- font-size: 14px; }
- .news__info-stat:hover {
- fill: #e36236; }
- .news__geek {
- display: none;
- margin-left: 5px;
- margin-right: 3px; }
- .news__comments {
- margin-right: 4px; }
-
-.common__table-nostyle, .feeds__table {
- border: none;
- border-spacing: 0; }
- .common__table-nostyle td, .feeds__table td {
- border: none;
- border-spacing: 0;
- vertical-align: top; }
-
-.feeds {
- padding-top: 20px; }
- .feeds__table {
- width: 100%;
- max-width: 770px;
- margin: 0 auto;
- table-layout: fixed;
- border-spacing: 10px 4px; }
- @media (max-width: 850px) {
- .feeds__table {
- max-width: none;
- table-layout: auto; } }
- .feeds__table th {
- text-align: left; }
- .feeds__urls {
- width: 500px;
- max-width: 500px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis; }
- @media (max-width: 850px) {
- .feeds__urls {
- width: auto;
- max-width: 300px; } }
- @media (max-width: 600px) {
- .feeds__urls {
- max-width: 150px;
- overflow: visible;
- white-space: normal;
- word-wrap: break-word; } }
- @media (max-width: 350px) {
- .feeds__urls {
- max-width: 100px;
- overflow: visible;
- white-space: normal;
- word-wrap: break-word; } }
- .feeds__update {
- width: 170px;
- max-width: 170px;
- white-space: nowrap; }
- @media (max-width: 850px) {
- .feeds__update {
- width: auto; } }
- @media (max-width: 600px) {
- .feeds__update {
- max-width: 70px;
- white-space: normal; } }
- .feeds__del {
- width: 100px;
- max-width: 100px; }
- @media (max-width: 850px) {
- .feeds__del {
- width: auto; } }
- .feeds__add-form {
- margin-top: 10px;
- font-size: 0; }
-
-.login {
- max-width: 200px;
- margin: 0 auto; }
- .login__tip {
- margin-bottom: 5px; }
- .login__error {
- display: none;
- margin-top: 10px;
- color: #f00000; }
-
-.add {
- margin-top: 90px;
- padding: 20px 0 50px;
- text-align: center; }
- .add_by-link {
- margin-top: 60px; }
- .add__bookmark {
- position: relative;
- bottom: -50px;
- left: 0;
- right: 0;
- font-size: 14px;
- text-align: center; }
- .add__tip {
- margin-top: 20px;
- margin-bottom: 5px;
- color: #999;
- font-size: 12px; }
- .add__switcher {
- font-size: 13px;
- text-align: center; }
-
-.onenews {
- padding-top: 20px; }
- .onenews__title {
- border-color: rgba(0, 0, 0, 0.2);
- color: #000;
- font-size: 2rem;
- font-weight: 700;
- font-family: "PT Serif", Georgia, sans-serif; }
- .onenews__info {
- margin-top: 20px;
- color: #666;
- font-size: 0.85rem;
- letter-spacing: 1px; }
- .onenews__body {
- margin-top: 20px;
- margin-bottom: 35px; }
- .onenews__comments {
- margin-top: 45px; }
- .onenews__geek {
- display: none;
- margin-right: 3px;
- vertical-align: -1px; }
-
-/* fonts */
-/* fixes */
-html, body {
- height: 100%;
- margin: 0;
- padding: 0; }
-
-input:focus::placeholder, textarea:focus::placeholder {
- color: transparent; }
-
-input, textarea {
- font-family: inherit; }
-
-/* ie 9 fixes */
-img {
- border: 0; }
-
-textarea {
- overflow: auto; }
diff --git a/dev/fonts/pt-sans/pt-sans.scss b/dev/fonts/pt-sans/pt-sans.scss
deleted file mode 100644
index c34df98..0000000
--- a/dev/fonts/pt-sans/pt-sans.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import url(https://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic&subset=latin,cyrillic);
\ No newline at end of file
diff --git a/dev/fonts/pt-serif/pt-serif.scss b/dev/fonts/pt-serif/pt-serif.scss
deleted file mode 100644
index 2ed167a..0000000
--- a/dev/fonts/pt-serif/pt-serif.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import url(https://fonts.googleapis.com/css?family=PT+Serif:400,700,400italic,700italic&subset=latin,cyrillic);
\ No newline at end of file
diff --git a/dev/html/add/index.html b/dev/html/add/index.html
deleted file mode 100644
index 6a66455..0000000
--- a/dev/html/add/index.html
+++ /dev/null
@@ -1,33 +0,0 @@
-@@include('../../includes/head_admin.html',{
- "title": "Добавление — Новости для Радио-Т"
-})
-
-
- @@include('../../blocks/header/header.html')
-
-
-
- @@include('../../blocks/footer/footer.html')
-
-