]> source.dussan.org Git - gitea.git/commitdiff
Add nofollow to sign in links (#8509)
authorguillep2k <18600385+guillep2k@users.noreply.github.com>
Mon, 14 Oct 2019 17:43:48 +0000 (14:43 -0300)
committerzeripath <art27@cantab.net>
Mon, 14 Oct 2019 17:43:48 +0000 (18:43 +0100)
templates/base/head_navbar.tmpl
templates/repo/header.tmpl
templates/user/auth/signin_navbar.tmpl

index 30316e7e5b074d843bd5289af1fcef2aef2f3246..390a1fe8044ca7133e4cdffe982fed05f5ad2231 100644 (file)
                                        <i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
                                </a>
                        {{end}}
-                       <a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
+                       <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
                                <i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
                        </a>
                </div><!-- end anonymous right menu -->
index 9fb3e32899ae0fcaa30c0b8fa748089d8b48eb6b..111609efefb6d2446bc19ee7fb995519a5296ecc 100644 (file)
@@ -36,7 +36,7 @@
                                        </div>
                                        {{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
                                                <div class="ui labeled button {{if and ($.IsSigned) (not $.CanSignedUserFork)}}disabled-repo-button{{end}}" tabindex="0">
-                                                       <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">
+                                                       <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">
                                                                <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
                                                        </a>
                                                        <a class="ui basic label" href="{{.Link}}/forks">
index 3f0db26713fa18cabc685ef2f4f5d745babd0562..345e2212963f84708aeb0af13aa2ddee14ce71ec 100644 (file)
@@ -1,9 +1,9 @@
 {{if .EnableOpenIDSignIn}}
 <div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
-       <a class="{{if .PageIsLogin}}active{{end}} item" href="{{AppSubUrl}}/user/login">
+       <a class="{{if .PageIsLogin}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login">
                {{.i18n.Tr "auth.login_userpass"}}
        </a>
-       <a class="{{if .PageIsLoginOpenID}}active{{end}} item" href="{{AppSubUrl}}/user/login/openid">
+       <a class="{{if .PageIsLoginOpenID}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login/openid">
                <i class="fa fa-openid"></i>
                &nbsp;OpenID
        </a>