Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Fix some html errors (#1549)

* Remove useless / that created html error

* Slightly bigger font for torrent name on view.html, padding fixes

* Set kilo.js to look for span class name instead of name to remove HTML error

* Change span name into class to remove html errors

* remove name attribute

* remove link to user profile is Anon or invalid userid

* fix duplicate class attribute

* remove useless center, remove useless attribute, remove useless yield errors & bad name attribute

* turn name attribute into ID

* JS changes to go along

* fix travis

* Delete OldNav.jet.html

* Create oldNav.jet.html

* turn <li> into <span>

* Update classic.css

* Update main.css

* Update g.css

* Update tomorrow.css

* Update tomorrow.css

* Update classic_colors.css
Cette révision appartient à :
kilo 2017-09-11 21:59:17 +02:00 révisé par GitHub
Parent 870b72f1e9
révision 615ff10dc8
13 fichiers modifiés avec 37 ajouts et 38 suppressions

Voir le fichier

@ -177,7 +177,7 @@ select.form-input {
.header .h-search .form-input {
font-size: 100%;
}
.pagination li {
.pagination span {
border: 1px solid #666666;
border-radius: 0!important;
padding: 0.25em;
@ -185,7 +185,7 @@ select.form-input {
color: #106655;
margin-right: 4px;
}
.pagination li:hover {
.pagination span:hover {
background-color: #339999;
border: 1px solid #333333;
color: #FBFBFB;
@ -199,10 +199,10 @@ select.form-input {
.website-nav .pagination a {
display: inline!important;
}
.website-nav #page-prev li{
.website-nav #page-prev{
float: left;
}
.website-nav #page-next li{
.website-nav #page-next{
float: right;
}
@ -221,11 +221,11 @@ select.form-input {
}
.comment-box {
font-size: .9em;
font-size: .9em;
border-radius: 5px;
margin: 0 0 4px 0;
padding: 4px;
min-height: 70px;
min-height: 70px;
}
span.comment-index+p {
@ -319,13 +319,13 @@ span.comment-index+p a:hover {
font-size: 1em;
}
.torrent-hr::after {
content: ':';
content: ':';
}
#torrent-name h1::after {
content: '';
content: '';
}
#torrent-name h1 {
font-size: .7em;
font-size: .75em;
text-align: left!important;
margin-bottom: 0;
}

Voir le fichier

@ -3,7 +3,7 @@ body {
background: #ededed;
}
.header, .box, .pagination li, .user-menu {
.header, .box, .pagination span, .user-menu {
box-shadow: 1px 3px 4px rgba(0, 0, 0, 0.1)
}

Voir le fichier

@ -7,7 +7,7 @@ body {
box-shadow: 1px 3px 4px hsla(200, 20%, 20%, 0.15)
}
.box, .pagination li {
.box, .pagination span {
box-shadow: 1px 3px 4px hsla(270, 20%, 20%, 0.15)
}
@ -36,7 +36,7 @@ a:hover {
color: #2586B0;
}
.box, .pagination li {
.box, .pagination span {
background: hsla(198, 63%, 97%, 0.85);
border-color: #cbbdd7 !important;
}

Voir le fichier

@ -596,7 +596,7 @@ th {
z-index: 4;
}
.pagination li {
.pagination span {
border: 1px solid;
display: inline-block;
padding: 0.4rem;
@ -606,11 +606,11 @@ th {
min-width: 35px;
}
.pagination a:first-child li {
.pagination a:first-child span {
border-radius: 3px 0 0 3px;
}
.pagination a:nth-last-child(2) li {
.pagination a:nth-last-child(2) span {
border-radius: 0 3px 3px 0;
border-right-width: 1px !important
}

Voir le fichier

@ -3,7 +3,7 @@ body {
background: #1d1f21;
}
.header, .box, .pagination li, .user-menu {
.header, .box, .pagination span, .user-menu {
box-shadow: 1px 3px 4px rgba(0, 0, 0, 0.2)
}
@ -41,7 +41,7 @@ a:hover {
color: #9a9a9a;
}
.box, .pagination li, .modtools {
.box, .pagination span, .modtools {
background: hsla(222, 8%, 20%, 0.85);
border-color: #141517 !important;
}

Voir le fichier

@ -96,7 +96,7 @@ var Kilo = function (params) {
for (var i = 0; i < l; i++) {
torrentHTML.push(Templates.Render('torrents.item', torrents[i]))
}
document.getElementById("torrentListResults").innerHTML = torrentHTML[0] + document.getElementsByName("torrent-info tr")[0].outerHTML + torrentHTML[1]
document.getElementById("torrentListResults").innerHTML = torrentHTML[0] + document.getElementById("torrent-info-tr").outerHTML + torrentHTML[1]
})
}
}
@ -105,17 +105,17 @@ var Kilo = function (params) {
// set the class remake with b a boolean
this.setRemake = function (b) {
if (b) {
document.getElementsByName('torrent-info tr')[0].classList.add('remake')
document.getElementById("torrent-info-tr").classList.add('remake')
} else {
document.getElementsByName('torrent-info tr')[0].classList.remove('remake')
document.getElementById("torrent-info-tr").classList.remove('remake')
}
}
// set the class hidden with b a boolean
this.setHidden = function (b) {
if (!b) {
document.getElementsByName('torrent-info tr')[0].classList.remove('trusted')
document.getElementById("torrent-info-tr").classList.remove('trusted')
} else if (this.userTrusted) {
document.getElementsByName('torrent-info tr')[0].classList.add('trusted')
document.getElementById("torrent-info-tr").classList.add('trusted')
}
}
// set the name of the torrent according to value string
@ -206,7 +206,7 @@ var Kilo = function (params) {
for (var langIndex = 0; langIndex < document.getElementsByName('languages').length; langIndex++) {
if (document.getElementsByName('languages')[langIndex].checked) {
langTitle = langTitle + document.getElementsByName('upload-lang-languagename')[langIndex].innerText + ','
langTitle = langTitle + document.getElementsByClassName('upload-lang-languagename')[langIndex].innerText + ','
if (++langCount > 1) {
langValue = 'multiple'
continue

Voir le fichier

@ -11,7 +11,7 @@
{{ T("captcha_audio") }}
</a>
</audio>
<input class="form-input up-input" type="text" name="solution" id="solution" class="form-control" style="display:block;" placeholder="{{ T("captcha")}}" autocomplete="off" required />
<input class="form-input up-input form-control" type="text" name="solution" id="solution" style="display:block;" placeholder="{{ T("captcha")}}" autocomplete="off" required />
</div>
{{end}}
{{end}}

Voir le fichier

@ -1,7 +1,7 @@
{{ block flagList(languages=nil, selected="", inputname="languages", id="lang")}}
{{ if isset(languages) }}
{{ range _, language := languages }}<span class="input-group">
<span name="{{id}}-languagename">{{LanguageName(language, T)}}</span>
<span class="{{id}}-languagename">{{LanguageName(language, T)}}</span>
<input type="checkbox" name="{{inputname}}" class="form-language-checkbox" id="{{id}}-{{ language.Code }}" value="{{language.Code}}"{{ range _, v := selected}}{{ if contains(v, language.Code) }} checked{{end}}{{end}}><label for="{{id}}-{{ language.Code }}" class="flag flag-{{ language.Flag(false) }}" title="{{LanguageName(language, T)}}"></label>
</span>{{ end }}
{{ end }}

Voir le fichier

@ -10,7 +10,7 @@
{{ if Search.Sort != 4}}<a href="{{ genSearchWithOrdering(URL, "4") }}">Size</a>{{else}}<b>Size</b>{{end}} /
{{ if Search.Sort != 1}}<a href="{{ genSearchWithOrdering(URL, "1") }}">Name</a>{{else}}<b>Name</b>{{end}}
</td>
<td style="padding: 0 0.4em!important;"> | </td>
<td style="padding: 0 0.35em!important;"> | </td>
<td>
{{ if Search.Order}}<a href="{{ genSearchWithOrdering(URL, toString(Search.Sort)) }}">Ascending</a>{{else}}<b>Ascending</b>{{end}} /
{{ if !Search.Order}}<a href="{{ genSearchWithOrdering(URL, toString(Search.Sort)) }}">Descending</a>{{else}}<b>Descending</b>{{end}}

Voir le fichier

@ -22,7 +22,7 @@
<div class="refine-container-1">
<span class="form-refine">
<span class="spacing">{{ T("search_for") }}:</span>
<input type="text" class="form-input refine-searchbox" size="30" name="q" value="{{Search.NameLike}}" placeholder="{{ T("search_for") }}"/><select name="c" class="form-input refine-category"/>
<input type="text" class="form-input refine-searchbox" size="30" name="q" value="{{Search.NameLike}}" placeholder="{{ T("search_for") }}"/><select name="c" class="form-input refine-category">
<option value="_">{{ T("all_categories")}}</option>
{{ range _, cat := GetCategories(true, true) }}
<option value="{{ cat.ID }}" {{if Search.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
@ -93,7 +93,7 @@
<input type="text" name="vndb" placeholder="VnDB" title="VnDB" value="" class="form-input"/>
<input type="text" name="dlsite" placeholder="DLsite" title="DLsite" value="" class="form-input"/>
</span>
<div name="language" class="form-refine form-input language">
<div class="form-refine form-input language">
{{ yield flagList(languages=GetTorrentLanguages(), selected=Search.Languages, inputname="lang", id="refine-search")}}
</div>
<button type="submit" class="form-input refine-btn" name="refine" value="1">{{ T("refine")}}</button>

Voir le fichier

@ -8,13 +8,13 @@
{{block content_body()}}
<div style="text-align: left;" class="box">
{{ yield ruleList() }}
<form enctype="multipart/form-data" role="upload" method="POST">
<form enctype="multipart/form-data" method="POST">
{{ yield csrf_field() }}
<h3>{{ T("name")}}</h3>
<input type="text" name="name" id="name" class="form-input up-input form-torrent-name" placeholder="{{ T("file_name")}}" value="{{Form.Name}}" autofocus>
{{ yield errors(name="name")}}
<div class="torrent-preview-table" style="display: none;"><center><h3 style="margin-bottom: 3px;">{{ T("torrent_preview")}}</h3></center>
<div class="torrent-preview-table" style="display: none;"><h3 style="text-align: center;margin-bottom: 3px;">{{ T("torrent_preview")}}</h3>
<table>
<thead class="torrent-info table-torrent-thead">
<tr>
@ -76,7 +76,7 @@
<td class="tr-dl home-td hide-xs"></td>
<td class="hide-xs"></td>
</tr>
<tr name="torrent-info tr" class="torrent-info{{ if User.IsTrusted() }} trusted{{end}}">
<tr id="torrent-info-tr" class="torrent-info{{ if User.IsTrusted() }} trusted{{end}}">
<td class="tr-cat home-td">
<div class="nyaa-cat table-torrent-category">
<a class="category"></a>
@ -134,11 +134,10 @@
{{ yield errors(name="c")}}
<h3>{{ T("torrent_language") }}</h3>
<div name="language" class="form-input language">
<div class="form-input language">
{{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages, inputname="languages", id="upload-lang")}}
</div>
<p class="not-important">{{ T("language_not_mandatory") }}</p>
{{ yield errors(name="language")}}
<p>
<input type="checkbox" value="true" name="remake" id="remake" class="form-torrent-remake"/>

Voir le fichier

@ -180,7 +180,7 @@
<a href="#comment_{{index}}">{{index}}</a>
<small style="padding-left: 4px;" class="date-short">{{formatDateRFC(element.Date)}}</small>
</span>
<p><img src="https://www.gravatar.com/avatar/{{ element.UserAvatar }}"/><a href="/user/{{element.UserID}}/{{element.Username}}" class="comment-user">{{element.Username}}</a></p>
<p><img src="https://www.gravatar.com/avatar/{{ element.UserAvatar }}"/><a {{if element.UserID > 0}}href="/user/{{element.UserID}}/{{element.Username}}"{{end}} class="comment-user">{{element.Username}}</a></p>
<p class="comment-content">{{element.Content|raw}}</p>
</div>
{{end}}

Voir le fichier

@ -125,7 +125,7 @@ func genNav(nav Navigation, currentURL *url.URL, pagesSelectable int) template.H
display = ""
href = " href=\"" + "/" + nav.Route + "/1" + "?" + currentURL.RawQuery + "\""
}
ret = ret + "<a id=\"page-prev\"" + display + href + " aria-label=\"Previous\"><li><span aria-hidden=\"true\">&laquo;</span></li></a>"
ret = ret + "<a id=\"page-prev\"" + display + href + " aria-label=\"Previous\"><span aria-hidden=\"true\">&laquo;</span></a>"
startValue := 1
if nav.CurrentPage > pagesSelectable/2 {
@ -141,11 +141,11 @@ func genNav(nav Navigation, currentURL *url.URL, pagesSelectable int) template.H
for i := startValue; i <= endValue; i++ {
pageNum := strconv.Itoa(i)
url := "/" + nav.Route + "/" + pageNum
ret = ret + "<a aria-label=\"Page " + strconv.Itoa(i) + "\" href=\"" + url + "?" + currentURL.RawQuery + "\">" + "<li"
ret = ret + "<a aria-label=\"Page " + strconv.Itoa(i) + "\" href=\"" + url + "?" + currentURL.RawQuery + "\">" + "<span"
if i == nav.CurrentPage {
ret = ret + " class=\"active\""
}
ret = ret + ">" + strconv.Itoa(i) + "</li></a>"
ret = ret + ">" + strconv.Itoa(i) + "</span></a>"
}
href = ""
@ -154,7 +154,7 @@ func genNav(nav Navigation, currentURL *url.URL, pagesSelectable int) template.H
display = ""
href = " href=\"" + "/" + nav.Route + "/" + strconv.Itoa(nav.CurrentPage+1) + "?" + currentURL.RawQuery + "\""
}
ret = ret + "<a id=\"page-next\"" + display + href +" aria-label=\"Next\"><li><span aria-hidden=\"true\">&raquo;</span></li></a>"
ret = ret + "<a id=\"page-next\"" + display + href +" aria-label=\"Next\"><span aria-hidden=\"true\">&raquo;</span></a>"
itemsThisPageStart := nav.MaxItemPerPage*(nav.CurrentPage-1) + 1
itemsThisPageEnd := nav.MaxItemPerPage * nav.CurrentPage