Skip to content

adds: rel='nofollow' to all links generated by the application #17345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/layouts/doc/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<!-- this template is sucked in by search.js and appended to the search-results div above. So editing here will adjust style -->
<script id="search-result-template" type="text/x-js-template">
<div id="summary-${key}">
<h4><a href="${link}">${title}</a></h4>
<h4><a href="${link}" rel="nofollow">${title}</a></h4>
<p>${snippet}</p>
${ isset tags }<p>Tags: ${tags}</p>${ end }
${ isset categories }<p>Categories: ${categories}</p>${ end }
Expand Down
4 changes: 2 additions & 2 deletions modules/markup/common/footnote.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func (r *FootnoteHTMLRenderer) renderFootnoteLink(w util.BufWriter, source []byt
_, _ = w.Write(n.Name)
_, _ = w.WriteString(`"><a href="#fn:`)
_, _ = w.Write(n.Name)
_, _ = w.WriteString(`" class="footnote-ref" role="doc-noteref">`)
_, _ = w.WriteString(`" rel="nofollow" class="footnote-ref" role="doc-noteref">`)
_, _ = w.WriteString(is)
_, _ = w.WriteString(`</a></sup>`)
}
Expand All @@ -434,7 +434,7 @@ func (r *FootnoteHTMLRenderer) renderFootnoteBackLink(w util.BufWriter, source [
fmt.Fprintf(os.Stdout, "source:\n%s\n", string(n.Text(source)))
_, _ = w.WriteString(` <a href="#fnref:`)
_, _ = w.Write(n.Name)
_, _ = w.WriteString(`" class="footnote-backref" role="doc-backlink">`)
_, _ = w.WriteString(`" rel="nofollow" class="footnote-backref" role="doc-backlink">`)
_, _ = w.WriteString("&#x21a9;&#xfe0e;")
_, _ = w.WriteString(`</a>`)
}
Expand Down
2 changes: 1 addition & 1 deletion modules/markup/orgmode/orgmode.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (r *Writer) WriteRegularLink(l org.RegularLink) {
videoSrc := getMediaURL(link)
fmt.Fprintf(r, `<video src="%s" title="%s">%s</video>`, videoSrc, description, description)
default:
fmt.Fprintf(r, `<a href="%s" title="%s">%s</a>`, link, description, description)
fmt.Fprintf(r, `<a href="%s" rel="nofollow" title="%s">%s</a>`, link, description, description)
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/repofiles/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func UpdateIssuesCommit(doer *models.User, repo *models.Repository, commits []*r
continue
}

message := fmt.Sprintf(`<a href="%s/commit/%s">%s</a>`, repo.Link(), c.Sha1, html.EscapeString(strings.SplitN(c.Message, "\n", 2)[0]))
message := fmt.Sprintf(`<a href="%s/commit/%s" rel="nofollow">%s</a>`, repo.Link(), c.Sha1, html.EscapeString(strings.SplitN(c.Message, "\n", 2)[0]))
if err = models.CreateRefComment(doer, refRepo, refIssue, message, c.Sha1); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion routers/web/feed/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions []*models.Action) (ite
if len(desc) != 0 {
desc += "\n\n"
}
desc += fmt.Sprintf("<a href=\"%s\">%s</a>\n%s",
desc += fmt.Sprintf("<a href=\"%s\" rel=\"nofollow\">%s</a>\n%s",
fmt.Sprintf("%s/commit/%s", act.GetRepoLink(), commit.Sha1),
commit.Sha1,
templates.RenderCommitMessage(commit.Message, repoLink, nil),
Expand Down
2 changes: 1 addition & 1 deletion services/webhook/general.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func noneLinkFormatter(url string, text string) string {

// htmlLinkFormatter creates a HTML link
func htmlLinkFormatter(url string, text string) string {
return fmt.Sprintf(`<a href="%s">%s</a>`, url, html.EscapeString(text))
return fmt.Sprintf(`<a href="%s" rel="nofollow">%s</a>`, url, html.EscapeString(text))
}

func getIssuesPayloadInfo(p *api.IssuePayload, linkFormatter linkFormatter, withSender bool) (string, string, string, int) {
Expand Down
2 changes: 1 addition & 1 deletion services/webhook/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (m *MatrixPayloadUnsafe) JSONPayload() ([]byte, error) {

// MatrixLinkFormatter creates a link compatible with Matrix
func MatrixLinkFormatter(url string, text string) string {
return fmt.Sprintf(`<a href="%s">%s</a>`, html.EscapeString(url), html.EscapeString(text))
return fmt.Sprintf(`<a href="%s" rel="nofollow">%s</a>`, html.EscapeString(url), html.EscapeString(text))
}

// MatrixLinkToRef Matrix-formatter link to a repo ref
Expand Down
12 changes: 6 additions & 6 deletions services/webhook/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (t *TelegramPayload) JSONPayload() ([]byte, error) {
func (t *TelegramPayload) Create(p *api.CreatePayload) (api.Payloader, error) {
// created tag/branch
refName := git.RefEndName(p.Ref)
title := fmt.Sprintf(`[<a href="%s">%s</a>] %s <a href="%s">%s</a> created`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType,
title := fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>] %s <a href="%s" rel="nofollow">%s</a> created`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType,
p.Repo.HTMLURL+"/src/"+refName, refName)

return createTelegramPayload(title), nil
Expand All @@ -70,15 +70,15 @@ func (t *TelegramPayload) Create(p *api.CreatePayload) (api.Payloader, error) {
func (t *TelegramPayload) Delete(p *api.DeletePayload) (api.Payloader, error) {
// created tag/branch
refName := git.RefEndName(p.Ref)
title := fmt.Sprintf(`[<a href="%s">%s</a>] %s <a href="%s">%s</a> deleted`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType,
title := fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>] %s <a href="%s" rel="nofollow">%s</a> deleted`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType,
p.Repo.HTMLURL+"/src/"+refName, refName)

return createTelegramPayload(title), nil
}

// Fork implements PayloadConvertor Fork method
func (t *TelegramPayload) Fork(p *api.ForkPayload) (api.Payloader, error) {
title := fmt.Sprintf(`%s is forked to <a href="%s">%s</a>`, p.Forkee.FullName, p.Repo.HTMLURL, p.Repo.FullName)
title := fmt.Sprintf(`%s is forked to <a href="%s" rel="nofollow">%s</a>`, p.Forkee.FullName, p.Repo.HTMLURL, p.Repo.FullName)

return createTelegramPayload(title), nil
}
Expand All @@ -101,7 +101,7 @@ func (t *TelegramPayload) Push(p *api.PushPayload) (api.Payloader, error) {
if titleLink == "" {
titleLink = p.Repo.HTMLURL + "/src/" + branchName
}
title := fmt.Sprintf(`[<a href="%s">%s</a>:<a href="%s">%s</a>] %s`, p.Repo.HTMLURL, p.Repo.FullName, titleLink, branchName, commitDesc)
title := fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>:<a href="%s" rel="nofollow">%s</a>] %s`, p.Repo.HTMLURL, p.Repo.FullName, titleLink, branchName, commitDesc)

var text string
// for each commit, generate attachment text
Expand All @@ -110,7 +110,7 @@ func (t *TelegramPayload) Push(p *api.PushPayload) (api.Payloader, error) {
if commit.Author != nil {
authorName = " - " + commit.Author.Name
}
text += fmt.Sprintf(`[<a href="%s">%s</a>] %s`, commit.URL, commit.ID[:7],
text += fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>] %s`, commit.URL, commit.ID[:7],
strings.TrimRight(commit.Message, "\r\n")) + authorName
// add linebreak to each commit but the last
if i < len(p.Commits)-1 {
Expand Down Expand Up @@ -164,7 +164,7 @@ func (t *TelegramPayload) Repository(p *api.RepositoryPayload) (api.Payloader, e
var title string
switch p.Action {
case api.HookRepoCreated:
title = fmt.Sprintf(`[<a href="%s">%s</a>] Repository created`, p.Repository.HTMLURL, p.Repository.FullName)
title = fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>] Repository created`, p.Repository.HTMLURL, p.Repository.FullName)
return createTelegramPayload(title), nil
case api.HookRepoDeleted:
title = fmt.Sprintf("[%s] Repository deleted", p.Repository.FullName)
Expand Down
4 changes: 2 additions & 2 deletions templates/admin/auth/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
{{range .Sources}}
<tr>
<td>{{.ID}}</td>
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}" rel="nofollow">{{.Name}}</a></td>
<td>{{.TypeName}}</td>
<td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
<td><span class="poping up" data-content="{{.UpdatedUnix.FormatShort}}" data-variation="tiny">{{.UpdatedUnix.FormatShort}}</span></td>
<td><span class="poping up" data-content="{{.CreatedUnix.FormatLong}}" data-variation="tiny">{{.CreatedUnix.FormatShort}}</span></td>
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{svg "octicon-pencil"}}</a></td>
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}" rel="nofollow">{{svg "octicon-pencil"}}</a></td>
</tr>
{{end}}
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/dashboard.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{template "base/alert" .}}
{{if .NeedUpdate}}
<div class="ui negative message flash-error">
<p>"Gitea {{.RemoteVersion | Str2html}} is now available, you are running {{.AppVer | Str2html}}. Check the <a href="https://blog.gitea.io">blog</a> for more details.</p>
<p>"Gitea {{.RemoteVersion | Str2html}} is now available, you are running {{.AppVer | Str2html}}. Check the <a href="https://blog.gitea.io" rel="nofollow">blog</a> for more details.</p>
</div>
{{end}}
<h4 class="ui top attached header">
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/emails/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<tbody>
{{range .Emails}}
<tr>
<td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
<td><a href="{{AppSubUrl}}/{{.Name}}" rel="nofollow">{{.Name}}</a></td>
<td><span class="text truncate">{{.FullName}}</span></td>
<td><span class="text email">{{.Email}}</span></td>
<td>{{if .IsPrimary}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/monitor.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<td>{{.Type}}</td>
<td>{{.ExemplarType}}</td>
<td>{{$sum := .NumberOfWorkers}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td><a href="{{$.Link}}/queue/{{.QID}}" class="button">{{if lt $sum 0}}{{$.i18n.Tr "admin.monitor.queue.review"}}{{else}}{{$.i18n.Tr "admin.monitor.queue.review_add"}}{{end}}</a>
<td><a href="{{$.Link}}/queue/{{.QID}}" rel="nofollow" class="button">{{if lt $sum 0}}{{$.i18n.Tr "admin.monitor.queue.review"}}{{else}}{{$.i18n.Tr "admin.monitor.queue.review_add"}}{{end}}</a>
</tr>
{{end}}
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/notice.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<td>{{$.i18n.Tr .TrStr}}</td>
<td class="view-detail"><span class="notice-description text truncate">{{.Description}}</span></td>
<td><span class="notice-created-time poping up" data-content="{{.CreatedUnix.AsTime}}" data-variation="inverted tiny">{{.CreatedUnix.FormatShort}}</span></td>
<td><a href="#">{{svg "octicon-note" 16 "view-detail"}}</a></td>
<td><a href="#" rel="nofollow">{{svg "octicon-note" 16 "view-detail"}}</a></td>
</tr>
{{end}}
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions templates/admin/org/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<tr>
<td>{{.ID}}</td>
<td>
<a href="{{.HomeLink}}">{{.Name}}</a>
<a href="{{.HomeLink}}" rel="nofollow">{{.Name}}</a>
{{if .Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock"}}</span>
{{end}}
Expand All @@ -45,7 +45,7 @@
<td>{{.NumMembers}}</td>
<td>{{.NumRepos}}</td>
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
<td><a href="{{.OrganisationLink}}/settings">{{svg "octicon-pencil"}}</a></td>
<td><a href="{{.OrganisationLink}}/settings" rel="nofollow">{{svg "octicon-pencil"}}</a></td>
</tr>
{{end}}
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions templates/admin/repo/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
<tr>
<td>{{.ID}}</td>
<td>
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
<a href="{{AppSubUrl}}/{{.Owner.Name}}" rel="nofollow">{{.Owner.Name}}</a>
{{if .Owner.Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock"}}</span>
{{end}}
</td>
<td>
<a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
<a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}" rel="nofollow">{{.Name}}</a>
{{if .IsArchived}}
<span class="ui basic mini label">{{$.i18n.Tr "repo.desc.archived"}}</span>
{{end}}
Expand Down
4 changes: 2 additions & 2 deletions templates/admin/user/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
{{range .Users}}
<tr>
<td>{{.ID}}</td>
<td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
<td><a href="{{AppSubUrl}}/{{.Name}}" rel="nofollow">{{.Name}}</a></td>
<td><span class="text truncate email">{{.Email}}</span></td>
<td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
<td>{{if .IsAdmin}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
Expand All @@ -100,7 +100,7 @@
{{else}}
<td><span>{{$.i18n.Tr "admin.users.never_login"}}</span></td>
{{end}}
<td><a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a></td>
<td><a href="{{$.Link}}/{{.ID}}" rel="nofollow">{{svg "octicon-pencil"}}</a></td>
</tr>
{{end}}
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions templates/base/footer_content.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
{{end}}
</div>
</div>
<a href="{{AssetUrlPrefix}}/js/licenses.txt">{{.i18n.Tr "licenses"}}</a>
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
<a href="{{AssetUrlPrefix}}/js/licenses.txt" rel="nofollow">{{.i18n.Tr "licenses"}}</a>
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger" rel="nofollow">API</a>{{end}}
<a target="_blank" rel="noopener noreferrer" href="https://gitea.io">{{.i18n.Tr "website"}}</a>
{{template "custom/extra_links_footer" .}}
{{if (or .ShowFooterVersion .PageIsAdmin)}}<span class="version">{{GoVer}}</span>{{end}}
Expand Down
4 changes: 2 additions & 2 deletions templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="{{AppSubUrl}}/" data-content="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}" data-variation="tiny inverted">
<a href="{{AppSubUrl}}/" data-content="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}" data-variation="tiny inverted" rel="nofollow">
<img class="ui mini image" width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
Expand Down Expand Up @@ -101,7 +101,7 @@
</div>
</div>

<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted" rel="nofollow">
<span class="text">
<span class="fitted">{{svg "octicon-bell"}}</span>
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
Expand Down
2 changes: 1 addition & 1 deletion templates/explore/code.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<tr>
<td class="lines-num">
{{range .LineNumbers}}
<a href="{{EscapePound $repo.HTMLURL}}/src/commit/{{$result.CommitID}}/{{EscapePound $result.Filename}}#L{{.}}"><span>{{.}}</span></a>
<a href="{{EscapePound $repo.HTMLURL}}/src/commit/{{$result.CommitID}}/{{EscapePound $result.Filename}}#L{{.}}" rel="nofollow"><span>{{.}}</span></a>
{{end}}
</td>
<td class="lines-code chroma"><code class="code-inner">{{.FormattedLines | Safe}}</code></td>
Expand Down
2 changes: 1 addition & 1 deletion templates/explore/organizations.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{end}}
{{if and .Website}}
{{svg "octicon-link"}}
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
<a href="{{.Website}}">{{.Website}}</a>
{{end}}
{{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/explore/repo_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{{if .Topics }}
<div class="ui tags">
{{range .Topics}}
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic" rel="nofollow">{{.}}</div></a>{{end}}
{{end}}
</div>
{{end}}
Expand Down
2 changes: 1 addition & 1 deletion templates/mail/auth/reset_passwd.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{ $recover_url := printf "%suser/recover_account?code=%s" AppUrl .Code}}
<body>
<p>{{.i18n.Tr "mail.hi_user_x" .DisplayName | Str2html}}</p><br>
<p>{{.i18n.Tr "mail.reset_password.text" .ResetPwdCodeLives | Str2html}}</p><p><a href="{{$recover_url}}">{{$recover_url}}</a></p><br>
<p>{{.i18n.Tr "mail.reset_password.text" .ResetPwdCodeLives | Str2html}}</p><p><a href="{{$recover_url}}" rel="nofollow">{{$recover_url}}</a></p><br>
<p>{{.i18n.Tr "mail.link_not_working_do_paste"}}</p>

<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
Expand Down
2 changes: 1 addition & 1 deletion templates/mail/notify/collaborator.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<p>
---
<br>
<a href="{{.Link}}">{{.i18n.Tr "mail.view_it_on" AppName}}</a>.
<a href="{{.Link}}" rel="nofollow">{{.i18n.Tr "mail.view_it_on" AppName}}</a>.
</p>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion templates/mail/release.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

</head>

{{$release_url := printf "<a href='%s'>%s</a>" .Release.HTMLURL .Release.TagName}}
{{$release_url := printf "<a href='%s' rel="nofollow">%s</a>" .Release.HTMLURL .Release.TagName}}
{{$repo_url := printf "<a href='%s'>%s</a>" .Release.Repo.HTMLURL .Release.Repo.FullName}}
<body>
<p>
Expand Down
2 changes: 1 addition & 1 deletion templates/org/team/members.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
data-data-team-name="{{$.Team.Name}}">{{$.i18n.Tr "org.members.remove"}}</button>
</form>
{{end}}
<a href="{{.HomeLink}}">
<a href="{{.HomeLink}}" rel="nofollow">
{{avatar .}}
{{.DisplayName}}
</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/post-install.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<p><a href="{{AppUrl}}user/login">{{AppUrl}}user/login</a></p>
<p><a href="{{AppUrl}}user/login" rel="nofollow">{{AppUrl}}user/login</a></p>
</div>
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions templates/repo/activity.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<div class="column">
{{if gt .Activity.ActivePRCount 0}}
<div class="stats-table">
<a href="#merged-pull-requests" class="table-cell tiny background purple" style="width: {{.Activity.MergedPRPerc}}{{if ne .Activity.MergedPRPerc 0}}%{{end}}"></a>
<a href="#proposed-pull-requests" class="table-cell tiny background green"></a>
<a href="#merged-pull-requests" class="table-cell tiny background purple" style="width: {{.Activity.MergedPRPerc}}{{if ne .Activity.MergedPRPerc 0}}%{{end}}" rel="nofollow"></a>
<a href="#proposed-pull-requests" class="table-cell tiny background green" rel="nofollow"></a>
</div>
{{else}}
<div class="stats-table">
Expand All @@ -48,8 +48,8 @@
<div class="column">
{{if gt .Activity.ActiveIssueCount 0}}
<div class="stats-table">
<a href="#closed-issues" class="table-cell tiny background red" style="width: {{.Activity.ClosedIssuePerc}}{{if ne .Activity.ClosedIssuePerc 0}}%{{end}}"></a>
<a href="#new-issues" class="table-cell tiny background green"></a>
<a href="#closed-issues" class="table-cell tiny background red" style="width: {{.Activity.ClosedIssuePerc}}{{if ne .Activity.ClosedIssuePerc 0}}%{{end}}" rel="nofollow"></a>
<a href="#new-issues" class="table-cell tiny background green" rel="nofollow"></a>
</div>
{{else}}
<div class="stats-table">
Expand All @@ -62,21 +62,21 @@
</div>
<div class="ui attached segment horizontal segments">
{{if .Permission.CanRead $.UnitTypePullRequests}}
<a href="#merged-pull-requests" class="ui attached segment text center">
<a href="#merged-pull-requests" class="ui attached segment text center" rel="nofollow">
<span class="text purple">{{svg "octicon-git-pull-request"}}</span> <strong>{{.Activity.MergedPRCount}}</strong><br>
{{.i18n.Tr (TrN .i18n.Lang .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n") }}
</a>
<a href="#proposed-pull-requests" class="ui attached segment text center">
<a href="#proposed-pull-requests" class="ui attached segment text center" rel="nofollow">
<span class="text green">{{svg "octicon-git-branch"}}</span> <strong>{{.Activity.OpenedPRCount}}</strong><br>
{{.i18n.Tr (TrN .i18n.Lang .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n") }}
</a>
{{end}}
{{if .Permission.CanRead $.UnitTypeIssues}}
<a href="#closed-issues" class="ui attached segment text center">
<a href="#closed-issues" class="ui attached segment text center" rel="nofollow">
<span class="text red">{{svg "octicon-issue-closed"}}</span> <strong>{{.Activity.ClosedIssueCount}}</strong><br>
{{.i18n.Tr (TrN .i18n.Lang .Activity.ClosedIssueCount "repo.activity.closed_issues_count_1" "repo.activity.closed_issues_count_n") }}
</a>
<a href="#new-issues" class="ui attached segment text center">
<a href="#new-issues" class="ui attached segment text center" rel="nofollow">
<span class="text green">{{svg "octicon-issue-opened"}}</span> <strong>{{.Activity.OpenedIssueCount}}</strong><br>
{{.i18n.Tr (TrN .i18n.Lang .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n") }}
</a>
Expand Down
Loading