diff --git a/.htmlhintrc b/.htmlhintrc index 19796123..7c749b69 100644 --- a/.htmlhintrc +++ b/.htmlhintrc @@ -5,8 +5,8 @@ "attr-unsafe-chars": true, "attr-value-double-quotes": false, "attr-value-not-empty": false, - "doctype-first": true, - "doctype-html5": true, + "doctype-first": false, + "doctype-html5": false, "head-script-disabled": true, "href-abs-or-rel": false, "id-class-ad-disabled": true, @@ -19,7 +19,7 @@ "src-not-empty": true, "style-disabled": true, "tag-pair": true, - "tag-self-close": false, + "tag-self-close": true, "tagname-lowercase": true, "title-require": true } diff --git a/public/js/main.js b/public/js/main.js index c1315959..f4e85ff2 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -4,7 +4,7 @@ // Switches between themes when a new one is selected function switchThemes() { - themeName = document.getElementById("theme-selector").value + var themeName = document.getElementById("theme-selector").value var head = document.getElementsByTagName("head")[0] // Remove the theme in place, it fails if one isn't set try { diff --git a/templates/admin/commentlist.jet.html b/templates/admin/commentlist.jet.html index 9800cc10..bf867443 100644 --- a/templates/admin/commentlist.jet.html +++ b/templates/admin/commentlist.jet.html @@ -1,28 +1,42 @@ {{ extends "layouts/index_admin" }} -{{block title()}}{{ T("comments_list") }}{{end}} +{{block title()}}{{ T("comments_list") }}{{end}} {{block content_body()}}
-

{{ T("comments_list") }}

- - - - - - - - - - - {{ range Models}} - - - - - - - - {{end}} - -
{{ T("comments") }}{{ T("torrents") }}{{ T("username") }}{{ T("actions") }}
{{ .Content }}{{ .TorrentID }}{{if .User }}{{ .User.Username }}{{else}}れんちょん{{end}} {{ T("delete") }}
+

{{ T("comments_list") }}

+ + + + + + + + + + + {{ range Models}} + + + + + + + + {{end}} + +
{{ T("comments") }}{{ T("torrents") }}{{ T("username") }}{{ T("actions") }}
+ {{ .Content }} + + {{ .TorrentID }} + + {{if .User }} + {{ .User.Username }} + {{else}} + れんちょん + {{end}} + + + {{ T("delete") }} + +
{{end}} diff --git a/templates/admin/index.jet.html b/templates/admin/index.jet.html index 1a374323..577f9626 100644 --- a/templates/admin/index.jet.html +++ b/templates/admin/index.jet.html @@ -1,108 +1,138 @@ {{ extends "layouts/index_admin" }} -{{ block title()}}{{ T("moderation_overview") }}{{end}} -{{ block content_body()}} +{{ block title()}}{{ T("moderation_overview") }}{{end}} + {{ block content_body()}}
-

{{ T("last_torrents") }}

- +

{{ T("last_torrents") }}

+
- - - - - + + + + + - {{range Torrents}} - - - - - - {{end}} + {{range Torrents}} + + + + + + {{end}} -
{{ T("name") }}{{ T("username") }}{{ T("actions") }}
{{ T("name") }}{{ T("username") }}{{ T("actions") }}
{{ .Name }} {{ T("edit") }}{{ .UploaderID }} {{ T("delete") }}
+ {{ .Name }} + {{ T("edit") }} + + {{ .UploaderID }} + + + {{ T("delete") }} + +
- -
+ + +
-

{{ T("last_reports") }}

- +

{{ T("last_reports") }}

+
- - - - - - + + + + + + - {{range TorrentReports}} - - + {{range TorrentReports}} + + - - - {{end}} + + + {{end}} -
{{ T("name") }}{{ T("username") }}{{ T("reason") }}{{ T("actions") }}
{{ T("name") }}{{ T("username") }}{{ T("reason") }}{{ T("actions") }}
{{ .Torrent.Name }} {{ T("edit") }}
+ {{ .Torrent.Name }} + {{ T("edit") }} + {{.User.Username}} {{ getReportDescription(.Description,T) }} {{ T("delete") }}
+ + {{ T("delete") }} +
- -
-

{{ T("last_users") }}

- +
+ +
+

{{ T("last_users") }}

+ - - - - + + + + - {{range Users}} - - + {{range Users}} + + - - {{end}} + + {{ T("delete") }} + + {{end}} + + + {{end}} -
{{ T("username") }}{{ T("actions") }}
{{ T("username") }}{{ T("actions") }}
{{ .Username }}
+ {{ .Username }} + {{if .ID > 0}} - {{ T("delete") }} - {{end}}
- -
-

{{ T("last_comments") }}

- +
+ +
+

{{ T("last_comments") }}

+ - - - - - + + + + + - {{range Comments}} - - - - - - {{end}} + {{range Comments}} + + + + + + {{end}} -
{{ T("comments") }}{{ T("username") }}{{ T("actions") }}
{{ T("comments") }}{{ T("username") }}{{ T("actions") }}
{{ .Content }}{{if .User }}{{ .User.Username }}{{else}}れんちょん{{end}} {{ T("delete") }}
+ {{ .Content }} + + + {{if .User }}{{ .User.Username }}{{else}}れんちょん{{end}} + + + + {{ T("delete") }} + +
- + +
{{end}} diff --git a/templates/admin/paneltorrentedit.jet.html b/templates/admin/paneltorrentedit.jet.html index 572cde44..e96fad1f 100644 --- a/templates/admin/paneltorrentedit.jet.html +++ b/templates/admin/paneltorrentedit.jet.html @@ -1,57 +1,59 @@ -{{ extends "layouts/index_admin" }} -{{ import "layouts/partials/helpers/flags" }} -{{block title()}}{{ T("torrent_edit_panel") }}{{end}} -{{ block content_body()}} +{{ extends "layouts/index_admin" }} {{ import "layouts/partials/helpers/flags" }} {{block title()}}{{ T("torrent_edit_panel") }}{{end}} {{ block content_body()}}
-

{{ T("torrent_edit_panel") }}

+

{{ T("torrent_edit_panel") }}

-
+
- + +
+
+ + +
+
+ +
+ {{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages) }}
-
- - -
-
- -
- {{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages) }} -
-
-
- - -
-

- - -

-
- - -
-
- -

{{ T("description_markdown_notice")}}

- -
- +
+
+ + +
+

+ + +

+
+ + +
+
+ +

{{ T("description_markdown_notice")}}

+ +
+
-{{end}} -{{ block footer_js()}} +{{end}} {{ block footer_js()}} - -{{end}} \ No newline at end of file + +{{end}} diff --git a/templates/admin/reassign.jet.html b/templates/admin/reassign.jet.html index 75df80b3..14c90821 100644 --- a/templates/admin/reassign.jet.html +++ b/templates/admin/reassign.jet.html @@ -1,28 +1,29 @@ {{ extends "layouts/index_admin" }} -{{block title()}}{{ T("torrent_reassign") }}{{end}} +{{block title()}}{{ T("torrent_reassign") }}{{end}} {{ block content_body()}}
-

{{ T("torrent_reassign") }}

-
-

{{ T("reassign_warning") }}

+

{{ T("torrent_reassign") }}

+ +

{{ T("reassign_warning") }}

- - + +
-
- {{ T("previous_username") }}
- {{ T("torrent_id") }} +
+ {{ T("previous_username") }} +
+ {{ T("torrent_id") }}
-

{{ T("reassign_indication")|raw}}

- +

{{ T("reassign_indication")|raw}}

+
-

{{ T("reassign_warning_2") }}

+

{{ T("reassign_warning_2") }}

-
+
{{end}} diff --git a/templates/admin/torrent_report.jet.html b/templates/admin/torrent_report.jet.html index ae1379a8..e2332871 100644 --- a/templates/admin/torrent_report.jet.html +++ b/templates/admin/torrent_report.jet.html @@ -1,29 +1,38 @@ {{ extends "layouts/index_admin" }} -{{block title()}}{{ T("reports_list") }}{{end}} +{{block title()}}{{ T("reports_list") }}{{end}} {{ block content_body()}}
-

{{ T("reports_list") }}

- - - - - - - - - - - {{range Models}} - - - - - - - {{end}} - -
{{ T("name") }}{{ T("username") }}{{ T("reason") }}{{ T("actions") }}
{{ .Torrent.Name }} {{ T("edit")}}{{.User.Username}}{{ getReportDescription(.Description, T) }} - {{ T("delete_torrent") }}
- {{ T("delete_report") }}
+

{{ T("reports_list") }}

+ + + + + + + + + + + {{range Models}} + + + + + + + {{end}} + +
{{ T("name") }}{{ T("username") }}{{ T("reason") }}{{ T("actions") }}
+ {{ .Torrent.Name }} + {{ T("edit")}} + {{.User.Username}}{{ getReportDescription(.Description, T) }} + + {{ T("delete_torrent") }} + +
+ + {{ T("delete_report") }} + +
{{end}} diff --git a/templates/admin/torrentlist.jet.html b/templates/admin/torrentlist.jet.html index 73b27b7f..1ca0b033 100644 --- a/templates/admin/torrentlist.jet.html +++ b/templates/admin/torrentlist.jet.html @@ -1,73 +1,96 @@ -{{ extends "layouts/index_admin" }} -{{block title()}}{{ T("torrents_list") }}{{end}} -{{ block content_body()}} +{{ extends "layouts/index_admin" }} {{block title()}}{{ T("torrents_list") }}{{end}} {{ block content_body()}}
-

{{ T("torrents_list") }}

-
+

{{ T("torrents_list") }}

+
- - - - - + + + + +
- - +
+ - - - - + + + + - - - {{ range Models}} - - - - - - - {{end}} - -
{{ T("name") }}{{ T("uploaded_by") }}{{ T("actions") }} + + {{ T("name") }}{{ T("uploaded_by") }}{{ T("actions") }}
{{ .Name }} {{ if !.IsDeleted }}{{ T("edit")}}{{end}}{{ if .Uploader }}{{ .Uploader.Username }}{{ else }}れんちょん{{end}} - {{ if .IsBlocked }}{{ T("torrent_unblock") }}{{else}}{{ T("torrent_block") }}{{end}} - {{ if .IsDeleted }} -
{{ T("delete_definitely") }} - {{ else }} - {{ T("delete") }} - {{ end }} -
+ + + {{ range Models}} + + + + + + {{ .Name }} {{ if !.IsDeleted }} + + {{ T("edit")}} + {{end}} + + + {{ if .Uploader }} + + {{ .Uploader.Username }} + {{ else }}れんちょん{{end}} + + + + {{ if .IsBlocked }} + {{ T("torrent_unblock") }} + {{else}} + {{ T("torrent_block") }} + {{end}} + + {{ if .IsDeleted }} +
+ + + {{ T("delete_definitely") }} + + {{ else }} + + {{ T("delete") }} + + {{ end }} + + + {{end}} + +
-{{end}} -{{ block footer_js()}} +{{end}} {{ block footer_js()}} - + {{end}} diff --git a/templates/admin/userlist.jet.html b/templates/admin/userlist.jet.html index fc19865c..e5bb62d7 100644 --- a/templates/admin/userlist.jet.html +++ b/templates/admin/userlist.jet.html @@ -1,23 +1,31 @@ {{ extends "layouts/index_admin" }} -{{block title()}}{{ T("users_list") }}{{end}} +{{block title()}}{{ T("users_list") }}{{end}} {{ block content_body()}}
-

{{ T("users_list") }}

- - - - - - - - - {{ range Models}} - - - - - {{end}} - -
{{ T("username") }}{{ T("actions") }}
{{ .Username }}{{if .ID > 0}} {{ T("delete") }}{{end}}
+

{{ T("users_list") }}

+ + + + + + + + + {{ range Models}} + + + + + {{end}} + +
{{ T("username") }}{{ T("actions") }}
+ {{ .Username }} + + {{if .ID > 0}} + + {{ T("delete") }} + + {{end}} +
{{end}} diff --git a/templates/errors/400.jet.html b/templates/errors/400.jet.html index 2600516f..951b82a0 100644 --- a/templates/errors/400.jet.html +++ b/templates/errors/400.jet.html @@ -1,9 +1,8 @@ {{ extends "layouts/index_site" }} {{block title()}}{{ T("error_400")}}{{end}} {{block content_body()}} -
-

{{ T("400_bad_request")}}

- -
-{{end}} -{{block mascot()}}
{{end}} \ No newline at end of file +
+

{{ T("400_bad_request")}}

+ 400 +
+{{end}} {{block mascot()}}
{{end}} diff --git a/templates/errors/404.jet.html b/templates/errors/404.jet.html index f746d771..7a8044f2 100644 --- a/templates/errors/404.jet.html +++ b/templates/errors/404.jet.html @@ -1,9 +1,9 @@ {{ extends "layouts/index_site" }} {{block title()}}{{ T("404_not_found")}}{{end}} {{block content_body()}} -
-

{{ T("404_not_found")}}

- -
+
+

{{ T("404_not_found")}}

+ 404 +
{{end}} -{{block mascot()}}
{{end}} \ No newline at end of file +{{block mascot()}}
{{end}} diff --git a/templates/errors/500.jet.html b/templates/errors/500.jet.html index c0799624..ee6b7c3a 100644 --- a/templates/errors/500.jet.html +++ b/templates/errors/500.jet.html @@ -1,9 +1,9 @@ {{ extends "layouts/index_site" }} {{block title()}}{{ T("error_500")}}{{end}} {{block content_body()}} -
-

{{ T("500_internal_server_error")}}

- -
+
+

{{ T("500_internal_server_error")}}

+ 500 +
{{end}} -{{block mascot()}}
{{end}} \ No newline at end of file +{{block mascot()}}
{{end}} diff --git a/templates/errors/no_results.jet.html b/templates/errors/no_results.jet.html index c1c17945..1bc33dd2 100644 --- a/templates/errors/no_results.jet.html +++ b/templates/errors/no_results.jet.html @@ -1,9 +1,8 @@ {{ extends "layouts/index_site" }} {{block title()}}{{ T("err_no_results")}}{{end}} {{block content_body()}} -
-

{{ T("err_no_results")}}

- -
-{{end}} -{{block mascot()}}
{{end}} +
+

{{ T("err_no_results")}}

+ no results +
+{{end}} {{block mascot()}}
{{end}} diff --git a/templates/layouts/index_admin.jet.html b/templates/layouts/index_admin.jet.html index 88e4a9c2..fb885d9a 100644 --- a/templates/layouts/index_admin.jet.html +++ b/templates/layouts/index_admin.jet.html @@ -1,20 +1,3 @@ -{* We extend the base template *} -{{ extends "partials/base" }} -{{import "partials/helpers/search"}} - -{* We apply the menu in the base template *} -{{ block menu()}} -{{include "partials/menu/admin"}} -{{end}} - -{* We add the class content for admin *} -{{ block contclass()}}content-admin{{end}} - -{* We add the mod panel title and the title block *} -{{block titleBase()}}Moderation Panel - {{block title()}}{{end}}{{end}} - -{* We add the mod panel search refine and the body block *} -{{ block content_body_base()}} -{{ yield search_refine(url=URL.Parse("/mod/torrents")) }} -{{ block content_body()}}{{end}} -{{end}} \ No newline at end of file +{* We extend the base template *} {{ extends "partials/base" }} {{import "partials/helpers/search"}} {* We apply the menu in the base template *} {{ block menu()}} {{include "partials/menu/admin"}} {{end}} {* We add the class content for admin *} {{ block +contclass()}}content-admin{{end}} {* We add the mod panel title and the title block *} {{block titleBase()}}Moderation Panel - {{block title()}}{{end}}{{end}} {* We add the mod panel search refine and the body block *} {{ block content_body_base()}} {{ +yield search_refine(url=URL.Parse("/mod/torrents")) }} {{ block content_body()}}{{end}} {{end}} diff --git a/templates/layouts/partials/base.jet.html b/templates/layouts/partials/base.jet.html index 8dfa499d..b6db6fcc 100644 --- a/templates/layouts/partials/base.jet.html +++ b/templates/layouts/partials/base.jet.html @@ -2,96 +2,96 @@ {{import "helpers/infos"}} - - - - - - - - {{if Sukebei()}}Sukebei{{else}}Nyaa{{end}} Pantsu{{block titleBase()}}{{end}} - - - - - - - - - - - - - - - - - - - - - - - {{if Theme == ""}} - - {{else}} - - {{end}} - - - - - {{block additional_header()}}{{end}} - - - -
-
- {{ yield infos()}} - {{ yield errors()}} - {{ block content_body_base() }}{{end}} -
- {{ block mascot() }} - {{if Mascot != "hide"}} -
- {* Only play the sounds with the default mascot *} - {{ if MascotURL == "" }} - {{ if Sukebei() }} - - {{else if Theme == "tomorrow" }} - - {{ else if User.ID > 0}} - - {{ else }} - - {{end}} - {{end}} - {{end}} - {{end}} - - -
- - - {{block footer_js()}}{{end}} - + + + + + + + + {{if Sukebei()}}Sukebei{{else}}Nyaa{{end}} Pantsu{{block titleBase()}}{{end}} + + + + + + + + + + + + + + + + + + + + + + + {{if Theme == ""}} + + {{else}} + + {{end}} + + + + + {{block additional_header()}}{{end}} + + + +
+
+ {{ yield infos()}} + {{ yield errors()}} + {{ block content_body_base() }}{{end}} +
+ {{ block mascot() }} + {{if Mascot != "hide"}} +
+ {* Only play the sounds with the default mascot *} + {{ if MascotURL == "" }} + {{ if Sukebei() }} + + {{else if Theme == "tomorrow" }} + + {{ else if User.ID > 0}} + + {{ else }} + + {{end}} + {{end}} + {{end}} + {{end}} + + +
+ + + {{block footer_js()}}{{end}} + diff --git a/templates/layouts/partials/helpers/badgemenu.jet.html b/templates/layouts/partials/helpers/badgemenu.jet.html index 3bf8dbd8..c9b43a38 100644 --- a/templates/layouts/partials/helpers/badgemenu.jet.html +++ b/templates/layouts/partials/helpers/badgemenu.jet.html @@ -1,22 +1,36 @@ {{ import "csrf" }} {{block badge_user()}}
- {{if User.ID > 0 }} - - - {{ else }} - - {{ T("signin") }} - - {{end}} + {{if User.ID > 0 }} + + + {{ else }} + + {{ T("signin") }} + {{end}}
{{end}} diff --git a/templates/layouts/partials/helpers/captcha.jet.html b/templates/layouts/partials/helpers/captcha.jet.html index 40a50513..bc14ce18 100644 --- a/templates/layouts/partials/helpers/captcha.jet.html +++ b/templates/layouts/partials/helpers/captcha.jet.html @@ -1,14 +1,17 @@ {{block captcha(captchaid="")}} - {* unset if user doesn't need captcha *} - {{if captchaid != ""}} -
-

{{ T("captcha")}}

- -
- - -
- {{end}} +{* unset if user doesn't need captcha *} +{{if captchaid != ""}} +
+

{{ T("captcha")}}

+ + captcha +
+ + +
+{{end}} {{end}} diff --git a/templates/layouts/partials/helpers/csrf.jet.html b/templates/layouts/partials/helpers/csrf.jet.html index 575a2d7a..ae6419fa 100644 --- a/templates/layouts/partials/helpers/csrf.jet.html +++ b/templates/layouts/partials/helpers/csrf.jet.html @@ -1,3 +1,3 @@ {{ block csrf_field()}} - -{{end}} \ No newline at end of file + +{{end}} diff --git a/templates/layouts/partials/helpers/flags.jet.html b/templates/layouts/partials/helpers/flags.jet.html index 0ceb657c..bfc5c78d 100644 --- a/templates/layouts/partials/helpers/flags.jet.html +++ b/templates/layouts/partials/helpers/flags.jet.html @@ -1,5 +1,13 @@ {{ block flagList(languages=nil, selected="", inputname="languages", id="lang")}} {{ if isset(languages) }} - {{ range _, language := languages }}{{LanguageName(language, T)}}{{ end }} +{{ range _, language := languages }} + + {{LanguageName(language, T)}} + + + +{{ end }} +{{ end }} {{ end }} -{{ end }} diff --git a/templates/layouts/partials/helpers/rules.jet.html b/templates/layouts/partials/helpers/rules.jet.html index ca460856..de9e53d1 100644 --- a/templates/layouts/partials/helpers/rules.jet.html +++ b/templates/layouts/partials/helpers/rules.jet.html @@ -1,13 +1,13 @@ {{ block ruleList(open=false)}}
- {{ T("rules")}} -
-
    -
  • {{ T("no_cp")}}
  • -
  • {{ T("asia")}}
  • -
  • {{ T("rules_spam")}}
  • -
  • {{ T("rules_sukebei")}}
  • -
-
+ {{ T("rules")}} +
+
    +
  • {{ T("no_cp")}}
  • +
  • {{ T("asia")}}
  • +
  • {{ T("rules_spam")}}
  • +
  • {{ T("rules_sukebei")}}
  • +
+
{{ end }} diff --git a/templates/layouts/partials/helpers/search.jet.html b/templates/layouts/partials/helpers/search.jet.html index 66649f0b..67c15478 100644 --- a/templates/layouts/partials/helpers/search.jet.html +++ b/templates/layouts/partials/helpers/search.jet.html @@ -1,67 +1,71 @@ {{ import "flags" }} {{block search_common()}} - - + + {{end}} {{block search_button() }} - - - + + + {{end}} {{block search_refine(url="") }}
-

{{ T("refine_search") }}

-
- {{ T("search_for") }}: - - - {{ T("show") }}: - - Limit: - From: - - {{ T("between")}} - - {{ T("and")}} - - - {{ T("large")}} - - {{ T("between")}} - - {{ T("and")}} - - - {{ T("old")}}. - -
- {{ yield flagList(languages=GetTorrentLanguages(), selected=Search.Languages, inputname="lang", id="refine-search")}} -
- -
+

{{ T("refine_search") }}

+
+ + {{ T("search_for") }}: + + + + {{ T("show") }}: + + Limit: + From: + + + {{ T("between")}} + + {{ T("and")}} + + + {{ T("large")}} + + + {{ T("between")}} + + {{ T("and")}} + + + {{ T("old")}}. + +
+ {{ yield flagList(languages=GetTorrentLanguages(), selected=Search.Languages, inputname="lang", id="refine-search")}} +
+ +
{{end}} diff --git a/templates/layouts/partials/helpers/treeview.jet.html b/templates/layouts/partials/helpers/treeview.jet.html index 65d587f4..2614ee9e 100644 --- a/templates/layouts/partials/helpers/treeview.jet.html +++ b/templates/layouts/partials/helpers/treeview.jet.html @@ -1,26 +1,26 @@ {{ block make_treeview(treeviewData=nil) }} {{ if isset(treeviewData)}} {{ range index, folder := treeviewData.Folder.Folders }} - {{ folderId := treeviewData.IdentifierChain+"_"+index }} - - - {{ fileSize(folder.TotalSize(), T) }} - - - - - - {{ yield make_treeview(treeviewData=makeTreeViewData(folder, treeviewData.NestLevel+1, folderId)) }} -
- - +{{ folderId := treeviewData.IdentifierChain+"_"+index }} + + + {{ fileSize(folder.TotalSize(), T) }} + + + + + + {{ yield make_treeview(treeviewData=makeTreeViewData(folder, treeviewData.NestLevel+1, folderId)) }} +
+ + {{ end }} {{ range _, file := treeviewData.Folder.Files }} - - {{file.Filename()}} - {{fileSize(file.Filesize, T)}} - + + {{file.Filename()}} + {{fileSize(file.Filesize, T)}} + +{{ end }} {{ end }} {{ end }} -{{ end }} \ No newline at end of file diff --git a/templates/layouts/partials/menu/admin.jet.html b/templates/layouts/partials/menu/admin.jet.html index 5c8f270b..41d66b24 100644 --- a/templates/layouts/partials/menu/admin.jet.html +++ b/templates/layouts/partials/menu/admin.jet.html @@ -1,28 +1,48 @@ {{ import "layouts/partials/helpers/search" }}
-
- - +
+ -
-
- {{ include "layouts/partials/helpers/badgemenu" }} -
- - + -
\ No newline at end of file +
+
+
+ {{ include "layouts/partials/helpers/badgemenu" }} +
+ + +
+
diff --git a/templates/layouts/partials/menu/profile.jet.html b/templates/layouts/partials/menu/profile.jet.html index 45ae33ca..12de4de7 100644 --- a/templates/layouts/partials/menu/profile.jet.html +++ b/templates/layouts/partials/menu/profile.jet.html @@ -1,52 +1,64 @@ {{ block profile_menu(route="profile") }}
- -
- {{ UserProfile.Username }} -
- - -
-

- {{ UserProfile.Username}} -

-

- {{UserProfile.GetRole()}} -

-

{{ T("torrents_uploaded") }}:{{ NbTorrents }}

-
- - -
- {{if User.ID > 0 }} - {{if !User.CurrentUserIdentical(UserProfile.ID) }} - {{if !User.IsFollower(UserProfile)}} - {{ T("follow")}}
- {{else}} - {{ T("unfollow")}}
- {{end}} - {{end}} - {{end}} - -
-
- - -
- {{ if User.ID > 0 && (User.CurrentUserIdentical(UserProfile.ID) || User.CurrentOrAdmin(UserProfile.ID)) }} -
{{ T("torrents")}}

- {{ else }} -
{{ T("torrents")}}

- {{ end }} - {{if User.ID > 0 }} - {{ if User.CurrentUserIdentical(UserProfile.ID) }} - {{ T("my_notifications")}}
- {{end}} - {{if User.CurrentOrAdmin(UserProfile.ID) }} - {{ T("settings")}}
- {{end}} - {{end}} -
- + +
+ {{ UserProfile.Username }} +
+ + +
+

+ {{ UserProfile.Username}} +

+

+ {{UserProfile.GetRole()}} +

+

{{ T("torrents_uploaded") }}:{{ NbTorrents }}

+
+ + +
+ {{if User.ID > 0 }} + {{if !User.CurrentUserIdentical(UserProfile.ID) }} + {{if !User.IsFollower(UserProfile)}} + {{ T("follow")}} +
+ {{else}} + {{ T("unfollow")}} +
+ {{end}} + {{end}} + {{end}} + +
+
+ + +
+ {{ if User.ID > 0 && (User.CurrentUserIdentical(UserProfile.ID) || User.CurrentOrAdmin(UserProfile.ID)) }} + +
{{ T("torrents")}} +
+
+ {{ else }} + +
{{ T("torrents")}} +
+
+ {{ end }} + {{if User.ID > 0 }} + {{ if User.CurrentUserIdentical(UserProfile.ID) }} + {{ T("my_notifications")}} +
+ {{end}} + {{if User.CurrentOrAdmin(UserProfile.ID) }} + + {{ T("settings")}} + +
+ {{end}} + {{end}} +
+
{{end}} diff --git a/templates/layouts/profile.jet.html b/templates/layouts/profile.jet.html index 7289355f..cfb5fa8e 100644 --- a/templates/layouts/profile.jet.html +++ b/templates/layouts/profile.jet.html @@ -3,12 +3,12 @@ {{block rss_link()}}/user/{{UserProfile.ID}}/{{UserProfile.Username}}/feed{{end}} {{block rsstitle() }}{{ UserProfile.Username }}{{end}} {{block content_body()}} -
-
- {{ block profile_navigation() }}{{end}} -
-
- {{ block profile_content() }}{{end}} -
-
+
+
+ {{ block profile_navigation() }}{{end}} +
+
+ {{ block profile_content() }}{{end}} +
+
{{end}} diff --git a/templates/site/database/dumps.jet.html b/templates/site/database/dumps.jet.html index c33ce5e8..4987d34b 100644 --- a/templates/site/database/dumps.jet.html +++ b/templates/site/database/dumps.jet.html @@ -2,39 +2,39 @@ {{block title()}}{{ T("home")}}{{end}} {{block content_body()}}
- Gpg key + Gpg key -
- {{ if len(ListDumps) > 0 }} - - - - - - - - - {{ range ListDumps}} - - - - - - - - {{end}} -
{{ T("name")}}{{ T("date")}}{{ T("size")}}{{ T("links")}}
- {{.Name}} - {{.Date}}{{.Filesize}} - {{if .TorrentLink != ""}} - -
-
- {{end}} -
- {{else}} -

{{ T("no_database_dumps_available")}}

+
+ {{ if len(ListDumps) > 0 }} + + + + + + + + + {{ range ListDumps}} + + + + + + + {{end}} +
{{ T("name")}}{{ T("date")}}{{ T("size")}}{{ T("links")}}
+ {{.Name}} + {{.Date}}{{.Filesize}} + {{if .TorrentLink != ""}} + +
+
+ {{end}} +
+ {{else}} +

{{ T("no_database_dumps_available")}}

+ {{end}}
{{end}} diff --git a/templates/site/static/delete_success.jet.html b/templates/site/static/delete_success.jet.html index 315f352a..ac9a9f1a 100644 --- a/templates/site/static/delete_success.jet.html +++ b/templates/site/static/delete_success.jet.html @@ -2,8 +2,8 @@ {{block title()}}{{ T("delete_account") }}{{end}} {{block content_body()}}
-
-

{{ T("delete_success")}}

-
+
+

{{ T("delete_success")}}

+
-{{end}} \ No newline at end of file +{{end}} diff --git a/templates/site/static/signup_success.jet.html b/templates/site/static/signup_success.jet.html index fd560dee..f9aebadd 100644 --- a/templates/site/static/signup_success.jet.html +++ b/templates/site/static/signup_success.jet.html @@ -2,14 +2,14 @@ {{block title()}}{{ T("register_success_title") }}{{end}} {{block content_body()}}
-
-

{{ T("sign_up_success")}}

-
- {{if User.Email != ""}} -

{{ T("signup_verification_email") }}

- {{else}} -

{{ T("signup_verification_noemail") }}

- {{end}} -
+
+

{{ T("sign_up_success")}}

+
+ {{if User.Email != ""}} +

{{ T("signup_verification_email") }}

+ {{else}} +

{{ T("signup_verification_noemail") }}

+ {{end}} +
-{{end}} \ No newline at end of file +{{end}} diff --git a/templates/site/static/verify_success.jet.html b/templates/site/static/verify_success.jet.html index bec254ab..4ccf8c77 100644 --- a/templates/site/static/verify_success.jet.html +++ b/templates/site/static/verify_success.jet.html @@ -2,8 +2,8 @@ {{block title()}}{{ T("register_success_title") }}{{end}} {{block content_body()}}
-
-

{{ T("verify_success")}}

-
+
+

{{ T("verify_success")}}

+
-{{end}} \ No newline at end of file +{{end}} diff --git a/templates/site/torrents/activities.jet.html b/templates/site/torrents/activities.jet.html index 94fcc5bd..3f61176e 100644 --- a/templates/site/torrents/activities.jet.html +++ b/templates/site/torrents/activities.jet.html @@ -2,21 +2,25 @@ {{block title()}}{{ T("activity_list") }}{{end}} {{block content_body()}}
- - - - - - - - - {{ range Models}} - - - - - {{end}} - -
{{ T("activities") }}{{ T("filter") }}
{{ genActivityContent(., T) }}{{ T(.Filter) }}
+ + + + + + + + + {{ range Models}} + + + + + {{end}} + +
{{ T("activities") }}{{ T("filter") }}
+ {{ genActivityContent(., T) }} + + {{ T(.Filter) }} +
-{{end}} \ No newline at end of file +{{end}} diff --git a/templates/site/torrents/edit.jet.html b/templates/site/torrents/edit.jet.html index 7d75f436..943cfe0b 100644 --- a/templates/site/torrents/edit.jet.html +++ b/templates/site/torrents/edit.jet.html @@ -4,57 +4,57 @@ {{ import "layouts/partials/helpers/flags" }} {{block title()}}{{T("torrent_edit_panel")}}{{end}} {{block content_body()}} -
+

{{ T("torrent_edit_panel") }}

- {{ yield csrf_field() }} -
+ {{ yield csrf_field() }} +
- - {{ yield errors(name="name")}} + + {{ yield errors(name="name")}} +
+
+ + + {{ yield errors(name="c")}} +
+
+ +
+ {{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages) }}
-
- - - {{ yield errors(name="c")}} -
-
- -
- {{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages) }} -
- {{ yield errors(name="language")}} -
-
- - - {{ yield errors(name="remake")}} -
- {{ if User.ID > 0 }} -

- - - {{ yield errors(name="hidden")}} -

- {{ end }} -
- - -
-
- - {{ yield errors(name="desc")}} -

{{ T("description_markdown_notice")}}

- -
- -
-
+ {{ yield errors(name="language")}} +
+
+ + + {{ yield errors(name="remake")}} +
+ {{ if User.ID > 0 }} +

+ + + {{ yield errors(name="hidden")}} +

+ {{ end }} +
+ + +
+
+ + {{ yield errors(name="desc")}} +

{{ T("description_markdown_notice")}}

+ +
+ +
+
{{end}} @@ -62,4 +62,3 @@ {{end}} - diff --git a/templates/site/torrents/listing.jet.html b/templates/site/torrents/listing.jet.html index 7346e519..b77dd0a6 100644 --- a/templates/site/torrents/listing.jet.html +++ b/templates/site/torrents/listing.jet.html @@ -3,151 +3,173 @@ {{block title()}}{{ T("home")}}{{end}} {{block contclass()}}{{if User.HasAdmin() }}content-admin{{end}}{{end}} {{block content_body()}} - -
- - - - {{ if User.HasAdmin() }} - - {{end}} - - - - - + +
+
{{ T("category")}} - {{ T("name")}}{{ genSortArrows(URL, "1")|raw }} - {{ T("size")}}{{ genSortArrows(URL, "4")|raw }}
+ + + {{ if User.HasAdmin() }} + + {{end}} + + + + + - - - - - - - - - {{ range Models}} - - {{ if User.HasAdmin() }} - - {{ end }} - + + + + + + + + {{ range Models}} + + {{ if User.HasAdmin() }} + + {{ end }} + - - {{ if len(.Comments) > 0 }} - - {{ end }} - - - {{if .LastScrape.IsZero}} - - {{else}} - - - + + {{ range key, language := .Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }} + {{end}} - - + + + + + {{ if len(.Comments) > 0 }} + + {{ end }} + -
+ + {{ T("category")}} + + {{ T("name")}} + {{ genSortArrows(URL, "1")|raw }} + + {{ T("size")}}{{ genSortArrows(URL, "4")|raw }} - {{ T("S")}}{{ genSortArrows(URL, "5")|raw }} - - {{ T("L")}}{{ genSortArrows(URL, "6")|raw }} - - {{ T("D")}}{{ genSortArrows(URL, "7")|raw }} - {{ T("date")}}{{ genSortArrows(URL, "2")|raw }}
- - - {{ if Sukebei() }} -
- {{ else}} -
- {{end}} - +
+ + {{ T("S")}} + {{ genSortArrows(URL, "5")|raw }} + + + + {{ T("L")}} + {{ genSortArrows(URL, "6")|raw }} + + + + {{ T("D")}} + {{ genSortArrows(URL, "7")|raw }} + + + {{ T("date")}} + {{ genSortArrows(URL, "2")|raw }} + +
+ + + {{ if Sukebei() }} +
+ {{ else}} +
+ {{end}} + {{if .Languages[0] != "" }} - - {{ range key, language := .Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }} - - {{end}} - -
-
- - {{.Name}} - - - {{len(.Comments)}} - - {{ fileSize(.Filesize, T) }} - {{ T("unknown")}}{{.Seeders}}{{.Leechers}}{{.Completed}}{{.Date}}
+ + {{.Name}} + + + {{len(.Comments)}} +
+ + + {{ fileSize(.Filesize, T) }} + + {{if .LastScrape.IsZero}} + {{ T("unknown")}} + {{else}} + {{.Seeders}} + {{.Leechers}} + {{.Completed}} + {{end}} + {{.Date}} + + {{end}} + + +
+{{ if User.HasAdmin() }} +
+ + + + + + + + + + + + + + + + +
+ + + {{end}} + {{ block footer_js()}} + + + + + + + + {{end}} diff --git a/templates/site/torrents/view.jet.html b/templates/site/torrents/view.jet.html index fb6dd4e0..d63508b8 100644 --- a/templates/site/torrents/view.jet.html +++ b/templates/site/torrents/view.jet.html @@ -5,51 +5,77 @@ {{block title()}}{{Torrent.Name}}{{end}} {{block content_body()}}
-
-

{{Torrent.Name}}

-
-
+
+

{{Torrent.Name}}

+
+
- - - - - - - - - - - - - - - - - - - - {{ if len(Torrent.Languages) > 0 && Torrent.Languages[0] != "" }} - - - + + + + - {{end}} + + + + + + + + + + + + + + + + + + + + + + + + + {{ if len(Torrent.Languages) > 0 && Torrent.Languages[0] != "" }} + + + + + {{end}}
{{ T("category") }}:{{ T(CategoryName(Torrent.Category, Torrent.SubCategory)) }}
{{ T("date") }}:{{Torrent.Date}}
{{ T("uploaded_by") }}:{{ genUploaderLink(Torrent.UploaderID, Torrent.UploaderName, Torrent.Hidden)|raw }}{{ T("seeders")}}:{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Seeders}}{{end}}
{{ T("website_link") }}:{{if Torrent.WebsiteLink != ""}}{{Torrent.WebsiteLink}}{{else}}N/A{{end}}{{ T("leechers")}}:{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Leechers}}{{end}}
{{ T("hash")}}:{{Torrent.Hash}}{{ T("completed")}}:{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Completed}}{{end}}
{{ T("size")}}:{{ fileSize(Torrent.Filesize, T) }}{{ T("last_scraped")}}{{formatDateRFC(Torrent.LastScrape)}}{{else}}">{{ T("unknown")}}{{end}}
{{ T("torrent_language")}}: - {{ range _, language := Torrent.Languages}} - {{ if language != "" }} - 5 }}class="big"{{ end }}>{{ LanguageNameFromCode(language, T) }} {{ LanguageNameFromCode(language, T) }} - {{end}} - {{end}} - {{ T("category") }}: + {{ T(CategoryName(Torrent.Category, Torrent.SubCategory)) }} +
+
{{ T("date") }}:{{Torrent.Date}}
{{ T("uploaded_by") }}:{{ genUploaderLink(Torrent.UploaderID, Torrent.UploaderName, Torrent.Hidden)|raw }}{{ T("seeders")}}:{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Seeders}}{{end}}
{{ T("website_link") }}: + {{if Torrent.WebsiteLink != ""}} + {{Torrent.WebsiteLink}} + {{else}}N/A{{end}} + {{ T("leechers")}}:{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Leechers}}{{end}}
{{ T("hash")}}:{{Torrent.Hash}}{{ T("completed")}}: + {{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Completed}}{{end}} +
{{ T("size")}}:{{ fileSize(Torrent.Filesize, T) }}{{ T("last_scraped")}}{{formatDateRFC(Torrent.LastScrape)}}{{else}}">{{ T("unknown")}}{{end}}
{{ T("torrent_language")}}: + {{ range _, language := Torrent.Languages}} + {{ if language != "" }} + 5 }}class="big"{{ end }}> + {{ LanguageNameFromCode(language, T) }} + {{ LanguageNameFromCode(language, T) }} + + {{end}} + {{end}} +
-
-
{{ T("magnet_link")}}
- {{ if Torrent.TorrentLink != ""}} -
{{ T("torrent_file")}}
- {{end}} - {{ if User.ID > 0}} - {{ T("report_btn") }} +
+ +
{{ T("magnet_link")}} +
+ {{ if Torrent.TorrentLink != ""}} + +
{{ T("torrent_file")}} +
+ {{end}} + {{ if User.ID > 0}} + {{ T("report_btn") }} {{ if User.HasAdmin()}} {{ T("delete") }} {{ T("edit") }} @@ -57,7 +83,7 @@ {{ T("delete") }} {{ T("edit") }} {{end}} -{{end}} + {{end}}

{{ T("description")}}

@@ -66,8 +92,10 @@ {{else}}

{{ T("no_description") }}

{{end}} - 1}}checked{{end}}> - + 1}}checked{{end}}/> +
{{ if len(Torrent.FileList) > 0 }} {* how do i concat lol *} @@ -81,72 +109,81 @@ {{ else }} -

{{ T("no_files") }}

+

{{ T("no_files") }}

{{ end }}

{{ T("comments")}}

{{range index, element := Torrent.Comments}}
- #{{index}}{{formatDateRFC(element.Date)}} -

{{element.Username}}

-

{{element.Content|raw}}

+ + #{{index}} + {{formatDateRFC(element.Date)}} + +

{{element.Username}}

+

{{element.Content|raw}}

{{end}}
- {{ yield csrf_field()}} -
-
-

{{ if User.ID > 0}} {{ T("submit_a_comment_as_username", User.Username) }} {{else}} {{ T("submit_a_comment_as_anonymous")|raw}} {{end}}

- -
-
- {{ yield captcha(captchaid=CaptchaID)}} -
- -
-
-
-
- {{ if User.ID > 0 }} - - +
+{{ if User.ID > 0 }} + + +{{end}} {{end}} {{ block footer_js()}} {{end}} diff --git a/templates/site/user/edit.jet.html b/templates/site/user/edit.jet.html index 0030e90a..5aaa6da7 100644 --- a/templates/site/user/edit.jet.html +++ b/templates/site/user/edit.jet.html @@ -4,153 +4,180 @@ {{block title()}}{{ T("profile_edit_page", UserProfile.Username) }}{{end}} {{ block profile_navigation()}}{{ yield profile_menu(route="profile_edit") }}{{end}} {{block profile_content()}} -

{{ T("personal_info")}}

-
-
- {{ yield csrf_field()}} - -

{{UserProfile.APIToken}}

- Reset API key

- {{ T("api_documentation")}} -
-
-
- {{ yield errors(name="Email")}} -
-
- {{ yield errors(name="Language")}} - {{ if !User.HasAdmin()}} -
-
- {{ yield errors(name="CurrentPassword")}} - {{end}} -
-
- {{ yield errors(name="Password")}} -
-
- {{ yield errors(name="ConfirmPassword")}} +

{{ T("personal_info")}}

+
+ + {{ yield csrf_field()}} + +

{{UserProfile.APIToken}}

+ Reset API key +
+
+ {{ T("api_documentation")}} +
+ +
+ +
+ {{ yield errors(name="Email")}} + +
+ +
+ {{ yield errors(name="Language")}} + {{ if !User.HasAdmin()}} + +
+ +
+ {{ yield errors(name="CurrentPassword")}} + {{end}} + +
+ +
+ {{ yield errors(name="Password")}} + +
+ +
+ {{ yield errors(name="ConfirmPassword")}} -

{{ T("preferences")}}

-
-
- {{ yield errors(name="Theme")}} - {{ if DefaultUserSettings("new_torrent")}} -
-
- {{ yield errors(name="NewTorrent")}} - {{end}} - {{ if DefaultUserSettings("new_torrent_email")}} -
-
- {{ yield errors(name="NewTorrentEmail")}} - {{end}} - {{ if DefaultUserSettings("new_comment")}} -
-
- {{ yield errors(name="NewComment")}} - {{end}} - {{ if DefaultUserSettings("new_comment_email")}} -
-
- {{ yield errors(name="NewCommentEmail")}} - {{end}} - {{ if DefaultUserSettings("new_responses")}} -
-
- {{ yield errors(name="NewResponses")}} - {{end}} - {{ if DefaultUserSettings("new_responses_email")}} -
-
- {{ yield errors(name="NewResponsesEmail")}} - {{end}} - {{ if DefaultUserSettings("new_follower")}} -
-
- {{ yield errors(name="NewFollower")}} - {{end}} - {{ if DefaultUserSettings("new_follower_email")}} -
-
- {{ yield errors(name="NewFollowerEmail")}} - {{end}} - {{ if DefaultUserSettings("followed")}} -
-
- {{ yield errors(name="Followed")}} - {{end}} - {{ if DefaultUserSettings("followed_email")}} -
-
- {{ yield errors(name="FollowedEmail")}} - {{end}} - {{ if User.HasAdmin()}} -

{{ T("moderation")}}

-
- - {{ yield errors(name="Username")}} +

{{ T("preferences")}}

+ +
+ +
+ {{ yield errors(name="Theme")}} + {{ if DefaultUserSettings("new_torrent")}} + +
+ +
+ {{ yield errors(name="NewTorrent")}} + {{end}} + {{ if DefaultUserSettings("new_torrent_email")}} + +
+
+ {{ yield errors(name="NewTorrentEmail")}} + {{end}} + {{ if DefaultUserSettings("new_comment")}} +
+
+ {{ yield errors(name="NewComment")}} + {{end}} + {{ if DefaultUserSettings("new_comment_email")}} + +
+ +
+ {{ yield errors(name="NewCommentEmail")}} + {{end}} + {{ if DefaultUserSettings("new_responses")}} + +
+ +
+ {{ yield errors(name="NewResponses")}} + {{end}} + {{ if DefaultUserSettings("new_responses_email")}} +
+ +
+ {{ yield errors(name="NewResponsesEmail")}} + {{end}} + {{ if DefaultUserSettings("new_follower")}} +
+ +
+ {{ yield errors(name="NewFollower")}} + {{end}} + {{ if DefaultUserSettings("new_follower_email")}} +
+ +
+ {{ yield errors(name="NewFollowerEmail")}} + {{end}} + {{ if DefaultUserSettings("followed")}} +
+ +
+ {{ yield errors(name="Followed")}} + {{end}} + {{ if DefaultUserSettings("followed_email")}} + +
+ +
+ {{ yield errors(name="FollowedEmail")}} + {{end}} + {{ if User.HasAdmin()}} +

{{ T("moderation")}}

+
+ + {{ yield errors(name="Username")}} - - - {{ yield errors(name="Status")}} - {{end}} - - - - - -
- {{ if User.CurrentOrAdmin(UserProfile.ID) }} -
- {{ T("delete_account")}} - {{end}} + + + {{ yield errors(name="Status")}} + {{end}} + + + + + +
+{{ if User.CurrentOrAdmin(UserProfile.ID) }} +
+{{ T("delete_account")}} +{{end}} {{end}} diff --git a/templates/site/user/login.jet.html b/templates/site/user/login.jet.html index 7432cb24..88fb3cfd 100644 --- a/templates/site/user/login.jet.html +++ b/templates/site/user/login.jet.html @@ -3,26 +3,28 @@ {{ import "layouts/partials/helpers/errors" }} {{block title()}}{{ T("sign_in_title") }}{{end}} {{block content_body()}} -
-
-
- {{ yield csrf_field()}} -

{{ T("sign_in_box_title")}}

-
- {{ yield errors(name="Username")}} -
- - {{ yield errors(name="Password")}} - - - {{ T("register")}} -
-
-
-
-
+
+
+
+ {{ yield csrf_field()}} +

{{ T("sign_in_box_title")}}

+ +
+ {{ yield errors(name="Username")}} + +
+ + {{ yield errors(name="Password")}} + + + {{ T("register")}} +
+
+
+
+
{{end}} diff --git a/templates/site/user/notifications.jet.html b/templates/site/user/notifications.jet.html index f9bd7281..8a94cfbc 100644 --- a/templates/site/user/notifications.jet.html +++ b/templates/site/user/notifications.jet.html @@ -3,21 +3,25 @@ {{block title()}}{{ T("profile_edit_page", User.Username) }}{{end}} {{ block profile_navigation()}}{{ yield profile_menu(route="profile") }}{{end}} {{block profile_content()}} - {{ if len(User.Notifications) > 0}} - - - {{ range User.Notifications }} - - - - {{end}} -
- {{else}} -

{{ T("no_notifications") }}

- {{end}} +{{ if len(User.Notifications) > 0}} + + + {{ range User.Notifications }} + + + + + +{{end}} +
+{{else}} +

{{ T("no_notifications") }}

+{{end}} {{end}} diff --git a/templates/site/user/public/settings.jet.html b/templates/site/user/public/settings.jet.html index 86d370ab..33dcc1a4 100644 --- a/templates/site/user/public/settings.jet.html +++ b/templates/site/user/public/settings.jet.html @@ -2,40 +2,38 @@ {{ import "layouts/partials/helpers/csrf" }} {{block title()}}{{ T("change_settings")}}{{end}} {{block content_body()}} -
-
- {{ yield csrf_field() }} -
-

{{ T("language")}}

- -

{{ T("theme")}}

- -
-

{{ T("mascot")}}

- -
- -

{{ T("mascot_url")}}

- -
+
+ + {{ yield csrf_field() }} +
+

{{ T("language")}}

+ +

{{ T("theme")}}

+ +
+

{{ T("mascot")}}

+ +
-

{{ T("cookies")}}

- -
- -
+

{{ T("mascot_url")}}

+ +
+ +

{{ T("cookies")}}

+ +
+ +
{{end}} - - diff --git a/templates/site/user/register.jet.html b/templates/site/user/register.jet.html index 3fd5c1e1..26a81e42 100644 --- a/templates/site/user/register.jet.html +++ b/templates/site/user/register.jet.html @@ -4,53 +4,59 @@ {{ import "layouts/partials/helpers/errors" }} {{block title()}}{{ T("register_title") }}{{end}} {{block content_body()}} -
-
-
- {{ yield csrf_field() }} -

{{ T("signup_box_title") }}

-
- {{ yield errors(name="username") }} -
- {{ yield errors(name="email") }} -
- {{ yield errors(name="Password") }} -
- {{ yield errors(name="ConfirmPassword") }} -

- - {{ T("terms_conditions_confirm")|raw }} -

- {{ yield errors(name="TermsAndConditions") }} - - {{ yield captcha(captchaid=Form.CaptchaID)}} +
+
+ + {{ yield csrf_field() }} +

{{ T("signup_box_title") }}

+ +
+ {{ yield errors(name="username") }} + +
+ {{ yield errors(name="email") }} + +
+ {{ yield errors(name="Password") }} + +
+ {{ yield errors(name="ConfirmPassword") }} +

+ + + + {{ T("terms_conditions_confirm")|raw }} +

+ {{ yield errors(name="TermsAndConditions") }} + + {{ yield captcha(captchaid=Form.CaptchaID)}} - - -
-
- - +
+ + {{end}} {{ block footer_js() }} -{{end}} \ No newline at end of file +{{end}} diff --git a/templates/site/user/torrents.jet.html b/templates/site/user/torrents.jet.html index 316aee85..a6091fe6 100644 --- a/templates/site/user/torrents.jet.html +++ b/templates/site/user/torrents.jet.html @@ -3,62 +3,67 @@ {{ block profile_navigation()}}{{ yield profile_menu(route="profile") }}{{end}} {{block profile_content()}} {{ if len(UserProfile.Torrents) > 0 }} - - - - - - - - - {{ range i, t := UserProfile.Torrents }} - {{ torrent := t.ToJSON() }} - - - - - - - +
{{ T("category")}}{{ T("name")}}{{ T("links")}}{{ T("size")}}{{ T("date")}}
- {{ if Sukebei() }} -
- {{ else }} - -
- - {{torrent.Name}} - - - {{ fileSize(torrent.Filesize, T) }} - {{torrent.Date}}
+ + + + + + + + {{ range i, t := UserProfile.Torrents }} + {{ torrent := t.ToJSON() }} + +
{{ T("category")}}{{ T("name")}}{{ T("links")}}{{ T("size")}}{{ T("date")}}
+ {{ if Sukebei() }} +
+ {{ else }} +
- - {{else}} -

{{ T("no_torrents_uploaded") }}

+ +
+ + + + {{torrent.Name}} + + + + +
+
+ {{if torrent.TorrentLink != ""}} + +
+
+ {{end}} + + + {{ fileSize(torrent.Filesize, T) }} + + {{torrent.Date}} + + {{end}} + + +{{else}} +

{{ T("no_torrents_uploaded") }}

{{end}} {{end}} diff --git a/templates/template.go b/templates/template.go index 3b6415d2..83b9ff7e 100644 --- a/templates/template.go +++ b/templates/template.go @@ -54,7 +54,7 @@ func Commonvariables(c *gin.Context) jet.VarMap { variables.Set("T", publicSettings.GetTfuncFromRequest(c)) variables.Set("Theme", publicSettings.GetThemeFromRequest(c)) variables.Set("Mascot", publicSettings.GetMascotFromRequest(c)) - variables.Set("MascotURL", publicSettings.GetMascotUrlFromRequest(c)) + variables.Set("MascotURL", publicSettings.GetMascotURLFromRequest(c)) variables.Set("User", user) variables.Set("URL", c.Request.URL) variables.Set("CsrfToken", token) diff --git a/utils/feeds/rss.go b/utils/feeds/rss.go index ef2b13af..41ae2f92 100644 --- a/utils/feeds/rss.go +++ b/utils/feeds/rss.go @@ -260,14 +260,14 @@ func (r *Rss) RssFeed() *RssFeed { } // FeedXML : return an XML-Ready object for an Rss object -func (r *Rss) FeedXML() interface{} { +func (r *Rss) FeedXml() interface{} { // only generate version 2.0 feeds for now - return r.RssFeed().FeedXML() + return r.RssFeed().FeedXml() } // FeedXML : return an XML-ready object for an RssFeed object -func (r *RssFeed) FeedXML() interface{} { +func (r *RssFeed) FeedXml() interface{} { if r.Xmlns != "" { return &rssFeedXML{Version: "2.0", Encoding: "UTF-8", Channel: r, Xmlns: r.Xmlns} } @@ -275,6 +275,6 @@ func (r *RssFeed) FeedXML() interface{} { } // FeedXML : return an XML-ready object for an RssFeed object -func (r *RssCaps) FeedXML() interface{} { +func (r *RssCaps) FeedXml() interface{} { return r } diff --git a/utils/publicSettings/publicSettings.go b/utils/publicSettings/publicSettings.go index be33eb54..790635a3 100644 --- a/utils/publicSettings/publicSettings.go +++ b/utils/publicSettings/publicSettings.go @@ -25,12 +25,14 @@ type UserRetriever interface { RetrieveCurrentUser(c *gin.Context) (*models.User, error) } +// Language localization language struct type Language struct { Name string Code string Tag string } +// Languages Array of Language type Languages []Language // TemplateTfunc : T func used in template @@ -192,9 +194,9 @@ func GetMascotFromRequest(c *gin.Context) string { return "show" } -// GetMascotUrlFromRequest : Get the user selected mascot url from the request. +// GetMascotURLFromRequest : Get the user selected mascot url from the request. // Returns an empty string if not set. -func GetMascotUrlFromRequest(c *gin.Context) string { +func GetMascotURLFromRequest(c *gin.Context) string { user, _ := getCurrentUser(c) if user.ID > 0 { return user.MascotURL