aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-09-01 19:32:39 +0200
committerGitHub <noreply@github.com>2023-09-01 17:32:39 +0000
commita625f3a76198bed3c857f5c00f238bf9516ca950 (patch)
treef7cce48cbb25f767f4bb26e51068a85276445d68 /templates
parent5743d7cb5bcd85c88ad7d128e0162893a074418b (diff)
downloadgitea-a625f3a76198bed3c857f5c00f238bf9516ca950.tar.gz
gitea-a625f3a76198bed3c857f5c00f238bf9516ca950.zip
Enable djlint H008 and fix issues (#26869)
Enable `H008 | Attributes should be double quoted` and fix issues.
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content/attachments.tmpl4
-rw-r--r--templates/repo/issue/view_content/comments.tmpl4
-rw-r--r--templates/user/dashboard/navbar.tmpl2
-rw-r--r--templates/user/notification/notification_div.tmpl8
-rw-r--r--templates/user/overview/header.tmpl8
5 files changed, 13 insertions, 13 deletions
diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl
index 2eb0fcf61c..b74b6ce918 100644
--- a/templates/repo/issue/view_content/attachments.tmpl
+++ b/templates/repo/issue/view_content/attachments.tmpl
@@ -6,7 +6,7 @@
{{- range .Attachments -}}
<div class="gt-df">
<div class="gt-f1 gt-p-3">
- <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctxData.locale.Tr "repo.issues.attachment.open_tab" .Name}}'>
+ <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title="{{$.ctxData.locale.Tr "repo.issues.attachment.open_tab" .Name}}">
{{if FilenameIsImage .Name}}
{{if not (StringUtils.Contains $.Content .UUID)}}
{{$hasThumbnails = true}}
@@ -31,7 +31,7 @@
{{if FilenameIsImage .Name}}
{{if not (StringUtils.Contains $.Content .UUID)}}
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
- <img alt="{{.Name}}" src="{{.DownloadURL}}" title='{{$.ctxData.locale.Tr "repo.issues.attachment.open_tab" .Name}}'>
+ <img alt="{{.Name}}" src="{{.DownloadURL}}" title="{{$.ctxData.locale.Tr "repo.issues.attachment.open_tab" .Name}}">
</a>
{{end}}
{{end}}
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 8c99973827..d43979ff59 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -111,9 +111,9 @@
{{template "shared/user/authorlink" .Poster}}
{{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}}
{{if eq $.Issue.PullRequest.Status 3}}
- {{$.locale.Tr "repo.issues.comment_manually_pull_merged_at" (printf "<a class='ui sha' href='%[1]s'><b>%[2]s</b></a>" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
+ {{$.locale.Tr "repo.issues.comment_manually_pull_merged_at" (printf `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
{{else}}
- {{$.locale.Tr "repo.issues.comment_pull_merged_at" (printf "<a class='ui sha' href='%[1]s'><b>%[2]s</b></a>" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
+ {{$.locale.Tr "repo.issues.comment_pull_merged_at" (printf `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
{{end}}
</span>
</div>
diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl
index 0c185807c1..ee9e7e60ad 100644
--- a/templates/user/dashboard/navbar.tmpl
+++ b/templates/user/dashboard/navbar.tmpl
@@ -97,7 +97,7 @@
</a>
{{end}}
<div class="item">
- <a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title='{{.locale.Tr "home.view_home" .ContextUser.Name}}'>
+ <a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title="{{.locale.Tr "home.view_home" .ContextUser.Name}}">
{{.locale.Tr "home.view_home" (.ContextUser.ShortName 40)}}
</a>
</div>
diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl
index 3cc9d31d52..415051ae95 100644
--- a/templates/user/notification/notification_div.tmpl
+++ b/templates/user/notification/notification_div.tmpl
@@ -15,7 +15,7 @@
<form action="{{AppSubUrl}}/notifications/purge" method="post">
{{$.CsrfTokenHtml}}
<div class="{{if not $notificationUnreadCount}}gt-hidden{{end}}">
- <button class="ui mini button primary gt-mr-0" title='{{$.locale.Tr "notification.mark_all_as_read"}}'>
+ <button class="ui mini button primary gt-mr-0" title="{{$.locale.Tr "notification.mark_all_as_read"}}">
{{svg "octicon-checklist"}}
</button>
</div>
@@ -74,7 +74,7 @@
{{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}">
<input type="hidden" name="status" value="pinned">
- <button class="btn interact-bg gt-p-3" title='{{$.locale.Tr "notification.pin"}}'
+ <button class="btn interact-bg gt-p-3" title="{{$.locale.Tr "notification.pin"}}"
data-url="{{AppSubUrl}}/notifications/status"
data-status="pinned"
data-page="{{$.Page.Paginater.Current}}"
@@ -90,7 +90,7 @@
<input type="hidden" name="notification_id" value="{{.ID}}">
<input type="hidden" name="status" value="read">
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
- <button class="btn interact-bg gt-p-3" title='{{$.locale.Tr "notification.mark_as_read"}}'
+ <button class="btn interact-bg gt-p-3" title="{{$.locale.Tr "notification.mark_as_read"}}"
data-url="{{AppSubUrl}}/notifications/status"
data-status="read"
data-page="{{$.Page.Paginater.Current}}"
@@ -105,7 +105,7 @@
<input type="hidden" name="notification_id" value="{{.ID}}">
<input type="hidden" name="status" value="unread">
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
- <button class="btn interact-bg gt-p-3" title='{{$.locale.Tr "notification.mark_as_unread"}}'
+ <button class="btn interact-bg gt-p-3" title="{{$.locale.Tr "notification.mark_as_unread"}}"
data-url="{{AppSubUrl}}/notifications/status"
data-status="unread"
data-page="{{$.Page.Paginater.Current}}"
diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl
index 5134449084..895f1efb38 100644
--- a/templates/user/overview/header.tmpl
+++ b/templates/user/overview/header.tmpl
@@ -1,6 +1,6 @@
<div class="ui secondary stackable pointing menu">
{{if .HasProfileReadme}}
- <a class='{{if eq .TabName "overview"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=overview">
+ <a class="{{if eq .TabName "overview"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=overview">
{{svg "octicon-info"}} {{.locale.Tr "user.overview"}}
</a>
{{end}}
@@ -50,18 +50,18 @@
</div>
{{end}}
{{else}}
- <a class='{{if eq .TabName "activity"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=activity">
+ <a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
{{svg "octicon-rss"}} {{.locale.Tr "user.activity"}}
</a>
{{if not .DisableStars}}
- <a class='{{if eq .TabName "stars"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=stars">
+ <a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
{{svg "octicon-star"}} {{.locale.Tr "user.starred"}}
{{if .ContextUser.NumStars}}
<div class="ui small label">{{.ContextUser.NumStars}}</div>
{{end}}
</a>
{{else}}
- <a class='{{if eq .TabName "watching"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=watching">
+ <a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
{{svg "octicon-eye"}} {{.locale.Tr "user.watched"}}
</a>
{{end}}