gitea/templates/user/profile.tmpl
Admin 2fc3e5a1c7
Some checks failed
Build and Release / Create Release (push) Has been skipped
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 1m33s
Build and Release / Lint (push) Failing after 1m52s
Build and Release / Build Binaries (amd64, darwin) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux) (push) Has been skipped
Build and Release / Build Binaries (amd64, windows) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin) (push) Has been skipped
Build and Release / Build Binaries (arm64, linux) (push) Has been skipped
Build and Release / Unit Tests (push) Successful in 1m59s
fix: stats 2x2 grid with inline style, user profile pinned repos vertical layout
2026-01-11 04:00:23 +00:00

122 lines
4.3 KiB
Handlebars

{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content user profile">
<div class="ui container">
<div class="ui stackable grid">
<div class="ui four wide column">
{{template "shared/user/profile_big_avatar" .}}
</div>
<div class="ui twelve wide column tw-mb-4">
{{template "user/overview/header" .}}
{{if eq .TabName "activity"}}
{{if .ContextUser.KeepActivityPrivate}}
<div class="ui info message">
<p>{{ctx.Locale.Tr "user.disabled_public_activity"}}</p>
</div>
{{end}}
{{template "user/heatmap" .}}
{{template "user/dashboard/feeds" .}}
{{else if eq .TabName "stars"}}
<div class="stars">
{{template "shared/repo/search" .}}
{{template "shared/repo/list" .}}
{{template "base/paginate" .}}
</div>
{{else if eq .TabName "following"}}
{{template "repo/user_cards" .}}
{{else if eq .TabName "followers"}}
{{template "repo/user_cards" .}}
{{else if eq .TabName "overview"}}
{{/* Activity Heatmap on Overview */}}
{{if and .ContextUser.ShowHeatmapOnProfile .HeatmapData}}
<div class="ui segment tw-mb-4">
<h4 class="ui header tw-flex tw-items-center">
{{svg "octicon-graph" 16}} {{ctx.Locale.Tr "user.activity_heatmap"}}
</h4>
{{template "user/heatmap" .}}
</div>
{{end}}
{{/* Pinned Repositories Section */}}
{{if or .UserPinnedRepos .IsContextUserProfile}}
<div class="ui segment pinned-repos-section tw-mb-4">
<h4 class="ui header tw-flex tw-items-center">
{{svg "octicon-pin" 16}} {{ctx.Locale.Tr "user.pinned_repos"}}
{{if .IsContextUserProfile}}
<span class="tw-ml-auto text grey tw-text-sm">{{ctx.Locale.Tr "user.pinned_repos_hint"}}</span>
{{end}}
</h4>
{{if .UserPinnedRepos}}
<div class="ui three stackable cards pinned-repos">
{{range .UserPinnedRepos}}
{{if .Repo}}
<a class="ui card" href="{{.Repo.Link}}">
<div class="content tw-text-center">
{{if .Repo.Avatar}}
<img class="tw-inline-block tw-rounded" style="max-width: 80px; max-height: 80px; object-fit: contain;" src="{{.Repo.RelAvatarLink ctx}}" alt="">
{{else}}
<div class="tw-inline-block tw-p-4">
{{if .Repo.IsPrivate}}{{svg "octicon-lock" 48}}{{else if .Repo.IsFork}}{{svg "octicon-repo-forked" 48}}{{else if .Repo.IsMirror}}{{svg "octicon-mirror" 48}}{{else}}{{svg "octicon-repo" 48}}{{end}}
</div>
{{end}}
<div class="header tw-mt-2">
{{if and .Repo.Owner (ne .Repo.OwnerID $.ContextUser.ID)}}
<span class="text grey">{{.Repo.Owner.Name}}/</span>
{{end}}
{{.Repo.Name}}
</div>
{{if .Repo.Description}}
<div class="description text grey tw-text-sm tw-mt-1">{{.Repo.Description}}</div>
{{end}}
</div>
<div class="extra content">
{{if .Repo.PrimaryLanguage}}
<span class="tw-mr-2">
<span class="repo-language-color" style="background-color: {{.Repo.PrimaryLanguage.Color}}"></span>
{{.Repo.PrimaryLanguage.Language}}
</span>
{{end}}
{{if .Repo.NumStars}}
<span class="tw-mr-2">{{svg "octicon-star" 14}} {{.Repo.NumStars}}</span>
{{end}}
{{if .Repo.NumForks}}
<span>{{svg "octicon-repo-forked" 14}} {{.Repo.NumForks}}</span>
{{end}}
</div>
</a>
{{end}}
{{end}}
</div>
{{else if .IsContextUserProfile}}
<div class="ui placeholder segment tw-text-center">
<div class="ui icon header">
{{svg "octicon-pin" 32}}
<div class="content">
{{ctx.Locale.Tr "user.pinned_repos_empty_title"}}
<div class="sub header">
{{ctx.Locale.Tr "user.pinned_repos_empty_desc"}}
</div>
</div>
</div>
</div>
{{end}}
</div>
{{end}}
{{/* Profile README */}}
{{if .ProfileReadmeContent}}
<div id="readme_profile" class="render-content markup">{{.ProfileReadmeContent}}</div>
{{end}}
{{else if eq .TabName "organizations"}}
{{template "repo/user_cards" .}}
{{else}}
{{template "shared/repo/search" .}}
{{template "shared/repo/list" .}}
{{template "base/paginate" .}}
{{end}}
</div>
</div>
</div>
</div>
{{template "base/footer" .}}