Goit

Simple and lightweight Git web server
git clone http://git.omkov.net/Goit
Log | Tree | Refs | README | Download

Goit/res/repo/tree.html (48 lines, 1.2 KiB) -rw-r--r-- blame download

01234567891011121314151617181920212223242526272829303132333435363738394041424344454647
<!DOCTYPE html>
<html lang="en">
	<head>{{template "base/head" .}}</head>
	<body>
		<header>
			{{template "repo/header" .}}<hr>
			{{.HtmlPath}} ({{.Size}}) <a href="/{{.Name}}/download/{{.Path}}">download</a>
		</header><hr>
		<main>
			<table class="highlight-row">
				<thead>
					<tr>
						<td><b>Mode</b></td>
						<td><b>Name</b></td>
						<td><b>Size</b></td>
						<td></td>
					</tr>
				</thead>
				<tbody>
					{{if .Files}}
						{{range .Files}}
							<tr>
								<td>{{.Mode}}</td>
								<td><a href="/{{$.Name}}/{{.Path}}">{{.Name}}</a></td>
								<td align="right" {{if .B}}style="padding-right: calc(2ch + 0.4em);"{{end}}>{{.Size}}</td>
								<td>
									{{if .RawPath}}
										<a href="/{{$.Name}}/log/{{.RawPath}}">log</a>
										{{if .IsFile}}
											{{if .IsText}}
												<a href="/{{$.Name}}/blame/{{.RawPath}}">blame</a>
											{{end}}
											<a href="/{{$.Name}}/raw/{{.RawPath}}">raw</a>
										{{end}}
										<a href="/{{$.Name}}/download/{{.RawPath}}">download</a>
									{{end}}
								</td>
							</tr>
						{{end}}
					{{else}}
						<tr><td colspan="4">No files</td></tr>
					{{end}}
				</tbody>
			</table>
		</main>
	</body>
</html>