1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-23 00:50: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 { .avatar {
max-width: 120px; 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
View file

@ -29,42 +29,49 @@
{{ render_field(form.information, class_='form-control', placeholder='Your website or IRC channel') }} {{ render_field(form.information, class_='form-control', placeholder='Your website or IRC channel') }}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label class="control-label">Torrent flags</label> <label class="control-label">Torrent flags</label><br>
<div> <div class="btn-group" data-toggle="buttons">
{% 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 #} {# Only allow changing anonymous status when an uploader exists #}
{% if torrent.uploader_id %} {% 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 }} {{ form.is_anonymous }}
<span class="glyphicon glyphicon-ok"></span>
Anonymous Anonymous
</label> </label>
{% endif %} {% 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 %} {% 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 }} {{ form.is_trusted }}
<span class="glyphicon glyphicon-ok"></span>
Trusted Trusted
</label> </label>
{% endif %} {% endif %}
</div> </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>
</div> </div>

18
nyaa/templates/upload.html Normal file → Executable file
View file

@ -38,32 +38,36 @@
{{ render_field(upload_form.information, class_='form-control', placeholder='Your website or IRC channel') }} {{ render_field(upload_form.information, class_='form-control', placeholder='Your website or IRC channel') }}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label class="control-label">Torrent flags</label> <label class="control-label">Torrent flags</label><br>
<div> <div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary" title="Upload torrent anonymously (don't display your username)"> <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 "")) }} {{ upload_form.is_anonymous(disabled=(False if g.user else ""), checked=(False if g.user else "")) }}
<span class="glyphicon glyphicon-ok"></span>
Anonymous Anonymous
</label> </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 }} {{ upload_form.is_hidden }}
<span class="glyphicon glyphicon-ok"></span>
Hidden Hidden
</label> </label>
<label class="btn btn-danger" title="This torrent is derived from another release"> <label class="btn btn-danger" title="This torrent is derived from another release">
{{ upload_form.is_remake }} {{ upload_form.is_remake }}
<span class="glyphicon glyphicon-ok"></span>
Remake Remake
</label> </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 }} {{ upload_form.is_complete }}
<span class="glyphicon glyphicon-ok"></span>
Complete Complete
</label> </label>
{% if g.user.is_trusted %} {% 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="") }} {{ upload_form.is_trusted(checked="") }}
<span class="glyphicon glyphicon-ok"></span>
Trusted Trusted
</label> </label>
{% endif %} {% endif %}
</div> </div>
</div>
</div> </div>
<div class="row"> <div class="row">