Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/components/widgets/BookClubList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ const booksWithFormattedDates = allBooks.map(book => ({
<Icon name="tabler:arrows-right-left" class="w-4 h-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300 rotate-90" />
</div>
</th>
<th scope="col" class="px-6 py-4 text-sm font-semibold text-gray-900 dark:text-white">
Slides
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 dark:divide-slate-600" id="bookclub-tbody">
Expand Down Expand Up @@ -137,6 +140,17 @@ const booksWithFormattedDates = allBooks.map(book => ({
</span>
</div>
</td>
<td class="px-6 py-4">
{book.slides && (
<a
href={`/bookclub/${book.slides}`}
class="inline-flex items-center gap-1 text-sm text-primary hover:text-secondary dark:text-blue-400 dark:hover:text-blue-300 font-medium transition-colors duration-200"
>
<Icon name="tabler:presentation" class="w-4 h-4" />
<span>View</span>
</a>
)}
</td>
</tr>
))}
</tbody>
Expand Down Expand Up @@ -191,6 +205,15 @@ const booksWithFormattedDates = allBooks.map(book => ({
<span class="italic text-gray-400 dark:text-gray-500">TBD</span>
)}
</div>
{book.slides && (
<a
href={`/bookclub/${book.slides}`}
class="inline-flex items-center gap-1 text-sm text-primary hover:text-secondary dark:text-blue-400 dark:hover:text-blue-300 font-medium transition-colors duration-200 mt-1"
>
<Icon name="tabler:presentation" class="w-4 h-4" />
<span>View Slides</span>
</a>
)}
</div>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/data/bookclub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export interface BookClubBook {
link: string;
date: string | null;
image: string;
slides?: string;
}

export const bookClubBooks: BookClubBook[] = [
Expand Down Expand Up @@ -221,8 +222,9 @@ export const bookClubBooks: BookClubBook[] = [
title: "Price of Tomorrow",
author: "Jeff Booth",
link: "https://a.co/d/4qW589F",
date: null,
image: "~/assets/images/books/priceoftomorrow.jpg"
date: "2026-03-19",
image: "~/assets/images/books/priceoftomorrow.jpg",
slides: '15',
},
{
title: "The Deficit Myth",
Expand Down
20 changes: 20 additions & 0 deletions src/pages/bookclub/[session]/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
import { readFileSync } from 'node:fs';
import { join } from 'node:path';

export async function getStaticPaths() {
const { readdirSync } = await import('node:fs');
const slidesDir = join(process.cwd(), 'src', 'slides');
return readdirSync(slidesDir)
.filter((f: string) => f.endsWith('.html'))
.map((f: string) => ({ params: { session: f.replace('.html', '') } }));
}

const { session } = Astro.params;
const slidesPath = join(process.cwd(), 'src', 'slides', `${session}.html`);
const html = readFileSync(slidesPath, 'utf-8');

return new Response(html, {
headers: { 'Content-Type': 'text/html; charset=utf-8' },
});
---
Loading