mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 19:00:07 +00:00
Update buttons and css.
This commit is contained in:
parent
f32d1a0c64
commit
ad8a5c0d1c
14
nyaa/static/css/main.css
Normal file → Executable file
14
nyaa/static/css/main.css
Normal file → Executable file
|
@ -256,3 +256,17 @@ a.text-purple:hover, a.text-purple:active, a.text-purple:focus { color: #a760e0;
|
|||
.avatar {
|
||||
max-width: 120px;
|
||||
}
|
||||
|
||||
.btn-grey {
|
||||
color: #000000;
|
||||
background-color: #cccfd2;
|
||||
border-color: #ccc;
|
||||
}
|
||||
.btn-grey:hover, .btn-grey:focus, .btn-grey:active, .btn-grey.active, .open > .dropdown-toggle.btn-grey {
|
||||
background-color: #aaaaaa;
|
||||
}
|
||||
.btn span.glyphicon {
|
||||
opacity: 0;
|
||||
}
|
||||
.btn.active span.glyphicon {
|
||||
opacity: 1;
|
||||
|
|
55
nyaa/templates/edit.html
Normal file → Executable file
55
nyaa/templates/edit.html
Normal file → Executable file
|
@ -29,42 +29,49 @@
|
|||
{{ render_field(form.information, class_='form-control', placeholder='Your website or IRC channel') }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="control-label">Torrent flags</label>
|
||||
<div>
|
||||
{% if g.user.is_moderator %}
|
||||
<label class="btn btn-primary">
|
||||
{{ form.is_deleted }}
|
||||
Deleted
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
<label class="btn btn-default" style="background-color: darkgray; border-color: #ccc;" title="Hide torrent from listing">
|
||||
{{ form.is_hidden }}
|
||||
Hidden
|
||||
</label>
|
||||
<label class="btn btn-danger" title="This torrent is derived from another release">
|
||||
{{ form.is_remake }}
|
||||
Remake
|
||||
</label>
|
||||
<label class="btn btn-primary" title="This torrent is a complete batch (eg. season)">
|
||||
{{ form.is_complete }}
|
||||
Complete
|
||||
</label>
|
||||
|
||||
<label class="control-label">Torrent flags</label><br>
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
{# Only allow changing anonymous status when an uploader exists #}
|
||||
{% if torrent.uploader_id %}
|
||||
<label class="btn btn-primary" title="Upload torrent anonymously (don't display your username)">
|
||||
<label class="btn btn-default {% if torrent.anonymous %}active{% endif %}" title="Upload torrent anonymously (don't display your username)">
|
||||
{{ form.is_anonymous }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Anonymous
|
||||
</label>
|
||||
{% endif %}
|
||||
<label class="btn btn-grey {% if torrent.hidden %}active{% endif %}" title="Hide torrent from listing">
|
||||
{{ form.is_hidden }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Hidden
|
||||
</label>
|
||||
<label class="btn btn-danger {% if torrent.remake %}active{% endif %}" title="This torrent is derived from another release">
|
||||
{{ form.is_remake }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Remake
|
||||
</label>
|
||||
<label class="btn btn-warning {% if torrent.complete %}active{% endif %}" title="This torrent is a complete batch (eg. season)">
|
||||
{{ form.is_complete }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Complete
|
||||
</label>
|
||||
{% if g.user.is_trusted %}
|
||||
<label class="btn btn-success" title="Mark torrent trusted">
|
||||
<label class="btn btn-success {% if torrent.trusted %}active{% endif %}" title="Mark torrent trusted">
|
||||
{{ form.is_trusted }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Trusted
|
||||
</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
{% if g.user.is_moderator %}
|
||||
<label class="btn btn-primary {% if torrent.deleted %}active{% endif %}">
|
||||
{{ form.is_deleted }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Deleted
|
||||
</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
18
nyaa/templates/upload.html
Normal file → Executable file
18
nyaa/templates/upload.html
Normal file → Executable file
|
@ -38,32 +38,36 @@
|
|||
{{ render_field(upload_form.information, class_='form-control', placeholder='Your website or IRC channel') }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="control-label">Torrent flags</label>
|
||||
<div>
|
||||
<label class="btn btn-primary" title="Upload torrent anonymously (don't display your username)">
|
||||
<label class="control-label">Torrent flags</label><br>
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
<label class="btn btn-default" title="Upload torrent anonymously (don't display your username)">
|
||||
{{ upload_form.is_anonymous(disabled=(False if g.user else ""), checked=(False if g.user else "")) }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Anonymous
|
||||
</label>
|
||||
<label class="btn btn-default" style="background-color: darkgray; border-color: #ccc;" title="Hide torrent from listing">
|
||||
<label class="btn btn-grey" title="Hide torrent from listing">
|
||||
{{ upload_form.is_hidden }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Hidden
|
||||
</label>
|
||||
<label class="btn btn-danger" title="This torrent is derived from another release">
|
||||
{{ upload_form.is_remake }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Remake
|
||||
</label>
|
||||
<label class="btn btn-primary" title="This torrent is a complete batch (eg. season)">
|
||||
<label class="btn btn-warning" title="This torrent is a complete batch (eg. season)">
|
||||
{{ upload_form.is_complete }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Complete
|
||||
</label>
|
||||
{% if g.user.is_trusted %}
|
||||
<label class="btn btn-success" title="Mark torrent trusted">
|
||||
<label class="btn btn-success active" title="Mark torrent trusted">
|
||||
{{ upload_form.is_trusted(checked="") }}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Trusted
|
||||
</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in a new issue