Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/layouts/partials/torrent_item_upload.jet.html
kilo 116464f43b Show seeder & leecher down to 520px wide at worst instead of 810px (#1257)
* change seeder & leecher width at lower res

* change class for seeder & leecher

* add new class to hide stuff when below 520px wide

* add those classes in upload

* change classes in torrent updating JS

* change class in torrent updating JS for upload
2017-07-22 00:27:10 +02:00

36 lignes
2,2 Kio
HTML

{{ range _, cat := GetCategories(false, true) }}
T.Add("{{ cat.ID }}", "{{ T(cat.Name) }}")
{{end}}
{{ range _, language := GetTorrentLanguages() }}
T.Add("{{ language.Code }}", "{{ LanguageName(language, T) }}")
{{ if language.Tag != language.Code }}
T.Add("{{ language.Tag }}", "{{ LanguageName(language, T) }}")
{{end}}
{{end}}
Templates.Add("torrents.item", function(torrent) {
return "<tr id=\"torrent_" + torrent.id + "\" class=\"torrent-info hidden"+ ((torrent.status == 2) ? " remake" : ((torrent.status == 3) ? " trusted" : ((torrent.status == 3) ? " aplus" : "" )))+"\">"+
"<td class=\"tr-cat home-td\">"+
{{ if Sukebei() }}
"<div class=\"nyaa-cat sukebei-cat-"+ torrent.category + torrent.sub_category +"\">"+
{{else}}
"<div class=\"nyaa-cat nyaa-cat-"+ torrent.sub_category +"\">"+
{{end}}
"<a class=\"category\">"+
((torrent.languages[0] != "") ? "<a><img src=\"img/blank.gif\" class=\"flag flag-"+ ((torrent.languages.length == 1) ? Templates.FlagCode(torrent.languages[0]) : "multiple") +"\" title=\""+torrent.languages.map(function (el, i) { return T.r(el)}).join(",")+"\"></a>" : "") +
"</a>"+
"</div></td>"+
"<td class=\"tr-name home-td\""+ (torrent.comments.length == 0 ? "colspan=\"2\"" : "" ) +"><a>"+Templates.EncodeEntities(torrent.name) +"</a></td>"+
((torrent.comments.length > 0) ? "<td class=\"tr-cs home-td\"><span>"+ torrent.comments.length + "</span></td>" : "")+
"<td class=\"tr-links home-td\">"+
"<a title=\"{{ T("magnet_link") }}\">"+
"<div class=\"icon-magnet\"></div>"+
"</a>"+(torrent.torrent != "" ? " <a><div class=\"icon-floppy\"></div></a>" : "") +
"</td>"+
"<td class=\"tr-size home-td hide-xs\">"+humanFileSize(torrent.filesize)+"</td>"+
"<td class=\"tr-se home-td hide-smol\">"+torrent.seeders+"</td>"+
"<td class=\"tr-le home-td hide-smol\">"+torrent.leechers+"</td>"+
"<td class=\"tr-dl home-td hide-xs\">"+torrent.completed+"</td>"+
"<td class=\"tr-date home-td date-short hide-xs\">"+torrent.date+"</td>"+
"</tr>";
});