diff options
author | silverwind <me@silverwind.io> | 2024-03-24 17:42:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-24 17:42:49 +0100 |
commit | 68ec9b48592fe88765bcc3a73093d43c98b315de (patch) | |
tree | 793962a104d31d63d22ae3cfc7b4c9aff6b6f5f9 /routers | |
parent | 4734d43e1422da04f9ff79ea0212f7e9472b55a1 (diff) | |
download | gitea-68ec9b48592fe88765bcc3a73093d43c98b315de.tar.gz gitea-68ec9b48592fe88765bcc3a73093d43c98b315de.zip |
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}/**/*
```
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/blame.go | 2 | ||||
-rw-r--r-- | routers/web/repo/issue_content_history.go | 2 | ||||
-rw-r--r-- | routers/web/repo/view.go | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/repo/blame.go b/routers/web/repo/blame.go index 549ccdeabe..935e6d78fc 100644 --- a/routers/web/repo/blame.go +++ b/routers/web/repo/blame.go @@ -280,7 +280,7 @@ func renderBlame(ctx *context.Context, blameParts []*git.BlamePart, commitNames if commit.User != nil { avatar = string(avatarUtils.Avatar(commit.User, 18)) } else { - avatar = string(avatarUtils.AvatarByEmail(commit.Author.Email, commit.Author.Name, 18, "gt-mr-3")) + avatar = string(avatarUtils.AvatarByEmail(commit.Author.Email, commit.Author.Name, 18, "tw-mr-2")) } br.Avatar = gotemplate.HTML(avatar) diff --git a/routers/web/repo/issue_content_history.go b/routers/web/repo/issue_content_history.go index 1ec497658f..bf3571c835 100644 --- a/routers/web/repo/issue_content_history.go +++ b/routers/web/repo/issue_content_history.go @@ -70,7 +70,7 @@ func GetContentHistoryList(ctx *context.Context) { } src := html.EscapeString(item.UserAvatarLink) - class := avatars.DefaultAvatarClass + " gt-mr-3" + class := avatars.DefaultAvatarClass + " tw-mr-2" name := html.EscapeString(username) avatarHTML := string(templates.AvatarHTML(src, 28, class, username)) timeSinceText := string(timeutil.TimeSinceUnix(item.EditedUnix, ctx.Locale)) diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index b9e623919a..73a7be4e89 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -919,9 +919,9 @@ func prepareOpenWithEditorApps(ctx *context.Context) { schema, _, _ := strings.Cut(app.OpenURL, ":") var iconHTML template.HTML if schema == "vscode" || schema == "vscodium" || schema == "jetbrains" { - iconHTML = svg.RenderHTML(fmt.Sprintf("gitea-%s", schema), 16, "gt-mr-3") + iconHTML = svg.RenderHTML(fmt.Sprintf("gitea-%s", schema), 16, "tw-mr-2") } else { - iconHTML = svg.RenderHTML("gitea-git", 16, "gt-mr-3") // TODO: it could support user's customized icon in the future + iconHTML = svg.RenderHTML("gitea-git", 16, "tw-mr-2") // TODO: it could support user's customized icon in the future } tmplApps = append(tmplApps, map[string]any{ "DisplayName": app.DisplayName, |