src/server/http/templates/base.html
Ref: Size: 3.5 KiB History
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}{{ site_title }}{% endblock %}</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: monospace; font-size: 14px; line-height: 1.6; color: #24292f; background: #fff; }
a { color: #0366d6; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 4px 8px; }
th { font-weight: normal; color: #666; }
td { border-top: 1px solid #eee; }
pre { padding: 8px; background: #f8f8f8; overflow-x: auto; }
/* A table wider than the viewport scrolls inside its own block, exactly as
a wide diff already does in `pre` above. Without this the table pushes
the body out and the whole page scrolls sideways, which takes the header
and every other row's leading columns off-screen with it. See issue
8e716471; the property is measured in a real browser by
tests/web_layout_test.rs. */
.table-scroll { overflow-x: auto; }
/* A timestamp is rendered short with the exact value on hover, so it must
not be the thing that wraps a row onto two lines. See issue b2a57996. */
.timestamp { white-space: nowrap; }
.badge { font-size: 11px; color: #666; }
.status-open { color: green; }
.status-closed { color: red; }
.diff-add { color: #1a7f37; background: #eaf6ec; }
.diff-del { color: #cf222e; background: #ffebe9; }
.diff-hunk { color: #57606a; background: #f6f8fa; }
.diff-file { font-weight: bold; border-top: 1px solid #ccc; padding-top: 8px; }
.diff-ctx { color: #24292f; background: #fff; }
.diff-empty { background: #f6f8fa; color: transparent; }
.header { padding: 8px 16px; border-bottom: 1px solid #ccc; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.header a { text-decoration: none; }
.header .site { font-weight: bold; }
.header nav { display: flex; gap: 12px; flex-wrap: wrap; }
.header nav a.active { font-weight: bold; }
.filter-bar { color: #666; margin-bottom: 12px; }
.filter-bar a { margin-left: 8px; }
.filter-bar a.active { font-weight: bold; }
.content { padding: 16px; max-width: 1500px; margin: 0 auto; }
.commit-message { padding: 12px; border: 1px solid #d0d7de; border-radius: 6px; white-space: pre-wrap; }
.diff-file-block { border: 1px solid #d0d7de; border-radius: 6px; overflow: hidden; }
.diff-file-heading { padding: 10px 12px; background: #f6f8fa; border-bottom: 1px solid #d0d7de; }
.side-by-side-diff { table-layout: fixed; }
.side-by-side-diff col.diff-line-col { width: 4rem; }
.side-by-side-diff col.diff-code-col { width: auto; }
.side-by-side-diff thead th { background: #f6f8fa; border-bottom: 1px solid #d0d7de; }
.side-by-side-diff thead th:nth-child(1), .side-by-side-diff thead th:nth-child(2) { border-right: 1px solid #d8dee4; }
.side-by-side-diff td { border-top: 1px solid #d8dee4; vertical-align: top; padding: 2px 6px; }
.side-by-side-diff td:nth-child(2) { border-right: 1px solid #d8dee4; }
.diff-line-no { text-align: right; color: #57606a; user-select: none; padding-right: 10px; }
.diff-code { white-space: pre-wrap; word-break: break-word; }
</style>
</head>
<body>
<div class="header">
<a class="site" href="/">{{ site_title }}</a>
{% block nav %}{% endblock %}
</div>
<div class="content">
{% block body %}{% endblock %}
</div>
</body>
</html>