mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 11:54:17 +01:00
Migrate font-weight helpers to tailwind (#30027)
Commands ran: ```sh perl -p -i -e 's#gt-font-light#tw-font-light#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-font-normal#tw-font-normal#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-font-medium#tw-font-medium#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-font-semibold#tw-font-semibold#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-font-bold#tw-font-bold#g' web_src/js/**/* templates/**/* ```
This commit is contained in:
parent
d9e33959b3
commit
fabe01478a
12 changed files with 18 additions and 17 deletions
|
@ -66,5 +66,12 @@ export default {
|
|||
'3xl': '24px',
|
||||
'full': 'var(--border-radius-circle)', // 50%
|
||||
},
|
||||
fontWeight: {
|
||||
light: 'var(--font-weight-light)',
|
||||
normal: 'var(--font-weight-normal)',
|
||||
medium: 'var(--font-weight-medium)',
|
||||
semibold: 'var(--font-weight-semibold)',
|
||||
bold: 'var(--font-weight-bold)',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
{{svg "octicon-chevron-down" 18}}
|
||||
{{end}}
|
||||
</button>
|
||||
<div class="gt-font-semibold tw-flex tw-items-center gt-mono">
|
||||
<div class="tw-font-semibold tw-flex tw-items-center gt-mono">
|
||||
{{if $file.IsBin}}
|
||||
<span class="gt-ml-1 gt-mr-3">
|
||||
{{ctx.Locale.Tr "repo.diff.bin"}}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between">
|
||||
<div class="comment-header-left tw-flex tw-items-center">
|
||||
{{if .OriginalAuthor}}
|
||||
<span class="text black gt-font-semibold gt-mr-2">
|
||||
<span class="text black tw-font-semibold gt-mr-2">
|
||||
{{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}}
|
||||
{{.OriginalAuthor}}
|
||||
</span>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="flex-item-main">
|
||||
<div class="flex-item-title gt-font-18">
|
||||
<a class="muted gt-font-normal" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/<a class="muted" href="{{$.RepoLink}}">{{.Name}}</a>
|
||||
<a class="muted tw-font-normal" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/<a class="muted" href="{{$.RepoLink}}">{{.Name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-item-trailing">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
|
||||
<div class="comment-header-left tw-flex tw-items-center">
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
<span class="text black gt-font-semibold">
|
||||
<span class="text black tw-font-semibold">
|
||||
{{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
|
||||
{{.Issue.OriginalAuthor}}
|
||||
</span>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
|
||||
<div class="comment-header-left tw-flex tw-items-center">
|
||||
{{if .OriginalAuthor}}
|
||||
<span class="text black gt-font-semibold gt-mr-2">
|
||||
<span class="text black tw-font-semibold gt-mr-2">
|
||||
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
||||
{{.OriginalAuthor}}
|
||||
</span>
|
||||
|
@ -411,7 +411,7 @@
|
|||
{{end}}
|
||||
<span class="text grey muted-links">
|
||||
{{if .OriginalAuthor}}
|
||||
<span class="text black gt-font-semibold">
|
||||
<span class="text black tw-font-semibold">
|
||||
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
||||
{{.OriginalAuthor}}
|
||||
</span>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{{ctx.Locale.Tr "repo.pulls.tab_files"}}
|
||||
<span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span>
|
||||
</a>
|
||||
<span class="item tw-ml-auto gt-pr-0 gt-font-bold tw-flex tw-items-center gt-gap-3">
|
||||
<span class="item tw-ml-auto gt-pr-0 tw-font-bold tw-flex tw-items-center gt-gap-3">
|
||||
<span><span class="text green">{{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}}</span> <span class="text red">{{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}</span></span>
|
||||
<span class="diff-stats-bar">
|
||||
<div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
{{range .LanguageStats}}
|
||||
<div class="item">
|
||||
<i class="color-icon" style="background-color: {{.Color}}"></i>
|
||||
<span class="gt-font-semibold">
|
||||
<span class="tw-font-semibold">
|
||||
{{if eq .Language "other"}}
|
||||
{{ctx.Locale.Tr "repo.language_other"}}
|
||||
{{else}}
|
||||
|
|
|
@ -1 +1 @@
|
|||
<a class="author text black gt-font-semibold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>{{if .IsBot}}<span class="ui basic label gt-p-2">bot</span>{{end}}
|
||||
<a class="author text black tw-font-semibold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>{{if .IsBot}}<span class="ui basic label gt-p-2">bot</span>{{end}}
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
<div class="ui red message">
|
||||
<p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "settings.delete_prompt"}}</p>
|
||||
{{if .UserDeleteWithComments}}
|
||||
<p class="text left gt-font-semibold">{{ctx.Locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime}}</p>
|
||||
<p class="text left tw-font-semibold">{{ctx.Locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime}}</p>
|
||||
{{end}}
|
||||
</div>
|
||||
<form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post">
|
||||
|
|
|
@ -36,12 +36,6 @@ Gitea's private styles use `g-` prefix.
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.gt-font-light { font-weight: var(--font-weight-light) !important; }
|
||||
.gt-font-normal { font-weight: var(--font-weight-normal) !important; }
|
||||
.gt-font-medium { font-weight: var(--font-weight-medium) !important; }
|
||||
.gt-font-semibold { font-weight: var(--font-weight-semibold) !important; }
|
||||
.gt-font-bold { font-weight: var(--font-weight-bold) !important; }
|
||||
|
||||
.interact-fg { color: inherit !important; }
|
||||
.interact-fg:hover { color: var(--color-primary) !important; }
|
||||
.interact-fg:active { color: var(--color-primary-active) !important; }
|
||||
|
|
|
@ -38,7 +38,7 @@ export default {
|
|||
<template>
|
||||
<ol class="diff-stats gt-m-0" ref="root" v-if="store.fileListIsVisible">
|
||||
<li v-for="file in store.files" :key="file.NameHash">
|
||||
<div class="gt-font-semibold tw-flex tw-items-center pull-right">
|
||||
<div class="tw-font-semibold tw-flex tw-items-center pull-right">
|
||||
<span v-if="file.IsBin" class="gt-ml-1 gt-mr-3">{{ store.binaryFileMessage }}</span>
|
||||
{{ file.IsBin ? '' : file.Addition + file.Deletion }}
|
||||
<span v-if="!file.IsBin" class="diff-stats-bar gt-mx-3" :data-tooltip-content="store.statisticsMessage.replace('%d', (file.Addition + file.Deletion)).replace('%d', file.Addition).replace('%d', file.Deletion)">
|
||||
|
|
Loading…
Reference in a new issue