mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-28 18:34:10 -05:00
165182a92d
The negative margin was suboptimal and presents a few unnecessary challenges while styling the page. Remove it and add custom margin values, which slightly changes the height a few things near the top of the page as well: 15px less height of explore and login navbar: <img width="899" alt="Screenshot 2024-03-20 at 00 52 34" src="https://github.com/go-gitea/gitea/assets/115237/72a01ca4-5d17-4a0f-b915-61f95054fcb1"> 15px reduced padding-top height of "user bar" and equal 4px padding added: <img width="484" alt="Screenshot 2024-03-20 at 00 52 50" src="https://github.com/go-gitea/gitea/assets/115237/a8507e6d-372d-4a8b-9048-66fcf8a5facd"> 3px less padding on top of repo: <img width="552" alt="Screenshot 2024-03-20 at 00 53 49" src="https://github.com/go-gitea/gitea/assets/115237/dede6e44-7688-440f-a1b6-13532638ae03"> (cherry picked from commit 8cad44f4109b6f87e565d43e137e99ab23b54349)
108 lines
5.4 KiB
Go HTML Template
108 lines
5.4 KiB
Go HTML Template
<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">
|
|
{{ctx.AvatarUtils.Avatar .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">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
|
{{if .ContextUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
|
</span>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
</span>
|
|
<div class="context user overflow menu">
|
|
<div class="ui header">
|
|
{{ctx.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}}">
|
|
{{ctx.AvatarUtils.Avatar .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">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
|
{{if .SignedUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.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}}">
|
|
{{ctx.AvatarUtils.Avatar .}}
|
|
<span class="truncated-item-name">{{.ShortName 40}}</span>
|
|
<span class="org-visibility">
|
|
{{if .Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
|
{{if .Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.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"}} {{ctx.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}}
|
|
{{ctx.Locale.Tr "org.teams"}}
|
|
{{end}}
|
|
</span>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
<div class="context user overflow menu">
|
|
<div class="ui header">
|
|
{{ctx.Locale.Tr "home.filter_by_team_repositories"}}
|
|
</div>
|
|
<div class="scrolling menu items">
|
|
<a class="{{if not $.Team}}active selected{{end}} item" title="{{ctx.Locale.Tr "all"}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
|
|
{{ctx.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 menu">
|
|
<a class="{{if .PageIsNews}}active {{end}}item tw-ml-auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
|
{{svg "octicon-rss"}} {{ctx.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"}} {{ctx.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"}} {{ctx.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"}} {{ctx.Locale.Tr "milestones"}}
|
|
</a>
|
|
{{end}}
|
|
<div class="item">
|
|
<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title="{{ctx.Locale.Tr "home.view_home" .ContextUser.Name}}">
|
|
{{ctx.Locale.Tr "home.view_home" (.ContextUser.ShortName 40)}}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
<div class="divider tw-mt-0"></div>
|