0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-25 05:02:49 +01:00

Remove obsolete CSS text classes (#30576)

- `.text-thin` and `.text-italic` are not present in CSS so were doing nothing and I removed them.
- `.text.middle` was unused so I removed it.
- `.text.italic` is replaced with `tw-italic`.
- `.text.normal` had exactly one use and it wasn't even needed.
- add a `muted` class to the link to `org_profile_avatar.tmpl`.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind 2024-04-22 13:21:06 +02:00 committed by GitHub
parent 0386a42f70
commit aff7b7bdd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 11 additions and 27 deletions

View file

@ -46,7 +46,7 @@
</div> </div>
{{else}} {{else}}
<div class="flex-item"> <div class="flex-item">
<span class="text grey italic">{{ctx.Locale.Tr "org.teams.members.none"}}</span> <span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.members.none"}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -48,7 +48,7 @@
</div> </div>
{{else}} {{else}}
<div class="flex-item"> <div class="flex-item">
<span class="text grey italic">{{ctx.Locale.Tr "org.teams.repos.none"}}</span> <span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.repos.none"}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -22,7 +22,7 @@
{{if .Team.Description}} {{if .Team.Description}}
{{.Team.Description}} {{.Team.Description}}
{{else}} {{else}}
<span class="text grey italic">{{ctx.Locale.Tr "org.teams.no_desc"}}</span> <span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.no_desc"}}</span>
{{end}} {{end}}
</div> </div>
{{if eq .Team.LowerName "owners"}} {{if eq .Team.LowerName "owners"}}

View file

@ -65,7 +65,7 @@
</div> </div>
<div class="inline field"> <div class="inline field">
<label>{{ctx.Locale.Tr "repo.template"}}</label> <label>{{ctx.Locale.Tr "repo.template"}}</label>
<div id="repo_template_search" class="ui search normal selection dropdown"> <div id="repo_template_search" class="ui search selection dropdown">
<input type="hidden" id="repo_template" name="repo_template" value="{{.repo_template}}"> <input type="hidden" id="repo_template" name="repo_template" value="{{.repo_template}}">
<div class="default text">{{.repo_template_name}}</div> <div class="default text">{{.repo_template_name}}</div>
<div class="menu"> <div class="menu">
@ -119,7 +119,7 @@
<div id="non_template"> <div id="non_template">
<div class="inline field"> <div class="inline field">
<label>{{ctx.Locale.Tr "repo.issue_labels"}}</label> <label>{{ctx.Locale.Tr "repo.issue_labels"}}</label>
<div class="ui search normal selection dropdown"> <div class="ui search selection dropdown">
<input type="hidden" name="issue_labels" value="{{.issueLabels}}"> <input type="hidden" name="issue_labels" value="{{.issueLabels}}">
<div class="default text">{{ctx.Locale.Tr "repo.issue_labels_helper"}}</div> <div class="default text">{{ctx.Locale.Tr "repo.issue_labels_helper"}}</div>
<div class="menu"> <div class="menu">
@ -135,7 +135,7 @@
<div class="inline field"> <div class="inline field">
<label>.gitignore</label> <label>.gitignore</label>
<div class="ui multiple search normal selection dropdown"> <div class="ui multiple search selection dropdown">
<input type="hidden" name="gitignores" value="{{.gitignores}}"> <input type="hidden" name="gitignores" value="{{.gitignores}}">
<div class="default text">{{ctx.Locale.Tr "repo.repo_gitignore_helper"}}</div> <div class="default text">{{ctx.Locale.Tr "repo.repo_gitignore_helper"}}</div>
<div class="menu"> <div class="menu">

View file

@ -1,4 +1,4 @@
<div class="file-info text grey normal tw-font-mono"> <div class="file-info tw-font-mono">
{{if .FileIsSymlink}} {{if .FileIsSymlink}}
<div class="file-info-entry"> <div class="file-info-entry">
{{ctx.Locale.Tr "repo.symbolic_link"}} {{ctx.Locale.Tr "repo.symbolic_link"}}

View file

@ -29,7 +29,7 @@
</div> </div>
</div> </div>
</div> </div>
<button class="ui red tiny button inline text-thin delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"> <button class="ui red tiny button inline delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
{{ctx.Locale.Tr "repo.settings.delete_collaborator"}} {{ctx.Locale.Tr "repo.settings.delete_collaborator"}}
</button> </button>
</div> </div>
@ -75,7 +75,7 @@
</div> </div>
{{if $allowedToChangeTeams}} {{if $allowedToChangeTeams}}
<div class="flex-item-trailing" {{if .IncludesAllRepositories}} data-tooltip-content="{{ctx.Locale.Tr "repo.settings.delete_team_tip"}}"{{end}}> <div class="flex-item-trailing" {{if .IncludesAllRepositories}} data-tooltip-content="{{ctx.Locale.Tr "repo.settings.delete_team_tip"}}"{{end}}>
<button class="ui red tiny button inline text-thin delete-button {{if .IncludesAllRepositories}}disabled{{end}}" data-url="{{$.Link}}/team/delete" data-id="{{.ID}}"> <button class="ui red tiny button inline delete-button {{if .IncludesAllRepositories}}disabled{{end}}" data-url="{{$.Link}}/team/delete" data-id="{{.ID}}">
{{ctx.Locale.Tr "repo.settings.delete_collaborator"}} {{ctx.Locale.Tr "repo.settings.delete_collaborator"}}
</button> </button>
</div> </div>

View file

@ -135,7 +135,7 @@
<form method="post" class="tw-inline-block"> <form method="post" class="tw-inline-block">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<input type="hidden" name="action" value="mirror-sync"> <input type="hidden" name="action" value="mirror-sync">
<button class="ui primary tiny button inline text-thin">{{ctx.Locale.Tr "repo.settings.sync_mirror"}}</button> <button class="ui primary tiny button inline">{{ctx.Locale.Tr "repo.settings.sync_mirror"}}</button>
</form> </form>
</td> </td>
</tr> </tr>

View file

@ -4,7 +4,7 @@
<div class="column"> <div class="column">
<div class="ui header tw-flex tw-items-center gt-word-break"> <div class="ui header tw-flex tw-items-center gt-word-break">
{{ctx.AvatarUtils.Avatar . 100}} {{ctx.AvatarUtils.Avatar . 100}}
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> <span class="text grey"><a class="muted" href="{{.HomeLink}}">{{.DisplayName}}</a></span>
<span class="org-visibility"> <span class="org-visibility">
{{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} {{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
{{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} {{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}

View file

@ -702,14 +702,6 @@ input:-webkit-autofill:active,
text-align: right !important; text-align: right !important;
} }
.ui .text.normal {
font-weight: var(--font-weight-normal);
}
.ui .text.italic {
font-style: italic;
}
.ui .text.truncate { .ui .text.truncate {
overflow-x: hidden; overflow-x: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -717,14 +709,6 @@ input:-webkit-autofill:active,
display: inline-block; display: inline-block;
} }
.ui .text.thin {
font-weight: var(--font-weight-normal);
}
.ui .text.middle {
vertical-align: middle;
}
.ui .message.flash-message { .ui .message.flash-message {
text-align: center; text-align: center;
} }