mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-05 18:35:09 +02:00
add templates for main group page
This commit is contained in:
parent
8c0b7c4c1d
commit
2047492033
49
templates/group/header.tmpl
Normal file
49
templates/group/header.tmpl
Normal file
@ -0,0 +1,49 @@
|
||||
<div class="ui container">
|
||||
<div class="repo-group-header">
|
||||
<div class="flex-item">
|
||||
<div class="flex-item-main">
|
||||
<div class="flex-item-title tw-text-18">
|
||||
<a class="muted tw-font-normal" href="{{.Group.Owner.HomeLink}}">{{.Group.Owner.Name}}</a>
|
||||
{{- range .Breadcrumbs -}}
|
||||
/<a class="muted{{if eq .ID $.Group.ID}} tw-font-bold active{{else}} tw-font-normal{{end}}"
|
||||
href="{{.GroupLink}}">{{.Name}}</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui container tw-flex">
|
||||
{{ctx.AvatarUtils.Avatar .Group 100 "group-avatar"}}
|
||||
<div id="repo-group-info" class="tw-flex tw-flex-col tw-flex-1 tw-break-anywhere">
|
||||
<div class="ui header">
|
||||
{{.Group.Name}}
|
||||
<span class="repo-group-visibility">
|
||||
{{if .Group.Visibility.IsLimited}}
|
||||
<span
|
||||
class="ui large basic horizontal label">
|
||||
{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}
|
||||
</span>
|
||||
{{end}}
|
||||
{{if .Group.Visibility.IsPrivate}}
|
||||
<span class="ui large basic horizontal label">
|
||||
{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}
|
||||
</span>
|
||||
{{end}}
|
||||
</span>
|
||||
<span class="tw-flex tw-items-center tw-gap-1 tw-ml-auto tw-text-16 tw-whitespace-nowrap">
|
||||
{{if .EnableFeed}}
|
||||
<a class="ui basic label button tw-mr-0" href="{{.Group.GroupLink}}.rss"
|
||||
data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
|
||||
{{svg "octicon-rss" 24}}
|
||||
</a>
|
||||
{{end}}
|
||||
</span>
|
||||
</div>
|
||||
{{if .RenderedDescription}}
|
||||
<div class="render-content markup tw-break-anywhere">{{.RenderedDescription}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "group/menu" . }}
|
||||
18
templates/group/home.tmpl
Normal file
18
templates/group/home.tmpl
Normal file
@ -0,0 +1,18 @@
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content repo-group profile">
|
||||
{{template "group/header" .}}
|
||||
<div class="ui container">
|
||||
|
||||
<div class="ui mobile reversed stackable grid">
|
||||
<div class="ui eleven wide column">
|
||||
{{template "shared/repo_search" .}}
|
||||
{{template "explore/repo_list" .}}
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
<div class="ui five wide column">
|
||||
{{ template "group/sidebar/menu" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
34
templates/group/menu.tmpl
Normal file
34
templates/group/menu.tmpl
Normal file
@ -0,0 +1,34 @@
|
||||
<div class="ui container">
|
||||
<overflow-menu class="ui secondary pointing tabular borderless menu tw-mb-4">
|
||||
<div class="overflow-menu-items">
|
||||
<a class="{{if .PageIsViewRepositories}}active {{end}}item" href="{{.GroupLink}}">
|
||||
{{svg "octicon-repo"}} {{ctx.Locale.Tr "user.repositories"}}
|
||||
{{if .RepoCount}}
|
||||
<div class="ui small label">{{.RepoCount}}</div>
|
||||
{{end}}
|
||||
</a>
|
||||
{{if .CanReadProjects}}
|
||||
<a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Group.GroupLink}}/projects">
|
||||
{{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
|
||||
{{if .ProjectCount}}
|
||||
<div class="ui small label">{{.ProjectCount}}</div>
|
||||
{{end}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .IsGroupMember}}
|
||||
<a class="{{if $.PageIsGroupTeams}}active {{end}}item" href="{{$.OrgGroupLink}}/teams">
|
||||
{{svg "octicon-people"}} {{ctx.Locale.Tr "org.teams"}}
|
||||
{{if .NumTeams}}
|
||||
<div class="ui small label">{{.NumTeams}}</div>
|
||||
{{end}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if or .IsGroupOwner .IsGroupAdmin}}
|
||||
<span class="item-flex-space"></span>
|
||||
<a class="{{if .PageIsGroupSettings}}active {{end}}item" href="{{$.OrgGroupLink}}/settings">
|
||||
{{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</overflow-menu>
|
||||
</div>
|
||||
Loading…
x
Reference in New Issue
Block a user