Verified -> Recommended
This commit is contained in:
parent
6bdd1d0629
commit
3ac1535b24
9 changed files with 18 additions and 17 deletions
|
@ -26,8 +26,8 @@ type Theme struct {
|
|||
Description string
|
||||
// Scheme is the theme's color scheme. It must be either: dark, light, or auto.
|
||||
Scheme string
|
||||
// Verified is whether the theme is verified. It means the theme is guaranteed to be bug-free, which happens more with third-party themes.
|
||||
Verified bool
|
||||
// Recommended means the theme is guaranteed to be bug-free, usually a first-party theme.
|
||||
Recommended bool
|
||||
}
|
||||
|
||||
// loadThemeMeta loads theme metadata from a file in a layered FS.
|
||||
|
@ -54,7 +54,7 @@ func loadThemeMeta(assetFs *assetfs.LayeredFS, filename string, theme *Theme) er
|
|||
theme.Url = kv["url"]
|
||||
theme.Description = kv["description"]
|
||||
theme.Scheme = strings.ToLower(kv["scheme"])
|
||||
theme.Verified = kv["verified"] == "yes"
|
||||
theme.Recommended = kv["recommended"] == "yes"
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -100,13 +100,12 @@
|
|||
"editor.textarea.tab_hint": "Line already indented. Press <kbd>Tab</kbd> again or <kbd>Escape</kbd> to leave the editor.",
|
||||
"editor.textarea.shift_tab_hint": "No indentation on this line. Press <kbd>Shift</kbd> + <kbd>Tab</kbd> again or <kbd>Escape</kbd> to leave the editor.",
|
||||
"admin.dashboard.cleanup_offline_runners": "Cleanup offline runners",
|
||||
"settings.visibility.description": "Profile visibility affects others' ability to access your non-private repositories. <a href=\"%s\" target=\"_blank\">Learn more</a>",
|
||||
"avatar.constraints_hint": "Custom avatar may not exceed %[1]s in size or be larger than %[2]dx%[3]d pixels",
|
||||
"settings.theme_recommended": "Recommended",
|
||||
"settings.theme_light": "Light",
|
||||
"settings.theme_dark": "Dark",
|
||||
"settings.theme_auto": "Auto (per your browser)",
|
||||
"error.issue_not_found": "Issue not found",
|
||||
"admin.dashboard.cleanup_offline_runners": "Cleanup offline runners",
|
||||
"settings.visibility.description": "Profile visibility affects others' ability to access your non-private repositories. <a href=\"%s\" target=\"_blank\">Learn more</a>",
|
||||
"avatar.constraints_hint": "Custom avatar may not exceed %[1]s in size or be larger than %[2]dx%[3]d pixels",
|
||||
"meta.last_line": "Thank you for translating Forgejo! This line isn't seen by the users but it serves other purposes in the translation management. You can place a fun fact in the translation instead of translating it."
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class="item">
|
||||
<p>
|
||||
<strong>{{$theme.Name}}</strong>
|
||||
by <em><a href="{{$theme.Url}}">{{$theme.Author}}</a></em> {{if $theme.Verified}}<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_verified"}}">{{svg "octicon-verified" 16 "dropdown icon"}}</span>{{end}}
|
||||
by <em><a href="{{$theme.Url}}">{{$theme.Author}}</a></em> {{if $theme.Recommended}}<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_recommended"}}">{{svg "octicon-star" 16 "dropdown icon"}}</span>{{end}}
|
||||
</p>
|
||||
{{if $theme.Description}}
|
||||
<p><em>"{{$theme.Description}}"</em></p>
|
||||
|
@ -37,16 +37,18 @@
|
|||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="text">
|
||||
{{- range $i,$a := .AllThemes -}}
|
||||
{{if eq $.SignedUser.Theme $i}}{{$a.Name}}{{end}}
|
||||
{{if eq $.SignedUser.Theme $i}}
|
||||
{{$a.Name}}
|
||||
{{end}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
{{range $i,$a := .AllThemes}}
|
||||
<div class="item{{if eq $.SignedUser.Theme $i}} active selected{{end}} tw-flex" data-value="{{$i}}">
|
||||
<div class="item{{if eq $.SignedUser.Theme $i}} active selected{{end}} tw-flex " data-value="{{$i}}">
|
||||
{{$a.Name}}
|
||||
{{if $a.Verified}}
|
||||
<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_verified"}}">{{svg "octicon-verified" 16 "dropdown icon"}}</span>
|
||||
{{if $a.Recommended}}
|
||||
<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_recommended"}}">{{svg "octicon-star" 16 "dropdown icon"}}</span>
|
||||
{{end}}
|
||||
{{if eq $a.Scheme "auto"}}
|
||||
<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_auto"}}">{{svg "octicon-sync" 16 "dropdown icon"}}</span>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Url https://forgejo.org/
|
||||
Description The fresh of freedom.
|
||||
Scheme Auto
|
||||
Verified
|
||||
Recommended
|
||||
*/
|
||||
|
||||
@import "theme-forgejo-light.css";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Url https://forgejo.org/
|
||||
Description The fresh of freedom.
|
||||
Scheme Dark
|
||||
Verified
|
||||
Recommended
|
||||
*/
|
||||
|
||||
@import "../chroma/dark.css";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Url https://forgejo.org/
|
||||
Description The fresh of freedom.
|
||||
Scheme Light
|
||||
Verified
|
||||
Recommended
|
||||
*/
|
||||
|
||||
@import "../chroma/light.css";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Url https://github.com/go-gitea/gitea
|
||||
Description The OG look.
|
||||
Scheme Auto
|
||||
Verified
|
||||
Recommended
|
||||
*/
|
||||
|
||||
@import "./theme-gitea-light.css" (prefers-color-scheme: light);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Url https://github.com/go-gitea/gitea
|
||||
Description The OG look.
|
||||
Scheme Dark
|
||||
Verified
|
||||
Recommended
|
||||
*/
|
||||
|
||||
@import "../chroma/dark.css";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Url https://github.com/go-gitea/gitea
|
||||
Description The OG look.
|
||||
Scheme Light
|
||||
Verified
|
||||
Recommended
|
||||
*/
|
||||
|
||||
@import "../chroma/light.css";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue