mirror of
https://github.com/sb745/NyaaV3.git
synced 2025-12-23 04:35:45 +02:00
View template improvements
Merge pull request #9 from CounterPillow/view-template-improvements
This commit is contained in:
commit
4270ca8dd7
3 changed files with 7 additions and 3 deletions
|
|
@ -352,6 +352,7 @@ a.text-purple:hover, a.text-purple:active, a.text-purple:focus {
|
||||||
|
|
||||||
#comment {
|
#comment {
|
||||||
height: 8em;
|
height: 8em;
|
||||||
|
min-height: 8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
|
|
|
||||||
|
|
@ -268,6 +268,9 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||||
// Info bubble stuff
|
// Info bubble stuff
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
var bubble = document.getElementById('infobubble');
|
var bubble = document.getElementById('infobubble');
|
||||||
|
if (!bubble) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (Number(localStorage.getItem('infobubble_dismiss_ts')) < Number(bubble.dataset.ts)) {
|
if (Number(localStorage.getItem('infobubble_dismiss_ts')) < Number(bubble.dataset.ts)) {
|
||||||
bubble.removeAttribute('hidden');
|
bubble.removeAttribute('hidden');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<meta property="og:description" content="{{ category_name(torrent.sub_category.id_as_string) }} | {{ torrent.filesize | filesizeformat(True) }} | Uploaded by {{ uploader_name }} on {{ torrent.created_time.strftime('%Y-%m-%d') }}">
|
<meta property="og:description" content="{{ category_name(torrent.sub_category.id_as_string) }} | {{ torrent.filesize | filesizeformat(True) }} | Uploaded by {{ uploader_name }} on {{ torrent.created_time.strftime('%Y-%m-%d') }}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% from "_formhelpers.html" import render_field %}
|
{% from "_formhelpers.html" import render_field, render_markdown_editor %}
|
||||||
<div class="panel panel-{% if torrent.deleted %}deleted{% elif torrent.remake %}danger{% elif torrent.trusted %}success{% else %}default{% endif %}">
|
<div class="panel panel-{% if torrent.deleted %}deleted{% elif torrent.remake %}danger{% elif torrent.trusted %}success{% else %}default{% endif %}">
|
||||||
<div class="panel-heading"{% if torrent.hidden %} style="background-color: darkgray;"{% endif %}>
|
<div class="panel-heading"{% if torrent.hidden %} style="background-color: darkgray;"{% endif %}>
|
||||||
<h3 class="panel-title">
|
<h3 class="panel-title">
|
||||||
|
|
@ -177,7 +177,7 @@
|
||||||
<div class="row comment-body">
|
<div class="row comment-body">
|
||||||
{# Escape newlines into html entities because CF strips blank newlines #}
|
{# Escape newlines into html entities because CF strips blank newlines #}
|
||||||
<div markdown-text class="comment-content" id="torrent-comment{{ comment.id }}">{{- comment.text | escape | replace('\r\n', '\n') | replace('\n', ' '|safe) -}}</div>
|
<div markdown-text class="comment-content" id="torrent-comment{{ comment.id }}">{{- comment.text | escape | replace('\r\n', '\n') | replace('\n', ' '|safe) -}}</div>
|
||||||
{% if g.user.id == comment.user_id and comment_form %}
|
{% if g.user.id == comment.user_id and comment_form and not comment.editing_limit_exceeded and (not torrent.comment_locked or g.user.is_moderator) %}
|
||||||
<form class="edit-comment-box" action="{{ url_for('torrents.edit_comment', torrent_id=torrent.id, comment_id=comment.id) }}" method="POST">
|
<form class="edit-comment-box" action="{{ url_for('torrents.edit_comment', torrent_id=torrent.id, comment_id=comment.id) }}" method="POST">
|
||||||
{{ comment_form.csrf_token }}
|
{{ comment_form.csrf_token }}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -225,7 +225,7 @@
|
||||||
{{ comment_form.csrf_token }}
|
{{ comment_form.csrf_token }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{{ render_field(comment_form.comment, class_='form-control') }}
|
{{ render_markdown_editor(comment_form.comment) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if config.USE_RECAPTCHA and g.user.age < config['ACCOUNT_RECAPTCHA_AGE'] %}
|
{% if config.USE_RECAPTCHA and g.user.age < config['ACCOUNT_RECAPTCHA_AGE'] %}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue