Skip to content

Commit 0d87de4

Browse files
committed
feat: macos esque page
1 parent 8fbbb53 commit 0d87de4

2 files changed

Lines changed: 45 additions & 9 deletions

File tree

src/layouts/BaseLayout.astro

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,13 +560,20 @@ const iconPaths = {
560560
const isMaximized = windowElement.hasAttribute('data-maximized');
561561

562562
if (isMaximized) {
563-
// Restore window
563+
// Restore window with smooth animation
564+
windowElement.style.transition = 'all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94)';
564565
const originalData = JSON.parse(windowElement.getAttribute('data-original-size'));
566+
windowElement.style.position = 'absolute';
565567
windowElement.style.top = originalData.top;
566568
windowElement.style.left = originalData.left;
569+
windowElement.style.right = 'auto'; // Reset right constraint
570+
windowElement.style.bottom = 'auto'; // Reset bottom constraint
567571
windowElement.style.width = originalData.width;
568572
windowElement.style.height = originalData.height;
573+
windowElement.style.margin = '';
574+
windowElement.style.maxWidth = '';
569575
windowElement.style.resize = 'both';
576+
windowElement.style.borderRadius = ''; // Restore rounded corners
570577
windowElement.removeAttribute('data-maximized');
571578
windowElement.removeAttribute('data-original-size');
572579
} else {
@@ -580,12 +587,19 @@ const iconPaths = {
580587
windowElement.setAttribute('data-original-size', JSON.stringify(originalData));
581588
windowElement.setAttribute('data-maximized', 'true');
582589

583-
// Maximize window
590+
// Maximize window with smooth animation
591+
windowElement.style.transition = 'all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94)';
592+
windowElement.style.position = 'fixed';
584593
windowElement.style.top = '28px'; // Below menu bar
585594
windowElement.style.left = '0px';
595+
windowElement.style.right = '0px'; // Ensure it goes to right edge
596+
windowElement.style.bottom = '120px'; // Above dock
586597
windowElement.style.width = '100vw';
587-
windowElement.style.height = 'calc(100vh - 28px - 100px)'; // Menu bar + dock space
598+
windowElement.style.height = 'calc(100vh - 28px - 120px)'; // Menu bar + dock space
599+
windowElement.style.margin = '0';
600+
windowElement.style.maxWidth = 'none';
588601
windowElement.style.resize = 'none';
602+
windowElement.style.borderRadius = '0px'; // Remove rounded corners in fullscreen
589603
}
590604

591605
this.focusWindow(windowElement);

src/styles/globals.css

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,29 +203,51 @@
203203

204204
/* Widgets Panel */
205205
.widgets-panel {
206-
@apply fixed top-8 right-4 w-80 z-40;
207-
@apply p-6;
206+
position: fixed;
207+
top: 32px;
208+
right: 16px;
209+
width: 320px;
210+
z-index: 9999; /* Above everything */
211+
padding: 24px;
208212
opacity: 0;
209213
visibility: hidden;
210214
transform: scale(0.95) translateY(-10px);
211215
transition: opacity 0.2s ease-out, visibility 0.2s ease-out, transform 0.2s ease-out;
216+
pointer-events: none; /* Don't interfere when hidden */
212217
}
213218

214219
.widgets-panel.active {
215220
opacity: 1;
216221
visibility: visible;
217222
transform: scale(1) translateY(0);
223+
pointer-events: auto; /* Enable interactions when shown */
218224
}
219225

220226
.widget {
221-
@apply bg-white/30 backdrop-blur-xl rounded-2xl p-4 mb-4 border border-white/40;
227+
@apply rounded-2xl p-4 mb-4 border border-white/40;
228+
background: rgba(0, 0, 0, 0.7);
229+
backdrop-filter: blur(20px);
230+
-webkit-backdrop-filter: blur(20px);
222231
box-shadow:
223-
0 8px 32px rgba(0, 0, 0, 0.2),
224-
0 0 0 1px rgba(255, 255, 255, 0.3) inset;
232+
0 10px 40px rgba(0, 0, 0, 0.4),
233+
0 0 0 1px rgba(255, 255, 255, 0.2) inset,
234+
0 2px 8px rgba(0, 0, 0, 0.2);
235+
color: white;
225236
}
226237

227238
.weather-widget {
228-
@apply bg-gradient-to-br from-blue-500/30 to-purple-500/30;
239+
background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(147, 51, 234, 0.9));
240+
backdrop-filter: blur(20px);
241+
-webkit-backdrop-filter: blur(20px);
242+
color: white;
243+
}
244+
245+
.weather-widget .text-white\/60 {
246+
color: rgba(255, 255, 255, 0.8) !important;
247+
}
248+
249+
.weather-widget .text-white\/70 {
250+
color: rgba(255, 255, 255, 0.9) !important;
229251
}
230252

231253
.widgets-toggle {

0 commit comments

Comments
 (0)