repo2html/assets/templates/default.html

105 lines
3.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>git.example.com - {{ repository_name }}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale-1.0, user-scalable=yes" />
<link rel="icon" href="data:," />
<meta name="description" content="{{ repository_description }}" />
<style>
body {
font-family: sans-serif;
font-size: 16px;
margin: 0 auto;
max-width: 700px;
line-height: 1.5;
}
pre, code {
font-size: 14px;
background-color: #eeeeee;
border-radius: 5px ;
}
code { padding: 2px 7px }
pre {
overflow: scroll;
padding: 15px 20px;
white-space: pre;
}
pre code { padding: 0 }
a { color: blue }
nav a { margin-right: 10px }
hr {
border: 0;
border-bottom: 1px solid black;
}
th { text-align: left }
td {
padding: 0 1em 0 0;
vertical-align: top;
}
footer {
font-size: small;
text-align: right;
}
img { max-width: 100% }
/* permalinks */
h1 a[href^="#"]::after, h2 a[href^="#"]::after, h3 a[href^="#"]::after, h4 a[href^="#"]::after, h5 a[href^="#"]::after, h6 a[href^="#"]::after { content: "¶"; opacity: 0; margin-left: .5em; }
h1:hover a[href^="#"]::after, h2:hover a[href^="#"]::after, h3:hover a[href^="#"]::after, h4:hover a[href^="#"]::after, h5:hover a[href^="#"]::after, h6:hover a[href^="#"]::after { opacity: 100; }
h1 a[href^="#"], h2 a[href^="#"], h3 a[href^="#"], h4 a[href^="#"], h5 a[href^="#"], h6 a[href^="#"] { text-decoration: none; }
#file-contents {
white-space: pre;
font-family: monospace;
border-collapse: collapse;
}
#file-contents code { background-color: inherit }
.line-number { text-align: right }
.line:target { background-color: yellow }
@media (prefers-color-scheme: dark) {
body {
color: #dddddd;
background-color: #111111;
}
a { color: cyan; }
pre, code { background-color: #222222 }
.line:target { background-color: darkgreen }
}
</style>
</head>
<body>
<h1>git.example.com</h1>
<h2>{{ repository_path_parent }}
{% if repository_path_parent %} / {% endif %}
{{ repository_name }}</h2>
<p><strong>clone url</strong>: <code>git://git.example.com/{{ repository_path }}</code></p>
<nav>
{% if readme_file %}
<a href="{{ relative_root }}{{ readme_file }}.html">about</a>
<a href="{{ relative_root }}files.html">files</a>
{% else %}
<a href="{{ relative_root }}files.html">files</a>
{% endif %}
{% if license_file %}
<a href="{{ relative_root }}{{ license_file }}.html">license</a>
{% endif %}
{% if issues_file %}
<a href="{{ relative_root }}{{ issues_file }}.html">issues</a>
{% endif %}
<a href="{{ relative_root }}commits.html">commits</a>
<a href="{{ relative_root }}contributors.html">contributors</a>
</nav>
<hr />
{% if source_file %}
<p id="file-path">{{ source_file }}</p>
{% endif %}
{{ content|safe }}
<hr />
<footer>
<p>Generated by
<a href="https://git.m455.casa/repo2html/"
title="the repo2html git repo static renderer by m455 and pho4cexa">repo2html</a>
{{ repo2html_version }} using
<a href="http://wiki.call-cc.org/eggref/5/ersatz"
title="the ersatz Jinja2-like templating library by Ivan Raikov"
>ersatz</a> templates</p>
</footer>
</html>