diff --git a/tailwind.config.js b/tailwind.config.js index e2e8f2365..01fc9ee24 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -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)', + }, }, }; diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 34194ebbd..c1d0c4fe8 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -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"}} diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index b561f094c..bcf91f74e 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -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> diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index b6f5ed499..a5bfb5f25 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -6,7 +6,7 @@ <div class="flex-item-leading">{{template "repo/icon" .}}</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 tw-font-normal" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/ <a class="muted" href="{{$.RepoLink}}">{{.Name}}</a></div> </div> <div class="flex-item-trailing"> diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index d885b4790..c885f2e93 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -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> diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index a6d0b801f..a48ae1947 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -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> @@ -412,7 +412,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> diff --git a/templates/repo/pulls/tab_menu.tmpl b/templates/repo/pulls/tab_menu.tmpl index 2a653c7c6..7f4c460b8 100644 --- a/templates/repo/pulls/tab_menu.tmpl +++ b/templates/repo/pulls/tab_menu.tmpl @@ -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> diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl index 8edb0c151..654a65fa5 100644 --- a/templates/repo/sub_menu.tmpl +++ b/templates/repo/sub_menu.tmpl @@ -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}} diff --git a/templates/shared/user/authorlink.tmpl b/templates/shared/user/authorlink.tmpl index 64ccc62cd..4d8ad736b 100644 --- a/templates/shared/user/authorlink.tmpl +++ b/templates/shared/user/authorlink.tmpl @@ -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}} diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl index 6b3d3957c..24a7d236f 100644 --- a/templates/user/settings/account.tmpl +++ b/templates/user/settings/account.tmpl @@ -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"> diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index 7a328aeb2..346184f04 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -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; } diff --git a/web_src/js/components/DiffFileList.vue b/web_src/js/components/DiffFileList.vue index 3a0e28780..66fe49c50 100644 --- a/web_src/js/components/DiffFileList.vue +++ b/web_src/js/components/DiffFileList.vue @@ -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)">