0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 16:54:15 +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:
silverwind 2024-03-23 19:45:11 +01:00 committed by GitHub
parent d9e33959b3
commit fabe01478a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 18 additions and 17 deletions

View file

@ -66,5 +66,12 @@ export default {
'3xl': '24px', '3xl': '24px',
'full': 'var(--border-radius-circle)', // 50% '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)',
},
}, },
}; };

View file

@ -119,7 +119,7 @@
{{svg "octicon-chevron-down" 18}} {{svg "octicon-chevron-down" 18}}
{{end}} {{end}}
</button> </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}} {{if $file.IsBin}}
<span class="gt-ml-1 gt-mr-3"> <span class="gt-ml-1 gt-mr-3">
{{ctx.Locale.Tr "repo.diff.bin"}} {{ctx.Locale.Tr "repo.diff.bin"}}

View file

@ -11,7 +11,7 @@
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between"> <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"> <div class="comment-header-left tw-flex tw-items-center">
{{if .OriginalAuthor}} {{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)}} {{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>

View file

@ -8,7 +8,7 @@
</div> </div>
<div class="flex-item-main"> <div class="flex-item-main">
<div class="flex-item-title gt-font-18"> <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> </div>
<div class="flex-item-trailing"> <div class="flex-item-trailing">

View file

@ -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="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"> <div class="comment-header-left tw-flex tw-items-center">
{{if .Issue.OriginalAuthor}} {{if .Issue.OriginalAuthor}}
<span class="text black gt-font-semibold"> <span class="text black tw-font-semibold">
{{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
{{.Issue.OriginalAuthor}} {{.Issue.OriginalAuthor}}
</span> </span>

View file

@ -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="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"> <div class="comment-header-left tw-flex tw-items-center">
{{if .OriginalAuthor}} {{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)}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>
@ -411,7 +411,7 @@
{{end}} {{end}}
<span class="text grey muted-links"> <span class="text grey muted-links">
{{if .OriginalAuthor}} {{if .OriginalAuthor}}
<span class="text black gt-font-semibold"> <span class="text black tw-font-semibold">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>

View file

@ -15,7 +15,7 @@
{{ctx.Locale.Tr "repo.pulls.tab_files"}} {{ctx.Locale.Tr "repo.pulls.tab_files"}}
<span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span> <span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span>
</a> </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><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"> <span class="diff-stats-bar">
<div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div> <div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div>

View file

@ -25,7 +25,7 @@
{{range .LanguageStats}} {{range .LanguageStats}}
<div class="item"> <div class="item">
<i class="color-icon" style="background-color: {{.Color}}"></i> <i class="color-icon" style="background-color: {{.Color}}"></i>
<span class="gt-font-semibold"> <span class="tw-font-semibold">
{{if eq .Language "other"}} {{if eq .Language "other"}}
{{ctx.Locale.Tr "repo.language_other"}} {{ctx.Locale.Tr "repo.language_other"}}
{{else}} {{else}}

View file

@ -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}}

View file

@ -136,7 +136,7 @@
<div class="ui red message"> <div class="ui red message">
<p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "settings.delete_prompt"}}</p> <p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "settings.delete_prompt"}}</p>
{{if .UserDeleteWithComments}} {{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}} {{end}}
</div> </div>
<form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post"> <form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post">

View file

@ -36,12 +36,6 @@ Gitea's private styles use `g-` prefix.
text-overflow: ellipsis; 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 { color: inherit !important; }
.interact-fg:hover { color: var(--color-primary) !important; } .interact-fg:hover { color: var(--color-primary) !important; }
.interact-fg:active { color: var(--color-primary-active) !important; } .interact-fg:active { color: var(--color-primary-active) !important; }

View file

@ -38,7 +38,7 @@ export default {
<template> <template>
<ol class="diff-stats gt-m-0" ref="root" v-if="store.fileListIsVisible"> <ol class="diff-stats gt-m-0" ref="root" v-if="store.fileListIsVisible">
<li v-for="file in store.files" :key="file.NameHash"> <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> <span v-if="file.IsBin" class="gt-ml-1 gt-mr-3">{{ store.binaryFileMessage }}</span>
{{ file.IsBin ? '' : file.Addition + file.Deletion }} {{ 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)"> <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)">