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
12 changes: 12 additions & 0 deletions components/common/sidebar/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
16 changes: 1 addition & 15 deletions styles/components/issues/issue_overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
34 changes: 2 additions & 32 deletions styles/pages/dashboard-lists.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions templates/repo/issue/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</div>
{{end}}

<div class="list-header list-header-issues">
<div class="issue-list-title"><button type="button" class="theme-icon-button" data-theme-sidebar-toggle data-theme-sidebar-expand aria-expanded="false" aria-label="Expand sidebar">{{svg "octicon-sidebar-expand" 16}}</button><h1>{{if eq .ViewType "assigned"}}Assigned to me{{else if eq .ViewType "created_by"}}Created by me{{else if eq .ViewType "mentioned"}}Mentioned{{else if eq .ViewType "review_requested"}}Review requested{{else if .PageIsIssueList}}All issues{{else}}All pull requests{{end}}</h1></div>
<div class="list-header list-header-issues theme-list-heading">
<div class="theme-list-title"><button type="button" class="theme-icon-button" data-theme-sidebar-toggle data-theme-sidebar-expand aria-expanded="false" aria-label="Expand sidebar">{{svg "octicon-sidebar-expand" 16}}</button><h1>{{if eq .ViewType "assigned"}}Assigned to me{{else if eq .ViewType "created_by"}}Created by me{{else if eq .ViewType "mentioned"}}Mentioned{{else if eq .ViewType "review_requested"}}Review requested{{else if .PageIsIssueList}}All issues{{else}}All pull requests{{end}}</h1></div>
{{if not .Repository.IsArchived}}
{{if .PageIsIssueList}}
<a class="primary button issue-list-new" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
Expand Down
4 changes: 2 additions & 2 deletions templates/user/dashboard/issues.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
</aside>
<div class="ui container issue-list-main theme-sidebar-main">
{{template "base/alert" .}}
<div class="list-header list-header-issues">
<div class="issue-list-title">
<div class="list-header list-header-issues theme-list-heading">
<div class="theme-list-title">
<button type="button" class="theme-icon-button" data-theme-sidebar-toggle data-theme-sidebar-expand aria-expanded="false" aria-label="Expand sidebar">{{svg "octicon-sidebar-expand" 16}}</button>
<h1>{{if eq .ViewType "assigned"}}{{ctx.Locale.Tr "repo.issues.filter_type.assigned_to_you"}}{{else if eq .ViewType "created_by"}}{{ctx.Locale.Tr "repo.issues.filter_type.created_by_you"}}{{else if eq .ViewType "mentioned"}}{{ctx.Locale.Tr "repo.issues.filter_type.mentioning_you"}}{{else if eq .ViewType "review_requested"}}{{ctx.Locale.Tr "repo.issues.filter_type.review_requested"}}{{else if eq .ViewType "reviewed_by"}}{{ctx.Locale.Tr "repo.issues.filter_type.reviewed_by_you"}}{{else}}{{ctx.Locale.Tr "home.issues.in_your_repos"}}{{end}}</h1>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/user/dashboard/milestones.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
</aside>
<div class="ui container issue-list-main theme-sidebar-main">
{{template "base/alert" .}}
<div class="list-header list-header-issues">
<div class="issue-list-title">
<div class="list-header list-header-issues theme-list-heading">
<div class="theme-list-title">
<button type="button" class="theme-icon-button" data-theme-sidebar-toggle data-theme-sidebar-expand aria-expanded="false" aria-label="Expand sidebar">{{svg "octicon-sidebar-expand" 16}}</button>
<h1>{{ctx.Locale.Tr "repo.milestones"}}</h1>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/user/notification/notification_div.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
{{template "components/common/sidebar/toggle" .}}
</aside>
<div class="ui container theme-sidebar-main">
<div class="github-notifications-header">
<div class="github-notifications-title">
<div class="theme-list-heading">
<div class="theme-list-title">
<button type="button" class="theme-icon-button" data-theme-sidebar-toggle data-theme-sidebar-expand aria-expanded="false" aria-label="Expand sidebar">{{svg "octicon-sidebar-expand" 16}}</button>
<h1>{{if eq .Status 2}}{{ctx.Locale.Tr "notification.read"}}{{else}}{{ctx.Locale.Tr "notification.unread"}}{{end}}</h1>
</div>
Expand Down
Loading