Skip to content

Commit 0cf1ec5

Browse files
authored
Merge pull request #26 from objectstack-ai/copilot/improve-demo-ui-design
2 parents 14cc664 + cb6ad15 commit 0cf1ec5

File tree

3 files changed

+149
-100
lines changed

3 files changed

+149
-100
lines changed

apps/playground/src/index.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,21 @@
6767
@apply bg-background text-foreground;
6868
}
6969
}
70+
71+
@layer utilities {
72+
/* Dot grid background patterns */
73+
.bg-dot-pattern {
74+
background-image: radial-gradient(circle, #cbd5e1 1.5px, transparent 1.5px);
75+
background-size: 32px 32px;
76+
}
77+
78+
.bg-dot-pattern-sm {
79+
background-image: radial-gradient(circle, #cbd5e1 1px, transparent 1px);
80+
background-size: 20px 20px;
81+
}
82+
83+
/* Custom spinner animation */
84+
.animate-spin-reverse {
85+
animation: spin 1s linear infinite reverse;
86+
}
87+
}

apps/playground/src/pages/Home.tsx

Lines changed: 68 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,59 +19,82 @@ export const Home = () => {
1919
const [activeCategory, setActiveCategory] = useState<string>('Layouts');
2020

2121
return (
22-
<div className="min-h-screen bg-gray-50 text-gray-900">
22+
<div className="min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50 text-gray-900">
2323
{/* Hero Section */}
24-
<header className="bg-white border-b sticky top-0 z-10">
24+
<header className="bg-white/80 backdrop-blur-md border-b border-gray-200/50 sticky top-0 z-20 shadow-sm">
2525
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between">
26-
<div className="flex items-center gap-2">
27-
<div className="bg-indigo-600 p-1.5 rounded-lg">
26+
<div className="flex items-center gap-3">
27+
<div className="bg-gradient-to-br from-indigo-600 to-purple-600 p-2 rounded-xl shadow-lg shadow-indigo-200">
2828
<Box className="w-5 h-5 text-white" />
2929
</div>
30-
<span className="font-bold text-xl tracking-tight">Object UI Studio</span>
30+
<span className="font-bold text-xl tracking-tight bg-gradient-to-r from-gray-900 to-gray-600 bg-clip-text text-transparent">Object UI Studio</span>
3131
</div>
3232
<a
3333
href="https://github.com/objectql/objectui"
3434
target="_blank"
35-
className="text-sm font-medium text-gray-500 hover:text-gray-900 transition-colors"
35+
className="flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 hover:text-gray-900 bg-white/50 hover:bg-white border border-gray-200 rounded-lg transition-all shadow-sm hover:shadow"
3636
>
37+
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
38+
<path fillRule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clipRule="evenodd" />
39+
</svg>
3740
GitHub
3841
</a>
3942
</div>
4043
</header>
4144

42-
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
43-
<div className="text-center mb-16">
44-
<h1 className="text-4xl font-extrabold tracking-tight text-gray-900 sm:text-5xl mb-4">
45+
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
46+
<div className="text-center mb-20 relative">
47+
{/* Decorative elements */}
48+
<div className="absolute inset-0 -z-10 overflow-hidden">
49+
<div className="absolute top-0 left-1/4 w-96 h-96 bg-gradient-to-br from-indigo-200 to-purple-200 rounded-full blur-3xl opacity-30 animate-pulse"></div>
50+
<div className="absolute top-20 right-1/4 w-80 h-80 bg-gradient-to-br from-blue-200 to-cyan-200 rounded-full blur-3xl opacity-30 animate-pulse"></div>
51+
</div>
52+
53+
<div className="inline-flex items-center gap-2 px-4 py-2 bg-indigo-50 border border-indigo-200 rounded-full text-sm font-semibold text-indigo-700 mb-6 shadow-sm">
54+
<span className="relative flex h-2 w-2">
55+
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-indigo-400 opacity-75"></span>
56+
<span className="relative inline-flex rounded-full h-2 w-2 bg-indigo-500"></span>
57+
</span>
58+
Interactive Visual Editor
59+
</div>
60+
61+
<h1 className="text-5xl md:text-6xl lg:text-7xl font-black tracking-tight text-gray-900 mb-6 leading-tight">
4562
Build Stunning Interfaces,<br />
46-
<span className="text-indigo-600">Purely from JSON.</span>
63+
<span className="bg-gradient-to-r from-indigo-600 via-purple-600 to-pink-600 bg-clip-text text-transparent">Purely from JSON.</span>
4764
</h1>
48-
<p className="max-w-2xl mx-auto text-lg text-gray-500">
65+
<p className="max-w-2xl mx-auto text-xl text-gray-600 leading-relaxed">
4966
Object UI transforms JSON schemas into fully functional, accessible, and responsive React applications.
50-
Select a template below to start building.
67+
<br className="hidden sm:block" />
68+
<span className="font-semibold text-gray-700">Select a template below to start building.</span>
5169
</p>
5270
</div>
5371

5472
{/* Category Filter */}
55-
<div className="flex flex-wrap justify-center gap-2 mb-12">
73+
<div className="flex flex-wrap justify-center gap-3 mb-16">
5674
{Object.keys(exampleCategories).map((category) => (
5775
<button
5876
key={category}
5977
onClick={() => setActiveCategory(category)}
6078
className={`
61-
flex items-center gap-2 px-4 py-2 rounded-full text-sm font-medium transition-all
79+
group flex items-center gap-2 px-5 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
6280
${activeCategory === category
63-
? 'bg-gray-900 text-white shadow-lg scale-105'
64-
: 'bg-white text-gray-600 hover:bg-gray-100 border border-gray-200'}
81+
? 'bg-gradient-to-r from-indigo-600 to-purple-600 text-white shadow-lg shadow-indigo-300/50 scale-105'
82+
: 'bg-white text-gray-700 hover:bg-gray-50 border-2 border-gray-200 hover:border-indigo-200 hover:shadow-md'}
6583
`}
6684
>
6785
<CategoryIcon name={category} />
6886
{category}
87+
{activeCategory === category && (
88+
<span className="ml-1 px-2 py-0.5 bg-white/20 rounded-full text-xs font-bold">
89+
{exampleCategories[category as keyof typeof exampleCategories].length}
90+
</span>
91+
)}
6992
</button>
7093
))}
7194
</div>
7295

7396
{/* Examples Grid */}
74-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
97+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
7598
{exampleCategories[activeCategory as keyof typeof exampleCategories].map((key) => {
7699
// Try to parse the example to get a description or just format the title
77100
const title = key.split('-').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' ');
@@ -80,32 +103,44 @@ export const Home = () => {
80103
<div
81104
key={key}
82105
onClick={() => navigate(`/studio/${key}`)}
83-
className="group relative bg-white rounded-2xl border border-gray-200 overflow-hidden hover:shadow-xl transition-all duration-300 cursor-pointer hover:border-indigo-200 flex flex-col h-64"
106+
className="group relative bg-white rounded-2xl border-2 border-gray-200 overflow-hidden hover:shadow-2xl hover:shadow-indigo-500/20 transition-all duration-300 cursor-pointer hover:border-indigo-400 hover:-translate-y-1 flex flex-col h-72"
84107
>
108+
{/* Gradient overlay on hover */}
109+
<div className="absolute inset-0 bg-gradient-to-br from-indigo-500/0 via-purple-500/0 to-pink-500/0 group-hover:from-indigo-500/5 group-hover:via-purple-500/5 group-hover:to-pink-500/5 transition-all duration-500 pointer-events-none z-10"></div>
110+
85111
{/* Mock Preview Window */}
86-
<div className="bg-gray-50 border-b border-gray-100 p-4 flex-1 flex items-center justify-center overflow-hidden">
87-
<div className="w-3/4 h-3/4 bg-white shadow-sm border border-gray-200 rounded-lg flex flex-col opacity-80 group-hover:scale-105 transition-transform duration-500">
88-
<div className="h-4 border-b border-gray-100 bg-gray-50 flex items-center px-2 gap-1">
89-
<div className="w-1.5 h-1.5 rounded-full bg-red-400"></div>
90-
<div className="w-1.5 h-1.5 rounded-full bg-yellow-400"></div>
91-
<div className="w-1.5 h-1.5 rounded-full bg-green-400"></div>
112+
<div className="bg-gradient-to-br from-gray-50 to-slate-100 border-b border-gray-200 p-6 flex-1 flex items-center justify-center overflow-hidden relative">
113+
{/* Decorative grid */}
114+
<div className="absolute inset-0 opacity-20 bg-dot-pattern-sm"></div>
115+
116+
<div className="relative w-3/4 h-3/4 bg-white shadow-xl border-2 border-gray-300 rounded-xl flex flex-col group-hover:scale-110 transition-transform duration-500">
117+
<div className="h-5 border-b-2 border-gray-200 bg-gradient-to-b from-gray-100 to-gray-50 flex items-center px-2 gap-1.5 rounded-t-xl">
118+
<div className="w-2 h-2 rounded-full bg-red-500 shadow-sm"></div>
119+
<div className="w-2 h-2 rounded-full bg-yellow-500 shadow-sm"></div>
120+
<div className="w-2 h-2 rounded-full bg-green-500 shadow-sm"></div>
92121
</div>
93-
<div className="flex-1 p-2">
94-
<div className="space-y-2">
95-
<div className="h-2 bg-gray-100 rounded w-1/2"></div>
96-
<div className="h-2 bg-gray-100 rounded w-3/4"></div>
97-
<div className="h-2 bg-gray-100 rounded w-full"></div>
122+
<div className="flex-1 p-3">
123+
<div className="space-y-2.5">
124+
<div className="h-2.5 bg-gradient-to-r from-indigo-200 to-purple-200 rounded-full w-1/2 animate-pulse"></div>
125+
<div className="h-2.5 bg-gradient-to-r from-blue-200 to-cyan-200 rounded-full w-3/4 animate-pulse [animation-delay:75ms]"></div>
126+
<div className="h-2.5 bg-gradient-to-r from-purple-200 to-pink-200 rounded-full w-full animate-pulse [animation-delay:150ms]"></div>
98127
</div>
99128
</div>
100129
</div>
101130
</div>
102131

103-
<div className="p-5 relative z-10 bg-white">
104-
<h3 className="text-lg font-bold text-gray-900 group-hover:text-indigo-600 transition-colors">
132+
<div className="p-6 relative z-10 bg-white border-t border-gray-100">
133+
<h3 className="text-lg font-bold text-gray-900 group-hover:text-indigo-600 transition-colors mb-2">
105134
{title}
106135
</h3>
107-
<div className="flex items-center text-sm font-medium text-gray-400 mt-2 group-hover:text-indigo-500 transition-colors">
108-
Launch Studio <ArrowRight className="w-4 h-4 ml-1 transform group-hover:translate-x-1 transition-transform" />
136+
<div className="flex items-center justify-between">
137+
<div className="flex items-center text-sm font-semibold text-gray-500 group-hover:text-indigo-600 transition-colors">
138+
Launch Studio
139+
<ArrowRight className="w-4 h-4 ml-2 transform group-hover:translate-x-2 transition-transform" />
140+
</div>
141+
<div className="px-3 py-1 bg-indigo-50 text-indigo-700 rounded-full text-xs font-bold group-hover:bg-indigo-600 group-hover:text-white transition-colors">
142+
Try Now
143+
</div>
109144
</div>
110145
</div>
111146
</div>

0 commit comments

Comments
 (0)