2
0
Files
gitcaddy-server/templates/home.tmpl
GitCaddy 7e7a413b78 Fix editorconfig issues and home.tmpl pinned org display format
- Fix home.tmpl to properly show promotional content when selected
- Fix line endings and indentation in all templates
- Fix locale file line endings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 08:40:02 +00:00

154 lines
5.1 KiB
Handlebars

{{template "base/head" .}}
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home_title"}}{{end}}" class="page-content home">
{{if .SystemConfig.Theme.CustomHomeHTML.Value ctx}}
{{/* Custom homepage content */}}
{{.SystemConfig.Theme.CustomHomeHTML.Value ctx | SafeHTML}}
{{else}}
{{/* Default homepage content */}}
<div class="tw-mb-8 tw-px-8">
<div class="center">
{{if .SystemConfig.Theme.CustomHomeLogoURL.Value ctx}}
<img class="logo" width="220" height="220" src="{{.SystemConfig.Theme.CustomHomeLogoURL.Value ctx}}" alt="{{ctx.Locale.Tr "logo"}}">
{{else}}
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/gitcaddy-logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
{{end}}
<div class="hero">
<h1 class="ui icon header title tw-text-balance">
{{if .SystemConfig.Theme.CustomHomeTitle.Value ctx}}
{{.SystemConfig.Theme.CustomHomeTitle.Value ctx}}
{{else}}
{{AppName}}
{{end}}
</h1>
<h2 class="tw-text-balance">
{{if .SystemConfig.Theme.CustomHomeTagline.Value ctx}}
{{.SystemConfig.Theme.CustomHomeTagline.Value ctx}}
{{else}}
{{ctx.Locale.Tr "startpage.app_desc"}}
{{end}}
</h2>
</div>
</div>
</div>
{{if eq (.SystemConfig.Theme.PinnedOrgDisplayFormat.Value ctx) "promotional"}}
{{/* Promotional format: show marketing content */}}
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.install_desc"}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-dependabot"}} {{ctx.Locale.Tr "startpage.platform"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.platform_desc"}}
</p>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.lightweight_desc"}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.license_desc"}}
</p>
</div>
</div>
{{else if .PinnedOrganizations}}
{{/* Show pinned organizations */}}
<div class="ui container tw-my-8">
{{if eq (.SystemConfig.Theme.PinnedOrgDisplayFormat.Value ctx) "regular"}}
{{/* Regular format: icon above, title below, description below that */}}
<div class="ui four doubling stackable cards">
{{range .PinnedOrganizations}}
<a class="ui card" href="{{.HomeLink}}">
<div class="content tw-text-center">
<div class="tw-mb-3">
{{ctx.AvatarUtils.Avatar . 64 "tw-rounded"}}
</div>
<div class="header">{{.DisplayName}}</div>
{{if .Description}}
<div class="meta tw-mt-2">{{.Description}}</div>
{{end}}
</div>
</a>
{{end}}
</div>
{{else}}
{{/* Condensed format (default): icon on left, title/description on right */}}
<div class="ui four doubling stackable cards">
{{range .PinnedOrganizations}}
<a class="ui card" href="{{.HomeLink}}">
<div class="content">
<div class="tw-flex tw-items-center tw-gap-3">
{{ctx.AvatarUtils.Avatar . 48 "tw-rounded"}}
<div class="tw-flex-1 tw-overflow-hidden">
<div class="header tw-truncate">{{.DisplayName}}</div>
{{if .Description}}
<div class="meta tw-truncate">{{.Description}}</div>
{{end}}
</div>
</div>
</div>
</a>
{{end}}
</div>
{{end}}
</div>
{{else}}
{{/* No pinned organizations - show promotional content as fallback */}}
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.install_desc"}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-dependabot"}} {{ctx.Locale.Tr "startpage.platform"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.platform_desc"}}
</p>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.lightweight_desc"}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.license_desc"}}
</p>
</div>
</div>
{{end}}
{{end}}
</div>
{{template "base/footer" .}}