playcademy 0.12.4 → 0.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,9 +20,28 @@
20
20
  <body
21
21
  class="min-h-screen flex items-center justify-center bg-black dark:bg-white transition-colors relative overflow-hidden"
22
22
  >
23
+ <!-- Top left badges -->
24
+ <a
25
+ href="{{PLAYCADEMY_HUB_URL}}"
26
+ target="_blank"
27
+ rel="noopener noreferrer"
28
+ class="fixed top-5 left-5 px-2 py-1 rounded bg-[rgba(23,23,23,0.9)] hover:bg-[rgba(23,23,23,1)] dark:bg-[rgba(255,255,255,0.9)] dark:hover:bg-[rgba(255,255,255,1)] text-white dark:text-black border border-white/20 dark:border-black/20 backdrop-blur-lg transition-colors z-[9999] no-underline"
29
+ style="font-family: 'VT323', monospace; font-size: 1rem; letter-spacing: 0.05em"
30
+ >
31
+ PLAYCADEMY
32
+ </a>
33
+ <a
34
+ href="/api"
35
+ class="fixed top-5 left-[7.5rem] px-2 py-1 rounded bg-[rgba(23,23,23,0.9)] hover:bg-[rgba(23,23,23,1)] dark:bg-[rgba(255,255,255,0.9)] dark:hover:bg-[rgba(255,255,255,1)] text-white dark:text-black border border-white/20 dark:border-black/20 backdrop-blur-lg transition-colors z-[9999] no-underline"
36
+ style="font-family: 'VT323', monospace; font-size: 1rem; letter-spacing: 0.05em"
37
+ >
38
+ VIEW ROUTES
39
+ </a>
40
+
41
+ <!-- Theme toggle -->
23
42
  <button
24
43
  id="themeToggle"
25
- class="fixed top-5 right-5 w-8 h-8 flex items-center justify-center cursor-pointer opacity-40 hover:opacity-100 transition-opacity"
44
+ class="fixed top-5 right-5 w-8 h-8 flex items-center justify-center cursor-pointer opacity-40 hover:opacity-100 transition-opacity z-[9999]"
26
45
  >
27
46
  <svg
28
47
  id="sunIcon"
@@ -96,45 +115,14 @@
96
115
  ></div>
97
116
  </div>
98
117
 
99
- <div class="max-w-2xl mx-auto px-6 py-12 relative z-10">
100
- <div class="text-center space-y-8">
101
- <div>
102
- <h1
103
- class="text-4xl md:text-5xl font-bold text-white dark:text-black mb-3"
104
- style="font-family: 'Tomorrow', sans-serif; letter-spacing: -0.02em"
105
- >
106
- {{GAME_NAME}}
107
- </h1>
108
- <p
109
- class="text-lg text-gray-500 dark:text-gray-500"
110
- style="font-family: 'VT323', monospace; letter-spacing: 0.1em"
111
- >
112
- GAME BACKEND API
113
- </p>
114
- </div>
115
-
116
- <a
117
- href="/api"
118
- class="inline-block px-8 py-2.5 bg-white dark:bg-black text-black dark:text-white rounded border-2 border-white dark:border-black hover:bg-gray-200 dark:hover:bg-gray-800 transition-colors"
119
- style="font-family: 'VT323', monospace; letter-spacing: 0.05em; font-size: 1rem"
120
- >
121
- VIEW ROUTES →
122
- </a>
123
-
124
- <div
125
- class="pt-8 text-xs text-gray-600 dark:text-gray-500"
126
- style="font-family: 'VT323', monospace; letter-spacing: 0.05em"
127
- >
128
- POWERED BY
129
- <a
130
- href="{{PLAYCADEMY_HUB_URL}}"
131
- target="_blank"
132
- rel="noopener noreferrer"
133
- class="font-bold hover:text-gray-500 dark:hover:text-gray-600 transition-colors underline decoration-dotted underline-offset-2"
134
- >PLAYCADEMY</a
135
- >
136
- </div>
137
- </div>
118
+ <!-- Center content -->
119
+ <div class="relative z-10">
120
+ <h1
121
+ class="text-6xl md:text-7xl lg:text-6xl font-bold text-white dark:text-black text-center"
122
+ style="font-family: 'Tomorrow', sans-serif; letter-spacing: -0.02em"
123
+ >
124
+ {{GAME_NAME}}
125
+ </h1>
138
126
  </div>
139
127
 
140
128
  <script>
@@ -155,10 +143,9 @@
155
143
  }
156
144
  }
157
145
 
158
- // Initialize theme from localStorage or system preference
146
+ // Initialize theme from localStorage, defaulting to dark mode
159
147
  const savedTheme = localStorage.getItem('theme')
160
- const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
161
- const isDark = savedTheme === 'dark' || (!savedTheme && prefersDark)
148
+ const isDark = savedTheme !== 'light' // Default to dark unless explicitly set to light
162
149
  setTheme(isDark)
163
150
 
164
151
  // Toggle on click
@@ -173,12 +160,27 @@
173
160
  // Pixel Trail Effect
174
161
  const pixelTrail = document.getElementById('pixelTrail')
175
162
  const PIXEL_SIZE = 20 // px
176
- const FADE_DURATION = 500 // ms
163
+ const FADE_DURATION = 300 // ms
164
+
165
+ // Arcade color palette - vibrant neon colors
166
+ const ARCADE_COLORS = [
167
+ 'rgba(255, 0, 255, 0.8)', // Neon Pink/Magenta
168
+ 'rgba(0, 255, 255, 0.8)', // Neon Cyan
169
+ 'rgba(255, 255, 0, 0.8)', // Neon Yellow
170
+ 'rgba(0, 255, 0, 0.8)', // Neon Green
171
+ 'rgba(255, 105, 180, 0.8)', // Hot Pink
172
+ 'rgba(138, 43, 226, 0.8)', // Blue Violet
173
+ 'rgba(50, 205, 50, 0.8)', // Lime Green
174
+ ]
177
175
 
178
176
  let pixelGrid = {}
179
177
  let columns = 0
180
178
  let rows = 0
181
179
 
180
+ function getRandomArcadeColor() {
181
+ return ARCADE_COLORS[Math.floor(Math.random() * ARCADE_COLORS.length)]
182
+ }
183
+
182
184
  function initPixelGrid() {
183
185
  const width = window.innerWidth
184
186
  const height = window.innerHeight
@@ -200,12 +202,7 @@
200
202
  pixel.style.top = `${row * PIXEL_SIZE}px`
201
203
  pixel.style.opacity = '0'
202
204
  pixel.style.transitionDuration = `${FADE_DURATION}ms`
203
-
204
- // Add a subtle background color based on theme
205
- const isDark = html.classList.contains('dark')
206
- pixel.style.backgroundColor = isDark
207
- ? 'rgba(0, 0, 0, 0.4)'
208
- : 'rgba(255, 255, 255, 0.4)'
205
+ pixel.style.borderRadius = '2px' // Slight rounding for arcade feel
209
206
 
210
207
  pixelTrail.appendChild(pixel)
211
208
  pixelGrid[`${col}-${row}`] = pixel
@@ -221,6 +218,9 @@
221
218
  // Cancel any ongoing animation
222
219
  clearTimeout(pixel.fadeTimeout)
223
220
 
221
+ // Assign random arcade color
222
+ pixel.style.backgroundColor = getRandomArcadeColor()
223
+
224
224
  // Show pixel
225
225
  pixel.style.opacity = '1'
226
226
 
@@ -248,18 +248,6 @@
248
248
  clearTimeout(resizeTimeout)
249
249
  resizeTimeout = setTimeout(initPixelGrid, 200)
250
250
  })
251
-
252
- // Update pixel colors when theme changes
253
- const originalSetTheme = setTheme
254
- setTheme = function (isDark) {
255
- originalSetTheme(isDark)
256
- // Update all pixel colors
257
- Object.values(pixelGrid).forEach(pixel => {
258
- pixel.style.backgroundColor = isDark
259
- ? 'rgba(0, 0, 0, 0.4)'
260
- : 'rgba(255, 255, 255, 0.4)'
261
- })
262
- }
263
251
  </script>
264
252
  </body>
265
253
  </html>
package/dist/index.js CHANGED
@@ -5382,7 +5382,6 @@ function generateEntryCode(customRoutes, customRoutesDir) {
5382
5382
  init_core();
5383
5383
  import { existsSync as existsSync9 } from "fs";
5384
5384
  import { join as join8 } from "path";
5385
- import { generateSQLiteDrizzleJson, generateSQLiteMigration } from "drizzle-kit/api";
5386
5385
 
5387
5386
  // src/lib/init/prompts.ts
5388
5387
  init_constants3();
@@ -5642,6 +5641,8 @@ async function getSchemaInfo(previousSchemaSnapshot) {
5642
5641
  return null;
5643
5642
  }
5644
5643
  try {
5644
+ const drizzleKitApi = await import("drizzle-kit/api");
5645
+ const { generateSQLiteDrizzleJson, generateSQLiteMigration } = drizzleKitApi;
5645
5646
  const schemaModule = await import(schemaPath);
5646
5647
  const currentSchema = schemaModule.default || schemaModule;
5647
5648
  const nextJson = await generateSQLiteDrizzleJson(currentSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playcademy",
3
- "version": "0.12.4",
3
+ "version": "0.12.5",
4
4
  "type": "module",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",