From 5c63c87393def6490d0ea737aa32c19b837a2e33 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Fri, 10 Feb 2023 15:07:38 +0100 Subject: [PATCH] UI: Fix broken path to font And move font-weight overrides to the header so it affects all themes. --- public/css/theme-bthree-dark.css | 11 ----------- templates/custom/header.tmpl | 14 +++++++++++++- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/public/css/theme-bthree-dark.css b/public/css/theme-bthree-dark.css index 1cd00f1..a25b456 100644 --- a/public/css/theme-bthree-dark.css +++ b/public/css/theme-bthree-dark.css @@ -210,17 +210,6 @@ --color-footer-links: var(--color-text-light-1); } -/* Strong/bold elements. */ -strong, b, h1, h2, h3, h4, h5, h6, -.issue.list>.item .issue-item-top-row { - font-weight: normal !important; - font-variation-settings: "wght" var(--font-weight-bold); -} - -.repository.view.issue .title .issue-title h1 { - font-variation-settings: "wght" var(--font-weight-thin); -} - /* Custom styling of individual elements. * Using !important is bad, but unfortunately gitea does it already in _base.less. */ diff --git a/templates/custom/header.tmpl b/templates/custom/header.tmpl index 64f109f..a8f1f96 100644 --- a/templates/custom/header.tmpl +++ b/templates/custom/header.tmpl @@ -2,7 +2,7 @@ /* bthree dark theme */ @font-face { font-family: "Heebo"; - src: url("../fonts/Heebo-VariableFont_wght.ttf") format("truetype-variations"); + src: url("/assets/fonts/Heebo-VariableFont_wght.ttf") format("truetype-variations"); font-weight: normal; font-variation-settings: "wght" var(--font-weight); font-style: normal @@ -33,6 +33,18 @@ --color-primary: hsl(204deg, 90%, 52%); } + /* Set weight variations. */ + strong, b, h1, h2, h3, h4, h5, h6, .bold, + a.issue-title, + .ui.tabular.menu .active.item { + font-weight: normal !important; + font-variation-settings: "wght" var(--font-weight-bold); + } + + .repository.view.issue .title .issue-title h1 { + font-variation-settings: "wght" var(--font-weight-thin); + } + @media (min-width: 1200px) { /* Limit navbar width on large screens. */ .dashboard-navbar {