mirror of
https://codeberg.org/forgejo/forgejo
synced 2025-10-20 00:10:44 +02:00
Followup to https://codeberg.org/forgejo/forgejo/pulls/9317#issuecomment-7214470. Summary of changes: - implement new CSS for buttons that doesn't have problems Fomantic buttons have: - button height doesn't depend on it's content - `min-height:` is used instead of `padding-{top,bottom}:` - no margins to fit right in with the other elements while relying on `display:flex` and `flex-gap:` - other `.button` changes compared to `.ui.button`: - no semi-bold black text for now, I think it looks just as fine with normal weight - no variable `font-size` - should give better readability compared to existing `.small` and `.tiny` buttons - variable height depending on specified size (currently normal or `.small`) and on `@media (pointer: )` - apply the new buttons to areas where there are switches or dropdown openers near them Before: - https://codeberg.org/forgejo/forgejo/attachments/8d9a3941-8889-4420-8f4f-f44cb8c3726f - https://codeberg.org/forgejo/forgejo/attachments/e5804fae-a71f-43ba-918b-20d4f742124c - https://codeberg.org/forgejo/forgejo/attachments/65d4e31c-01b7-4050-89a1-4afe74aa574c - https://codeberg.org/forgejo/forgejo/attachments/c8057262-a834-4b61-a87f-70dab60b5506 - https://codeberg.org/forgejo/forgejo/attachments/aa9508e3-dca1-4ffe-913e-9cbddbb0d6ff - https://codeberg.org/forgejo/forgejo/attachments/4b2daa07-e0ca-4b44-8795-1609dff8968f - https://codeberg.org/forgejo/forgejo/attachments/93f7803f-1338-44dc-a428-e44e26231517 After: - https://codeberg.org/forgejo/forgejo/attachments/ca5426c4-d75e-493d-8b29-64eee1e1c9de - https://codeberg.org/forgejo/forgejo/attachments/f21c7219-6880-4a2e-9117-6267d46b3081 - https://codeberg.org/forgejo/forgejo/attachments/da3ee771-b5d5-4b4f-8c88-9a8de11b1a45 - https://codeberg.org/forgejo/forgejo/attachments/56f974c3-f72e-4f80-9bbd-5bc785a4a624 - https://codeberg.org/forgejo/forgejo/attachments/17f6e360-dfe5-4bb6-a6b5-dd747dbc2af8 - https://codeberg.org/forgejo/forgejo/attachments/91cd10e1-6c5e-4134-be4c-18223ed2a4f4 - https://codeberg.org/forgejo/forgejo/attachments/f0322c5c-ee9d-4889-9840-0c46838566cc - https://codeberg.org/forgejo/forgejo/attachments/96560fe7-3436-46dc-8456-c43bfaee2daf - https://codeberg.org/forgejo/forgejo/attachments/273cf795-6bb4-479f-804f-f40010fae825 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9359 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org>
82 lines
4.9 KiB
Go HTML Template
82 lines
4.9 KiB
Go HTML Template
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content user notification">
|
|
<div class="ui container">
|
|
<div class="tw-flex tw-items-center tw-justify-between tw-mb-4 tw-gap-2">
|
|
<div class="switch">
|
|
<a href="{{AppSubUrl}}/notifications/subscriptions" class="{{if eq .Status 1}}active {{end}}item">
|
|
{{ctx.Locale.Tr "notification.subscriptions"}}
|
|
</a>
|
|
<a href="{{AppSubUrl}}/notifications/watching" class="{{if eq .Status 2}}active {{end}}item">
|
|
{{ctx.Locale.Tr "notification.watching"}}
|
|
</a>
|
|
</div>
|
|
<a class="secondary button" href="{{AppSubUrl}}/notifications">
|
|
{{ctx.Locale.Tr "notifications"}}
|
|
</a>
|
|
</div>
|
|
<div class="ui bottom active tab segment">
|
|
{{if eq .Status 1}}
|
|
<div class="tw-flex tw-justify-between tw-flex-wrap tw-gap-y-4 tw-gap-x-2">
|
|
<div class="switch">
|
|
<a class="{{if eq .State "all"}}active {{end}}item" href="?sort={{$.SortType}}&state=all&issueType={{$.IssueType}}&labels={{$.Labels}}">
|
|
{{ctx.Locale.Tr "all"}}
|
|
</a>
|
|
<a class="{{if eq .State "open"}}active {{end}}item" href="?sort={{$.SortType}}&state=open&issueType={{$.IssueType}}&labels={{$.Labels}}">
|
|
{{svg "octicon-issue-opened" 16}}
|
|
{{ctx.Locale.Tr "repo.issues.open_title"}}
|
|
</a>
|
|
<a class="{{if eq .State "closed"}}active {{end}}item" href="?sort={{$.SortType}}&state=closed&issueType={{$.IssueType}}&labels={{$.Labels}}">
|
|
{{svg "octicon-issue-closed" 16}}
|
|
{{ctx.Locale.Tr "repo.issues.closed_title"}}
|
|
</a>
|
|
</div>
|
|
<div class="tw-flex">
|
|
<div class="ui right aligned secondary filter menu labels">
|
|
<!-- Type -->
|
|
<div class="ui dropdown type jump item">
|
|
<span class="text">
|
|
{{ctx.Locale.Tr "repo.issues.filter_type"}}
|
|
</span>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
<div class="menu">
|
|
<a class="{{if or (eq .IssueType "all") (not .IssueType)}}active {{end}}item" href="?sort={{$.SortType}}&state={{$.State}}&issueType=all&labels={{$.Labels}}">{{ctx.Locale.Tr "all"}}</a>
|
|
<a class="{{if eq .IssueType "issues"}}active {{end}}item" href="?sort={{$.SortType}}&state={{$.State}}&issueType=issues&labels={{$.Labels}}">{{ctx.Locale.Tr "issues"}}</a>
|
|
<a class="{{if eq .IssueType "pulls"}}active {{end}}item" href="?sort={{$.SortType}}&state={{$.State}}&issueType=pulls&labels={{$.Labels}}">{{ctx.Locale.Tr "pull_requests"}}</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Sort -->
|
|
<div class="ui dropdown type jump item">
|
|
<span class="text">
|
|
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
|
</span>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
<div class="menu">
|
|
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="?sort=latest&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
|
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="?sort=oldest&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
|
<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="?sort=recentupdate&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
|
|
<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="?sort=leastupdate&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
|
|
<a class="{{if eq .SortType "mostcomment"}}active {{end}}item" href="?sort=mostcomment&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
|
|
<a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="?sort=leastcomment&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
|
<a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="?sort=nearduedate&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
|
|
<a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="?sort=farduedate&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{ctx.Locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="divider"></div>
|
|
{{if not .Issues}}
|
|
{{ctx.Locale.Tr "notification.no_subscriptions"}}
|
|
{{else}}
|
|
{{template "shared/issuelist" dict "." . "listType" "dashboard"}}
|
|
{{end}}
|
|
{{else}}
|
|
{{template "shared/repo_search" .}}
|
|
{{template "explore/repo_list" .}}
|
|
{{template "base/paginate" .}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|