package templates import ( "encoding/json" "fmt" ) // The init config carries only immutable book metadata. Reading state // (position, bookmarks, annotations) is never embedded: the reader fetches // it from the APIs at open time, so the page can never carry — nor write // back — a stale snapshot of it. func readerInitExpr(metadata ReaderMetadata) string { config := map[string]interface{}{ "mediaItemId": metadata.MediaItemID, "fileUrl": metadata.FileURL, "formatGroup": metadata.FormatGroup, "readingDirection": metadata.ReadingDirection, "mangaType": metadata.MangaType, } jsonBytes, _ := json.Marshal(config) return fmt.Sprintf("initReader(%s)", string(jsonBytes)) } templ Reader(user User, metadata ReaderMetadata) {
No pages