|
5 | 5 | import { goto } from '$app/navigation'; |
6 | 6 | import { getProject } from '$lib/auth'; |
7 | 7 | import type { Project } from '$lib/auth'; |
| 8 | + import Button from '$lib/Button.svelte'; |
8 | 9 | |
9 | 10 | let project = $state<Project | null>(null); |
10 | 11 | let loading = $state(true); |
|
51 | 52 | {:else if error} |
52 | 53 | <div class="error">Error: {error}</div> |
53 | 54 | {:else if project} |
54 | | - <div class="project-content"> |
| 55 | + <div class="project-overview"> |
55 | 56 | <div class="project-card-preview"> |
56 | 57 | <img src="/card-blah.svg" alt={project.projectTitle} /> |
57 | 58 | </div> |
58 | 59 |
|
59 | | - <div class="project-details"> |
60 | | - <h1 class="project-title">{project.projectTitle}</h1> |
61 | | - |
62 | | - <p class="project-time">time spent: 2 hours</p> |
63 | | - |
64 | | - <p class="project-description"> |
65 | | - {project.projectDescription} |
66 | | - </p> |
67 | | - |
68 | | - <div class="submit-section"> |
69 | | - <button class="submit-button" disabled={locked}> |
70 | | - SUBMIT → |
71 | | - {#if locked} |
72 | | - <div class="lock-indicator"> |
73 | | - <img src="/lock-circle.svg" alt="Locked" class="lock-circle" /> |
74 | | - <img src="/lock-icon.svg" alt="Locked" class="lock-icon" /> |
75 | | - </div> |
| 60 | + <div class="project-content"> |
| 61 | + <div class="project-details"> |
| 62 | + <div class="project-heading"> |
| 63 | + <h1 class="project-title">{project.projectTitle}</h1> |
| 64 | + {#if project.nowHackatimeHours} |
| 65 | + <h2 class="project-time">2 hours</h2> |
76 | 66 | {/if} |
77 | | - </button> |
| 67 | + </div> |
| 68 | + |
| 69 | + <p class="project-description"> |
| 70 | + {project.description} |
| 71 | + </p> |
78 | 72 | </div> |
| 73 | + |
| 74 | + <div class="submit-section"> |
| 75 | + <Button label="LINK HACKATIME" disabled={false} icon="link" /> |
| 76 | + <img alt="required!" src="/handdrawn_text/required.png" style="width: 140px;" /> |
| 77 | + </div> |
79 | 78 | </div> |
80 | 79 | </div> |
81 | 80 | {/if} |
|
122 | 121 | color: #f24b4b; |
123 | 122 | } |
124 | 123 |
|
125 | | - .project-content { |
| 124 | + .project-overview { |
126 | 125 | display: flex; |
127 | 126 | gap: 47px; |
128 | 127 | } |
|
138 | 137 | height: 100%; |
139 | 138 | } |
140 | 139 |
|
| 140 | + .project-content { |
| 141 | + display: flex; |
| 142 | + flex-direction: column; |
| 143 | + justify-content: space-between; |
| 144 | + } |
| 145 | +
|
141 | 146 | .project-details { |
142 | 147 | flex: 1; |
143 | | - padding-top: 33px; |
| 148 | + } |
| 149 | +
|
| 150 | + .project-heading { |
| 151 | + display: flex; |
| 152 | + flex-direction: row; |
| 153 | + align-items: baseline; |
| 154 | + gap: 8px; |
144 | 155 | } |
145 | 156 |
|
146 | 157 | .project-title { |
147 | 158 | font-family: 'Moga', sans-serif; |
148 | 159 | font-size: 90px; |
149 | 160 | color: white; |
150 | 161 | letter-spacing: -0.99px; |
151 | | - margin: 0 0 10px 0; |
152 | | - line-height: 1.5; |
| 162 | + margin: 0; |
| 163 | + line-height: 1; |
153 | 164 | } |
154 | 165 |
|
155 | 166 | .project-time { |
156 | | - font-family: 'PT Serif', serif; |
157 | | - font-size: 32px; |
| 167 | + font-family: 'Moga', serif; |
| 168 | + font-size: 40px; |
158 | 169 | color: white; |
159 | 170 | letter-spacing: -0.352px; |
160 | | - margin: 0 0 16px 0; |
161 | | - line-height: 1.5; |
| 171 | + margin: 0; |
| 172 | + line-height: 1; |
| 173 | + padding-bottom: 2px; |
162 | 174 | } |
163 | 175 |
|
164 | 176 | .project-description { |
|
173 | 185 |
|
174 | 186 | .submit-section { |
175 | 187 | position: relative; |
176 | | - } |
177 | | -
|
178 | | - .submit-button { |
179 | | - position: relative; |
180 | | - font-family: 'Moga', sans-serif; |
181 | | - font-size: 48px; |
182 | | - color: white; |
183 | | - background: #9a9a9a; |
184 | | - border: none; |
185 | | - padding: 0; |
186 | | - width: 227px; |
187 | | - height: 67px; |
| 188 | + |
188 | 189 | display: flex; |
189 | | - align-items: center; |
190 | | - justify-content: center; |
191 | | - letter-spacing: -0.528px; |
192 | | - line-height: 1.5; |
193 | | - cursor: pointer; |
194 | | - transition: background 0.2s; |
195 | | - } |
196 | | -
|
197 | | - .submit-button:not(:disabled):hover { |
198 | | - background: #b0b0b0; |
199 | | - } |
200 | | -
|
201 | | - .submit-button:disabled { |
202 | | - cursor: not-allowed; |
203 | | - } |
204 | | -
|
205 | | - .lock-indicator { |
206 | | - position: absolute; |
207 | | - top: -12px; |
208 | | - right: -12px; |
209 | | - width: 48px; |
210 | | - height: 48px; |
211 | | - z-index: 1; |
212 | | - } |
213 | | -
|
214 | | - .lock-circle { |
215 | | - position: absolute; |
216 | | - inset: 0; |
217 | | - width: 100%; |
218 | | - height: 100%; |
219 | | - } |
220 | | -
|
221 | | - .lock-icon { |
222 | | - position: absolute; |
223 | | - top: 50%; |
224 | | - left: 50%; |
225 | | - transform: translate(-50%, -50%); |
226 | | - width: 24px; |
227 | | - height: 24px; |
| 190 | + flex-direction: row; |
| 191 | + align-items: end; |
| 192 | + gap: 4px; |
228 | 193 | } |
229 | 194 |
|
230 | 195 | @media (max-width: 1024px) { |
231 | | - .project-content { |
| 196 | + .project-overview { |
232 | 197 | flex-direction: column; |
233 | 198 | } |
234 | 199 |
|
|
261 | 226 | .project-description { |
262 | 227 | font-size: 14px; |
263 | 228 | } |
264 | | -
|
265 | | - .submit-button { |
266 | | - font-size: 36px; |
267 | | - width: 180px; |
268 | | - height: 56px; |
269 | | - } |
270 | 229 | } |
271 | 230 |
|
272 | 231 | @media (max-width: 480px) { |
|
277 | 236 | .project-time { |
278 | 237 | font-size: 20px; |
279 | 238 | } |
280 | | -
|
281 | | - .submit-button { |
282 | | - font-size: 28px; |
283 | | - width: 150px; |
284 | | - height: 48px; |
285 | | - } |
286 | 239 | } |
287 | 240 | </style> |
0 commit comments