feat: title on pages

This commit is contained in:
2026-03-19 18:27:23 +01:00
parent 2b07701762
commit 16e5107185
18 changed files with 251 additions and 36 deletions
+7 -5
View File
@@ -9,6 +9,11 @@ import (
"strings"
)
const (
sourceSetSteps = 300
sourceSetMax = 1500
)
func UIDFromPath(path string) (uid string, err error) {
var b bytes.Buffer
// NewWriter with NoDict (nil) creates a raw DEFLATE compressor
@@ -57,14 +62,11 @@ func PathFromUID(uid string) (string, error) {
func SourceSet(src string) string {
sb := strings.Builder{}
const steps = 300
const max = 1500
i := 1
for {
width := i * steps
width := i * sourceSetSteps
sb.WriteString(fmt.Sprintf("%s?w=%d %dw, ", src, width, width))
if width >= max {
if width >= sourceSetMax {
return sb.String()
}
sb.WriteRune(',')