|
| 1 | +--- |
| 2 | +import { getCollection } from "astro:content"; |
| 3 | +import BaseHead from "../components/BaseHead.astro"; |
| 4 | +
|
| 5 | +const nowReading = { |
| 6 | + title: "The Creative Act", |
| 7 | + slug: "the-creative-act", |
| 8 | +}; |
| 9 | +const quote = { |
| 10 | + content: |
| 11 | + "Practicing a way of being that allows you to see the world through uncorrupted, innocent eyes can free you to act in concert with the universe's timetable.", |
| 12 | + bookTitle: "The Creative Act", |
| 13 | +}; |
| 14 | +
|
| 15 | +const books = (await getCollection("read")).filter( |
| 16 | + (book) => book.slug !== nowReading.slug, |
| 17 | +); |
| 18 | +--- |
| 19 | + |
| 20 | +<!doctype html> |
| 21 | +<html |
| 22 | + lang="en" |
| 23 | + class="bg-stone-200 dark:bg-stone-900 text-stone-700 dark:text-stone-400" |
| 24 | +> |
| 25 | + <head> |
| 26 | + <BaseHead |
| 27 | + title="Kenneth's Reads" |
| 28 | + description="Quotes and notes from my readings." |
| 29 | + /> |
| 30 | + </head> |
| 31 | + <body class="reads px-8"> |
| 32 | + <main class="mt-8 mb-20 md:mt-0 max-w-4xl grid grid-cols-11"> |
| 33 | + <header class="col-span-11 grid grid-cols-11"> |
| 34 | + <h1 |
| 35 | + class="col-span-10 md:col-span-3 md:justify-self-end text-lg font-bold mt-8" |
| 36 | + > |
| 37 | + <a href="/" class="hover:underline">Kenneth</a>'s Reads |
| 38 | + </h1> |
| 39 | + <p |
| 40 | + class="col-span-10 md:col-span-8 text-lg font-medium mb-10 md:mb-20 md:ml-12 md:mt-8" |
| 41 | + > |
| 42 | + Quotes and notes from my readings. |
| 43 | + </p> |
| 44 | + </header> |
| 45 | + |
| 46 | + <div class="md:justify-self-end col-span-10 md:col-span-3"> |
| 47 | + <div class="flex items-center opacity-70 mb-2 md:mb-20"> |
| 48 | + <div |
| 49 | + class="w-3 h-3 bg-green-500 border-green-200 dark:bg-green-500 border-2 dark:border-green-300 rounded-full animate-pulse mr-2" |
| 50 | + > |
| 51 | + </div> |
| 52 | + <h2 class="tracking-tight">Now Reading</h2> |
| 53 | + </div> |
| 54 | + </div> |
| 55 | + |
| 56 | + <div class="col-span-10 md:col-span-8 md:ml-12 mb-16 md:mb-20"> |
| 57 | + <a class="font-medium underline" href={`/read/${nowReading.slug}`} |
| 58 | + >{nowReading.title}</a |
| 59 | + > |
| 60 | + </div> |
| 61 | + |
| 62 | + <div |
| 63 | + class="md:justify-self-end col-span-10 md:col-span-3 flex flex-col md:items-end opacity-70" |
| 64 | + > |
| 65 | + <p class="text-6xl leading-none font-black select-none">“</p> |
| 66 | + <h2 class="leading-none -translate-y-8 tracking-tight"> |
| 67 | + {quote.bookTitle} |
| 68 | + </h2> |
| 69 | + </div> |
| 70 | + <p |
| 71 | + class="col-span-10 md:col-span-8 max-w-prose md:ml-12 text-2xl md:text-4xl tracking-tight mb-20" |
| 72 | + > |
| 73 | + {quote.content} |
| 74 | + </p> |
| 75 | + |
| 76 | + <h2 |
| 77 | + class="col-span-10 md:col-span-3 tracking-tight md:justify-self-end mb-4" |
| 78 | + > |
| 79 | + All Books |
| 80 | + </h2> |
| 81 | + <ul class="col-span-10 md:col-span-8 md:ml-12 space-y-2"> |
| 82 | + { |
| 83 | + books.map((book) => ( |
| 84 | + <li> |
| 85 | + <a class="underline" href={`/read/${book.slug}`}> |
| 86 | + {book.data.title} |
| 87 | + </a> |
| 88 | + </li> |
| 89 | + )) |
| 90 | + } |
| 91 | + </ul> |
| 92 | + </main> |
| 93 | + </body> |
| 94 | +</html> |
0 commit comments