first-commit
This commit is contained in:
8
templates/explore/code.tmpl
Normal file
8
templates/explore/code.tmpl
Normal file
@@ -0,0 +1,8 @@
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content explore users">
|
||||
{{template "explore/navbar" .}}
|
||||
<div class="ui container">
|
||||
{{template "shared/search/code/search" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
22
templates/explore/navbar.tmpl
Normal file
22
templates/explore/navbar.tmpl
Normal file
@@ -0,0 +1,22 @@
|
||||
<overflow-menu class="ui secondary pointing tabular top attached borderless menu secondary-nav">
|
||||
<div class="overflow-menu-items tw-justify-center">
|
||||
<a class="{{if .PageIsExploreRepositories}}active {{end}}item" href="{{AppSubUrl}}/explore/repos">
|
||||
{{svg "octicon-repo"}} {{ctx.Locale.Tr "explore.repos"}}
|
||||
</a>
|
||||
{{if not .UsersPageIsDisabled}}
|
||||
<a class="{{if .PageIsExploreUsers}}active {{end}}item" href="{{AppSubUrl}}/explore/users">
|
||||
{{svg "octicon-person"}} {{ctx.Locale.Tr "explore.users"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if not .OrganizationsPageIsDisabled}}
|
||||
<a class="{{if .PageIsExploreOrganizations}}active {{end}}item" href="{{AppSubUrl}}/explore/organizations">
|
||||
{{svg "octicon-organization"}} {{ctx.Locale.Tr "explore.organizations"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if and (not ctx.Consts.RepoUnitTypeCode.UnitGlobalDisabled) .IsRepoIndexerEnabled (not .CodePageIsDisabled)}}
|
||||
<a class="{{if .PageIsExploreCode}}active {{end}}item" href="{{AppSubUrl}}/explore/code">
|
||||
{{svg "octicon-code"}} {{ctx.Locale.Tr "explore.code"}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</overflow-menu>
|
10
templates/explore/repos.tmpl
Normal file
10
templates/explore/repos.tmpl
Normal file
@@ -0,0 +1,10 @@
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content explore repositories">
|
||||
{{template "explore/navbar" .}}
|
||||
<div class="ui container">
|
||||
{{template "shared/repo/search" .}}
|
||||
{{template "shared/repo/list" .}}
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
23
templates/explore/search.tmpl
Normal file
23
templates/explore/search.tmpl
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="ui small secondary filter menu tw-items-center tw-mx-0">
|
||||
<form class="ui form ignore-dirty tw-flex-1">
|
||||
{{if .PageIsExploreUsers}}
|
||||
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}}
|
||||
{{else}}
|
||||
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.org_kind")}}
|
||||
{{end}}
|
||||
</form>
|
||||
<!-- Sort -->
|
||||
<div class="ui small dropdown type jump item tw-mr-0">
|
||||
<span class="text">
|
||||
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
||||
</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="?sort=newest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="?sort=oldest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||
<a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="?sort=alphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
|
||||
<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="?sort=reversealphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
33
templates/explore/user_list.tmpl
Normal file
33
templates/explore/user_list.tmpl
Normal file
@@ -0,0 +1,33 @@
|
||||
<div class="flex-list">
|
||||
{{range .Users}}
|
||||
<div class="flex-item tw-items-center">
|
||||
<div class="flex-item-leading">
|
||||
{{ctx.AvatarUtils.Avatar . 48}}
|
||||
</div>
|
||||
<div class="flex-item-main">
|
||||
<div class="flex-item-title">
|
||||
{{template "shared/user/name" .}}
|
||||
{{if .Visibility.IsPrivate}}
|
||||
<span class="ui basic tiny label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="flex-item-body">
|
||||
{{if .Location}}
|
||||
<span class="flex-text-inline">{{svg "octicon-location"}}{{.Location}}</span>
|
||||
{{end}}
|
||||
{{if and .Email (or (and $.ShowUserEmail $.IsSigned (not .KeepEmailPrivate)) $.PageIsAdminUsers)}}
|
||||
<span class="flex-text-inline">
|
||||
{{svg "octicon-mail"}}
|
||||
<a href="mailto:{{.Email}}">{{.Email}}</a>
|
||||
</span>
|
||||
{{end}}
|
||||
<span class="flex-text-inline">{{svg "octicon-calendar"}}{{ctx.Locale.Tr "user.joined_on" (DateUtils.AbsoluteShort .CreatedUnix)}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="flex-item">
|
||||
{{ctx.Locale.Tr "search.no_results"}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
10
templates/explore/users.tmpl
Normal file
10
templates/explore/users.tmpl
Normal file
@@ -0,0 +1,10 @@
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content explore users">
|
||||
{{template "explore/navbar" .}}
|
||||
<div class="ui container">
|
||||
{{template "explore/search" .}}
|
||||
{{template "explore/user_list" .}}
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
Reference in New Issue
Block a user