package templates import ( "github.com/google/uuid" "github.com/jackc/pgx/v5/pgtype" ) func activeClass(current, target string) string { base := "block px-4 py-2 rounded-lg " if current == target { return base + "bg-accent text-bg-primary" } return base + "hover:opacity-80" } func ContainsString(slice []string, item string) bool { for _, s := range slice { if s == item { return true } } return false } func uuidToString(id pgtype.UUID) string { if !id.Valid { return "" } u, err := uuid.FromBytes(id.Bytes[0:16]) if err != nil { return "" } return u.String() }