git-preview @ main

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

cleaner titles

by nilix
Sat, 18 Feb 2023
9 files changed, 36 insertions(+), 41 deletions(-)
M routes/routes.go

@@ -190,6 +190,7 @@ data["name"] = name

data["ref"] = ref data["parent"] = treePath data["desc"] = getDescription(path) + data["dotdot"] = filepath.Dir(treePath) d.listFiles(files, data, w) return

@@ -254,7 +255,7 @@ data["meta"] = d.c.Meta

data["name"] = name data["ref"] = ref data["desc"] = getDescription(path)

… preview truncated

M static/style.css

@@ -252,17 +252,18 @@ margin-right: 1ch;

} .file-wrapper { + display: flex; + flex-direction: row; + grid-template-columns: 1rem minmax(0, 1fr); + gap: 1rem; + padding: 0.5rem; background: var(--light-gray); - display: table;

… preview truncated

M templates/file.html

@@ -1,29 +1,23 @@

{{ define "file" }} <html> {{ template "head" . }} - <title>{{.name }} &mdash; {{ .path }}</title> - {{ template "repoheader" . }} <body> {{ template "nav" . }} <main> <p>{{ .path }}</p>

… preview truncated

… and 6 more changed files not shown in this preview