git-preview @ main

static git web frontend but with images and html previews + code truncation

add style tweaks

Signed-off-by: Derek Stevens <nilix@nilfm.cc>
Tue, 31 Jan 2023
5 files changed, 31 insertions(+), 20 deletions(-)
M static/style.css

@@ -180,6 +180,10 @@ .diff-stat {

padding: 1rem 0 1rem 0; } +.commit-hash, .commit-email { + font-family: var(--mono-font); +} + .commit-email:before { content: '<'; }

… preview truncated

M templates/commit.html

@@ -11,13 +11,13 @@ <pre>

{{- .commit.Message -}} </pre> <div class="commit-info"> - {{ .commit.Author.Name }} <span class="commit-email">{{ .commit.Author.Email}}</span> + {{ .commit.Author.Name }} <a href="mailto:{{ .Author.Email }}" class="commit-email">{{ .commit.Author.Email}}</span> <div>{{ .commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</div> </div> <div> <strong>commit</strong>

… preview truncated

M templates/file.html

@@ -8,18 +8,22 @@ <body>

{{ template "nav" . }} <main> <p>{{ .path }}</p> - <div class="file-wrapper"> - <div class="line-numbers"> - {{- range .linecount }} + <table class="file-wrapper"> + <tbody><tr> + <td class="line-numbers"> + <pre>

… preview truncated

… and 2 more changed files not shown in this preview