Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Add "Change language" link (#741)

* Add "Change language" link

* Update change_language.html

* Update index.html

* Update index.html

* Update index.html
Cette révision appartient à :
MMP0 2017-05-25 19:31:16 +09:00 révisé par ewhal
Parent ef5279018e
révision e8dd3a96c4
2 fichiers modifiés avec 17 ajouts et 18 suppressions

Voir le fichier

@ -1,22 +1,19 @@
{{define "title"}}{{call $.T "change_language"}}{{end}}
{{define "content"}}
<div class="blockBody">
<hr>
<form role="form" method="POST">
<div class="form-group">
<label for="language">{{call $.T "language"}}</label>
<div class="ui-select">
<select id="language" name="language" class="form-control">
{{ $currentLanguage := .Language }}
{{ range $tag, $translatedName := $.Languages }}
<option value="{{ $tag }}" {{ if eq $currentLanguage $tag }}selected{{end}}>{{ $translatedName }}</option>
{{ end }}
</select>
</div>
</div>
<button type="submit" class="btn btn-success">{{call $.T "save_changes"}}</button>
</form>
<hr>
<form role="form" method="POST">
<div class="form-group">
<h3>{{call $.T "language"}}</h3>
<select id="language" name="language" class="form-input">
{{ $currentLanguage := .Language }}
{{ range $tag, $translatedName := $.Languages }}
<option value="{{ $tag }}" {{ if eq $currentLanguage $tag }}selected{{end}}>{{ $translatedName }}</option>
{{ end }}
</select>
<button type="submit" class="form-input btn">{{call $.T "save_changes"}}</button>
</div>
</form>
<div style="padding-bottom: 1em"></div>
</div>
{{end}}

Voir le fichier

@ -13,7 +13,7 @@
<!-- RSS Feed with Context -->
<link href="{{ block "rss_link" . }}{{ genRouteWithQuery "feed" .URL }}{{end}}" rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{block "rsstitle" .}}Last torrents{{end}} RSS Feed" />
<link rel="stylesheet" id="style" href="{{.URL.Parse "/css/main.css"}}">
<link rel="stylesheet" id="style" href="{{.URL.Parse "/css/main.css"}}?v=2">
<link rel="stylesheet" id="theme" href="">
<!-- 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>
@ -93,6 +93,8 @@
</select>
<button class="form-input btn" onclick="toggleMascot(this)" value="hide"><span class="oi" data-glyph="eye"></span> Mascot</button>
<p><a href="/language">Change Language</a></p>
</div>
<span><i>Powered by <a href="#">NyaaPantsu</a></i></span>
@ -100,6 +102,6 @@
</div>
</footer>
</div>
<script type="text/javascript" charset="utf-8" src="{{.URL.Parse "/js/main.js"}}"></script>
<script type="text/javascript" charset="utf-8" src="{{.URL.Parse "/js/main.js"}}?v=2"></script>
</body>
</html>