Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions components/common/label/label.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Label: GitHub's pill-shaped outline label. Add theme-label to a Forgejo ".ui label".
*
* By default the outline takes the label's own text colour, so Forgejo's coloured labels (green,
* orange) keep their meaning. Modifiers:
* theme-label-muted grey text and border, for neutral facts such as visibility
* theme-label-solid filled grey with white text, for a draft
* theme-label-large 24px tall, for use beside a large title
*
* The declarations are !important because the theme's general label rules are loaded later and
* are more specific.
*/
.ui.ui.ui.label.theme-label {
display: inline-block !important;
padding: 0 7px !important;
border: 1px solid currentcolor !important;
border-radius: 2em !important;
background: transparent !important;
font-size: 12px !important;
font-weight: 500 !important;
line-height: 18px !important;
vertical-align: middle !important;
}

.ui.ui.ui.label.theme-label-muted {
border-color: var(--color-secondary) !important;
color: var(--color-text-light-1) !important;
}

.ui.ui.ui.label.theme-label-solid {
border-color: var(--github-bgColor-neutral-emphasis) !important;
background: var(--github-bgColor-neutral-emphasis) !important;
color: var(--github-fgColor-onEmphasis) !important;
}

.ui.ui.ui.label.theme-label-large {
padding: 2px 8px !important;
}
10 changes: 1 addition & 9 deletions styles/pages/organization.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,9 @@ body:has(.organization-global-header) .page-content:is(.organization, .packages)
line-height: 21px;
}

/* The visibility badge is GitHub's outlined label, not a filled pill. */
/* The visibility badge is the shared outlined label; it only loses Forgejo's margin here. */
.page-content.organization .org-title .org-visibility .ui.label {
margin: 0;
padding: 0 7px;
border: 1px solid var(--color-secondary);
border-radius: 2em;
background: transparent;
color: var(--color-text-light-1);
font-size: 12px;
font-weight: 500;
line-height: 18px;
}

.org-overview-grid {
Expand Down
17 changes: 0 additions & 17 deletions styles/pages/releases.css
Original file line number Diff line number Diff line change
Expand Up @@ -343,17 +343,6 @@ body:has(.page-content.repository.github-releases) .repository-content-header {
.release-title-wrap h4 a[data-tippy="commit-statuses"] {
margin-left: 0;
}
.release-title-wrap h4 .ui.label {
display: inline-block;
vertical-align: middle;
background: transparent;
border: 1px solid currentColor;
border-radius: 24px;
font-size: 12px;
font-weight: 500;
line-height: 18px;
padding: 2px 8px;
}
.github-release-latest {
display: inline;
margin-left: 8px;
Expand Down Expand Up @@ -605,12 +594,6 @@ body:has(.page-content.repository.github-releases) .repository-content-header {
.github-release-list .markup ul ul ul {
list-style-type: square;
}
/* Draft is a solid grey label, like a draft pull request's. */
.release-title-wrap .github-release-draft.ui.ui.label {
border-color: var(--github-bgColor-neutral-emphasis) !important;
background: var(--github-bgColor-neutral-emphasis) !important;
color: var(--github-fgColor-onEmphasis) !important;
}
/* Asset rows */
.detail .download .list > li {
min-height: 45px;
Expand Down
1 change: 1 addition & 0 deletions templates/base/component_assets.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/components/common/counter/counter.css">
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/components/common/editor/editor.css">
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/components/common/empty/empty.css">
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/components/common/label/label.css">
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/components/common/list-heading/list-heading.css">
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/components/common/menu/menu.css">
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/components/common/search/search.css">
Expand Down
4 changes: 2 additions & 2 deletions templates/org/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div class="org-title">
<h1>{{.Org.DisplayName}}</h1>
<span class="org-visibility">
{{if .Org.Visibility.IsLimited}}<span class="ui large horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
{{if .Org.Visibility.IsPrivate}}<span class="ui large horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
{{if .Org.Visibility.IsLimited}}<span class="ui large horizontal label theme-label theme-label-muted">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
{{if .Org.Visibility.IsPrivate}}<span class="ui large horizontal label theme-label theme-label-muted">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
</span>
</div>
<span class="button-sequence org-actions tw-ml-auto tw-whitespace-nowrap">
Expand Down
6 changes: 3 additions & 3 deletions templates/repo/release/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
<span class="github-release-name"><a href="{{$.RepoLink}}/releases/tag/{{$release.TagName | PathEscapeSegments}}">{{$release.Title}}</a>
</span>
{{if $release.IsDraft}}
<span class="ui label github-release-draft">{{ctx.Locale.Tr "repo.release.draft"}}</span>
<span class="ui label github-release-draft theme-label theme-label-large theme-label-solid">{{ctx.Locale.Tr "repo.release.draft"}}</span>
{{else if $release.IsPrerelease}}
<span class="ui orange label">{{ctx.Locale.Tr "repo.release.prerelease"}}</span>
<span class="ui orange label theme-label theme-label-large">{{ctx.Locale.Tr "repo.release.prerelease"}}</span>
{{else if not $release.IsTag}}
<a class="github-release-latest" href="{{$.RepoLink}}/releases/latest" hidden><span class="ui green label">Latest</span></a>
<a class="github-release-latest" href="{{$.RepoLink}}/releases/latest" hidden><span class="ui green label theme-label theme-label-large">Latest</span></a>
{{end}}
{{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "tw-flex"}}
</h4>
Expand Down
Loading