git-preview @ main

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

unveil: init
Sun, 18 Dec 2022
3 files changed, 37 insertions(+), 0 deletions(-)
M main.go

@@ -20,6 +20,10 @@ if err != nil {

log.Fatal(err) } + // for path := range []string{c.Dirs.Static, c.Repo.ScanPath, c.Dirs.Templates} { + // Unveil(path, "r") + // } + mux := routes.Handlers(c) addr := fmt.Sprintf("%s:%d", c.Server.Host, c.Server.Port) log.Println("starting server on", addr)
M static/style.css

@@ -210,6 +210,11 @@ }

.line-numbers { white-space: pre-line; + -moz-user-select: -moz-none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none; }

… preview truncated

A unveil.go

@@ -0,0 +1,28 @@

+//go:build openbsd +// +build openbsd + +package main + +/* +#include <stdlib.h> +#include <unistd.h> +*/ +import "C"

… preview truncated