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/site/user/torrents.jet.html
kilo 61a267af43 Better alignement in user torrent page (#1147)
* Update main.css

* Update torrents.jet.html
2017-07-10 15:13:11 +10:00

67 lignes
3,6 Kio
HTML

{{ extends "layouts/profile" }}
{{ import "layouts/partials/menu/profile" }}
{{block additional_header()}}<link rel="stylesheet" href="/css/flags/flags.min.css">{{end}}
{{ block profile_navigation()}}{{ yield profile_menu(route="profile") }}{{end}}
{{block profile_content()}}
{{ if len(UserProfile.Torrents) > 0 }}
<table>
<tr class="torrent-info">
<th class="tr-cat user-td">{{ T("category")}}</th>
<th class="tr-name user-td">{{ T("name")}}</th>
<th class="tr-dl user-td">{{ T("links")}}</th>
<th class="tr-size user-td hide-xs">{{ T("size")}}</th>
<th class="tr-date user-td hide-xs">{{ T("date")}}</th>
</tr>
{{ range i, t := UserProfile.Torrents }}
{{ if DisplayTorrent(t, User) }}
{{ torrent := t.ToJSON() }}
<tr class="torrent-info
{{if torrent.Status == 2}}remake{{else if torrent.Status == 3}}trusted{{else if torrent.Status == 4}}aplus{{end}}">
<!-- forced width because the <td> gets bigger randomly otherwise -->
<td class="tr-cat user-td">
{{ if Sukebei }}
<div class="nyaa-cat sukebei-cat-{{ torrent.Category }}{{ torrent.SubCategory}}">
{{ else }}
<div class="nyaa-cat nyaa-cat-{{ torrent.SubCategory }}">
{{ end }}
<a href="{{URL.Parse ("/search?c="+ torrent.Category + "_" +torrent.SubCategory) }}" title="{{T(CategoryName(torrent.Category, torrent.SubCategory))}}" class="category">
{{ if torrent.Languages[0] != "" }}
<a href="{{ URL.Parse("/search?c="+torrent.Category+"_"+ torrent.SubCategory +"&lang=") }}{{ range key, language := torrent.Languages }}{{ language }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
<img src="/img/blank.gif" alt="{{ LanguageName(torrent.Languages[0], T) }}" class="flag flag-{{ (len(torrent.Languages) == 1) ? FlagCode(torrent.Languages[0]) : "multiple" }}" title=" {{ range key, language := torrent.Languages }}{{ LanguageName(language, T) }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
</a>
{{end}}
</a>
</div>
</td>
<td class="tr-name user-td">
<a href="/view/{{torrent.ID}}">
{{torrent.Name}}
</a>
</td>
<td class="tr-links user-td">
<a href="{{torrent.Magnet}}" title="{{ T("magnet_link") }}">
<div class="icon-magnet"></div>
</a>
{{if torrent.TorrentLink != ""}}
<a href="{{torrent.TorrentLink}}" title="{{ T("torrent_file") }}">
<div class="icon-floppy"></div>
</a>
{{end}}
</td>
<td class="tr-size user-td hide-xs">
{{ fileSize(torrent.Filesize, T) }}
</td>
<td class="tr-date user-td date-short hide-xs">{{torrent.Date}}</td>
</tr>
{{end}}
{{end}}
</table>
<nav class="torrentNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="/search?userID={{ UserProfile.ID }}" aria-label="Next"><span class="glyphicon glyphicon-add"></span> {{ T("see_more_torrents_from", UserProfile.Username) }}</a></li>
</ul>
</nav>
{{else}}
<h2 style="text-align: center;">{{ T("no_torrents_uploaded") }}</h2>
{{end}}
{{end}}