@@ -31,45 +31,49 @@ export default async function Page() {
3131 } ;
3232 }
3333 return (
34- < div className = "container mx-auto px-4 py-8" >
35- < h1 className = "text-3xl font-bold mb-6" > bookmarks
36- < a className = "text-xl text-blue-600 hover:text-blue-800" href = { RSS_FEED_URL } > rss</ a >
37- </ h1 >
38- < p className = "text-gray-600 mb-8" > { myBlog . feed . description } </ p >
39- < p className = "text-sm text-gray-500 mb-8" > Last updated: { myBlog . lastUpdated } </ p >
40- < div className = "space-y-6" >
34+ < div className = "max-w-2xl mx-auto px-4 py-8 bg-white dark:bg-gray-900" >
35+ < header className = "flex items-center justify-between mb-2" >
36+ < h1 className = "text-3xl font-bold text-gray-900 dark:text-gray-100" > bookmarks</ h1 >
37+ < a className = "text-base text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 underline" href = { RSS_FEED_URL } > rss</ a >
38+ </ header >
39+ < p className = "text-gray-600 dark:text-gray-300 mb-2 text-lg" > { myBlog . feed . description } </ p >
40+ < p className = "text-xs text-gray-400 dark:text-gray-500 mb-3" > as of { myBlog . lastUpdated } </ p >
41+ < div className = "divide-y divide-gray-200 dark:divide-gray-700" >
4142 { myBlog . feed . items . map ( ( item , index ) => (
42- < article key = { item . guid || index } className = "border-b pb-6" >
43- < h2 className = "text-xl font-semibold mb-2" >
44- < a
45- href = { item . link }
46- target = "_blank"
47- rel = "noopener noreferrer"
48- className = "text-blue-600 hover:text-blue-800"
49- >
50- { item . title }
51- </ a >
52- </ h2 >
43+ < article key = { item . guid || index } className = "py-6 flex flex-col gap-2" >
44+ < div className = "flex items-center gap-2" >
45+ < h2 className = "text-lg font-semibold text-gray-800 dark:text-gray-100" >
46+ < a
47+ href = { item . link }
48+ target = "_blank"
49+ rel = "noopener noreferrer"
50+ className = "text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 underline"
51+ >
52+ { item . title }
53+ </ a >
54+ </ h2 >
55+ { item . categories && item . categories . length > 0 && (
56+ < div className = "flex flex-wrap gap-1 ml-2" >
57+ { item . categories . map ( category => (
58+ ! [ "article" , "link" , "book" , "document" ] . includes ( category . toLowerCase ( ) ) &&
59+ < span
60+ key = { category }
61+ className = "bg-gray-200 dark:bg-gray-700 rounded-full px-2 py-0.5 text-xs font-medium text-gray-700 dark:text-gray-200"
62+ >
63+ { category }
64+ </ span >
65+ ) ) }
66+ </ div >
67+ ) }
68+ </ div >
5369 < div
54- className = "text-gray-700 mb-2 "
70+ className = "text-gray-700 dark:text-gray-300 text-sm hide-br hide-img "
5571 dangerouslySetInnerHTML = { { __html : item . description } }
5672 />
57- < div className = "text-sm text-gray-500" >
58- { item . pubDate && < span > Published: { new Date ( item . pubDate ) . toLocaleDateString ( ) } </ span > }
59- { item . author && < span className = "ml-4" > By: { item . author } </ span > }
73+ < div className = "flex items-center text-xs text-gray-500 dark:text-gray-400 gap-4 mt-1 " >
74+ { item . pubDate && < span > added { new Date ( item . pubDate ) . toLocaleDateString ( ) } </ span > }
75+ { item . author && < span > by { item . author } </ span > }
6076 </ div >
61- { item . categories && item . categories . length > 0 && (
62- < div className = "mt-2" >
63- { item . categories . map ( category => (
64- < span
65- key = { category }
66- className = "inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2"
67- >
68- { category }
69- </ span >
70- ) ) }
71- </ div >
72- ) }
7377 </ article >
7478 ) ) }
7579 </ div >
0 commit comments