-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Use secondary pointing menu for tabs on user/organization home page #24162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f56a168
use same styles for header
HesterG 23fc9e3
Merge branch 'go-gitea:main' into unify-header
HesterG c046a97
update css
HesterG cf4c3f9
Merge branch 'go-gitea:main' into unify-header
HesterG b3a2edc
update css
HesterG 42db46b
modify home
HesterG e07d6b8
revert
HesterG 95c3e87
Merge branch 'go-gitea:main' into unify-header
HesterG 146f3a4
update
HesterG 729ad29
comment
HesterG 0d1bcf1
move shared css
HesterG 3237650
remove unnecessary
HesterG b3d39e1
rename
HesterG 76a0b35
Merge branch 'main' into unify-header
HesterG 9daf121
Merge branch 'main' into unify-header
HesterG a16518b
Merge branch 'main' into unify-header
HesterG 4786701
Merge branch 'main' into unify-header
HesterG 0f5145f
Merge branch 'main' into unify-header
HesterG b1c227a
Merge branch 'main' into unify-header
GiteaBot 86a75e8
Merge branch 'main' into unify-header
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,82 @@ | ||
<div class="header-wrapper"> | ||
<!-- TODO: make template org and user can share --> | ||
{{with .ContextUser}} | ||
<div class="ui container"> | ||
<div class="ui vertically grid head"> | ||
<div class="column"> | ||
<div class="ui header"> | ||
{{avatar $.Context . 100}} | ||
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> | ||
<span class="org-visibility"> | ||
{{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} | ||
{{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} | ||
</span> | ||
</div> | ||
<!-- TODO: make template org and user can share --> | ||
{{with .ContextUser}} | ||
<div class="ui container"> | ||
<div class="ui vertically grid head"> | ||
<div class="column"> | ||
<div class="ui header"> | ||
{{avatar $.Context . 100}} | ||
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> | ||
<span class="org-visibility"> | ||
{{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} | ||
{{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
{{end}} | ||
</div> | ||
{{end}} | ||
|
||
<div class="ui tabs container"> | ||
<div class="ui tabular stackable menu navbar"> | ||
<a class="item" href="{{.ContextUser.HomeLink}}"> | ||
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}} | ||
<div class="ui tabs container"> | ||
<div class="ui secondary stackable pointing menu"> | ||
<a class="item" href="{{.ContextUser.HomeLink}}"> | ||
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}} | ||
</a> | ||
{{if and .IsProjectEnabled (or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadProjects))}} | ||
<a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if .PageIsViewProjects}}active {{end}}item"> | ||
{{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}} | ||
</a> | ||
{{end}} | ||
{{if and .IsPackageEnabled (or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadPackages))}} | ||
<a href="{{.ContextUser.HomeLink}}/-/packages" class="{{if .IsPackagesPage}}active {{end}}item"> | ||
{{svg "octicon-package"}} {{.locale.Tr "packages.title"}} | ||
</a> | ||
{{if and .IsProjectEnabled (or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadProjects))}} | ||
<a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if .PageIsViewProjects}}active {{end}}item"> | ||
{{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}} | ||
{{end}} | ||
{{if and .IsRepoIndexerEnabled (or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadCode))}} | ||
<a href="{{.ContextUser.HomeLink}}/-/code" class="{{if .IsCodePage}}active {{end}}item"> | ||
{{svg "octicon-code"}} {{.locale.Tr "user.code"}} | ||
</a> | ||
{{end}} | ||
{{if and .IsPackageEnabled (or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadPackages))}} | ||
<a href="{{.ContextUser.HomeLink}}/-/packages" class="{{if .IsPackagesPage}}active {{end}}item"> | ||
{{svg "octicon-package"}} {{.locale.Tr "packages.title"}} | ||
{{end}} | ||
|
||
{{if .ContextUser.IsOrganization}} | ||
{{if .IsOrganizationMember}} | ||
<a class="item" href="{{$.OrgLink}}/members"> | ||
{{svg "octicon-person"}} {{$.locale.Tr "org.members"}} | ||
{{if .NumMembers}} | ||
<div class="ui primary label">{{.NumMembers}}</div> | ||
{{end}} | ||
</a> | ||
{{end}} | ||
{{if and .IsRepoIndexerEnabled (or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadCode))}} | ||
<a href="{{.ContextUser.HomeLink}}/-/code" class="{{if .IsCodePage}}active {{end}}item"> | ||
{{svg "octicon-code"}} {{.locale.Tr "user.code"}} | ||
<a class="item" href="{{$.OrgLink}}/teams"> | ||
{{svg "octicon-people"}} {{$.locale.Tr "org.teams"}} | ||
{{if .NumTeams}} | ||
<div class="ui primary label">{{.NumTeams}}</div> | ||
{{end}} | ||
</a> | ||
{{end}} | ||
|
||
{{if .ContextUser.IsOrganization}} | ||
{{if .IsOrganizationMember}} | ||
<a class="item" href="{{$.OrgLink}}/members"> | ||
{{svg "octicon-person"}} {{$.locale.Tr "org.members"}} | ||
{{if .NumMembers}} | ||
<div class="ui primary label">{{.NumMembers}}</div> | ||
{{end}} | ||
{{if .IsOrganizationOwner}} | ||
<div class="right menu"> | ||
<a class="item" href="{{.OrgLink}}/settings"> | ||
{{svg "octicon-tools"}} {{.locale.Tr "repo.settings"}} | ||
</a> | ||
<a class="item" href="{{$.OrgLink}}/teams"> | ||
{{svg "octicon-people"}} {{$.locale.Tr "org.teams"}} | ||
{{if .NumTeams}} | ||
<div class="ui primary label">{{.NumTeams}}</div> | ||
{{end}} | ||
</a> | ||
{{end}} | ||
|
||
{{if .IsOrganizationOwner}} | ||
<div class="right menu"> | ||
<a class="item" href="{{.OrgLink}}/settings"> | ||
{{svg "octicon-tools"}} {{.locale.Tr "repo.settings"}} | ||
</a> | ||
</div> | ||
{{end}} | ||
</div> | ||
{{end}} | ||
{{else}} | ||
<a class='{{if eq .TabName "activity"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=activity"> | ||
{{svg "octicon-rss"}} {{.locale.Tr "user.activity"}} | ||
</a> | ||
{{if not .DisableStars}} | ||
<a class='{{if eq .TabName "stars"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=stars"> | ||
{{svg "octicon-star"}} {{.locale.Tr "user.starred"}} | ||
{{if .Owner.NumStars}} | ||
<div class="ui primary label">{{.Owner.NumStars}}</div> | ||
{{end}} | ||
</a> | ||
{{else}} | ||
<a class='{{if eq .TabName "activity"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=activity"> | ||
{{svg "octicon-rss"}} {{.locale.Tr "user.activity"}} | ||
<a class='{{if eq .TabName "watching"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=watching"> | ||
{{svg "octicon-eye"}} {{.locale.Tr "user.watched"}} | ||
</a> | ||
{{if not .DisableStars}} | ||
<a class='{{if eq .TabName "stars"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=stars"> | ||
{{svg "octicon-star"}} {{.locale.Tr "user.starred"}} | ||
{{if .Owner.NumStars}} | ||
<div class="ui primary label">{{.Owner.NumStars}}</div> | ||
{{end}} | ||
</a> | ||
{{else}} | ||
<a class='{{if eq .TabName "watching"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=watching"> | ||
{{svg "octicon-eye"}} {{.locale.Tr "user.watched"}} | ||
</a> | ||
{{end}} | ||
{{end}} | ||
{{end}} | ||
|
||
</div> | ||
</div> | ||
<div class="ui tabs divider"></div> | ||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.repository .head .ui.header .text, | ||
.organization .head .ui.header .text { | ||
vertical-align: middle; | ||
font-size: 1.6rem; | ||
margin-left: 15px; | ||
} | ||
|
||
.repository .ui.secondary.stackable.pointing.menu, | ||
.organization .ui.secondary.stackable.pointing.menu { | ||
flex-wrap: wrap; | ||
margin-top: 5px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.repository .ui.tabs.container, | ||
.organization .ui.tabs.container { | ||
margin-top: 14px; | ||
margin-bottom: 0; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.