Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Make navbar RSS link to user RSS on the profile page. (#681)

Also removed the RSS button from the profile page, as it would be
redundant.
Cette révision appartient à :
Ramon Dantas 2017-05-22 10:45:17 -03:00 révisé par ewhal
Parent bb6b47d913
révision 69b1a7f13e
2 fichiers modifiés avec 5 ajouts et 4 suppressions

Voir le fichier

@ -5,11 +5,11 @@
<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>
<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" />
<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" />
<!-- Bootstrap -->
<!-- Latest compiled and minified CSS -->
@ -51,7 +51,7 @@
<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>
<li><a href="{{ template "rss_link" . }}"><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 }}

Voir le fichier

@ -1,5 +1,7 @@
{{define "title"}}{{ call $.T "profile_page" .UserProfile.Username }}{{end}}
{{define "contclass"}}cont-view{{end}}
{{define "rss_link"}}{{ genRoute "feed_user" "id" ( print .UserProfile.ID ) "username" .UserProfile.Username }}{{end}}
{{define "rsstitle" }}{{ .UserProfile.Username }}{{end}}
{{define "content"}}
{{ range (index $.FormInfos "infos")}}
<div class="alert alert-info"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-info-sign"></i> {{ . }}</div>
@ -33,7 +35,6 @@
<a href="{{ genRoute "user_follow" "id" ( print .ID ) "username" .Username }}" class="btn btn-danger btn-sm">{{ call $.T "unfollow"}}</a>
{{end}}
{{end}}
<a href="{{ genRoute "feed_user" "id" ( print .ID ) "username" .Username }}" class="btn btn-warning btn-sm">RSS</a>
{{end}}
<!-- <button type="button" class="btn btn-danger btn-sm">Message</button> -->
</div>