-
-
-
File Explorer
-
-
-
-
-
-
-
- {selectedFile ? (
-
- ) : (
-
-
-
- Select a file from the explorer to edit
-
+ {isMobile ? (
+
+ {mobileCodeView === 'explorer' ? (
+ <>
+
+
File Explorer
-
+
+
+
+ >
+ ) : (
+ <>
+
+
setMobileCodeView('explorer')}
+ className="p-1"
+ >
+
+
+
+ {selectedFile ? selectedFile.split('/').pop() : 'File Editor'}
+
+
+
+ {selectedFile ? (
+
+ ) : (
+
+
+
+
+ Select a file from the explorer to edit
+
+
setMobileCodeView('explorer')}
+ className="mt-4"
+ >
+ Open File Explorer
+
+
+
+ )}
+
+ >
)}
-
+ ) : (
+
+
+
+
File Explorer
+
+
+
+
+
+
+
+ {selectedFile ? (
+
+ ) : (
+
+
+
+ Select a file from the explorer to edit
+
+
+
+ )}
+
+
+ )}
diff --git a/src/index.css b/src/index.css
index 33fdf9de..0feb937c 100644
--- a/src/index.css
+++ b/src/index.css
@@ -4,89 +4,107 @@
@layer base {
:root {
+ /* GitHub-inspired light theme with Shakespeare colors */
--background: 0 0% 100%;
- --foreground: 222.2 84% 4.9%;
+ --foreground: 220 9% 9%;
--card: 0 0% 100%;
- --card-foreground: 222.2 84% 4.9%;
+ --card-foreground: 220 9% 9%;
--popover: 0 0% 100%;
- --popover-foreground: 222.2 84% 4.9%;
+ --popover-foreground: 220 9% 9%;
- --primary: 222.2 47.4% 11.2%;
- --primary-foreground: 210 40% 98%;
+ /* Shakespeare purple as primary */
+ --primary: 271 81% 56%;
+ --primary-foreground: 0 0% 100%;
- --secondary: 210 40% 96.1%;
- --secondary-foreground: 222.2 47.4% 11.2%;
+ /* GitHub-style secondary */
+ --secondary: 220 14% 96%;
+ --secondary-foreground: 220 9% 9%;
- --muted: 210 40% 96.1%;
- --muted-foreground: 215.4 16.3% 46.9%;
+ --muted: 220 14% 96%;
+ --muted-foreground: 220 9% 46%;
- --accent: 210 40% 96.1%;
- --accent-foreground: 222.2 47.4% 11.2%;
+ /* Shakespeare gold as accent */
+ --accent: 45 93% 58%;
+ --accent-foreground: 220 9% 9%;
- --destructive: 0 84.2% 60.2%;
- --destructive-foreground: 210 40% 98%;
+ --destructive: 0 84% 60%;
+ --destructive-foreground: 0 0% 100%;
- --border: 214.3 31.8% 91.4%;
- --input: 214.3 31.8% 91.4%;
- --ring: 222.2 84% 4.9%;
+ /* GitHub-style borders */
+ --border: 220 13% 91%;
+ --input: 220 13% 91%;
+ --ring: 271 81% 56%;
- --radius: 0.5rem;
+ --radius: 0.375rem;
- --sidebar-background: 0 0% 98%;
+ /* Sidebar colors - Enhanced purple theme */
+ --sidebar-background: 271 81% 96%;
+ --sidebar-foreground: 271 81% 15%;
+ --sidebar-primary: 271 81% 56%;
+ --sidebar-primary-foreground: 0 0% 100%;
+ --sidebar-accent: 271 81% 92%;
+ --sidebar-accent-foreground: 271 81% 15%;
+ --sidebar-border: 271 81% 85%;
+ --sidebar-ring: 271 81% 56%;
- --sidebar-foreground: 240 5.3% 26.1%;
-
- --sidebar-primary: 240 5.9% 10%;
-
- --sidebar-primary-foreground: 0 0% 98%;
-
- --sidebar-accent: 240 4.8% 95.9%;
-
- --sidebar-accent-foreground: 240 5.9% 10%;
-
- --sidebar-border: 220 13% 91%;
-
- --sidebar-ring: 217.2 91.2% 59.8%;
+ /* GitHub-style success and warning */
+ --success: 142 76% 36%;
+ --success-foreground: 0 0% 100%;
+ --warning: 45 93% 58%;
+ --warning-foreground: 220 9% 9%;
}
.dark {
- --background: 222.2 84% 4.9%;
- --foreground: 210 40% 98%;
+ /* GitHub-inspired dark theme with Shakespeare colors */
+ --background: 220 13% 9%;
+ --foreground: 220 14% 93%;
- --card: 222.2 84% 4.9%;
- --card-foreground: 210 40% 98%;
+ --card: 220 13% 11%;
+ --card-foreground: 220 14% 93%;
- --popover: 222.2 84% 4.9%;
- --popover-foreground: 210 40% 98%;
+ --popover: 220 13% 11%;
+ --popover-foreground: 220 14% 93%;
- --primary: 210 40% 98%;
- --primary-foreground: 222.2 47.4% 11.2%;
+ /* Shakespeare purple (lighter for dark mode) */
+ --primary: 271 81% 65%;
+ --primary-foreground: 220 13% 9%;
- --secondary: 217.2 32.6% 17.5%;
- --secondary-foreground: 210 40% 98%;
+ /* GitHub dark secondary */
+ --secondary: 220 13% 15%;
+ --secondary-foreground: 220 14% 93%;
- --muted: 217.2 32.6% 17.5%;
- --muted-foreground: 215 20.2% 65.1%;
+ --muted: 220 13% 15%;
+ --muted-foreground: 220 9% 63%;
- --accent: 217.2 32.6% 17.5%;
- --accent-foreground: 210 40% 98%;
+ /* Shakespeare gold (adjusted for dark mode) */
+ --accent: 45 93% 65%;
+ --accent-foreground: 220 13% 9%;
- --destructive: 0 62.8% 30.6%;
- --destructive-foreground: 210 40% 98%;
+ --destructive: 0 84% 60%;
+ --destructive-foreground: 0 0% 100%;
- --border: 217.2 32.6% 17.5%;
- --input: 217.2 32.6% 17.5%;
- --ring: 212.7 26.8% 83.9%;
- --sidebar-background: 240 5.9% 10%;
- --sidebar-foreground: 240 4.8% 95.9%;
- --sidebar-primary: 224.3 76.3% 48%;
- --sidebar-primary-foreground: 0 0% 100%;
- --sidebar-accent: 240 3.7% 15.9%;
- --sidebar-accent-foreground: 240 4.8% 95.9%;
- --sidebar-border: 240 3.7% 15.9%;
- --sidebar-ring: 217.2 91.2% 59.8%;
+ /* GitHub dark borders */
+ --border: 220 13% 18%;
+ --input: 220 13% 18%;
+ --ring: 271 81% 65%;
+
+ /* Sidebar dark colors - Enhanced purple theme */
+ --sidebar-background: 271 81% 8%;
+ --sidebar-foreground: 271 81% 90%;
+ --sidebar-primary: 271 81% 65%;
+ --sidebar-primary-foreground: 271 81% 8%;
+ --sidebar-accent: 271 81% 15%;
+ --sidebar-accent-foreground: 271 81% 90%;
+ --sidebar-border: 271 81% 20%;
+ --sidebar-ring: 271 81% 65%;
+
+ /* Dark mode success and warning */
+ --success: 142 76% 45%;
+ --success-foreground: 0 0% 100%;
+ --warning: 45 93% 65%;
+ --warning-foreground: 220 13% 9%;
}
}
@@ -96,6 +114,151 @@
}
body {
- @apply bg-background text-foreground;
+ @apply bg-background text-foreground font-sans;
+ font-feature-settings: "rlig" 1, "calt" 1;
+ }
+
+ /* GitHub-style scrollbars */
+ ::-webkit-scrollbar {
+ width: 8px;
+ height: 8px;
+ }
+
+ ::-webkit-scrollbar-track {
+ background: transparent;
+ }
+
+ ::-webkit-scrollbar-thumb {
+ background: hsl(var(--border));
+ border-radius: 4px;
+ }
+
+ ::-webkit-scrollbar-thumb:hover {
+ background: hsl(var(--muted-foreground) / 0.5);
+ }
+
+ /* GitHub-style focus rings */
+ .focus-ring {
+ @apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
+ }
+
+ /* Smooth transitions for theme switching */
+ * {
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
+ transition-duration: 150ms;
+ }
+
+ /* Ensure hidden tab content doesn't take up space */
+ [role="tabpanel"][hidden] {
+ display: none !important;
+ }
+
+ /* Custom prose styling for chat messages */
+ .prose {
+ /* Override prose defaults to match chat styling */
+ --tw-prose-body: hsl(var(--foreground));
+ --tw-prose-headings: hsl(var(--foreground));
+ --tw-prose-lead: hsl(var(--muted-foreground));
+ --tw-prose-links: hsl(var(--primary));
+ --tw-prose-bold: hsl(var(--foreground));
+ --tw-prose-counters: hsl(var(--muted-foreground));
+ --tw-prose-bullets: hsl(var(--muted-foreground));
+ --tw-prose-hr: hsl(var(--border));
+ --tw-prose-quotes: hsl(var(--foreground));
+ --tw-prose-quote-borders: hsl(var(--border));
+ --tw-prose-captions: hsl(var(--muted-foreground));
+ --tw-prose-code: hsl(var(--foreground));
+ --tw-prose-pre-code: hsl(var(--foreground));
+ --tw-prose-pre-bg: hsl(var(--muted));
+ --tw-prose-th-borders: hsl(var(--border));
+ --tw-prose-td-borders: hsl(var(--border));
+ }
+
+ .prose.dark\\:prose-invert {
+ --tw-prose-body: hsl(var(--foreground));
+ --tw-prose-headings: hsl(var(--foreground));
+ --tw-prose-lead: hsl(var(--muted-foreground));
+ --tw-prose-links: hsl(var(--primary));
+ --tw-prose-bold: hsl(var(--foreground));
+ --tw-prose-counters: hsl(var(--muted-foreground));
+ --tw-prose-bullets: hsl(var(--muted-foreground));
+ --tw-prose-hr: hsl(var(--border));
+ --tw-prose-quotes: hsl(var(--foreground));
+ --tw-prose-quote-borders: hsl(var(--border));
+ --tw-prose-captions: hsl(var(--muted-foreground));
+ --tw-prose-code: hsl(var(--foreground));
+ --tw-prose-pre-code: hsl(var(--foreground));
+ --tw-prose-pre-bg: hsl(var(--muted));
+ --tw-prose-th-borders: hsl(var(--border));
+ --tw-prose-td-borders: hsl(var(--border));
+ }
+
+ /* Ensure proper spacing in chat messages */
+ .prose p:first-child {
+ margin-top: 0;
+ }
+
+ .prose p:last-child {
+ margin-bottom: 0;
+ }
+
+ /* Compact list styling for chat */
+ .prose ul, .prose ol {
+ margin-top: 0.5rem;
+ margin-bottom: 0.5rem;
+ }
+
+ .prose li {
+ margin-top: 0.25rem;
+ margin-bottom: 0.25rem;
+ }
+
+ /* Compact heading spacing for chat */
+ .prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
+ margin-top: 1rem;
+ margin-bottom: 0.5rem;
+ }
+
+ .prose h1:first-child, .prose h2:first-child, .prose h3:first-child,
+ .prose h4:first-child, .prose h5:first-child, .prose h6:first-child {
+ margin-top: 0;
+ }
+
+ /* Mobile textarea scroll fix */
+ .touch-action-manipulation {
+ touch-action: manipulation;
+ }
+
+ .overscroll-contain {
+ overscroll-behavior: contain;
+ }
+
+ /* Dynamic viewport height support for mobile keyboards */
+ .h-dvh {
+ height: 100dvh;
+ }
+
+ .min-h-dvh {
+ min-height: 100dvh;
+ }
+
+ .max-h-dvh {
+ max-height: 100dvh;
+ }
+
+ /* Fallback for browsers that don't support dvh */
+ @supports not (height: 100dvh) {
+ .h-dvh {
+ height: 100vh;
+ }
+
+ .min-h-dvh {
+ min-height: 100vh;
+ }
+
+ .max-h-dvh {
+ max-height: 100vh;
+ }
}
}
\ No newline at end of file
diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx
index 58b7b4d3..47c99f4c 100644
--- a/src/pages/Index.tsx
+++ b/src/pages/Index.tsx
@@ -57,41 +57,51 @@ export default function Index() {
};
return (
-
-
+
+
-
-
Shakespeare
-
+
+
ðŸŽ
+
+ Shakespeare
+
+
Build custom Nostr websites with AI assistance
-
+
Vibed with MKStack
-
-
+
+
- Create a New Project
-
- Describe what kind of Nostr website you want to build
-
+
+
+
+ Create a New Project
+
+ Describe what kind of Nostr website you want to build
+
+
+
-
Your Projects
+
Your Projects
{isLoading ? (
-
+
{[...Array(6)].map((_, i) => (
-
+
@@ -125,26 +135,37 @@ export default function Index() {
))}
) : projects.length === 0 ? (
-
-
-
No projects yet. Create your first project above!
-
+
+
+
+
+
+ No projects yet. Create your first project above!
+
+
) : (
-
+
{projects.map((project) => (
handleProjectClick(project.id)}
+ tabIndex={0}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') {
+ e.preventDefault();
+ handleProjectClick(project.id);
+ }
+ }}
>
-
- {project.name}
-
+
+ {project.name}
+
Created {project.createdAt.toLocaleDateString()}
-
-
+
+
Last modified {project.lastModified.toLocaleDateString()}
diff --git a/src/pages/ProjectView.tsx b/src/pages/ProjectView.tsx
index 632a46e3..8a9a60c0 100644
--- a/src/pages/ProjectView.tsx
+++ b/src/pages/ProjectView.tsx
@@ -5,17 +5,20 @@ import { useProjectsManager } from '@/hooks/useProjectsManager';
import { ChatPane } from '@/components/Shakespeare/ChatPane';
import { PreviewPane } from '@/components/Shakespeare/PreviewPane';
import { Button } from '@/components/ui/button';
-import { ArrowLeft } from 'lucide-react';
+import { ArrowLeft, MessageSquare, Eye, Code } from 'lucide-react';
import { useNavigate } from 'react-router-dom';
import { AISettingsDialog } from '@/components/ai/AISettingsDialog';
+import { useIsMobile } from '@/hooks/useIsMobile';
export function ProjectView() {
const { projectId } = useParams<{ projectId: string }>();
const [project, setProject] = useState(null);
const [isLoading, setIsLoading] = useState(true);
const [activeTab, setActiveTab] = useState<'preview' | 'code'>('preview');
+ const [mobileView, setMobileView] = useState<'chat' | 'preview' | 'code'>('preview');
const projectsManager = useProjectsManager();
const navigate = useNavigate();
+ const isMobile = useIsMobile();
const loadProject = useCallback(async () => {
if (!projectId) return;
@@ -56,9 +59,76 @@ export function ProjectView() {
);
}
+ if (isMobile) {
+ return (
+
+
+
+
navigate('/')}
+ >
+
+
+
+
{project.name}
+
+
+
+
+
+
+
+ {mobileView === 'chat' && (
+
+ )}
+ {(mobileView === 'preview' || mobileView === 'code') && (
+
+ )}
+
+
+
+
+ setMobileView('chat')}
+ className="flex-1 rounded-none"
+ >
+
+ Chat
+
+ setMobileView('preview')}
+ className="flex-1 rounded-none"
+ >
+
+ Preview
+
+ setMobileView('code')}
+ className="flex-1 rounded-none"
+ >
+
+ Code
+
+
+
+
+ );
+ }
+
return (
-
+
-
{project.name}
+
{project.name}
{project.id}
diff --git a/tailwind.config.ts b/tailwind.config.ts
index a555e6f6..f9465534 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,5 +1,6 @@
import type { Config } from "tailwindcss";
import tailwindcssAnimate from "tailwindcss-animate";
+import typography from "@tailwindcss/typography";
export default {
darkMode: ["class"],
@@ -65,6 +66,14 @@ export default {
'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
border: 'hsl(var(--sidebar-border))',
ring: 'hsl(var(--sidebar-ring))'
+ },
+ success: {
+ DEFAULT: 'hsl(var(--success))',
+ foreground: 'hsl(var(--success-foreground))'
+ },
+ warning: {
+ DEFAULT: 'hsl(var(--warning))',
+ foreground: 'hsl(var(--warning-foreground))'
}
},
borderRadius: {
@@ -96,5 +105,5 @@ export default {
}
}
},
- plugins: [tailwindcssAnimate],
+ plugins: [tailwindcssAnimate, typography],
} satisfies Config;