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/index.html
Ramon Dantas 1968d2ae54 Move translation func to template variables (#652)
* Add T field to template variables

* Remove languages.SetTranslationFromRequest

* Add Tfunc on handlers

* Remove T and Ts from template_functions

* Update templates

Change the templates to use the local Tfunc, instead of the global one.
Also changed the signature of the fields on template_variables.go, so that
they return a template.HTML to avoid escaping problems.

* Remove unnecessary variable
2017-05-21 08:38:28 +10:00

110 lignes
6,4 Kio
HTML
Fichier exécutable

<!DOCTYPE html>
<html lang="{{ call $.T "language_code" }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 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 "title" .}}{{ call $.T "error_404" }}{{end}}</title>
<link rel="icon" type="image/png" href="/img/favicon.png?v=3" />
<!-- RSS Feed with Context -->
<link href="{{ genRouteWithQuery "feed" .URL }}" rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{block "rsstitle" .}}Last torrents{{end}} RSS Feed" />
<!-- Bootstrap -->
<!-- Latest compiled and minified CSS -->
<!-- This should come before website CSS because it can f3ck up the website completely.. Use !important as a workaround -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Bootstrap Markdown -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-markdown/2.10.0/css/bootstrap-markdown.min.css" crossorigin="anonymous">
<!-- Bootstrap -->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Search Box for Google -->
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebSite","url":"https://nyaa.pantsu.cat/","potentialAction":{"@type":"SearchAction","target":"https://nyaa.pantsu.cat/search?q={search_term_string}","query-input":"required name=search_term_string"}}</script>
<!-- Website CSS -->
<link rel="stylesheet" id="style" href="{{.URL.Parse "/css/style.css"}}">
{{block "night_theme_init" .}}{{end}}
</head>
<body>
<nav class="navbar navbar-default" id="mainmenu">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">{{ call $.T "toggle_navigation" }}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="{{.URL.Parse "/"}}"><img src="/img/logo.png" class ="navbar-logo" alt="Nyaa Pantsu"></a>
<a class="navbar-brand pull-right nightswitch" href="javascript:toggleNightMode();" ></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="{{.URL.Parse "/upload"}}"><div class="hidden-md hidden-sm">{{call $.T "upload"}}</div><span class="glyphicon glyphicon-cloud-upload visible-md"></span></a></li>
<li><a href="{{.URL.Parse "/faq"}}"><div class="hidden-md hidden-sm">{{call $.T "faq"}}</div><span class="glyphicon glyphicon-question-sign visible-md"></span></a></li>
<li><a href="{{ genRouteWithQuery "feed" .URL }}"><div class="hidden-md hidden-sm">RSS</div><span class="glyphicon glyphicon-flash visible-md"></span></a></li>
{{ if Sukebei }}
<li><a href="https://nyaa.pantsu.cat"><div class="hidden-md hidden-sm">{{call $.T "fun"}}</div><span class="glyphicon glyphicon-eye-open visible-md"></span></a></li>
{{ else }}
<li><a href="https://sukebei.pantsu.cat"><div class="hidden-md hidden-sm">{{call $.T "fap"}}</div><span class="glyphicon glyphicon-eye-close visible-md"></span></a></li>
{{ end }}
</ul>
{{block "badge_user" .}}{{end}}
<form class="navbar-form navbar-right" role="search" action="/search" method="get">
<div class="form-group">
{{block "search_common" .}}{{end}}
</div>
<div class="form-group">
{{block "search_button" .}}{{end}}
</div>
</form>
</div>
</div>
</nav>
<!-- top padding -->
<div style="padding-top: 10rem"></div>
<div class="container {{block "contclass" .}}generic{{end}}" id="container">
{{block "content" .}}{{call $.T "nothing_here"}}{{end}}
</div>
<!-- bottom padding -->
<div style="padding-top: 5rem"></div>
<footer>
Powered by NyaaPantsu
</footer>
{{if eq .User.ID 0}}
<form method="POST" action="{{ .URL.Parse "/language" }}" id="bottom_language_selector_form">
<select id="bottom_language_selector" name="language" onchange="javascript:document.getElementById('bottom_language_selector_form').submit()" hidden class="form-control"></select>
</form>
<noscript>
<center><a href="{{ .URL.Parse "/language" }}">{{ call $.T "change_language" }}</a></center>
</noscript>
<script type="text/javascript" charset="utf-8" src="{{.URL.Parse "/js/languages.js"}}"></script>
{{end}}
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Main Javascript File -->
<script type="text/javascript" charset="utf-8" src="{{.URL.Parse "/js/main.js"}}"></script>
{{block "js_footer" .}}{{end}}
</body>
</html>