|
6 | 6 | import Viewport from './panels/Viewport.svelte'; |
7 | 7 |
|
8 | 8 | let layoutRef: HTMLDivElement; |
| 9 | + let currentTime = ''; |
| 10 | +
|
| 11 | + function updateTime() { |
| 12 | + const now = new Date(); |
| 13 | + const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; |
| 14 | + const dayName = days[now.getDay()]; |
| 15 | + const hours = now.getHours().toString().padStart(2, '0'); |
| 16 | + const minutes = now.getMinutes().toString().padStart(2, '0'); |
| 17 | + currentTime = `${dayName} ${hours}:${minutes}`; |
| 18 | + } |
9 | 19 |
|
10 | 20 | onMount(() => { |
11 | | - // Apply theme variables to layout (from omarchy-theme-builder) |
| 21 | + // Apply theme variables to layout |
12 | 22 | cssVariables.subscribe((variables) => { |
13 | 23 | if (layoutRef) { |
14 | 24 | Object.entries(variables).forEach(([key, value]) => { |
15 | 25 | layoutRef.style.setProperty(key, value); |
16 | 26 | }); |
17 | 27 | } |
18 | 28 | }); |
| 29 | +
|
| 30 | + // Update time immediately and then every second |
| 31 | + updateTime(); |
| 32 | + const timeInterval = setInterval(updateTime, 1000); |
| 33 | +
|
| 34 | + return () => { |
| 35 | + clearInterval(timeInterval); |
| 36 | + }; |
19 | 37 | }); |
20 | 38 | </script> |
21 | 39 |
|
22 | 40 | <div |
23 | 41 | bind:this={layoutRef} |
24 | | - class="layout-container w-screen h-screen overflow-hidden relative" |
25 | | - style="font-family: 'Inter', sans-serif;" |
| 42 | + class="desktop-container w-screen h-screen overflow-hidden relative" |
| 43 | + style="font-family: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;" |
26 | 44 | > |
27 | | - <!-- Background (adapted from omarchy-theme-builder) --> |
28 | | - <div class="layout-background absolute inset-0"> |
| 45 | + <!-- Desktop Background --> |
| 46 | + <div class="desktop-background absolute inset-0"> |
29 | 47 | <div |
30 | 48 | class="absolute inset-0" |
31 | 49 | style=" |
|
39 | 57 | ></div> |
40 | 58 | </div> |
41 | 59 |
|
42 | | - <!-- Top Bar --> |
| 60 | + <!-- Top Bar (Waybar-style) --> |
43 | 61 | <div |
44 | | - class="top-bar h-12 flex items-center justify-between px-6 border-b relative z-20" |
| 62 | + class="top-bar h-8 flex items-center justify-between px-4 text-xs border-b frosted-glass relative z-20" |
45 | 63 | style=" |
46 | | - background: var(--petalytics-surface); |
| 64 | + background: rgba(31, 29, 46, 0.8); |
47 | 65 | border-color: var(--petalytics-border); |
48 | 66 | color: var(--petalytics-text); |
| 67 | + backdrop-filter: blur(12px); |
| 68 | + -webkit-backdrop-filter: blur(12px); |
49 | 69 | " |
50 | 70 | > |
51 | | - <div class="flex items-center space-x-3"> |
| 71 | + <!-- Left: Workspaces / Logo --> |
| 72 | + <div class="flex items-center space-x-4"> |
52 | 73 | <div |
53 | | - class="w-8 h-8 rounded-full bg-gradient-to-r from-green-400 to-blue-500 flex items-center justify-center" |
| 74 | + class="px-2 h-5 flex items-center justify-center text-xs font-mono" |
| 75 | + style="background: var(--petalytics-pine); color: var(--petalytics-bg);" |
54 | 76 | > |
55 | | - <span class="text-white font-bold text-sm">🐾</span> |
| 77 | + 🐾 |
56 | 78 | </div> |
57 | | - <h1 class="text-lg font-semibold" style="color: var(--petalytics-text);">Petalytics</h1> |
| 79 | + <span class="font-mono" style="color: var(--petalytics-foam);">petalytics@desktop</span> |
58 | 80 | </div> |
59 | 81 |
|
60 | | - <div class="text-sm" style="color: var(--petalytics-subtle);">Pet Journal & AI Insights</div> |
| 82 | + <!-- Center: Current Time --> |
| 83 | + <div class="font-mono font-medium" style="color: var(--petalytics-subtle);"> |
| 84 | + {currentTime} |
| 85 | + </div> |
| 86 | + |
| 87 | + <!-- Right: System Status --> |
| 88 | + <div class="flex items-center space-x-3 text-xs font-mono"> |
| 89 | + <div class="flex items-center space-x-1"> |
| 90 | + <span style="color: var(--petalytics-foam);">●</span> |
| 91 | + <span style="color: var(--petalytics-subtle);">journal</span> |
| 92 | + </div> |
| 93 | + <div class="flex items-center space-x-1"> |
| 94 | + <span style="color: var(--petalytics-gold);">●</span> |
| 95 | + <span style="color: var(--petalytics-subtle);">ai</span> |
| 96 | + </div> |
| 97 | + </div> |
61 | 98 | </div> |
62 | 99 |
|
63 | | - <!-- Main 3-Panel Layout --> |
64 | | - <div class="main-layout flex h-full gap-4 p-4 relative z-10" style="height: calc(100vh - 3rem);"> |
| 100 | + <!-- Main Layout --> |
| 101 | + <div |
| 102 | + class="main-layout flex h-full gap-2 p-2 relative z-10" |
| 103 | + style="height: calc(100vh - 2rem);" |
| 104 | + > |
65 | 105 | <!-- Left Column: Stacked Panels --> |
66 | | - <div class="left-column flex flex-col gap-4 w-1/2 lg:w-2/5"> |
| 106 | + <div class="left-column flex flex-col gap-2 flex-1"> |
| 107 | + <!-- Guardian Panel --> |
67 | 108 | <div class="guardian-panel flex-1 frosted-panel"> |
68 | 109 | <GuardianPanel /> |
69 | 110 | </div> |
| 111 | + <!-- Pet Panel --> |
70 | 112 | <div class="pet-panel flex-1 frosted-panel"> |
71 | 113 | <PetPanel /> |
72 | 114 | </div> |
|
81 | 123 |
|
82 | 124 | <style> |
83 | 125 | .frosted-panel { |
84 | | - background: var(--petalytics-surface); |
85 | | - border: 1px solid var(--petalytics-border); |
86 | | - border-radius: 12px; |
87 | | - box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); |
88 | | - overflow: hidden; |
| 126 | + background: rgba(25, 23, 36, 0.9); |
| 127 | + border: 1px solid rgba(38, 35, 58, 0.5); |
89 | 128 | backdrop-filter: blur(16px); |
90 | 129 | -webkit-backdrop-filter: blur(16px); |
| 130 | + border-radius: 0; |
| 131 | + overflow: hidden; |
91 | 132 | } |
92 | 133 |
|
93 | 134 | .left-column { |
94 | 135 | min-height: 0; |
| 136 | + width: 400px; |
| 137 | + flex-shrink: 0; |
95 | 138 | } |
96 | 139 |
|
97 | 140 | .left-column .guardian-panel, |
|
100 | 143 | max-height: 55%; |
101 | 144 | } |
102 | 145 |
|
| 146 | + .viewport-column { |
| 147 | + flex: 1; |
| 148 | + min-width: 0; |
| 149 | + } |
| 150 | +
|
103 | 151 | @media (max-width: 768px) { |
104 | 152 | .main-layout { |
105 | 153 | flex-direction: column; |
106 | | - gap: 16px; |
| 154 | + gap: 8px; |
107 | 155 | } |
108 | 156 | .left-column { |
109 | 157 | width: 100%; |
110 | 158 | flex-direction: row; |
111 | 159 | height: 40%; |
112 | | - gap: 16px; |
| 160 | + gap: 8px; |
113 | 161 | } |
114 | 162 | .viewport-column { |
115 | | - width: 100%; |
116 | 163 | height: 60%; |
117 | 164 | } |
118 | 165 | } |
|
0 commit comments