summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-07-09 22:33:25 +0200
committerGitHub <noreply@github.com>2023-07-09 20:33:25 +0000
commit61e0d1a767e1a1a509de9de4aff42bdb79cc6443 (patch)
tree26b33e39b0a29493abfc93343cc0332bcf5b661e
parentbe23b73e8523738a1d3c214a01c0f162146da1c0 (diff)
downloadgitea-61e0d1a767e1a1a509de9de4aff42bdb79cc6443.tar.gz
gitea-61e0d1a767e1a1a509de9de4aff42bdb79cc6443.zip
Enable H014 and H023 djlint rules (#25786)
Enable these rules: - H014 | More than 2 blank lines. - H023 | Do not use entity references. There are more potential rules to enable but they are blocked by bugs in the linter: - https://github.com/Riverside-Healthcare/djLint/issues/711 - https://github.com/Riverside-Healthcare/djLint/issues/712
-rw-r--r--pyproject.toml2
-rw-r--r--templates/admin/auth/edit.tmpl1
-rw-r--r--templates/base/head_navbar.tmpl1
-rw-r--r--templates/install.tmpl1
-rw-r--r--templates/repo/diff/box.tmpl4
-rw-r--r--templates/repo/editor/edit.tmpl3
-rw-r--r--templates/repo/settings/options.tmpl5
-rw-r--r--templates/repo/tag/list.tmpl1
-rw-r--r--templates/repo/wiki/revision.tmpl5
-rw-r--r--templates/user/auth/change_passwd_inner.tmpl3
10 files changed, 3 insertions, 23 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 7a30f59140..43c6b050bb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,4 +12,4 @@ djlint = "1.31.1"
[tool.djlint]
profile="golang"
-ignore="H005,H006,H008,H013,H014,H016,H020,H021,H023,H026,H030,H031,T027"
+ignore="H005,H006,H008,H013,H016,H020,H021,H026,H030,H031,T027"
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl
index 801cf9e7b4..6dfa86d9dd 100644
--- a/templates/admin/auth/edit.tmpl
+++ b/templates/admin/auth/edit.tmpl
@@ -106,7 +106,6 @@
<input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto">
</div>
-
<!-- ldap group begin -->
<div class="inline field">
<div class="ui checkbox">
diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl
index 3898c98ac9..35aff8e538 100644
--- a/templates/base/head_navbar.tmpl
+++ b/templates/base/head_navbar.tmpl
@@ -23,7 +23,6 @@
<button class="item gt-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button>
</div>
-
<!-- navbar links non-mobile -->
{{if and .IsSigned .MustChangePassword}}
{{/* No links */}}
diff --git a/templates/install.tmpl b/templates/install.tmpl
index ccbd673470..48eabe8e74 100644
--- a/templates/install.tmpl
+++ b/templates/install.tmpl
@@ -155,7 +155,6 @@
<span class="help">{{.locale.Tr "install.enable_update_checker_helper"}}</span>
</div>
-
<!-- Optional Settings -->
<h4 class="ui dividing header">{{.locale.Tr "install.optional_title"}}</h4>
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index d12042800d..1bc79ad2ab 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -101,7 +101,7 @@
{{template "repo/diff/stats" dict "file" . "root" $}}
{{end}}
</div>
- <span class="file gt-mono"><a class="muted file-link" title="{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span>
+ <span class="file gt-mono"><a class="muted file-link" title="{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span>
<button class="btn interact-fg gt-p-3" data-clipboard-text="{{$file.Name}}">{{svg "octicon-copy" 14}}</button>
{{if $file.IsGenerated}}
<span class="ui label">{{$.locale.Tr "repo.diff.generated"}}</span>
@@ -110,7 +110,7 @@
<span class="ui label">{{$.locale.Tr "repo.diff.vendored"}}</span>
{{end}}
{{if and $file.Mode $file.OldMode}}
- <span class="gt-ml-4 gt-mono">{{$file.OldMode}} &rarr; {{$file.Mode}}</span>
+ <span class="gt-ml-4 gt-mono">{{$file.OldMode}} → {{$file.Mode}}</span>
{{else if $file.Mode}}
<span class="gt-ml-4 gt-mono">{{$file.Mode}}</span>
{{end}}
diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl
index 2f47616dc5..cfdb6298e5 100644
--- a/templates/repo/editor/edit.tmpl
+++ b/templates/repo/editor/edit.tmpl
@@ -52,8 +52,6 @@
{{template "repo/editor/commit_form" .}}
</form>
</div>
-
-
<div class="ui g-modal-confirm modal" id="edit-empty-content-modal">
<div class="header">
{{svg "octicon-file"}}
@@ -73,6 +71,5 @@
</button>
</div>
</div>
-
</div>
{{template "base/footer" .}}
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 4aff754e2c..ef72c0eadc 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -44,30 +44,25 @@
<label for="website">{{.locale.Tr "repo.settings.site"}}</label>
<input id="website" name="website" type="url" maxlength="1024" value="{{.Repository.Website}}">
</div>
-
<div class="field">
<button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
</div>
</form>
<div class="divider"></div>
-
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
{{.CsrfTokenHtml}}
<div class="inline field">
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
</div>
-
<div class="field">
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
<button class="ui red button link-action" data-url="{{.Link}}/avatar/delete" data-redirect="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
</div>
</form>
-
</div>
-
{{/* These variables exist to make the logic in the Settings window easier to comprehend and are not used later on. */}}
{{$newMirrorsPartiallyEnabled := or (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}}
{{/* .Repository.IsMirror is not always reliable if the repository is not actively acting as a mirror because of errors. */}}
diff --git a/templates/repo/tag/list.tmpl b/templates/repo/tag/list.tmpl
index 8651bfe2ec..5dfa79cd18 100644
--- a/templates/repo/tag/list.tmpl
+++ b/templates/repo/tag/list.tmpl
@@ -75,5 +75,4 @@
</div>
{{end}}
-
{{template "base/footer" .}}
diff --git a/templates/repo/wiki/revision.tmpl b/templates/repo/wiki/revision.tmpl
index b2d6e63924..b2c6ccf900 100644
--- a/templates/repo/wiki/revision.tmpl
+++ b/templates/repo/wiki/revision.tmpl
@@ -30,16 +30,11 @@
</div>
</div>
</h4>
-
{{if and .Commits (gt .CommitCount 0)}}
{{template "repo/commits_list" .}}
{{end}}
-
{{template "base/paginate" .}}
-
</div>
</div>
</div>
-
-
{{template "base/footer" .}}
diff --git a/templates/user/auth/change_passwd_inner.tmpl b/templates/user/auth/change_passwd_inner.tmpl
index 4b18ac944f..40281f8578 100644
--- a/templates/user/auth/change_passwd_inner.tmpl
+++ b/templates/user/auth/change_passwd_inner.tmpl
@@ -11,13 +11,10 @@
<label for="password">{{.locale.Tr "password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
</div>
-
-
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<label for="retype">{{.locale.Tr "re_type"}}</label>
<input id="retype" name="retype" type="password" autocomplete="new-password" required>
</div>
-
<div class="inline field">
<label></label>
<button class="ui green button">{{.locale.Tr "settings.change_password"}}</button>