Spaces:
Sleeping
Sleeping
Trae Assistant
commited on
Commit
·
9e61ba7
1
Parent(s):
7a8dae8
日常
Browse files- templates/index.html +48 -28
templates/index.html
CHANGED
|
@@ -58,27 +58,49 @@
|
|
| 58 |
<style>
|
| 59 |
@layer base {
|
| 60 |
:root {
|
| 61 |
-
--background:
|
| 62 |
-
--foreground:
|
| 63 |
-
--card:
|
| 64 |
-
--card-foreground:
|
| 65 |
-
--popover:
|
| 66 |
-
--popover-foreground:
|
| 67 |
-
--primary:
|
| 68 |
-
--primary-foreground:
|
| 69 |
-
--secondary:
|
| 70 |
-
--secondary-foreground:
|
| 71 |
-
--muted:
|
| 72 |
-
--muted-foreground:
|
| 73 |
-
--accent:
|
| 74 |
-
--accent-foreground:
|
| 75 |
-
--destructive: 0
|
| 76 |
-
--destructive-foreground:
|
| 77 |
-
--border:
|
| 78 |
-
--input:
|
| 79 |
-
--ring:
|
| 80 |
--radius: 0.5rem;
|
| 81 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
}
|
| 83 |
|
| 84 |
body {
|
|
@@ -103,9 +125,7 @@
|
|
| 103 |
}
|
| 104 |
|
| 105 |
.glass {
|
| 106 |
-
background: rgba(24, 24, 27, 0.6);
|
| 107 |
backdrop-filter: blur(12px);
|
| 108 |
-
border: 1px solid rgba(255, 255, 255, 0.08);
|
| 109 |
}
|
| 110 |
</style>
|
| 111 |
<!-- Phosphor Icons -->
|
|
@@ -114,7 +134,7 @@
|
|
| 114 |
<body>
|
| 115 |
<div id="app" class="flex flex-col h-screen overflow-hidden">
|
| 116 |
<!-- Top Navigation -->
|
| 117 |
-
<header class="h-14 border-b border-border glass flex items-center px-6 sticky top-0 z-50">
|
| 118 |
<div class="flex items-center gap-2 mr-8">
|
| 119 |
<div class="w-6 h-6 bg-primary rounded-md flex items-center justify-center text-primary-foreground font-bold text-xs">A</div>
|
| 120 |
<span class="font-bold text-lg tracking-tight">Aura UI</span>
|
|
@@ -145,7 +165,7 @@
|
|
| 145 |
|
| 146 |
<div class="flex flex-1 overflow-hidden">
|
| 147 |
<!-- Sidebar -->
|
| 148 |
-
<aside class="w-64 border-r border-border bg-background
|
| 149 |
<div class="p-6 space-y-8">
|
| 150 |
<div v-for="(group, groupName) in menuItems" :key="groupName">
|
| 151 |
<h4 class="mb-2 text-sm font-semibold tracking-tight text-foreground">${ groupName }</h4>
|
|
@@ -159,7 +179,7 @@
|
|
| 159 |
:class="{ 'font-medium text-foreground bg-accent/50': currentComponent === item.id }"
|
| 160 |
>
|
| 161 |
${ item.name }
|
| 162 |
-
<span v-if="item.new" class="ml-2 rounded-md bg-
|
| 163 |
</a>
|
| 164 |
</div>
|
| 165 |
</div>
|
|
@@ -206,7 +226,7 @@
|
|
| 206 |
</div>
|
| 207 |
|
| 208 |
<!-- Preview Tab -->
|
| 209 |
-
<div v-if="activeTab === 'preview'" class="relative rounded-xl border border-border bg-background
|
| 210 |
<!-- Native Game Component Rendering -->
|
| 211 |
<div v-if="currentComponent === 'game'" class="w-full h-full flex flex-col min-h-[400px]">
|
| 212 |
<div class="flex items-center justify-between mb-4">
|
|
@@ -272,7 +292,7 @@
|
|
| 272 |
</div>
|
| 273 |
|
| 274 |
<!-- Code Tab -->
|
| 275 |
-
<div v-if="activeTab === 'code'" class="relative rounded-xl border border-border bg-
|
| 276 |
<div class="flex items-center justify-between px-4 py-3 border-b border-border bg-muted/20">
|
| 277 |
<span class="text-xs text-muted-foreground">index.html</span>
|
| 278 |
<button class="text-xs text-muted-foreground hover:text-foreground flex items-center gap-1">
|
|
@@ -288,7 +308,7 @@
|
|
| 288 |
<!-- Installation -->
|
| 289 |
<div class="space-y-4 pt-8">
|
| 290 |
<h3 class="text-2xl font-semibold tracking-tight">安装</h3>
|
| 291 |
-
<div class="rounded-lg border border-border bg-
|
| 292 |
<span class="text-muted-foreground">$</span> npm install @aura-ui/${ activeComponent.id }
|
| 293 |
</div>
|
| 294 |
</div>
|
|
@@ -582,7 +602,7 @@
|
|
| 582 |
<div class="flex items-center space-x-2">
|
| 583 |
<label class="relative inline-flex items-center cursor-pointer">
|
| 584 |
<input type="checkbox" value="" class="sr-only peer">
|
| 585 |
-
<div class="w-11 h-6 bg-input peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-ring peer-focus:ring-offset-2 peer-focus:ring-offset-background rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-background after:border-
|
| 586 |
<span class="ml-3 text-sm font-medium text-foreground">飞行模式</span>
|
| 587 |
</label>
|
| 588 |
</div>
|
|
|
|
| 58 |
<style>
|
| 59 |
@layer base {
|
| 60 |
:root {
|
| 61 |
+
--background: 0 0% 100%;
|
| 62 |
+
--foreground: 240 10% 3.9%;
|
| 63 |
+
--card: 0 0% 100%;
|
| 64 |
+
--card-foreground: 240 10% 3.9%;
|
| 65 |
+
--popover: 0 0% 100%;
|
| 66 |
+
--popover-foreground: 240 10% 3.9%;
|
| 67 |
+
--primary: 240 5.9% 10%;
|
| 68 |
+
--primary-foreground: 0 0% 98%;
|
| 69 |
+
--secondary: 240 4.8% 95.9%;
|
| 70 |
+
--secondary-foreground: 240 5.9% 10%;
|
| 71 |
+
--muted: 240 4.8% 95.9%;
|
| 72 |
+
--muted-foreground: 240 3.8% 46.1%;
|
| 73 |
+
--accent: 240 4.8% 95.9%;
|
| 74 |
+
--accent-foreground: 240 5.9% 10%;
|
| 75 |
+
--destructive: 0 84.2% 60.2%;
|
| 76 |
+
--destructive-foreground: 0 0% 98%;
|
| 77 |
+
--border: 240 5.9% 90%;
|
| 78 |
+
--input: 240 5.9% 90%;
|
| 79 |
+
--ring: 240 10% 3.9%;
|
| 80 |
--radius: 0.5rem;
|
| 81 |
}
|
| 82 |
+
|
| 83 |
+
.dark {
|
| 84 |
+
--background: 240 10% 3.9%;
|
| 85 |
+
--foreground: 0 0% 98%;
|
| 86 |
+
--card: 240 10% 3.9%;
|
| 87 |
+
--card-foreground: 0 0% 98%;
|
| 88 |
+
--popover: 240 10% 3.9%;
|
| 89 |
+
--popover-foreground: 0 0% 98%;
|
| 90 |
+
--primary: 0 0% 98%;
|
| 91 |
+
--primary-foreground: 240 5.9% 10%;
|
| 92 |
+
--secondary: 240 3.7% 15.9%;
|
| 93 |
+
--secondary-foreground: 0 0% 98%;
|
| 94 |
+
--muted: 240 3.7% 15.9%;
|
| 95 |
+
--muted-foreground: 240 5% 64.9%;
|
| 96 |
+
--accent: 240 3.7% 15.9%;
|
| 97 |
+
--accent-foreground: 0 0% 98%;
|
| 98 |
+
--destructive: 0 62.8% 30.6%;
|
| 99 |
+
--destructive-foreground: 0 0% 98%;
|
| 100 |
+
--border: 240 3.7% 15.9%;
|
| 101 |
+
--input: 240 3.7% 15.9%;
|
| 102 |
+
--ring: 240 4.9% 83.9%;
|
| 103 |
+
}
|
| 104 |
}
|
| 105 |
|
| 106 |
body {
|
|
|
|
| 125 |
}
|
| 126 |
|
| 127 |
.glass {
|
|
|
|
| 128 |
backdrop-filter: blur(12px);
|
|
|
|
| 129 |
}
|
| 130 |
</style>
|
| 131 |
<!-- Phosphor Icons -->
|
|
|
|
| 134 |
<body>
|
| 135 |
<div id="app" class="flex flex-col h-screen overflow-hidden">
|
| 136 |
<!-- Top Navigation -->
|
| 137 |
+
<header class="h-14 border-b border-border bg-background/80 glass flex items-center px-6 sticky top-0 z-50">
|
| 138 |
<div class="flex items-center gap-2 mr-8">
|
| 139 |
<div class="w-6 h-6 bg-primary rounded-md flex items-center justify-center text-primary-foreground font-bold text-xs">A</div>
|
| 140 |
<span class="font-bold text-lg tracking-tight">Aura UI</span>
|
|
|
|
| 165 |
|
| 166 |
<div class="flex flex-1 overflow-hidden">
|
| 167 |
<!-- Sidebar -->
|
| 168 |
+
<aside class="w-64 border-r border-border bg-background overflow-y-auto hidden md:block">
|
| 169 |
<div class="p-6 space-y-8">
|
| 170 |
<div v-for="(group, groupName) in menuItems" :key="groupName">
|
| 171 |
<h4 class="mb-2 text-sm font-semibold tracking-tight text-foreground">${ groupName }</h4>
|
|
|
|
| 179 |
:class="{ 'font-medium text-foreground bg-accent/50': currentComponent === item.id }"
|
| 180 |
>
|
| 181 |
${ item.name }
|
| 182 |
+
<span v-if="item.new" class="ml-2 rounded-md bg-primary px-1.5 py-0.5 text-xs leading-none text-primary-foreground no-underline group-hover:no-underline font-bold">New</span>
|
| 183 |
</a>
|
| 184 |
</div>
|
| 185 |
</div>
|
|
|
|
| 226 |
</div>
|
| 227 |
|
| 228 |
<!-- Preview Tab -->
|
| 229 |
+
<div v-if="activeTab === 'preview'" class="relative rounded-xl border border-border bg-background shadow-sm min-h-[350px] flex items-center justify-center p-10 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2">
|
| 230 |
<!-- Native Game Component Rendering -->
|
| 231 |
<div v-if="currentComponent === 'game'" class="w-full h-full flex flex-col min-h-[400px]">
|
| 232 |
<div class="flex items-center justify-between mb-4">
|
|
|
|
| 292 |
</div>
|
| 293 |
|
| 294 |
<!-- Code Tab -->
|
| 295 |
+
<div v-if="activeTab === 'code'" class="relative rounded-xl border border-border bg-muted shadow-sm overflow-hidden">
|
| 296 |
<div class="flex items-center justify-between px-4 py-3 border-b border-border bg-muted/20">
|
| 297 |
<span class="text-xs text-muted-foreground">index.html</span>
|
| 298 |
<button class="text-xs text-muted-foreground hover:text-foreground flex items-center gap-1">
|
|
|
|
| 308 |
<!-- Installation -->
|
| 309 |
<div class="space-y-4 pt-8">
|
| 310 |
<h3 class="text-2xl font-semibold tracking-tight">安装</h3>
|
| 311 |
+
<div class="rounded-lg border border-border bg-muted px-4 py-3 font-mono text-sm text-foreground">
|
| 312 |
<span class="text-muted-foreground">$</span> npm install @aura-ui/${ activeComponent.id }
|
| 313 |
</div>
|
| 314 |
</div>
|
|
|
|
| 602 |
<div class="flex items-center space-x-2">
|
| 603 |
<label class="relative inline-flex items-center cursor-pointer">
|
| 604 |
<input type="checkbox" value="" class="sr-only peer">
|
| 605 |
+
<div class="w-11 h-6 bg-input peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-ring peer-focus:ring-offset-2 peer-focus:ring-offset-background rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-background after:border-border after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
|
| 606 |
<span class="ml-3 text-sm font-medium text-foreground">飞行模式</span>
|
| 607 |
</label>
|
| 608 |
</div>
|