1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 19:30:00 +00:00

Update buttons and css.

This commit is contained in:
snowfag 2017-05-23 01:17:18 -04:00
parent f32d1a0c64
commit ad8a5c0d1c
3 changed files with 67 additions and 42 deletions

14
nyaa/static/css/main.css Normal file → Executable file
View 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;

77
nyaa/templates/edit.html Normal file → Executable file
View file

@ -29,41 +29,48 @@
{{ 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>
{# 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)">
{{ form.is_anonymous }}
Anonymous
</label>
{% endif %}
{% if g.user.is_trusted %}
<label class="btn btn-success" title="Mark torrent trusted">
{{ form.is_trusted }}
Trusted
</label>
{% endif %}
<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-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 {% 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
View file

@ -38,31 +38,35 @@
{{ 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>