mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Finishing touches
This commit is contained in:
parent
ebafe494e8
commit
4b83d3792e
10 changed files with 31 additions and 13 deletions
|
@ -7,13 +7,13 @@ from ....database.tables import Royal, Diario
|
|||
|
||||
|
||||
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
||||
rp = Royalprint("diarioview", __name__, url_prefix="/diarioview", template_folder=tmpl_dir,
|
||||
rp = Royalprint("diarioview", __name__, url_prefix="/diario", template_folder=tmpl_dir,
|
||||
required_tables={Royal, Diario})
|
||||
|
||||
|
||||
@rp.route("/", defaults={"page": 1})
|
||||
@rp.route("/<int:page>")
|
||||
def diarioview_index(page):
|
||||
def diarioview_page(page):
|
||||
alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"]
|
||||
if page < 1:
|
||||
return "Page should be >1", 404
|
||||
|
|
|
@ -6,11 +6,14 @@
|
|||
|
||||
{% block content %}
|
||||
<div class="diarioview">
|
||||
{% if page > 1 %}
|
||||
<a class="previous-page" href="{{ url_for("diarioview.diarioview_page", page=(page - 1)) }}">Pagina precedente</a>
|
||||
{% endif %}
|
||||
{% for entry in entries %}
|
||||
<blockquote id="diario-{{ entry.diario_id }}" class="diario{% if entry.spoiler %} diario-spoiler{% endif %}">
|
||||
<div class="diario-content">
|
||||
{% if entry.media_url %}
|
||||
<img class="diario-img" src="{{ entry.media_url }}" alt="Caricamento immagine fallito">
|
||||
<a href="{{ entry.media_url }}" class="no-icon diario-img"><img src="{{ entry.media_url }}" alt="Caricamento immagine fallito"></a>
|
||||
{% endif %}
|
||||
{% if entry.text %}
|
||||
"<span class="diario-text">{{ entry.text }}</span>"
|
||||
|
@ -33,8 +36,11 @@
|
|||
<div class="diario-created">Salvato da <span class="diario-creator">{{ entry.creator.username }}</span></div>
|
||||
{% endif %}
|
||||
<time class="diario-timestamp" datetime="{{ entry.timestamp.isoformat() }}">{{ entry.timestamp.strftime("%d %b %Y %H:%M:%S") }}</time>
|
||||
<a class="diario-id no-icon" href="#diario-{{ entry.diario_id }}">#{{ entry.diario_id }}</a>
|
||||
<span class="diario-id">#{{ entry.diario_id }}</span>
|
||||
</blockquote>
|
||||
{% endfor %}
|
||||
{% if entries|length == 1000 %}
|
||||
<a class="next-page" href="{{ url_for("diarioview.diarioview_page", page=(page + 1)) }}">Pagina successiva</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<span class="left">Under construction</span>
|
||||
</div>
|
||||
<div class="bot">
|
||||
Non c'è ancora niente qui. O quasi. C'è solo la <a href="{{ url_for("wikiview.wikiview_index") }}">wiki</a> in sola lettura e il <a href="{{ url_for("tglogin.tglogin_index") }}">login con Telegram</a>...
|
||||
Lentamente, su questo sito stanno apparendo nuove features. Come il <a href="{{ url_for("diarioview.diarioview_page", page=1) }}">diario</a>!
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -9,7 +9,7 @@ from ....database.tables import Royal, Telegram
|
|||
|
||||
|
||||
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
||||
rp = Royalprint("tglogin", __name__, url_prefix="/tglogin", required_tables={Royal, Telegram},
|
||||
rp = Royalprint("tglogin", __name__, url_prefix="/login/telegram", required_tables={Royal, Telegram},
|
||||
template_folder=tmpl_dir)
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ from ....database.tables import Royal, WikiPage, WikiRevision
|
|||
|
||||
|
||||
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
||||
rp = Royalprint("wikiedit", __name__, url_prefix="/wikiedit", template_folder=tmpl_dir,
|
||||
rp = Royalprint("wikiedit", __name__, url_prefix="/wiki/edit", template_folder=tmpl_dir,
|
||||
required_tables={Royal, WikiPage, WikiRevision})
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ from ....database.tables import Royal, WikiPage, WikiRevision
|
|||
|
||||
|
||||
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
||||
rp = Royalprint("wikiview", __name__, url_prefix="/wikiview", template_folder=tmpl_dir,
|
||||
rp = Royalprint("wikiview", __name__, url_prefix="/wiki/view", template_folder=tmpl_dir,
|
||||
required_tables={Royal, WikiPage, WikiRevision})
|
||||
|
||||
|
||||
|
|
|
@ -648,11 +648,16 @@ button[disabled=""] {
|
|||
grid-row: 1;
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 4;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.diario .diario-content .diario-img {
|
||||
color: red;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
max-height: 400px;
|
||||
}
|
||||
.diario .diario-content .diario-text {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.diario .diario-quote {
|
||||
grid-row: 2;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -792,11 +792,17 @@ table {
|
|||
grid-row: 1;
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 4;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
|
||||
.diario-img {
|
||||
color: red;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
max-height: 400px;
|
||||
}
|
||||
|
||||
.diario-text {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
</a>
|
||||
<span class="nav-modules">
|
||||
<a class="no-icon" href="{{ url_for("wikiview.wikiview_index") }}">Wiki</a>
|
||||
<a class="no-icon" href="{{ url_for("diarioview.diarioview_page", page=1) }}">Diario</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="nav-center">
|
||||
|
|
Loading…
Reference in a new issue