Lindenii Project Forge
Login

server

Lindenii Forge’s main backend daemon
Commit info
ID
46446a0f91fcb8290791e49372493c2ef81d3506
Author
Runxi Yu <me@runxiyu.org>
Author date
Thu, 03 Apr 2025 16:25:44 +0800
Committer
Runxi Yu <me@runxiyu.org>
Committer date
Thu, 03 Apr 2025 16:47:01 +0800
Actions
HTML: Fix authorship fields
{{/*
	SPDX-License-Identifier: AGPL-3.0-only
	SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
*/}}
{{- define "repo_index" -}}
{{- $root := . -}}
<!DOCTYPE html>
<html lang="en">
	<head>
		{{- template "head_common" . -}}
		<title>{{ .repo_name }} &ndash; {{ template "group_path_plain" .group_path }} &ndash; {{ .global.forge_title -}}</title>
	</head>
	<body class="repo-index">
		{{- template "header" . -}}
		<div class="repo-header">
			<h2>{{- .repo_name -}}</h2>
			<ul class="nav-tabs-standalone">
				<li class="nav-item">
					<a class="nav-link active" href="./{{- template "ref_query" $root -}}">Summary</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="tree/{{- template "ref_query" $root -}}">Tree</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="log/{{- template "ref_query" $root -}}">Log</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="branches/">Branches</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="tags/">Tags</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="contrib/">Merge requests</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="settings/">Settings</a>
				</li>
			</ul>
		</div>
		<div class="repo-header-extension">
			<div class="repo-header-extension-content">
				{{- .repo_description -}}
			</div>
		</div>
		{{- if .notes -}}
		<div id="notes">Notes</div>
			<ul>
				{{- range .notes -}}<li>{{- . -}}</li>{{- end -}}
			</ul>
		</div>
		{{- end -}}
		<p class="readingwidth"><code>{{- .ssh_clone_url -}}</code></p>
		{{- if .commits -}}
			<div class="padding-wrapper scroll">
				<table id="recent-commits" class="wide">
					<thead>
						<tr class="title-row">
							<th colspan="3">Recent commits (<a href="log/{{- template "ref_query" $root -}}">see all</a>)</th>
						</tr>
						<tr>
							<th scope="col">Title</th>
							<th scope="col">Author</th>
							<th scope="col">Author date</th>
						</tr>
					</thead>
					<tbody>
						{{- range .commits -}}
							<tr>
								<td class="commit-title"><a href="commit/{{- .Hash -}}">{{- .Message | first_line -}}</a></td>
								<td class="commit-author">
									<a class="email-name" href="mailto:{{- .Author.Email -}}">{{- .Author.Name -}}</a>
									<a class="email-name" href="mailto:{{- .Email -}}">{{- .Author -}}</a>
								</td>
								<td class="commit-time">
									{{- .Author.When.Format "2006-01-02 15:04:05 -0700" -}}
									{{- .Date -}}
								</td>
							</tr>
						{{- end -}}
						{{- if dereference_error .commits_err -}}
							Error while obtaining commit log: {{ .commits_err }}
						{{- end -}}
					</tbody>
				</table>
			</div>
		{{- end -}}
		{{- if .readme -}}
			<div class="padding-wrapper" id="readme">
				{{- .readme -}}
			</div>
		{{- end -}}
		<footer>
			{{- template "footer" . -}}
		</footer>
	</body>
</html>
{{- end -}}