Migrate margin and padding helpers to tailwind (#30043)
This will conclude the refactor of 1:1 class replacements to tailwind,
except `gt-hidden`. Commands ran:
```bash
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/*
```
(cherry picked from commit 68ec9b48592fe88765bcc3a73093d43c98b315de)
Conflicts:
routers/web/repo/view.go
templates/base/head_navbar.tmpl
templates/repo/code/recently_pushed_new_branches.tmpl
templates/repo/diff/box.tmpl
templates/repo/diff/compare.tmpl
templates/repo/diff/conversation.tmpl
templates/repo/header.tmpl
templates/repo/issue/filter_list.tmpl
templates/repo/issue/view_content/conversation.tmpl
templates/repo/issue/view_content/sidebar.tmpl
templates/repo/settings/options.tmpl
templates/repo/view_file.tmpl
templates/shared/user/blocked_users.tmpl
templates/status/500.tmpl
web_src/js/components/DashboardRepoList.vue
resolved by prefering Forgejo version and applying the
commands to all files
2024-03-24 17:42:49 +01:00
< table id = "repo-files-table" class = "ui single line table tw-mt-0" {{ if .HasFilesWithoutLatestCommit }} hx-indicator = "tr.notready td.message span" hx-trigger = "load" hx-swap = "morph" hx-post = " {{ .LastCommitLoaderURL }} " {{ end }} >
2015-12-07 23:30:52 +01:00
< thead >
2017-11-30 06:08:40 +01:00
< tr class = "commit-list" >
2024-04-10 08:13:22 +02:00
< th class = "tw-overflow-hidden" colspan = "2" >
< div class = "tw-flex" >
< div class = "latest-commit" >
{{ template "repo/latest_commit" . }}
< / div >
< / div >
2015-12-07 23:30:52 +01:00
< / th >
2024-11-04 19:30:00 +08:00
< th class = "text grey right age" > {{ if .LatestCommit }}{{ if .LatestCommit.Committer }}{{ DateUtils .TimeSince .LatestCommit.Committer.When }}{{ end }}{{ end }} </ th >
2015-12-07 23:30:52 +01:00
< / tr >
< / thead >
< tbody >
{{ if .HasParentPath }}
< tr class = "has-parent" >
2024-08-01 13:32:01 +02:00
< td colspan = "3" >< a class = "muted" href = " {{ .BranchLink }}{{ if .ParentPath }}{{ PathEscapeSegments .ParentPath }}{{ end }} " > {{ svg "octicon-reply" 16 "tw-mr-2" }} ..</ a ></ td >
2015-12-07 23:30:52 +01:00
< / tr >
{{ end }}
{{ range $item := .Files }}
2020-12-17 14:00:47 +00:00
{{ $entry := $item .Entry }}
{{ $commit := $item .Commit }}
2021-10-08 14:08:22 +01:00
< tr data-entryname = " {{ $entry .Name }} " data-ready = " {{ if $commit }} true {{ else }} false {{ end }} " class = " {{ if not $commit }} not {{ end }} ready entry" >
2020-08-26 17:52:44 +02:00
< td class = "name four wide" >
< span class = "truncate" >
2025-07-15 00:20:00 +02:00
{{ if $entry .IsSubmodule }}
{{ $submodule := $item .Submodule }}
{{ $refURL := $submodule .ResolveUpstreamURL $.Repository.HTMLURL }}
2024-08-01 13:32:01 +02:00
{{ $icon := ( svg "octicon-file-submodule" 16 "tw-mr-2" ) }}
2020-08-26 17:52:44 +02:00
{{ if $refURL }}
2025-07-15 00:20:00 +02:00
< a class = "muted" href = " {{ $refURL }} " > {{ $icon }}{{ $entry .Name }} </ a >< span class = "at" > @</ span >< a href = " {{ $refURL }} /commit/ {{ PathEscape $submodule .Commit.String }} " > {{ ShortSha $submodule .Commit.String }} </ a >
2020-08-26 17:52:44 +02:00
{{ else }}
2025-07-15 00:20:00 +02:00
{{ $icon }}{{ $entry .Name }} < span class = "at" > @</ span > {{ ShortSha $submodule .Commit.String }}
2020-08-26 17:52:44 +02:00
{{ end }}
2020-08-23 21:05:17 +02:00
{{ else }}
2020-08-26 17:52:44 +02:00
{{ if $entry .IsDir }}
{{ $subJumpablePathName := $entry .GetSubJumpablePathName }}
2022-07-22 07:49:24 -03:00
< a class = "muted" href = " {{ $.TreeLink }} / {{ PathEscapeSegments $subJumpablePathName }} " title = " {{ $subJumpablePathName }} " >
2023-04-29 20:02:29 +08:00
{{ $subJumpablePathFields := StringUtils .Split $subJumpablePathName "/" }}
{{ $subJumpablePathFieldLast := ( Eval ( len $subJumpablePathFields ) "-" 1 ) }}
2024-08-01 13:32:01 +02:00
{{ svg "octicon-file-directory-fill" 16 "tw-mr-2" -}}
{{ if eq $subJumpablePathFieldLast 0 -}}
2023-04-29 20:02:29 +08:00
{{ $subJumpablePathName }}
2024-08-01 13:32:01 +02:00
{{ else -}}
{{ $subJumpablePathPrefixes := slice $subJumpablePathFields 0 $subJumpablePathFieldLast -}}
2023-05-25 04:31:26 +02:00
< span class = "text light-2" > {{ StringUtils .Join $subJumpablePathPrefixes "/" }} </ span > /{{ index $subJumpablePathFields $subJumpablePathFieldLast }}
2020-08-26 17:52:44 +02:00
{{ end }}
< / a >
{{ else }}
2024-08-01 13:32:01 +02:00
< a class = "muted" href = " {{ $.TreeLink }} / {{ PathEscapeSegments $entry .Name }} " title = " {{ $entry .Name }} " > {{ svg ( printf "octicon-%s" ( EntryIcon $entry )) 16 "tw-mr-2" }}{{ $entry .Name }} </ a >
2020-08-26 17:52:44 +02:00
{{ end }}
2020-08-23 21:05:17 +02:00
{{ end }}
2020-08-26 17:52:44 +02:00
< / span >
< / td >
2019-11-02 01:26:21 +01:00
< td class = "message nine wide" >
2020-08-26 17:52:44 +02:00
< span class = "truncate" >
2021-10-08 14:08:22 +01:00
{{ if $commit }}
2021-12-03 08:15:53 -08:00
{{ $commitLink := printf "%s/commit/%s" $.RepoLink ( PathEscape $commit .ID.String ) }}
2024-01-15 09:49:24 +01:00
{{ RenderCommitMessageLinkSubject $.Context $commit .Message $commitLink ( $.Repository.ComposeMetas ctx ) }}
2021-10-08 14:08:22 +01:00
{{ else }}
2024-03-02 21:31:59 +02:00
< div class = "ui active tiny slow centered inline" > < / div >
2021-10-08 14:08:22 +01:00
{{ end }}
2020-08-26 17:52:44 +02:00
< / span >
2015-12-07 23:30:52 +01:00
< / td >
2024-11-04 19:30:00 +08:00
< td class = "text right age three wide" > {{ if $commit }}{{ DateUtils .TimeSince $commit .Committer.When }}{{ end }} </ td >
2015-12-07 23:30:52 +01:00
< / tr >
{{ end }}
< / tbody >
2014-07-26 00:24:27 -04:00
< / table >
2024-04-25 08:07:38 +08:00
{{ if and .ReadmeExist ( or .IsMarkup .IsPlainText ) }}
2015-12-07 23:30:52 +01:00
{{ template "repo/view_file" . }}
2015-07-28 11:42:06 +03:00
{{ end }}