{{template "base/head" .}}
<div class="page-content pages-landing pages-product">
	{{template "pages/header" .}}

	<main class="pages-main">
		<!-- Hero Section -->
		<section class="pages-hero pages-hero-product" {{if .Config.Hero.Background}}style="background-image: url('{{.Config.Hero.Background}}')"{{end}}>
			<div class="pages-hero-overlay"></div>
			<div class="container">
				{{if .Config.Branding.Logo}}
				<img src="{{.Config.Branding.Logo}}" alt="{{.Repository.Name}}" class="pages-logo">
				{{end}}
				<h1 class="pages-title">{{if .Config.Hero.Title}}{{.Config.Hero.Title}}{{else}}{{.Repository.Name}}{{end}}</h1>
				{{if .Config.Hero.Tagline}}
				<p class="pages-tagline">{{.Config.Hero.Tagline}}</p>
				{{end}}
				<div class="pages-cta">
					{{if .Config.Hero.CTAPrimary.Text}}
					<a href="{{.Config.Hero.CTAPrimary.Link}}" class="ui large primary button">
						{{.Config.Hero.CTAPrimary.Text}}
					</a>
					{{end}}
					{{if .Config.Hero.CTASecondary.Text}}
					<a href="{{.Config.Hero.CTASecondary.Link}}" class="ui large button {{if eq .Config.Hero.CTASecondary.Style "outline"}}basic inverted{{end}}">
						{{.Config.Hero.CTASecondary.Text}}
					</a>
					{{end}}
				</div>
			</div>
		</section>

		<!-- Features Section -->
		{{if .Config.Features}}
		<section class="pages-features">
			<div class="container">
				<div class="pages-features-grid">
					{{range .Config.Features}}
					<div class="pages-feature">
						{{if .Icon}}
						<div class="pages-feature-icon">
							{{if hasPrefix .Icon "./"}}
							<img src="{{.Icon}}" alt="{{.Title}}">
							{{else}}
							{{svg (printf "octicon-%s" .Icon) 32}}
							{{end}}
						</div>
						{{end}}
						<h3 class="pages-feature-title">{{.Title}}</h3>
						<p class="pages-feature-description">{{.Description}}</p>
					</div>
					{{end}}
				</div>
			</div>
		</section>
		{{end}}

		<!-- README Section -->
		{{if .ReadmeContent}}
		<section class="pages-readme">
			<div class="container">
				<div class="markup">
					{{.ReadmeContent}}
				</div>
			</div>
		</section>
		{{end}}

		<!-- Stats Section -->
		<section class="pages-stats">
			<div class="container">
				<div class="pages-stats-grid">
					<div class="pages-stat">
						<span class="pages-stat-value">{{.NumStars}}</span>
						<span class="pages-stat-label">{{ctx.Locale.Tr "repo.stars"}}</span>
					</div>
					<div class="pages-stat">
						<span class="pages-stat-value">{{.NumForks}}</span>
						<span class="pages-stat-label">{{ctx.Locale.Tr "repo.forks"}}</span>
					</div>
				</div>
				<div class="pages-cta-bottom">
					<a href="{{AppSubUrl}}/{{.Repository.FullName}}" class="ui large button" target="_blank">
						{{svg "octicon-star" 16}} Star on Gitea
					</a>
				</div>
			</div>
		</section>
	</main>

	{{template "pages/footer" .}}
</div>
{{template "base/footer" .}}
