Series
No Series Found
Books with series metadata will appear here
import { Alpine } from "./alpine";
import { showToast } from "./toast";
import { initLibrarySwitcher, switchWithTransition } from "./library-switcher";
interface SeriesItem {
name: string;
book_count: number;
total_in_series: number;
cover_paths: string[];
last_entry_at: string;
}
function renderSeriesCard(series: SeriesItem): string {
const href = `/series/detail?name=${encodeURIComponent(series.name)}`;
const coverCount = series.cover_paths.length;
const coverClass = `cover-count-${coverCount}`;
let coversHtml = "";
for (let i = 0; i < coverCount; i++) {
coversHtml += ``;
}
if (coverCount === 0) {
coversHtml = `
${series.book_count} of ${series.total_in_series} books
Books with series metadata will appear here