package templates import ( "bookhoard/internal/handlers" "fmt" "net/url" "github.com/microcosm-cc/bluemonday" "strings" ) templ BookDetail(user User, book handlers.MediaDetail, errorMessage string, tombstoneDays int) {
Progress conflict detected — click "Sync Progress" to review and resolve.
Progress
{ fmt.Sprintf("%.1f", book.ReadingProgress.Percentage.Float64*100) }%
Page
{ book.ReadingProgress.CurrentPage.Int32 } / { book.ReadingProgress.TotalPages.Int32 }
Last Read
{ FormatTimestamptzInTimezone(book.ReadingProgress.LastReadAt, user.Timezone) }
Source
{ book.ReadingProgress.LastSyncSource.String }
Time Reading
if book.BookStats.TotalMinutes >= 60 {{ fmt.Sprintf("%dh %dmin", book.BookStats.TotalMinutes/60, book.BookStats.TotalMinutes%60) }
} else {{ fmt.Sprintf("%d min", book.BookStats.TotalMinutes) }
}Sessions
{ fmt.Sprintf("%d", book.BookStats.SessionCount) }
Pages Synced
{ fmt.Sprintf("%d", book.BookStats.TotalPages) }
Finished
if book.BookStats.Finished {✓
} else {—
}Publisher
{ book.Publisher.String }
Published
{ book.DatePublished.Time.Format("01-02-2006") }
ISBN
{ book.Isbn.String }
Language
{ book.Language.String }
Edition
{ book.Edition.String }
Pages
{ book.PageCount.Int32 }
Genre
{ book.Genre.String }
Series Count
{ book.SeriesCount.Int32 } items
Volume
Vol. { book.Volume.Int32 }
Imprint
{ book.Imprint.String }
Copyright
{ book.CopyrightYear.Int32 }
Manga Type
{ strings.ReplaceAll(book.MangaType.String, "_", " ") }
Scan Info
{ book.ScanInformation.String }
Alternate Series
{ altSeries }
Contributors
{ strings.Join(book.Contributors, ", ") }
Format
{ book.MimeType.String }
File Size
{ formatFileSize(book.FileSize.Int64) }
Location
{ book.FileLocation }