diff --git a/app/(withRecent)/categories/[categorySlug]/page.tsx b/app/(withRecent)/categories/[categorySlug]/page.tsx index 8ba8c71..6593544 100644 --- a/app/(withRecent)/categories/[categorySlug]/page.tsx +++ b/app/(withRecent)/categories/[categorySlug]/page.tsx @@ -1,5 +1,6 @@ import { metadata } from '@/app/metadata' import { getAllCategories, getCategoryBySlug, getPostsByCategory } from '@/lib/categories' +import { dateFormatter } from '@/utils/time' import type { Metadata } from 'next' import Link from 'next/link' @@ -49,14 +50,35 @@ export default async function CategoryPage({ params }: CategoryPageProps) { return ( - Category: {category} - - {posts.map((post) => ( - - {post.title} - - ))} - + ~/categories/{categorySlug} + + + + {category} + + + {posts.map((post) => ( + + + + {post.title} + + {post.date && ( + + {dateFormatter.format(new Date(post.date))} + + )} + + + ))} + + ) } diff --git a/app/(withRecent)/categories/page.tsx b/app/(withRecent)/categories/page.tsx index 4a45c98..6a3eec0 100644 --- a/app/(withRecent)/categories/page.tsx +++ b/app/(withRecent)/categories/page.tsx @@ -34,9 +34,9 @@ export default function CategoriesPage() { return ( - ~/categories + ~/categories - + {categoryNames.map((category) => { const categoryPosts = posts.filter((post) => post.category === category) @@ -49,10 +49,10 @@ export default function CategoriesPage() { {category} - ({categoryPosts.length}) + ({categoryPosts.length}) - + {categoryPosts.map((post) => ( - Tag: {tag} - - {posts.map((post) => ( - - {post.title} - - ))} - + ~/tags/{tagSlug} + + + + {tag} + + + {posts.map((post) => ( + + + + {post.title} + + {post.date && ( + + {dateFormatter.format(new Date(post.date))} + + )} + + + ))} + + ) } diff --git a/app/(withRecent)/tags/page.tsx b/app/(withRecent)/tags/page.tsx index 8837328..d4283cf 100644 --- a/app/(withRecent)/tags/page.tsx +++ b/app/(withRecent)/tags/page.tsx @@ -34,9 +34,9 @@ export default function TagsPage() { return ( - ~/tags + ~/tags - + {tagNames.map((tag) => { const tagPosts = posts.filter((post) => post.tags && post.tags.includes(tag)) @@ -49,10 +49,10 @@ export default function TagsPage() { {tag} - ({tagPosts.length}) + ({tagPosts.length}) - + {tagPosts.map((post) => ( RealFaviconGeneratorhttps://realfavicongenerator.net \ No newline at end of file diff --git a/app/icon1.png b/app/icon1.png new file mode 100644 index 0000000..463b09f Binary files /dev/null and b/app/icon1.png differ diff --git a/app/manifest.ts b/app/manifest.ts new file mode 100644 index 0000000..3450af8 --- /dev/null +++ b/app/manifest.ts @@ -0,0 +1,25 @@ +import type { MetadataRoute } from 'next' + +export default function manifest(): MetadataRoute.Manifest { + return { + name: 'Ephemeris', + short_name: 'Ephemeris', + icons: [ + { + src: '/web-app-manifest-192x192.png', + sizes: '192x192', + type: 'image/png', + purpose: 'maskable', + }, + { + src: '/web-app-manifest-512x512.png', + sizes: '512x512', + type: 'image/png', + purpose: 'maskable', + }, + ], + theme_color: '#ef1f1f', + background_color: '#ef1f1f', + display: 'standalone', + } +} \ No newline at end of file diff --git a/app/metadata.ts b/app/metadata.ts index 13d0874..86a40ff 100644 --- a/app/metadata.ts +++ b/app/metadata.ts @@ -12,4 +12,9 @@ export const metadata: Metadata = { url: process.env.SITE_URL, siteName: 'Ephemeris', }, + appleWebApp: { + title: 'Ephemeris', + statusBarStyle: 'default', + capable: true, + }, } diff --git a/app/posts/[slug]/page.tsx b/app/posts/[slug]/page.tsx index 29790fd..80a2f0c 100644 --- a/app/posts/[slug]/page.tsx +++ b/app/posts/[slug]/page.tsx @@ -106,9 +106,13 @@ export default async function Post({ params }: { params: Promise<{ slug: string Tags {meta.tags.map((tag) => ( - + {tag} - + ))} diff --git a/components/content/ImageWrapper.tsx b/components/content/ImageWrapper.tsx index 5feea57..45fde8b 100644 --- a/components/content/ImageWrapper.tsx +++ b/components/content/ImageWrapper.tsx @@ -23,7 +23,7 @@ export function ImageWrapper({ src, alt, isListing }: ImageWrapperProps) { ~/{src} - + {metadata.title!.toString()} diff --git a/components/layout/navItems.tsx b/components/layout/navItems.tsx index e210dd1..d64296f 100644 --- a/components/layout/navItems.tsx +++ b/components/layout/navItems.tsx @@ -1,4 +1,4 @@ -import { Folder, GitBranch, Home, Info, Rss, Tags } from 'lucide-react' +import { ChartColumnStacked, GitBranch, Home, Info, Rss, Tags } from 'lucide-react' type NavItem = { href: string @@ -12,7 +12,11 @@ const navIconsClassName = 'w-6 h-6 lg:w-4 lg:h-4' export const navItems: NavItem[] = [ { href: '/', label: 'Home', icon: }, { href: '/about', label: 'About', icon: }, - { href: '/categories', label: 'Categories', icon: }, + { + href: '/categories', + label: 'Categories', + icon: , + }, { href: '/tags', label: 'Tags', icon: }, { href: '/feed.xml', diff --git a/components/post/Post.tsx b/components/post/Post.tsx index 0fbc8d6..a821139 100644 --- a/components/post/Post.tsx +++ b/components/post/Post.tsx @@ -48,7 +48,7 @@ export function Post({ post, isLatest, showImageSlot }: PostProps) { {title} - {description} + {description} {dateFormatter.format(publishedAt)} · diff --git a/components/post/TableOfContents.tsx b/components/post/TableOfContents.tsx index e2f51fd..7bc0ee4 100644 --- a/components/post/TableOfContents.tsx +++ b/components/post/TableOfContents.tsx @@ -39,8 +39,11 @@ export function TableOfContents({ items }: { items: TocItem[] }) { return (
{description}