Add export placeholder page

This commit is contained in:
vas3k
2020-01-19 22:17:10 +01:00
parent 3014963ff0
commit 329e96c3da
7 changed files with 72 additions and 3 deletions

View File

@@ -86,6 +86,15 @@ boards:
- name: ReadWrite
url: https://readwrite.com
rss: https://readwrite.com/feed/
- name: Микс блогов
slug: the_mix
feeds:
- url: http://www.rssmix.com/
rss: http://www.rssmix.com/
columns: 3
mix:
- http://vas3k.ru/rss/
- http://nedbatchelder.com/blog/rss.xml
- name: Мейнстрим
slug: mainstream
feeds:

View File

@@ -42,6 +42,15 @@ def board(request, board_slug):
return result
@cache_page(settings.STATIC_PAGE_CACHE_SECONDS)
def export(request, board_slug):
board = get_object_or_404(Board, slug=board_slug)
return render(request, "export.html", {
"board": board,
})
@cache_page(settings.STATIC_PAGE_CACHE_SECONDS)
def what(request):
return render(request, "what.html")

View File

@@ -1,7 +1,7 @@
from django.urls import path
from auth.views import login, logout, club_callback
from boards.views import index, board, privacy_policy, what
from boards.views import index, board, privacy_policy, what, export
urlpatterns = [
path("", index, name="index"),
@@ -14,4 +14,5 @@ urlpatterns = [
path("auth/logout/", logout, name="logout"),
path("<slug:board_slug>/", board, name="board"),
path("<slug:board_slug>/export/", export, name="export"),
]

View File

@@ -331,7 +331,7 @@
.footer {
text-align: center;
padding: 60px;
padding: 100px 20px 50px;
}
.logout-button {
@@ -342,6 +342,14 @@
margin-top: 40px;
}
.export-button {
display: inline-block;
color: var(--opposite-text-color) !important;
font-size: 90%;
padding: 10px 20px;
margin-top: 40px;
}
.document {
font-size: 110%;
line-height: 1.5;
@@ -381,3 +389,20 @@
margin: 10px 0 30px;
}
.export {
min-height: 400px;
}
.coming-soon {
display: block;
max-width: 500px;
margin: 100px auto;
}
.coming-soon h2 {
font-size: 200%;
}
.coming-soon p {
font-size: 120%;
}

View File

@@ -107,6 +107,10 @@
{% if board.natural_refreshed_at %}
<br><small>Обновлено {{ board.natural_refreshed_at }}</small>
{% endif %}
<div class="board-footer-export">
<a href="{% url "export" board.slug %}" class="button export-button">Экспортировать подборку себе</a>
</div>
</div>
{% endif %}
{% endblock %}

21
templates/export.html Normal file
View File

@@ -0,0 +1,21 @@
{% extends "layout.html" %}
{% load text_filters %}
{% load static %}
{% block title %}Экспорт | {{ board.curator_name }} | {{ board.curator_title }} | {{ block.super }}{% endblock %}
{% block content %}
<div class="export">
<div class="coming-soon">
<h2>Экспорт скоро будет!</h2>
<p>
Эта идея появилась совсем недавно и мы пока думаем как её сделать удобнее всего.
</p>
<p>
Подпишитесь на мой канал ⭐️ <a href="https://t.me/vas3k_channel">Вастрик.Пынь</a> чтобы узнать сразу когда он появится.
</p>
</div>
</div>
{% endblock %}

View File

@@ -39,7 +39,7 @@
{% block footer %}
<div class="footer">
Сделал <a href="https://vas3k.ru">Вастрик</a>.<br><br>
Сайт использует <a href="https://ru.wikipedia.org/wiki/Cookie" target="_blank">куки</a> для авторизации<br> и <a href="{% url "privacy_policy" %}">не собирает данные</a> больше, чем нужно для анонимной статистики.
Сайт использует <a href="https://ru.wikipedia.org/wiki/Cookie" target="_blank">куки</a> для авторизации<br> и собирает <a href="{% url "privacy_policy" %}">анонимные данные</a> для статистики.
{% if me %}
<br><a href="{% url "logout" %}" class="button logout-button">Выйти</a>
{% endif %}