Skip to content

Commit

Permalink
Replace all simple inline styles with tailwind (go-gitea#30032)
Browse files Browse the repository at this point in the history
These should be all simple inline styles that were left in the
templates.

Co-authored-by: Giteabot <[email protected]>
  • Loading branch information
silverwind and GiteaBot authored Mar 23, 2024
1 parent fabe014 commit 0bef9a2
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion templates/admin/notice.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<td><div class="ui checkbox tw-flex" data-id="{{.ID}}"><input type="checkbox"></div></td>
<td>{{.ID}}</td>
<td>{{ctx.Locale.Tr .TrStr}}</td>
<td class="view-detail auto-ellipsis" style="width: 80%;"><span class="notice-description">{{.Description}}</span></td>
<td class="view-detail auto-ellipsis tw-w-4/5"><span class="notice-description">{{.Description}}</span></td>
<td nowrap>{{DateTime "short" .CreatedUnix}}</td>
<td class="view-detail"><a href="#">{{svg "octicon-note" 16}}</a></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion templates/devtest/flex-list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</div>
<div class="flex-item-trailing">
<a class="muted" href="{{$.Link}}">
<span class="flex-text-inline"><i class="color-icon gt-mr-3" style="background-color: aqua"></i>Go</span>
<span class="flex-text-inline"><i class="color-icon gt-mr-3 tw-bg-blue"></i>Go</span>
</a>
<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-star" 16}}45000</a>
<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-git-branch" 16}}1234</a>
Expand Down
4 changes: 2 additions & 2 deletions templates/devtest/tmplerr.tmpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{template "base/head" .}}
<div class="page-content devtest">
<div class="tw-flex">
<div style="width: 80%; ">
<div class="tw-w-4/5">
hello hello hello hello hello hello hello hello hello hello
</div>
<div style="width: 20%;">
<div class="tw-w-1/5">
{{template "devtest/tmplerr-sub" .}}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/diff/box.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<div class="diff-file-body ui attached unstackable table segment" {{if and $file.IsViewed $.IsShowingAllCommits}}data-folded="true"{{end}}>
<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} gt-hidden{{end}}">
{{if or $file.IsIncomplete $file.IsBin}}
<div class="diff-file-body binary" style="padding: 5px 10px;">
<div class="diff-file-body binary">
{{if $file.IsIncomplete}}
{{if $file.IsIncompleteLineTooLong}}
{{ctx.Locale.Tr "repo.diff.file_suppressed_line_too_long"}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="header">
{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}
</div>
<div class="content" style="text-align:left">
<div class="content tw-text-left">
<form class="ui form form-fetch-action" action="{{printf "%s/issues/new" .Repository.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="ui segment content">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/settings/deploy_keys.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<label for="is_writable">
{{ctx.Locale.Tr "repo.settings.is_writable"}}
</label>
<small style="padding-left: 26px;">{{ctx.Locale.Tr "repo.settings.is_writable_info"}}</small>
<small class="tw-pl-[26px]">{{ctx.Locale.Tr "repo.settings.is_writable_info"}}</small>
</div>
</div>
<button class="ui primary button">
Expand Down
4 changes: 2 additions & 2 deletions templates/repo/settings/options.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<table class="ui table">
<thead>
<tr>
<th style="width:40%">{{ctx.Locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}</th>
<th class="tw-w-2/5">{{ctx.Locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}</th>
<th>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction"}}</th>
<th>{{ctx.Locale.Tr "repo.settings.mirror_settings.last_update"}}</th>
<th></th>
Expand Down Expand Up @@ -207,7 +207,7 @@
<table class="ui table">
<thead>
<tr>
<th style="width:40%">{{ctx.Locale.Tr "repo.settings.mirror_settings.pushed_repository"}}</th>
<th class="tw-w-2/5">{{ctx.Locale.Tr "repo.settings.mirror_settings.pushed_repository"}}</th>
<th>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction"}}</th>
<th>{{ctx.Locale.Tr "repo.settings.mirror_settings.last_update"}}</th>
<th></th>
Expand Down
2 changes: 1 addition & 1 deletion templates/user/auth/webauthn.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p>{{ctx.Locale.Tr "webauthn_sign_in"}}</p>
</div>
<div class="ui attached segment tw-flex tw-items-center tw-justify-center gt-gap-2 gt-py-3">
<div class="is-loading" style="width: 40px; height: 40px"></div>
<div class="is-loading tw-w-[40px] tw-h-[40px]"></div>
{{ctx.Locale.Tr "webauthn_press_button"}}
</div>
{{if .HasTwoFactor}}
Expand Down
4 changes: 4 additions & 0 deletions web_src/css/review.css
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@
margin: 0 0 0 3em;
}

.diff-file-body.binary {
padding: 5px 10px;
}

.file-comment {
color: var(--color-text);
}
Expand Down

0 comments on commit 0bef9a2

Please sign in to comment.