Albirew/nyaa-pantsu
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/base.jet.html

113 lignes
5.7 KiB
HTML
Brut Vue normale Historique

First batch of changes for the refactor (#1078) * First batch of changes for the refactor Added the support of gin in routes and other services/utils Begining implementation of JetHTML * Remove os folder * Move scrapers to own repo * Second batch of changes All .jet.html are the working templates. You can now test this PR, the index Page and upload works. If you want to complete the other html templates, you're welcome * Move captcha to util * Move uploadService to utils * Use govalidator instead of regex * Third batch of changes All the front end should as previously. I also fixed some minor things unrelated to the refactor (mostly style issues on static pages) Now errors can be accessed by importing the "errors" helpers and using the `yield errors(name="xxx")` command in templates. Same for infos. Templates are now more hierarchized with a base template "base.jet.html" which is extended depending on the context in "index_site" or "index_admin" layouts. Those layouts are extended than in every pages. Other helpers are captcha to render a captcha `yield captcha(captchaid="xxx")` And also csrf, with the command `yield csrf_field()` To translate, you don't have anymore to do `call $.T "xxx"`, you just have to do `T("xxx")`. Pages for the website part are in folders in the folder "templates/site". Pages for the admin part are in "templates/admin". Layouts are separated in "templates/layouts". Helpers and menu are in "templates/layouts/helpers" and "templates/layouts/menu". Error pages should be put in "templates/errors" * Added test on templates When adding a new template, you have to tell to template_test.go, the context of the new template (if it doesn't use the common context) * Panel admin works Now the templating part should work. The PR can now be fully tested. I think we should push the templating PR and do the routes/controllers/removal of services in another branch. So we know that this one is functional * Updated dependencies * Fixed test for modelhelper * Fix testing for commentlist * Fix travis :') * Just renamed router and removed network * Applying same SEO fix * Update form_validator.go * Added back regexp package
2017-06-28 13:42:38 +02:00
{{import "helpers/errors"}}
{{import "helpers/infos"}}
{{import "layouts/partials/helpers/ad"}}
First batch of changes for the refactor (#1078) * First batch of changes for the refactor Added the support of gin in routes and other services/utils Begining implementation of JetHTML * Remove os folder * Move scrapers to own repo * Second batch of changes All .jet.html are the working templates. You can now test this PR, the index Page and upload works. If you want to complete the other html templates, you're welcome * Move captcha to util * Move uploadService to utils * Use govalidator instead of regex * Third batch of changes All the front end should as previously. I also fixed some minor things unrelated to the refactor (mostly style issues on static pages) Now errors can be accessed by importing the "errors" helpers and using the `yield errors(name="xxx")` command in templates. Same for infos. Templates are now more hierarchized with a base template "base.jet.html" which is extended depending on the context in "index_site" or "index_admin" layouts. Those layouts are extended than in every pages. Other helpers are captcha to render a captcha `yield captcha(captchaid="xxx")` And also csrf, with the command `yield csrf_field()` To translate, you don't have anymore to do `call $.T "xxx"`, you just have to do `T("xxx")`. Pages for the website part are in folders in the folder "templates/site". Pages for the admin part are in "templates/admin". Layouts are separated in "templates/layouts". Helpers and menu are in "templates/layouts/helpers" and "templates/layouts/menu". Error pages should be put in "templates/errors" * Added test on templates When adding a new template, you have to tell to template_test.go, the context of the new template (if it doesn't use the common context) * Panel admin works Now the templating part should work. The PR can now be fully tested. I think we should push the templating PR and do the routes/controllers/removal of services in another branch. So we know that this one is functional * Updated dependencies * Fixed test for modelhelper * Fix testing for commentlist * Fix travis :') * Just renamed router and removed network * Applying same SEO fix * Update form_validator.go * Added back regexp package
2017-06-28 13:42:38 +02:00
<!DOCTYPE html>
<html lang="{{ T("language_code") }}">
2017-07-24 07:03:43 +02:00
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="keywords" content="nyaa, torrents, pantsu, anime, manga, sukebei, nyaapassu, horriblesubs{{if Sukebei()}}, hentai{{end}}, dlsite"/>
2017-07-24 07:03:43 +02:00
<meta name="description" content='The leading open-source community-based nyaa.se successor, suitable for all anime and manga needs. にゃんぱす~!'/>
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{{if Sukebei()}}Sukebei{{else}}Nyaa{{end}} Pantsu{{block titleBase()}}{{end}}</title>
<!-- Flavicons and icons -->
<link rel="icon" type="image/png" href="/img/favicon.png" />
<link rel="shortcut icon" type="image/png" href="/img/favicon.png"/>
<!-- SMO -->
<meta property="og:site_name" content="{{if Sukebei()}}Sukebei{{else}}Nyaa{{end}} Pantsu"/>
<meta property="og:title" content="{{yield titleBase()}} - {{if Sukebei()}}Sukebei{{else}}Nyaa{{end}} Pantsu"/>
<meta property="og:image" content="/img/favicon.png"/>
<meta property="og:description" content="Nyaa Pantsu Homepage"/>
<!-- RSS Feed with Context -->
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{block rsstitle()}}Latest torrents{{end}} RSS Feed" href="{{ block rss_link() }}/feed?{{ getRawQuery(URL)|raw }}{{end}}" />
2017-09-04 00:11:16 +02:00
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{ yield rsstitle()}} Torznab RSS Feed" href="/feed/torznab?{{ getRawQuery(URL)|raw }}&t=search" />
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{ yield rsstitle()}} EZTV RSS Feed" href="/feed/eztv?{{ getRawQuery(URL)|raw }}" />
2017-07-24 07:03:43 +02:00
<!-- do NOT move -->
<link rel="stylesheet" href="/css/simplemde.min.css?v={{ Config.Version }}{{ Config.Build }}"/>
<!-- Base theme -->
<link rel="stylesheet" id="style" href="/css/main.css?v={{ Config.Version }}{{ Config.Build }}"/>
<!-- nyaacon, custom icon set -->
<link rel="stylesheet" href="/css/nyacon.css?v={{ Config.Version}}{{ Config.Build }}"/>
<!-- User selected theme, if empty defaults to theme in nyaa.yml -->
<link rel="stylesheet" id="theme" href="/css/themes/{{Theme}}.css?v={{ Config.Version }}{{ Config.Build }}"/>
2017-07-24 07:03:43 +02:00
<!-- Flags css -->
<link rel="stylesheet" href="/css/flags/flags.min.css"/>
<!-- Search Box for Google -->
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebSite","url":"{{Config.WebAddress.Nyaa}}/","potentialAction":{"@type":"SearchAction","target":"{{Config.WebAddress.Nyaa}}/search?q={search_term_string}","query-input":"required name=search_term_string"} }</script>
{{block additional_header()}}{{end}}
2017-08-28 15:38:37 +02:00
</head>
2017-07-24 07:03:43 +02:00
<body {{if Sukebei()}}class="sukebei"{{end}}>
<nav id="header" class="header">
2017-07-24 07:03:43 +02:00
{{block menu()}}{{end}}
</nav>
<div id="header-height-offset"></div>
2017-11-01 08:53:29 +01:00
{{ AdType := rand(2) }}
<div id="content" class="{{ block contclass()}}{{end}}">
<div class="content container center">
2017-07-24 07:03:43 +02:00
{{ yield infos()}}
{{ yield errors()}}
{{ if !isset(Infos["system"])}}<div class="centered">{{ yield ad_wide(Type=AdType) }}</div>{{end}}
2017-07-24 07:03:43 +02:00
{{ block content_body_base() }}{{end}}
</div>
{{ block mascot() }}
{{if Mascot != "hide"}}
<div id="mascot" class="hide-xs{{if MascotURL != ""}} custom-mascot{{end}}" onclick="playVoice();" {{if MascotURL != ""}}style="background-image: url('{{MascotURL}}');"{{end}}></div>
{* Only play the sounds with the default mascot *}
{{ if MascotURL == "" }}
{{ if Sukebei() }}
<audio id="kawaii" hidden preload="none">
<source src="/snd/spbyif.mp3" type="audio/mpeg">
2017-07-24 07:03:43 +02:00
</audio>
{{else if Theme == "tomorrow" }}
<audio id="explosion" hidden preload="none">
<source src="/snd/vrlrtw.mp3" type="audio/mpeg">
2017-07-24 07:03:43 +02:00
</audio>
{{ else if User.ID > 0}}
<audio id="nyanpassu2" hidden preload="none">
<source src="/snd/znadfr.mp3" type="audio/mpeg">
2017-07-24 07:03:43 +02:00
</audio>
{{ else }}
<audio id="nyanpassu" hidden preload="none">
<source src="/snd/sewang.mp3" type="audio/mpeg">
2017-07-24 07:03:43 +02:00
</audio>
{{end}}
{{end}}
{{end}}
{{end}}
[WIP] Anidex, TT & Nyaa.si uploading (#1604) * Update main.css * Update tomorrow.css * Create upload_multiple.jet.html * Create upload.js * Update upload.jet.html * Update upload.jet.html * Update upload.jet.html * Update tomorrow.css * Update main.css * Update tomorrow.css * Update main.css * Update user.go * Update template_test.go * Update main.css * Update upload.jet.html * Update edit.jet.html * Update template_test.go * Update upload.jet.html * Update main.css * new design for user edit * Fix CRSF token * Update upload_multiple.jet.html * Update upload.jet.html * Update profile.jet.html * Update base.jet.html * Update edit.jet.html * Update forms.go * Update forms_test.go * Update forms_test.go * Update forms.go * Update forms_test.go * Update main.css * Fix 4+ torrent flags display on IE * Fix userprofile buttons on IE, remove fancy css * Fix torrent link being hidden on IE * Update listing.jet.html * Update main.css * Update listing.jet.html * Delete torrent_item_upload.jet.html * Update torrent_item.jet.html * Update main.css * Update classic.css * Update listing.jet.html * Update classic.css * Update profile.jet.html * Update upload.jet.html * Update classic.css * Update classic.css * Update main.css * Update user.go * Update upload.jet.html * Update upload.jet.html * Update edit.jet.html * Update template_test.go * Update forms.go * Update forms_test.go * Update main.css * Update classic.css * checkboxes next to language div * wooo responsive checkboxes * remove empty space * need an !important here * Fix flags being unaligned on IE * Fix some inputs being too big on classic.css, remove fancy shit * Update classic.css * fix travis * Update main.css * Update upload.jet.html * Update edit.jet.html
2017-09-30 15:10:47 +02:00
{{ if genNav(Navigation, URL, 15) != ""}}
<div class="container bottom">
<div class="pagination">
{{ genNav(Navigation, URL, 15)|raw }}
</div>
</div>
[WIP] Anidex, TT & Nyaa.si uploading (#1604) * Update main.css * Update tomorrow.css * Create upload_multiple.jet.html * Create upload.js * Update upload.jet.html * Update upload.jet.html * Update upload.jet.html * Update tomorrow.css * Update main.css * Update tomorrow.css * Update main.css * Update user.go * Update template_test.go * Update main.css * Update upload.jet.html * Update edit.jet.html * Update template_test.go * Update upload.jet.html * Update main.css * new design for user edit * Fix CRSF token * Update upload_multiple.jet.html * Update upload.jet.html * Update profile.jet.html * Update base.jet.html * Update edit.jet.html * Update forms.go * Update forms_test.go * Update forms_test.go * Update forms.go * Update forms_test.go * Update main.css * Fix 4+ torrent flags display on IE * Fix userprofile buttons on IE, remove fancy css * Fix torrent link being hidden on IE * Update listing.jet.html * Update main.css * Update listing.jet.html * Delete torrent_item_upload.jet.html * Update torrent_item.jet.html * Update main.css * Update classic.css * Update listing.jet.html * Update classic.css * Update profile.jet.html * Update upload.jet.html * Update classic.css * Update classic.css * Update main.css * Update user.go * Update upload.jet.html * Update upload.jet.html * Update edit.jet.html * Update template_test.go * Update forms.go * Update forms_test.go * Update main.css * Update classic.css * checkboxes next to language div * wooo responsive checkboxes * remove empty space * need an !important here * Fix flags being unaligned on IE * Fix some inputs being too big on classic.css, remove fancy shit * Update classic.css * fix travis * Update main.css * Update upload.jet.html * Update edit.jet.html
2017-09-30 15:10:47 +02:00
{{end}}
{{ if !EUCookieLaw }}<div id="cookie-warning"><span id="cookie-warning-close" class="close">×</span>{{ T("cookie_warning")|raw }}</div>{{ end }}
<div class="centered">{{ yield ad_wide(Type=AdType) }}</div>
2017-07-24 07:03:43 +02:00
<footer id="footer">
<div class="container footer center">
<div class="footer-opt">
<p><a href="/settings">{{ T("change_settings") }}</a><a id="dark-toggle" href="/dark{{ URL.String()}}"> - Toggle Dark Mode</a></p>
2017-07-24 07:03:43 +02:00
</div>
<span><i>Powered by <a href="#">Nyaa Pantsu</a> v{{ Config.Version }} - commit <a id="commit" href="https://github.com/NyaaPantsu/nyaa/commit/{{ Config.Build }}">{{ Config.Build }}</a></i></span>
</div>
</footer>
</div>
<script type="text/javascript">
var commitVersion = "{{ Config.Build }}",
websiteVersion = "{{ Config.Version }}",
UserID = {{User.ID}},
domain = "{{getDomainName()}}",
darkTheme = "{{DarkTheme}}",
hmFmt = "{{ T("hours_minutes_ago") }}",
dhFmt = "{{ T("days_hours_ago") }}";
</script>
<script type="text/javascript" src="/js/query.js?v={{ Config.Version}}{{ Config.Build }}"></script>
2017-07-24 07:03:43 +02:00
<script type="text/javascript" charset="utf-8" src="/js/main.js?v={{ Config.Version }}{{ Config.Build }}" async></script>
{{block footer_js()}}{{end}}
</body>
</html>