mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-18 11:59:27 +00:00
f7ede92f82
- Make code block rendering via backticks work - Remove link color unless hovered - Remove table stripes and fix stripes rendering on dark theme for other tables - Introduce new `button-link` class discussed previously for buttons that look and act like links and apply it to the two right-side buttons - Reduce box padding by 8px on each side - Fix "Mark all read" button margin-right - brighten `--color-markup-code-block` on arc-green ### Before <img width="1216" alt="Screenshot 2023-05-10 at 20 00 30" src="https://github.com/go-gitea/gitea/assets/115237/66da9ec2-dd09-4ef0-8f1d-1822a18b6b43"> <img width="1211" alt="Screenshot 2023-05-10 at 20 00 48" src="https://github.com/go-gitea/gitea/assets/115237/f48e30a2-9a00-4723-93aa-79b97ca0ba0c"> ### After <img width="1222" alt="Screenshot 2023-05-10 at 20 09 59" src="https://github.com/go-gitea/gitea/assets/115237/c956e0d0-b3d9-42a4-a3ed-f0431c22bf3f"> <img width="1218" alt="Screenshot 2023-05-10 at 20 05 34" src="https://github.com/go-gitea/gitea/assets/115237/f72c1628-3961-4c28-9263-07cdf7531316">
109 lines
5.4 KiB
Handlebars
109 lines
5.4 KiB
Handlebars
<div class="dashboard-navbar">
|
|
<div class="ui secondary stackable menu">
|
|
<div class="item">
|
|
<div class="ui floating dropdown jump">
|
|
<span class="text truncated-item-container">
|
|
{{avatar $.Context .ContextUser}}
|
|
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
|
|
<span class="org-visibility">
|
|
{{if .ContextUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
|
{{if .ContextUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
|
</span>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
</span>
|
|
<div class="context user overflow menu" tabindex="-1">
|
|
<div class="ui header">
|
|
{{.locale.Tr "home.switch_dashboard_context"}}
|
|
</div>
|
|
<div class="scrolling menu items">
|
|
<a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item truncated-item-container" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{else if .PageIsMilestonesDashboard}}milestones{{end}}">
|
|
{{avatar $.Context .SignedUser}}
|
|
<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
|
|
<span class="org-visibility">
|
|
{{if .SignedUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
|
{{if .SignedUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
|
</span>
|
|
</a>
|
|
{{range .Orgs}}
|
|
<a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item truncated-item-container" title="{{.Name}}" href="{{.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
|
|
{{avatar $.Context .}}
|
|
<span class="truncated-item-name">{{.ShortName 40}}</span>
|
|
<span class="org-visibility">
|
|
{{if .Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
|
{{if .Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
|
</span>
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
{{if .SignedUser.CanCreateOrganization}}
|
|
<a class="item" href="{{AppSubUrl}}/org/create">
|
|
{{svg "octicon-plus"}} {{.locale.Tr "new_org"}}
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{if .ContextUser.IsOrganization}}
|
|
<div class="item">
|
|
<div class="ui floating dropdown jump">
|
|
<span class="text">
|
|
{{svg "octicon-people" 18}}
|
|
{{if .Team}}
|
|
{{.Team.Name}}
|
|
{{else}}
|
|
{{.locale.Tr "org.teams"}}
|
|
{{end}}
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
</span>
|
|
<div class="context user overflow menu" tabindex="-1">
|
|
<div class="ui header">
|
|
{{.locale.Tr "home.filter_by_team_repositories"}}
|
|
</div>
|
|
<div class="scrolling menu items">
|
|
<a class="{{if not $.Team}}active selected{{end}} item" title="{{.locale.Tr "all"}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
|
|
{{.locale.Tr "all"}}
|
|
</a>
|
|
{{range .Teams}}
|
|
{{if not .IncludesAllRepositories}}
|
|
<a class="{{if $.Team}}{{if eq $.Team.ID .ID}}active selected{{end}}{{end}} item" title="{{.Name}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}/{{.Name}}">
|
|
{{.Name}}
|
|
</a>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
|
|
{{if .ContextUser.IsOrganization}}
|
|
<div class="right stackable menu">
|
|
<a class="{{if .PageIsNews}}active {{end}}item gt-ml-auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
|
{{svg "octicon-rss"}} {{.locale.Tr "activities"}}
|
|
</a>
|
|
{{if not .UnitIssuesGlobalDisabled}}
|
|
<a class="{{if .PageIsIssues}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/issues{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
|
{{svg "octicon-issue-opened"}} {{.locale.Tr "issues"}}
|
|
</a>
|
|
{{end}}
|
|
{{if not .UnitPullsGlobalDisabled}}
|
|
<a class="{{if .PageIsPulls}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/pulls{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
|
{{svg "octicon-git-pull-request"}} {{.locale.Tr "pull_requests"}}
|
|
</a>
|
|
{{end}}
|
|
{{if and .ShowMilestonesDashboardPage (not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled))}}
|
|
<a class="{{if .PageIsMilestonesDashboard}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/milestones{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
|
{{svg "octicon-milestone"}} {{.locale.Tr "milestones"}}
|
|
</a>
|
|
{{end}}
|
|
<div class="item">
|
|
<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title='{{.locale.Tr "home.view_home" .ContextUser.Name}}'>
|
|
{{.locale.Tr "home.view_home" (.ContextUser.ShortName 40)}}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
<div class="ui divider"></div>
|