Added a basic homepage

This commit is contained in:
CamZawacki 2026-05-20 16:09:54 +01:00
parent d40640a648
commit 12fd3c04ca
113 changed files with 414 additions and 506 deletions

22
internal/ui/ui_test.go Normal file
View file

@ -0,0 +1,22 @@
package ui
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPublicFile(t *testing.T) {
path := "abc.txt"
got := PublicFile(path)
expected := fmt.Sprintf("/%s/%s", "files", path)
assert.Equal(t, expected, got)
}
func TestStaticFile(t *testing.T) {
path := "abc.txt"
got := StaticFile(path)
expected := fmt.Sprintf("/%s/%s?v=%s", "static", path, cacheBuster)
assert.Equal(t, expected, got)
}