diff --git a/components/common/sidebar/sidebar.css b/components/common/sidebar/sidebar.css index 76de1a7..30775e2 100644 --- a/components/common/sidebar/sidebar.css +++ b/components/common/sidebar/sidebar.css @@ -132,3 +132,15 @@ margin: 16px !important; } } + +/* A count at the right edge of an entry, with the label truncating before it. */ +.theme-sidebar nav a > .theme-counter { + margin-left: auto; +} + +.theme-sidebar nav a > span:not(.theme-counter) { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} diff --git a/styles/components/issues/issue_overview.ts b/styles/components/issues/issue_overview.ts index ac73aa5..35f814c 100644 --- a/styles/components/issues/issue_overview.ts +++ b/styles/components/issues/issue_overview.ts @@ -3,23 +3,9 @@ import { css, themeVars } from "@lutinglt/gitea-github-theme/core"; // The issue list and the pull request list share one layout. export default css` :is(.github-issues, .github-pull-list) { + /* The heading itself is the shared theme-list-heading component. */ & .list-header-issues { margin: 0 0 16px; - min-height: 32px; - display: flex; - align-items: center; - justify-content: space-between; - } - & .issue-list-title { - display: flex; - align-items: center; - gap: 8px; - } - & .issue-list-title h1 { - font-size: 20px; - line-height: 28px; - font-weight: 600; - margin: 0; } & .issue-list-new { min-height: 32px; diff --git a/styles/pages/dashboard-lists.css b/styles/pages/dashboard-lists.css index 4070501..60dfc13 100644 --- a/styles/pages/dashboard-lists.css +++ b/styles/pages/dashboard-lists.css @@ -20,18 +20,6 @@ padding: 6px 8px; } -/* Counts sit at the right edge of a sidebar entry, as in GitHub's sidebars. */ -:is(.dashboard-issue-list, .github-notifications) .theme-sidebar nav a > .theme-counter { - margin-left: auto; -} - -:is(.dashboard-issue-list, .github-notifications) .theme-sidebar nav a > span:not(.theme-counter) { - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - /* Milestones: the cards form one bordered list under the Open/Closed bar. */ .github-milestones .milestone-list { margin: 0; @@ -54,26 +42,8 @@ } /* Notifications */ -.github-notifications-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 8px; - min-height: 32px; - margin: 0 0 16px; -} - -.github-notifications-title { - display: flex; - align-items: center; - gap: 8px; -} - -.github-notifications-title h1 { - margin: 0; - font-size: 20px; - font-weight: 600; - line-height: 28px; +.github-notifications .theme-list-heading { + margin-bottom: 16px; } .github-notifications #notification_table { diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 10fb2a9..5371394 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -14,8 +14,8 @@ {{end}} -