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/view.html

138 lignes
8,2 Kio
HTML
Brut Vue normale Historique

2017-05-10 08:07:28 +02:00
{{define "title"}}{{.Torrent.Name}}{{end}}
2017-05-16 23:17:52 +02:00
{{define "contclass"}}cont-view {{if eq .Torrent.Status 2}}remake{{end}} {{if eq .Torrent.Status 3}}trusted{{end}} {{if eq .Torrent.Status 4}}aplus{{end}}{{end}}
2017-05-10 08:07:28 +02:00
{{define "content"}}
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
<div style="text-align: left;" class="box">
{{with .Torrent}}
{{ range (index $.FormErrors "errors")}}
2017-05-20 17:19:10 +02:00
<div class="alert alert-danger"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-exclamation-sign"></i> {{ . }}</div>
{{end}}
{{ range (index $.Infos "infos")}}
2017-05-20 17:19:10 +02:00
<div class="alert alert-info"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-info-sign"></i> {{ . }}</div>
{{end}}
More frontend shit (#731) * Torrent Mass Edit Api (WIP) * Torrents can be deleted in mass from frontend with api post request * Torrents status can be edited from frontend with api post request -- Look to function doc for more info on how to use it It is a WIP so it might not work =D * Finished Mass mod Api As per suggestion of @yiiTT in #720, I added: * Changing torrents category * Deletion of reports with deletion of a torrent * Changing owner of multiple torrents Commit also add some new translation strings. * Make some changes * Reports can now be cleared for the torrents selected without having to delete them * Users with no admin rights can't delete reports * Fix moveto to status moveto deprecated in api * Tested and works! Changes: * Updates only the colomns of torrent table * Moved categories config in config/torrents.go * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * Forgot this file in last commit * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony * Update README.md * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony
2017-05-25 02:20:30 +02:00
<div id="torrent-name" class="{{if eq .Status 2}}remake{{end}}
{{if eq .Status 3}}trusted{{end}}
{{if eq .Status 4}}aplus{{end}}">
<p style="text-align: center;" class="torrent-hr">{{.Name}}</p>
</div>
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
<br>
<table>
<tr class="torrent-info-row">
<td class="torrent-info-td torrent-info-label">{{ call $.T "category" }}:</td><td class="torrent-info-td torrent-info-data"><a href="{{$.URL.Parse (printf "/search?c=%s_%s" .Category .SubCategory) }}">{{ if Sukebei}}{{ call $.T (CategoryName .Category .SubCategory) }}{{else}}{{ call $.T (CategoryName .Category .SubCategory) }}{{end}}</a> <br></td>
<td class="torrent-info-td torrent-info-label">{{ call $.T "date" }}:</td><td class="torrent-info-td date-full">{{.Date}}</td>
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
</tr>
<tr class="torrent-info-row">
<td class="torrent-info-td torrent-info-label">{{ call $.T "uploaded_by" }}:</td><td class="torrent-view-td torrent-info-data"><a href="{{ genRoute "user_profile" "id" ( print .UploaderID ) "username" (print .UploaderName) }}">{{.UploaderName}}</a></td>
<td class="torrent-info-td torrent-info-label">{{call $.T "seeders"}}:</td><td class="torrent-info-td">{{if .LastScrape.IsZero}}{{call $.T "unknown"}}{{else}}{{.Seeders}}{{end}}</td>
</tr>
<tr class="torrent-info-row">
<td class="torrent-info-td torrent-info-label">{{ call $.T "website_link" }}:</td><td class="torrent-view-td torrent-info-data">{{if ne .WebsiteLink ""}}<a href="{{.WebsiteLink}}">{{.WebsiteLink}}</a>{{else}}<a href="//nyaa.pantsu.cat">nyaa.pantsu.cat{{end}}</td>
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
<td class="torrent-info-td torrent-info-label">{{call $.T "leechers"}}:</td><td class="torrent-info-td">{{if .LastScrape.IsZero}}{{call $.T "unknown"}}{{else}}{{.Leechers}}{{end}}</td>
</tr>
<tr class="torrent-info-row">
More frontend shit (#731) * Torrent Mass Edit Api (WIP) * Torrents can be deleted in mass from frontend with api post request * Torrents status can be edited from frontend with api post request -- Look to function doc for more info on how to use it It is a WIP so it might not work =D * Finished Mass mod Api As per suggestion of @yiiTT in #720, I added: * Changing torrents category * Deletion of reports with deletion of a torrent * Changing owner of multiple torrents Commit also add some new translation strings. * Make some changes * Reports can now be cleared for the torrents selected without having to delete them * Users with no admin rights can't delete reports * Fix moveto to status moveto deprecated in api * Tested and works! Changes: * Updates only the colomns of torrent table * Moved categories config in config/torrents.go * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * Forgot this file in last commit * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony * Update README.md * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony
2017-05-25 02:20:30 +02:00
<td class="torrent-info-td torrent-info-label">{{call $.T "hash"}}:</td><td style="font-size: small;" class="torrent-view-td torrent-info-data">{{.Hash}}</td>
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
<td class="torrent-info-td torrent-info-label">{{call $.T "completed"}}:</td><td class="torrent-info-td">{{if .LastScrape.IsZero}}{{call $.T "unknown"}}{{else}}{{.Completed}}{{end}}</td>
</tr>
<tr class="torrent-info-row">
<td class="torrent-info-td torrent-info-label">{{call $.T "size"}}:</td><td class="torrent-view-td torrent-info-data">{{ fileSize .Filesize $.T }}</td>
<td class="torrent-info-td torrent-info-label">{{call $.T "last_scraped"}}</td><td class="torrent-info-td">{{if not .LastScrape.IsZero}}{{formatDateRFC .LastScrape}}{{else}}{{call $.T "unknown"}}{{end}}</td>
</tr>
</table>
More frontend shit (#731) * Torrent Mass Edit Api (WIP) * Torrents can be deleted in mass from frontend with api post request * Torrents status can be edited from frontend with api post request -- Look to function doc for more info on how to use it It is a WIP so it might not work =D * Finished Mass mod Api As per suggestion of @yiiTT in #720, I added: * Changing torrents category * Deletion of reports with deletion of a torrent * Changing owner of multiple torrents Commit also add some new translation strings. * Make some changes * Reports can now be cleared for the torrents selected without having to delete them * Users with no admin rights can't delete reports * Fix moveto to status moveto deprecated in api * Tested and works! Changes: * Updates only the colomns of torrent table * Moved categories config in config/torrents.go * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * Forgot this file in last commit * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony * Update README.md * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony
2017-05-25 02:20:30 +02:00
<div class="torrent-buttons">
<a href="{{.Magnet}}" class="form-input">{{call $.T "magnet_link"}}</a>
<a href="{{.TorrentLink}}" class="form-input">{{call $.T "torrent_file"}}</a>
More frontend shit (#731) * Torrent Mass Edit Api (WIP) * Torrents can be deleted in mass from frontend with api post request * Torrents status can be edited from frontend with api post request -- Look to function doc for more info on how to use it It is a WIP so it might not work =D * Finished Mass mod Api As per suggestion of @yiiTT in #720, I added: * Changing torrents category * Deletion of reports with deletion of a torrent * Changing owner of multiple torrents Commit also add some new translation strings. * Make some changes * Reports can now be cleared for the torrents selected without having to delete them * Users with no admin rights can't delete reports * Fix moveto to status moveto deprecated in api * Tested and works! Changes: * Updates only the colomns of torrent table * Moved categories config in config/torrents.go * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * Forgot this file in last commit * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony * Update README.md * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony
2017-05-25 02:20:30 +02:00
{{ if gt $.User.ID 0}}
<script>
function reportPopup() {
reportContent = `
<h4>{{ call $.T "report_torrent_number" (print $.Torrent.ID) }}</h4>
<b>{{ call $.T "report_type" }}:</b>
<form method="post" action="/report/{{$.Torrent.ID}}">
<input type="radio" name="report_type" value="illegal" id="illegal" required> <label for="illegal">{{ call $.T "illegal_content" }}</label><br />
<input type="radio" name="report_type" value="spam" id="spam" required> <label for="spam">{{ call $.T "spam_garbage" }}</label><br />
<input type="radio" name="report_type" value="wrongcat" id="wrongcat" required> <label for="wrongcat">{{ call $.T "wrong_category" }}</label><br />
<input type="radio" name="report_type" value="dup" id="dup" required> <label for="dup">{{ call $.T "duplicate_deprecated" }}</label><br />
More frontend shit (#731) * Torrent Mass Edit Api (WIP) * Torrents can be deleted in mass from frontend with api post request * Torrents status can be edited from frontend with api post request -- Look to function doc for more info on how to use it It is a WIP so it might not work =D * Finished Mass mod Api As per suggestion of @yiiTT in #720, I added: * Changing torrents category * Deletion of reports with deletion of a torrent * Changing owner of multiple torrents Commit also add some new translation strings. * Make some changes * Reports can now be cleared for the torrents selected without having to delete them * Users with no admin rights can't delete reports * Fix moveto to status moveto deprecated in api * Tested and works! Changes: * Updates only the colomns of torrent table * Moved categories config in config/torrents.go * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * Forgot this file in last commit * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony * Update README.md * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony
2017-05-25 02:20:30 +02:00
<button type="submit" class="btn btn-default">{{ call $.T "report_btn" }}</button>
</form> <br />
`
reportWindow = window.open("", 'reportWindow', "width=300,height=300"); // Opens a new window
reportWindow.document.write(reportContent);
}
</script>
<a onclick="reportPopup();" class="form-input">{{ call $.T "report_btn" }}</a>
{{end}}
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
</div>
<p class="torrent-hr">{{call $.T "description"}}</p>
{{ if ne .Description ""}}
More frontend shit (#731) * Torrent Mass Edit Api (WIP) * Torrents can be deleted in mass from frontend with api post request * Torrents status can be edited from frontend with api post request -- Look to function doc for more info on how to use it It is a WIP so it might not work =D * Finished Mass mod Api As per suggestion of @yiiTT in #720, I added: * Changing torrents category * Deletion of reports with deletion of a torrent * Changing owner of multiple torrents Commit also add some new translation strings. * Make some changes * Reports can now be cleared for the torrents selected without having to delete them * Users with no admin rights can't delete reports * Fix moveto to status moveto deprecated in api * Tested and works! Changes: * Updates only the colomns of torrent table * Moved categories config in config/torrents.go * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * Forgot this file in last commit * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony * Update README.md * Make sort arrows look a lot nicer * Add search icon into search input * Work on navbar, fix it on mobile view * Hide mascot on mobile views * Make torrent view work on mobile + minor improvements * Add status and various things to view * ACTUALLY FINISH VIEW PAGE * wow user profile was easy * Work on profile page * remove language option * SEO improvement * forgot the fucking bracket * make description more weeb * add irony * add better irony
2017-05-25 02:20:30 +02:00
<div style="padding-left: 14px;" class="torrent-info-box">{{.Description}}</div>
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
{{else}}
<p>No description provided!</p>
{{end}}
<p class="torrent-hr" id="filelist-control" onclick="javascript:toggleFilelist()" data-filelist-open="true">{{call $.T "files"}}</p>
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
{{ if gt (len .FileList) 0 }}
{{/* how do i concat lol */}}
{{ $folderFormat := `<tr id="{{.Identifier}}" class='childs-of-{{.ParentIdentifier}} tr-filelist tr-folder' onclick="javascript:toggleFolder(this)" data-filelist-open="true" style="--nest-level: {{.NestLevel}}"><td>{{.FolderName}}</td><td>{{ fileSize .TotalSize .Data.T }}</td></tr>` }}
{{ $fileFormat := `<tr class='childs-of-{{.ParentIdentifier}} tr-filelist tr-file' style="--nest-level: {{.NestLevel}}"><td>{{.Filename}}</td><td>{{ fileSize .Filesize .Data.T }}</td>` }}
<script>
function toggleFilelist() {
var control = document.getElementById("filelist-control")
var filelist = document.getElementById("filelist")
filelist.hidden = !filelist.hidden
control.setAttribute("data-filelist-open", filelist.hidden ? "false" : "true")
}
function toggleFolder(folderNode) {
var isOpen = folderNode.getAttribute("data-filelist-open") == "true" ? true : false
var rows = document.querySelectorAll("*[class^='childs-of-" + folderNode.id + "']")
for (var i = 0; i < rows.length; i++) {
// If it's open (true), will hide, if not, will show.
rows[i].hidden = isOpen
}
folderNode.setAttribute("data-filelist-open", !isOpen ? "true" : "false")
}
</script>
<div class="torrent-info-box" id="filelist">
<table>
<thead>
<th style="width: 70%">{{call $.T "filename"}}</th>
<th>{{call $.T "size"}}</th>
</thead>
<tbody>
{{ MakeFolderTreeView $.RootFolder $folderFormat $fileFormat $ }}
</tbody>
</table>
</div>
{{/* Make filelist hidden by default with JS, but still visible without it */}}
<script>toggleFilelist()</script>
{{ else }}
<p>No files found? That doesn't even make sense!</p>
{{end}}
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
<p class="torrent-hr">{{call $.T "comments"}}</p>
{{range $index, $element := .Comments}}
<div class="torrent-info-box comment-box">
<span class="comment-index"><a href="#comment_{{inc $index}}">#{{inc $index}}</a><small style="padding-left: 4px;" class="date-short"> {{.Date}}</small></span>
<p>{{.Username}}</p>
<p>{{.Content}}</p>
</div>
{{end}}
{{end}}
<div style="margin-top: 10px" class="torrent-info-box">
<form method="post">
<div class="comment-form">
<div class="comment-text">
<h3>{{ if gt .User.ID 0}} {{call $.T "submit_a_comment_as_username" .User.Username}} {{else}} {{call $.T "submit_a_comment_as_anonymous"}} {{end}}</h3>
<textarea style="height: 10rem;" placeholder="サンキュー" name="comment" class="form-input up-input"></textarea>
</div>
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
<div class="comment-captcha">
{{block "captcha" (makeCaptchaData .CaptchaID $.T)}}{{end}}
<button type="submit" class="form-input up-btn">{{call $.T "submit" }}</button>
</div>
2017-05-11 03:00:57 +02:00
</div>
Frontend rewrite (DONE) (#723) * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * Change layout on torrent table, using grids. * Remove Bootstrap and Jquery, and create basic nav * More improvements to navbar, as well as work on _badgemenu * Complete navbar HTML, obviously it still looks horrendous * HOLY FUCK INDEX IS /DONE/ * DO UPLOAD PAGE, DELETE OLD SHITTY CSS * Complete login page * Begin work on profile page * fucking git, man * Damn, that looks sexy * Complete login and register pages, include very minimal grid system, and delete all of view template * Do view page! * Finish view even more * Fix dates and filesizes in torrent table * Improve comment/captcha input * Actually add magnet and torrent buttons * Add open-iconic instead of fontawesome * Improve user side-panel * Rename Category_* to CategoryName * Beginning to finish up * Implement themes and add basic mobile support to front page * Fix some slight color errors * Fix captcha on dark * magnet and torrent links on view
2017-05-24 06:20:51 +02:00
</form>
</div>
</div>
{{end}}