xonecas.io
53129
Pa

PAT / commit 008a500

feat: custom font, and small UI tweaks

xonecas2025-12-17 008a50063076504aed35ba77ea81264db7d2866f parent 5a3a5f1

7 files changed

app/globals.css+54−0
@@ -1,3 +1,57 @@
11 @tailwind base;
22 @tailwind components;
33 @tailwind utilities;
4+
5+@layer base {
6+ body {
7+ font-family: var(--font-montserrat), sans-serif;
8+ }
9+}
10+
11+@layer components {
12+ .prose {
13+ font-size: inherit;
14+ }
15+
16+ .prose p,
17+ .prose ul,
18+ .prose ol,
19+ .prose li,
20+ .prose blockquote,
21+ .prose code,
22+ .prose pre,
23+ .prose h1,
24+ .prose h2,
25+ .prose h3,
26+ .prose h4,
27+ .prose h5,
28+ .prose h6 {
29+ font-size: inherit;
30+ }
31+
32+ .prose h1 {
33+ font-size: 1.5em;
34+ }
35+
36+ .prose h2 {
37+ font-size: 1.3em;
38+ }
39+
40+ .prose h3 {
41+ font-size: 1.15em;
42+ }
43+
44+ .prose h4,
45+ .prose h5,
46+ .prose h6 {
47+ font-size: 1.05em;
48+ }
49+
50+ .prose code {
51+ font-size: 0.9em;
52+ }
53+
54+ .prose pre {
55+ font-size: 0.9em;
56+ }
57+}
app/layout.tsx+8−1
@@ -1,5 +1,12 @@
1+import { Montserrat } from "next/font/google";
12 import "./globals.css";
23
4+const montserrat = Montserrat({
5+ weight: ["400", "700"],
6+ subsets: ["latin"],
7+ variable: "--font-montserrat",
8+});
9+
310 export const metadata = {
411 title: "Personal Assistant",
512 description: "A simple personal assistant app built with Next.js, Tailwind, and Ollama.",
@@ -8,7 +15,7 @@ export const metadata = {
815 export default function RootLayout({ children }: { children: React.ReactNode }) {
916 return (
1017 <html lang="en">
11- <body>{children}</body>
18+ <body className={montserrat.variable}>{children}</body>
1219 </html>
1320 );
1421 }
app/page.tsx+1−1
@@ -235,7 +235,7 @@ export default function Home() {
235235 <div className="flex min-w-0 flex-1 flex-col">
236236 <div
237237 ref={messagesContainerRef}
238- className="flex-1 overflow-y-auto overflow-x-hidden bg-neutral-100 p-4 text-sm dark:bg-neutral-950"
238+ className="flex-1 overflow-y-auto overflow-x-hidden bg-neutral-100 p-4 dark:bg-neutral-950"
239239 >
240240 <div className="mx-auto flex min-h-full max-w-5xl flex-col justify-end gap-8">
241241 {currentThreadId === null ? (
next-env.d.ts+1−1
@@ -1,6 +1,6 @@
11 /// <reference types="next" />
22 /// <reference types="next/image-types/global" />
3-import "./.next/types/routes.d.ts";
3+import "./.next/dev/types/routes.d.ts";
44
55 // NOTE: This file should not be edited
66 // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
src/components/NoThreadSelected.tsx+14−14
@@ -1,9 +1,6 @@
11 "use client";
22
33 import { useState, useEffect } from "react";
4-import ReactMarkdown from "react-markdown";
5-import remarkGfm from "remark-gfm";
6-import rehypeHighlight from "rehype-highlight";
74
85 type NoThreadSelectedProps = {
96 threadCount: number;
@@ -30,17 +27,20 @@ export default function NoThreadSelected({ threadCount }: NoThreadSelectedProps)
3027
3128 return (
3229 <div className="mx-auto min-w-0 max-w-5xl">
33- <div className="prose prose-neutral max-w-none bg-neutral-200 p-8 dark:prose-invert dark:bg-neutral-900">
34- <ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeHighlight]}>
35- {`# Welcome to PAT 👋
36-
37-**PAT** (Personal Assistant Thing) is your personal assistant. Start typing below to start new a conversation thread or pick a previous conversation thread from the sidebar.
38-
39----
40-
41-${timeDisplay ? `*Current time: ${timeDisplay}*` : ""}
42-*${threadCount} ${threadCount === 1 ? "thread" : "threads"} created*`}
43- </ReactMarkdown>
30+ <div className="flex flex-col gap-4 bg-neutral-200 p-8 dark:bg-neutral-900">
31+ <h1 className="text-4xl font-bold">Welcome to PAT 👋</h1>
32+ <p>
33+ <strong>PAT</strong> (Personal Assistant Thing) is your personal assistant. Start typing
34+ below to start new a conversation thread or pick a previous conversation thread from the
35+ sidebar.
36+ </p>
37+ <hr className="border-neutral-300 dark:border-neutral-700" />
38+ <p className="text-sm text-neutral-600 dark:text-neutral-400">
39+ {timeDisplay && <><em>Current time: {timeDisplay}</em><br /></>}
40+ <em>
41+ {threadCount} {threadCount === 1 ? "thread" : "threads"} created
42+ </em>
43+ </p>
4444 </div>
4545 </div>
4646 );
src/components/Sidebar.tsx+4−4
@@ -29,7 +29,7 @@ export default function Sidebar({
2929 <div className="h-full w-64 overflow-y-auto bg-neutral-200 p-1 dark:bg-neutral-900">
3030 <div className="flex flex-col gap-2 p-4">
3131 <div className="flex flex-col gap-2">
32- <label className="text-sm font-semibold">Threads</label>
32+ <label className="font-semibold">Threads</label>
3333 <div className="flex flex-col gap-1">
3434 <button
3535 onClick={() => onCreateNewThread()}
@@ -39,7 +39,7 @@ export default function Sidebar({
3939 New Thread
4040 </button>
4141 {threads.length === 0 ? (
42- <div className="px-3 py-2 text-sm text-neutral-600 dark:text-neutral-400">
42+ <div className="px-3 py-2 text-neutral-600 dark:text-neutral-400">
4343 No threads yet
4444 </div>
4545 ) : (
@@ -47,7 +47,7 @@ export default function Sidebar({
4747 <button
4848 key={thread.id}
4949 onClick={() => onThreadSelect(thread.id)}
50- className={`border-2 px-3 py-2 text-left text-sm hover:bg-neutral-300 dark:hover:bg-neutral-800 ${
50+ className={`border-2 px-3 py-2 text-left hover:bg-neutral-300 dark:hover:bg-neutral-800 ${
5151 currentThreadId === thread.id
5252 ? "border-green-900 bg-neutral-300 dark:border-green-500 dark:bg-neutral-800"
5353 : "border-transparent bg-neutral-100 dark:bg-neutral-950"
@@ -71,7 +71,7 @@ export default function Sidebar({
7171 )}
7272 </div>
7373 <div className="flex flex-col gap-2">
74- <label className="text-sm font-semibold">Theme</label>
74+ <label className="font-semibold">Theme</label>
7575 <select
7676 value={themeMode}
7777 onChange={(e) => onThemeChange(e.target.value as "device" | "dark" | "light")}
tailwind.config.js+5−1
@@ -2,7 +2,11 @@ module.exports = {
22 content: ["./app/**/*.{js,ts,jsx,tsx}", "./src/**/*.{js,ts,jsx,tsx}"],
33 darkMode: "class",
44 theme: {
5- extend: {},
5+ extend: {
6+ fontFamily: {
7+ sans: ["var(--font-montserrat)", "sans-serif"],
8+ },
9+ },
610 },
711 plugins: [require("@tailwindcss/typography")],
812 };