Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Merge pull request #582 from sfan5/misc123

fixes
Cette révision appartient à :
akuma06 2017-05-17 22:36:36 +02:00 révisé par GitHub
révision 710de42fb0
25 fichiers modifiés avec 23 ajouts et 105 suppressions

Voir le fichier

@ -56,25 +56,9 @@
background-color: #29363d; background-color: #29363d;
} }
/* #container.cont-home { li#mascot {
background: #29363d url(/img/megumin.png) no-repeat;
}
#container.cont-view {
background: #29363d url(/img/megumin.png) no-repeat;
background-size: 75px;
}
*/
img#mascot {
display:block;
background-image: url(/img/megumin.png); background-image: url(/img/megumin.png);
box-sizing: border-box;
height: 167px;
width: 125px;
padding-left: 125px;
} }
/*The above is thanks to https://css-tricks.com/replace-the-image-in-an-img-with-css/
Used to avoid the layout bugs caused by pure css background mascots, while still avoiding
JS to switch the images.*/
body { body {
background-color:#282A2E; background-color:#282A2E;

Voir le fichier

@ -1,6 +1,6 @@
/* Torrent status colors */ /* Torrent status colors */
.remake { .remake {
background-color: rgba(240, 176, 128, 0.6); background-color: rgb(240, 176, 128);
} }
.trusted { .trusted {
background-color: #a3e9a4; background-color: #a3e9a4;
@ -59,16 +59,13 @@ padding:2px 0;
background: white; background: white;
} }
li#mascot {
/* background-image: url(/img/renchon.png);
#container.cont-home { width: 125px;
background: white url(/img/renchon.png) no-repeat; height: 169px;
margin-bottom: -5px;
} }
#container.cont-view { /* This used to avoid usage of Javascript for switching images. */
background: white url(/img/renchon.png) no-repeat;
background-size: 61px;
}
*/
body { body {
background-color: #ececec; background-color: #ececec;
@ -241,8 +238,9 @@ div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:last-of-typ
} }
#mainmenu .navbar-form select.form-control#max #mainmenu .navbar-form select.form-control#max
{ {
width: 8rem; width: 6rem;
} }
.special-img .special-img
{ {
position: relative; position: relative;
@ -444,10 +442,7 @@ select#bottom_language_selector {
/* Wordbreak fix*/ /* Wordbreak fix*/
.break { .break {
word-break:break-all; word-break: break-all;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto; hyphens: auto;
} }
@ -507,7 +502,7 @@ select#bottom_language_selector {
} }
.commentList .commentBody > .row > div { .commentList .commentBody > .row > div {
word-break: break-word; word-wrap: break-word;
} }
.commentList .commentData { .commentList .commentData {

Fichier binaire non affiché.

Avant

Largeur:  |  Hauteur:  |  Taille: 6,5 Kio

Après

Largeur:  |  Hauteur:  |  Taille: 6,4 Kio

Fichier binaire non affiché.

Avant

Largeur:  |  Hauteur:  |  Taille: 2,5 Kio

Après

Largeur:  |  Hauteur:  |  Taille: 2,4 Kio

Fichier binaire non affiché.

Avant

Largeur:  |  Hauteur:  |  Taille: 6,9 Kio

Après

Largeur:  |  Hauteur:  |  Taille: 6,7 Kio

Fichier binaire non affiché.

Avant

Largeur:  |  Hauteur:  |  Taille: 2,6 Kio

Après

Largeur:  |  Hauteur:  |  Taille: 2,6 Kio

Voir le fichier

@ -16,6 +16,7 @@ function toggleLayer(elem) {
elem.classList.add("hide"); elem.classList.add("hide");
} }
// Date formatting
var lang = $("html").attr("lang"); var lang = $("html").attr("lang");
var shortOpt = { year: "numeric", month: "short", day: "numeric" }; var shortOpt = { year: "numeric", month: "short", day: "numeric" };

Voir le fichier

@ -6,6 +6,7 @@ import (
"math" "math"
"net/url" "net/url"
"strconv" "strconv"
"time"
"github.com/NyaaPantsu/nyaa/config" "github.com/NyaaPantsu/nyaa/config"
"github.com/NyaaPantsu/nyaa/service/user/permission" "github.com/NyaaPantsu/nyaa/service/user/permission"
@ -143,4 +144,8 @@ var FuncMap = template.FuncMap{
"calcWidthLeech": func(seed uint32, leech uint32) float64 { "calcWidthLeech": func(seed uint32, leech uint32) float64 {
return float64(float64(leech)/(float64(seed)+float64(leech))) * 100 return float64(float64(leech)/(float64(seed)+float64(leech))) * 100
}, },
"formatDateRFC": func(t time.Time) string {
// because time.* isn't available in templates...
return t.Format(time.RFC3339)
},
} }

Voir le fichier

@ -64,23 +64,6 @@
{{ end }} {{ end }}
<input type="hidden" name="userID" value="{{ .Search.UserID }}"> <input type="hidden" name="userID" value="{{ .Search.UserID }}">
{{end}} {{end}}
{{/* this is used in the modpanel */}}
{{define "search_advanced"}}
<select name="sort" class="form-control input-sm">
<option value="0" {{if eq .Search.Sort 0}}selected{{end}}>{{T "id"}}</option>
<option value="1" {{if eq .Search.Sort 1}}selected{{end}}>{{T "name"}}</option>
<option value="2" {{if eq .Search.Sort 2}}selected{{end}}>{{T "date"}}</option>
<option value="3" {{if eq .Search.Sort 3}}selected{{end}}>{{T "downloads"}}</option>
<option value="4" {{if eq .Search.Sort 4}}selected{{end}}>{{T "size"}}</option>
<option value="5" {{if eq .Search.Sort 4}}selected{{end}}>{{T "seeders"}}</option>
<option value="6" {{if eq .Search.Sort 4}}selected{{end}}>{{T "leechers"}}</option>
<option value="7" {{if eq .Search.Sort 4}}selected{{end}}>{{T "completed"}}</option>
</select>
<select name="order" class="form-control input-sm">
<option value="false" {{if eq .Search.Order false}}selected{{end}}>{{T "descending"}}</option>
<option value="true" {{if eq .Search.Order true}}selected{{end}}>{{T "ascending"}}</option>
</select>
{{end}}
{{define "search_button"}} {{define "search_button"}}
<div class="input-group"> <div class="input-group">
<input name="q" class="form-control input-sm" placeholder="{{T "search"}}" type="text" value="{{.Search.Query}}"> <input name="q" class="form-control input-sm" placeholder="{{T "search"}}" type="text" value="{{.Search.Query}}">

Voir le fichier

@ -77,7 +77,7 @@
Powered by NyaaPantsu Powered by NyaaPantsu
</footer> </footer>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<!-- Include all compiled plugins (below), or include individual files as needed --> <!-- Include all compiled plugins (below), or include individual files as needed -->
<!-- Latest compiled and minified JavaScript --> <!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

Voir le fichier

@ -3,7 +3,7 @@
{{define "content"}} {{define "content"}}
<div class="blockBody"> <div class="blockBody">
<ul class="list-inline" aria-label="Page navigation"> <ul class="list-inline" aria-label="Page navigation">
<li><img id="mascot" src="/img/renchon.png" /></li> <li id="mascot"></li>
<li style="padding-top: 7%;" class="pull-right"><ul class="pagination"> <li style="padding-top: 7%;" class="pull-right"><ul class="pagination">
{{ genNav .Navigation .URL 5 }} {{ genNav .Navigation .URL 5 }}
</ul></li> </ul></li>

Voir le fichier

@ -98,7 +98,7 @@
{{end}} {{end}}
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<!-- Include all compiled plugins (below), or include individual files as needed --> <!-- Include all compiled plugins (below), or include individual files as needed -->
<!-- Latest compiled and minified JavaScript --> <!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

Voir le fichier

@ -137,10 +137,8 @@
<div class="col-sm-3"> <div class="col-sm-3">
<i class="pull-right date-short comment-date"> <i class="pull-right date-short comment-date">
<small> <small>
{{ .Date.Format ( Ts "date_format" ) }} {{ formatDateRFC .Date }}
{{/* output: "2017-05-01 15:30" {{/* JS will format the date as always */}}
Went with "Year-Month-Day" because it's the most unambiguous.
If you want it to be determined by where you're from, be my guest. */}}
</small> </small>
</i> </i>
</div> </div>

Voir le fichier

@ -651,10 +651,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "Edit %s's profile" "translation": "Edit %s's profile"
}, },
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "Seeders" "translation": "Seeders"

Voir le fichier

@ -603,10 +603,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "Editar perfil de %s" "translation": "Editar perfil de %s"
}, },
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "Seeders" "translation": "Seeders"

Voir le fichier

@ -655,10 +655,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "Éditer le profil de %s" "translation": "Éditer le profil de %s"
}, },
{
"id": "date_format",
"translation": "2006-01-02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "Seeders" "translation": "Seeders"

Voir le fichier

@ -587,10 +587,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "%s profiljának szerkesztése." "translation": "%s profiljának szerkesztése."
}, },
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "Seederek" "translation": "Seederek"

Voir le fichier

@ -614,10 +614,6 @@
{ {
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "Modifica il profilo di %s" "translation": "Modifica il profilo di %s"
},
{
"id":"date_format",
"translation": "2006-01-02 15:04"
}, },
{ {
"id": "seeders", "id": "seeders",

Voir le fichier

@ -651,10 +651,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "%s のプロフィールを編集" "translation": "%s のプロフィールを編集"
}, },
{
"id":"date_format",
"translation": "2006/01/02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "Seeder 数" "translation": "Seeder 数"

Voir le fichier

@ -611,10 +611,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "Editar o perfil de %s" "translation": "Editar o perfil de %s"
}, },
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "Seeders" "translation": "Seeders"

Voir le fichier

@ -651,10 +651,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "Modifică profilul lui %s" "translation": "Modifică profilul lui %s"
}, },
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "Seeders" "translation": "Seeders"

Voir le fichier

@ -619,10 +619,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "Изменение профиля %s's" "translation": "Изменение профиля %s's"
}, },
{
"id": "date_format",
"translation": "2006-01-02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "Сиды" "translation": "Сиды"

Voir le fichier

@ -651,10 +651,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "แก้ไขโปรไฟล์ของ %s" "translation": "แก้ไขโปรไฟล์ของ %s"
}, },
{
"id":"date_format",
"translation": "2006/01/02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "ผู้ปล่อย" "translation": "ผู้ปล่อย"

Voir le fichier

@ -651,10 +651,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "编辑 %s 的个人资料" "translation": "编辑 %s 的个人资料"
}, },
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "上传数" "translation": "上传数"

Voir le fichier

@ -611,10 +611,6 @@
"id": "profile_edit_page", "id": "profile_edit_page",
"translation": "編輯 %s 的個人檔案" "translation": "編輯 %s 的個人檔案"
}, },
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{ {
"id": "seeders", "id": "seeders",
"translation": "上傳數" "translation": "上傳數"