Skip to content

Commit eb8975d

Browse files
guillep2kzeripath
authored andcommitted
Add nofollow to sign in links (#8509)
1 parent 8c8a93c commit eb8975d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

templates/base/head_navbar.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
<i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
126126
</a>
127127
{{end}}
128-
<a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
128+
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
129129
<i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
130130
</a>
131131
</div><!-- end anonymous right menu -->

templates/repo/header.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</div>
3737
{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
3838
<div class="ui labeled button {{if and ($.IsSigned) (not $.CanSignedUserFork)}}disabled-repo-button{{end}}" tabindex="0">
39-
<a class="ui compact basic button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny">
39+
<a class="ui compact basic button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny">
4040
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
4141
</a>
4242
<a class="ui basic label" href="{{.Link}}/forks">

templates/user/auth/signin_navbar.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{{if .EnableOpenIDSignIn}}
22
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
3-
<a class="{{if .PageIsLogin}}active{{end}} item" href="{{AppSubUrl}}/user/login">
3+
<a class="{{if .PageIsLogin}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login">
44
{{.i18n.Tr "auth.login_userpass"}}
55
</a>
6-
<a class="{{if .PageIsLoginOpenID}}active{{end}} item" href="{{AppSubUrl}}/user/login/openid">
6+
<a class="{{if .PageIsLoginOpenID}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login/openid">
77
<i class="fa fa-openid"></i>
88
&nbsp;OpenID
99
</a>

0 commit comments

Comments
 (0)