mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
feat(cover): redraw placeholder covers in nine selectable styles
Replace the lattice placeholder with a typesetting engine that measures real glyphs, balances line breaks and parses series, subtitles and sort-form authors before drawing. Add a placeholderCoverStyle display preference, Bauhaus by default, with a style switcher and sample shelf in Book Covers settings. Colours follow the series, author or title, so a cover stays the same when genres arrive later; only Paperback's bands use genre.
This commit is contained in:
@@ -37,6 +37,20 @@ export type CardInfoMode = (typeof CARD_INFO_MODES)[number];
|
||||
export const BOOK_THUMBNAIL_CLICK_ACTION = ["reader", "details"] as const;
|
||||
export type BookThumbnailClickAction = (typeof BOOK_THUMBNAIL_CLICK_ACTION)[number];
|
||||
|
||||
/** The artwork drawn for a book that has no cover. */
|
||||
export const PLACEHOLDER_COVER_STYLES = [
|
||||
"bauhaus",
|
||||
"constructivist",
|
||||
"memphis",
|
||||
"clothbound",
|
||||
"poster",
|
||||
"aurora",
|
||||
"vista",
|
||||
"marbled",
|
||||
"paperback",
|
||||
] as const;
|
||||
export type PlaceholderCoverStyle = (typeof PLACEHOLDER_COVER_STYLES)[number];
|
||||
|
||||
export interface DisplayPreferences {
|
||||
portraitCoverSize: number;
|
||||
squareCoverSize: number;
|
||||
@@ -65,4 +79,5 @@ export interface DisplayPreferences {
|
||||
gridCardSecondaryLabel: GridCardLabelField;
|
||||
cardInfoMode: CardInfoMode;
|
||||
thumbnailClickAction: BookThumbnailClickAction;
|
||||
placeholderCoverStyle: PlaceholderCoverStyle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user