🎨 frosty blue hour redesign
Browse files at this commit4de8815161c4ca37b96eefdda78526c558ed4169Parent: 5d4b0e7All checks have passed
Show checks
ci/buildSucceededDetails
- feat
- 🎨 frosty blue hour redesign
9 changed files +124 -413
- assets/fonts/archivo-latin-ext-wdth.woff2 +0 -0
- assets/fonts/archivo-latin-wdth.woff2 +0 -0
- assets/main.css +88 -312
- src/app.rs +14 -66
- src/app/assets.rs +0 -2
- src/app/posts.rs +4 -14
- src/app/posts/slug.rs +2 -2
- src/app/projects.rs +14 -15
- src/app/projects/slug.rs +2 -2
assets/fonts/archivo-latin-ext-wdth.woff2deleted+0 -0
Binary file changed
assets/fonts/archivo-latin-wdth.woff2deleted+0 -0
Binary file changed
assets/main.cssmodified+88 -312
| @@ -1,21 +1,3 @@ | ||
| 1 | -@font-face { | |
| 2 | - font-family: "Archivo"; | |
| 3 | - src: url("/fonts/archivo-latin-wdth.woff2") format("woff2"); | |
| 4 | - font-weight: 100 900; | |
| 5 | - font-stretch: 62% 125%; | |
| 6 | - font-display: swap; | |
| 7 | - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | |
| 8 | -} | |
| 9 | - | |
| 10 | -@font-face { | |
| 11 | - font-family: "Archivo"; | |
| 12 | - src: url("/fonts/archivo-latin-ext-wdth.woff2") format("woff2"); | |
| 13 | - font-weight: 100 900; | |
| 14 | - font-stretch: 62% 125%; | |
| 15 | - font-display: swap; | |
| 16 | - unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; | |
| 17 | -} | |
| 18 | - | |
| 19 | 1 | @font-face { |
| 20 | 2 | font-family: "Inter"; |
| 21 | 3 | src: url("/fonts/inter-latin-wght.woff2") format("woff2"); |
| @@ -49,17 +31,14 @@ | ||
| 49 | 31 | } |
| 50 | 32 | |
| 51 | 33 | :root { |
| 52 | - --bg: #F5F5F4; | |
| 53 | - --text: #18181B; | |
| 54 | - --body: #3F3F46; | |
| 55 | - --muted: #63636B; | |
| 56 | - --line: #E4E4E7; | |
| 57 | - --strong: #D4D4D8; | |
| 58 | - --accent: #C2410C; | |
| 59 | - --spark: #FF6A13; | |
| 60 | - --gutter: 40px; | |
| 34 | + --bg: #070b14; | |
| 35 | + --text: #e2e2e7; | |
| 36 | + --muted: #8c919a; | |
| 37 | + --line: rgba(164, 200, 255, 0.09); | |
| 38 | + --accent: #a4c8ff; | |
| 39 | + --warm: #ffce9c; | |
| 40 | + --gutter: 48px; | |
| 61 | 41 | --font-sans: "Inter", system-ui, sans-serif; |
| 62 | - --font-display: "Archivo", sans-serif; | |
| 63 | 42 | --font-mono: "JetBrains Mono", monospace; |
| 64 | 43 | } |
| 65 | 44 | |
| @@ -67,16 +46,31 @@ | ||
| 67 | 46 | box-sizing: border-box; |
| 68 | 47 | } |
| 69 | 48 | |
| 49 | +html { | |
| 50 | + background: var(--bg); | |
| 51 | +} | |
| 52 | + | |
| 70 | 53 | body { |
| 71 | 54 | margin: 0; |
| 72 | - background: var(--bg); | |
| 55 | + min-height: 100vh; | |
| 56 | + padding: 72px 20px; | |
| 73 | 57 | color: var(--text); |
| 74 | 58 | font-family: var(--font-sans); |
| 59 | + line-height: 1.6; | |
| 60 | + background: | |
| 61 | + radial-gradient(4px 4px at 12% 10%, #ffd28a, transparent), | |
| 62 | + radial-gradient(260px 180px at 12% 10%, rgba(255, 196, 110, 0.13), transparent), | |
| 63 | + radial-gradient(3px 3px at 90% 18%, #ffd28a, transparent), | |
| 64 | + radial-gradient(180px 130px at 90% 18%, rgba(255, 196, 110, 0.09), transparent), | |
| 65 | + radial-gradient(120% 45% at 50% 105%, rgba(120, 160, 220, 0.28), transparent 70%), | |
| 66 | + linear-gradient(#070b14, #0c1526 55%, #13213a); | |
| 67 | + background-attachment: fixed; | |
| 75 | 68 | } |
| 76 | 69 | |
| 77 | 70 | a { |
| 78 | 71 | color: inherit; |
| 79 | 72 | text-decoration: none; |
| 73 | + transition: color 0.15s; | |
| 80 | 74 | } |
| 81 | 75 | |
| 82 | 76 | a:hover { |
| @@ -87,62 +81,33 @@ h1, h2, p { | ||
| 87 | 81 | margin: 0; |
| 88 | 82 | } |
| 89 | 83 | |
| 90 | -.wrap { | |
| 91 | - max-width: 1120px; | |
| 84 | +.glass { | |
| 85 | + max-width: 720px; | |
| 92 | 86 | margin: 0 auto; |
| 93 | - padding: 0 var(--gutter); | |
| 94 | -} | |
| 95 | - | |
| 96 | -.stack { | |
| 97 | - display: flex; | |
| 98 | - flex-direction: column; | |
| 99 | - gap: 28px; | |
| 100 | -} | |
| 101 | - | |
| 102 | -.arrow { | |
| 103 | - color: var(--muted); | |
| 104 | -} | |
| 105 | - | |
| 106 | -.index, | |
| 107 | -.more, | |
| 108 | -.eyebrow, | |
| 109 | -.back, | |
| 110 | -.meta, | |
| 111 | -.post-date, | |
| 112 | -.project-index, | |
| 113 | -.project-row-summary, | |
| 114 | -.footer-inner, | |
| 115 | -.nav { | |
| 116 | - font-family: var(--font-mono); | |
| 117 | - font-size: 13px; | |
| 87 | + padding: 36px var(--gutter) 40px; | |
| 88 | + border-radius: 24px; | |
| 89 | + background: rgba(17, 19, 23, 0.5); | |
| 90 | + backdrop-filter: blur(24px) saturate(1.2); | |
| 91 | + border: 1px solid rgba(164, 200, 255, 0.13); | |
| 92 | + box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); | |
| 118 | 93 | } |
| 119 | 94 | |
| 120 | 95 | .site-header { |
| 121 | - border-bottom: 1px solid var(--line); | |
| 122 | - padding: 0 var(--gutter); | |
| 123 | -} | |
| 124 | - | |
| 125 | -.header-inner { | |
| 126 | - min-height: 64px; | |
| 127 | 96 | display: flex; |
| 128 | - align-items: center; | |
| 129 | 97 | justify-content: space-between; |
| 98 | + align-items: center; | |
| 130 | 99 | gap: 16px; |
| 131 | 100 | flex-wrap: wrap; |
| 132 | 101 | } |
| 133 | 102 | |
| 134 | 103 | .wordmark { |
| 135 | - font-family: var(--font-display); | |
| 136 | - font-stretch: 112%; | |
| 137 | - font-weight: 700; | |
| 138 | - font-size: 18px; | |
| 139 | - letter-spacing: -0.02em; | |
| 104 | + font-weight: 500; | |
| 105 | + color: var(--warm); | |
| 140 | 106 | } |
| 141 | 107 | |
| 142 | 108 | .nav { |
| 143 | 109 | display: flex; |
| 144 | - gap: 28px; | |
| 145 | - flex-wrap: wrap; | |
| 110 | + gap: 22px; | |
| 146 | 111 | color: var(--muted); |
| 147 | 112 | } |
| 148 | 113 | |
| @@ -150,311 +115,122 @@ h1, h2, p { | ||
| 150 | 115 | color: var(--text); |
| 151 | 116 | } |
| 152 | 117 | |
| 153 | -.hero { | |
| 154 | - padding: 128px 0; | |
| 155 | - border-bottom: 1px solid var(--line); | |
| 156 | -} | |
| 157 | - | |
| 158 | -.eyebrow { | |
| 159 | - display: flex; | |
| 160 | - align-items: center; | |
| 161 | - gap: 10px; | |
| 162 | - color: var(--accent); | |
| 163 | -} | |
| 164 | - | |
| 165 | -.spark { | |
| 166 | - width: 8px; | |
| 167 | - height: 8px; | |
| 168 | - border-radius: 50%; | |
| 169 | - background: var(--spark); | |
| 170 | - box-shadow: 0 0 10px var(--spark); | |
| 171 | -} | |
| 172 | - | |
| 173 | -.hero h1, | |
| 174 | -.page-title { | |
| 175 | - font-family: var(--font-display); | |
| 176 | - font-stretch: 125%; | |
| 177 | - font-weight: 700; | |
| 178 | - letter-spacing: -0.04em; | |
| 179 | - line-height: 0.95; | |
| 180 | -} | |
| 181 | - | |
| 182 | -.hero h1 { | |
| 183 | - font-size: clamp(48px, 9vw, 104px); | |
| 184 | - line-height: 0.92; | |
| 185 | -} | |
| 186 | - | |
| 187 | -.page-title { | |
| 188 | - font-size: clamp(48px, 9vw, 80px); | |
| 189 | -} | |
| 190 | - | |
| 191 | -.lead { | |
| 192 | - font-size: 19px; | |
| 193 | - line-height: 1.6; | |
| 194 | - color: var(--body); | |
| 195 | - max-width: 540px; | |
| 196 | -} | |
| 197 | - | |
| 198 | -.buttons { | |
| 199 | - display: flex; | |
| 200 | - gap: 12px; | |
| 201 | - flex-wrap: wrap; | |
| 202 | - margin-top: 8px; | |
| 203 | -} | |
| 204 | - | |
| 205 | -.button { | |
| 206 | - border: 1px solid var(--strong); | |
| 207 | - border-radius: 6px; | |
| 208 | - padding: 12px 20px; | |
| 209 | - font-size: 15px; | |
| 210 | - font-weight: 500; | |
| 211 | -} | |
| 212 | - | |
| 213 | -.button.primary { | |
| 214 | - background: var(--text); | |
| 215 | - border-color: var(--text); | |
| 216 | - color: var(--bg); | |
| 217 | - font-weight: 600; | |
| 218 | - padding: 13px 20px; | |
| 219 | -} | |
| 220 | - | |
| 221 | -.button.primary:hover { | |
| 222 | - background: var(--accent); | |
| 223 | - border-color: var(--accent); | |
| 224 | - color: var(--bg); | |
| 225 | -} | |
| 226 | - | |
| 227 | -.section { | |
| 228 | - padding: 88px 0; | |
| 229 | - border-top: 1px solid var(--line); | |
| 230 | -} | |
| 231 | - | |
| 232 | -.section-head { | |
| 233 | - display: flex; | |
| 234 | - align-items: baseline; | |
| 235 | - gap: 16px; | |
| 236 | -} | |
| 237 | - | |
| 238 | -.index { | |
| 239 | - color: var(--accent); | |
| 240 | -} | |
| 241 | - | |
| 242 | -.section-head h2 { | |
| 243 | - font-family: var(--font-display); | |
| 244 | - font-stretch: 112%; | |
| 245 | - font-size: clamp(28px, 4vw, 36px); | |
| 246 | - font-weight: 600; | |
| 247 | - letter-spacing: -0.02em; | |
| 248 | -} | |
| 249 | - | |
| 250 | -.rule { | |
| 251 | - flex: 1; | |
| 252 | - height: 1px; | |
| 253 | - background: var(--line); | |
| 254 | -} | |
| 255 | - | |
| 256 | -.more { | |
| 257 | - color: var(--muted); | |
| 258 | -} | |
| 259 | - | |
| 260 | -.post-list { | |
| 261 | - display: flex; | |
| 262 | - flex-direction: column; | |
| 263 | -} | |
| 264 | - | |
| 265 | -.post-row { | |
| 266 | - display: grid; | |
| 267 | - grid-template-columns: 100px minmax(0, 1fr) 24px; | |
| 268 | - gap: 16px; | |
| 269 | - align-items: center; | |
| 270 | - padding: 20px 0; | |
| 271 | - border-bottom: 1px solid var(--line); | |
| 118 | +main { | |
| 119 | + padding: 80px 0 64px; | |
| 272 | 120 | } |
| 273 | 121 | |
| 274 | -.post-date { | |
| 275 | - color: var(--muted); | |
| 122 | +.hero { | |
| 123 | + margin-bottom: 64px; | |
| 276 | 124 | } |
| 277 | 125 | |
| 278 | -.post-title { | |
| 279 | - font-size: 20px; | |
| 126 | +h1 { | |
| 127 | + font-size: 30px; | |
| 280 | 128 | font-weight: 500; |
| 129 | + letter-spacing: -0.01em; | |
| 130 | + line-height: 1.25; | |
| 281 | 131 | } |
| 282 | 132 | |
| 283 | -.post-kind { | |
| 133 | +.lead { | |
| 134 | + margin-top: 12px; | |
| 284 | 135 | color: var(--muted); |
| 285 | - font-weight: 400; | |
| 286 | 136 | } |
| 287 | 137 | |
| 288 | -.project-grid { | |
| 289 | - display: grid; | |
| 290 | - grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); | |
| 291 | - border-top: 1px solid var(--line); | |
| 292 | - border-left: 1px solid var(--line); | |
| 138 | +.about { | |
| 139 | + margin-top: 24px; | |
| 140 | + line-height: 1.7; | |
| 293 | 141 | } |
| 294 | 142 | |
| 295 | -.project-cell { | |
| 296 | - display: flex; | |
| 297 | - flex-direction: column; | |
| 298 | - justify-content: space-between; | |
| 299 | - gap: 16px; | |
| 300 | - min-height: 140px; | |
| 301 | - padding: 22px; | |
| 302 | - border-right: 1px solid var(--line); | |
| 303 | - border-bottom: 1px solid var(--line); | |
| 143 | +.about p + p { | |
| 144 | + margin-top: 12px; | |
| 304 | 145 | } |
| 305 | 146 | |
| 306 | -.project-cell:hover .project-name { | |
| 307 | - color: var(--accent); | |
| 147 | +.section + .section { | |
| 148 | + margin-top: 56px; | |
| 308 | 149 | } |
| 309 | 150 | |
| 310 | -.project-index { | |
| 311 | - color: var(--muted); | |
| 151 | +h2.label { | |
| 152 | + margin-bottom: 12px; | |
| 312 | 153 | font-size: 12px; |
| 313 | -} | |
| 314 | - | |
| 315 | -.project-text { | |
| 316 | - display: flex; | |
| 317 | - flex-direction: column; | |
| 318 | - gap: 4px; | |
| 319 | -} | |
| 320 | - | |
| 321 | -.project-name { | |
| 322 | - font-size: 18px; | |
| 323 | - font-weight: 600; | |
| 324 | -} | |
| 325 | - | |
| 326 | -.project-summary { | |
| 327 | - font-size: 14px; | |
| 154 | + font-weight: 400; | |
| 155 | + letter-spacing: 0.12em; | |
| 156 | + text-transform: uppercase; | |
| 328 | 157 | color: var(--muted); |
| 329 | 158 | } |
| 330 | 159 | |
| 331 | -.quote { | |
| 332 | - padding: 96px 0; | |
| 333 | - border-top: 1px solid var(--line); | |
| 334 | -} | |
| 335 | - | |
| 336 | -.quote-mark { | |
| 337 | - font-family: var(--font-display); | |
| 338 | - font-size: 96px; | |
| 339 | - font-weight: 800; | |
| 340 | - line-height: 0.6; | |
| 341 | - height: 48px; | |
| 342 | - color: var(--spark); | |
| 343 | -} | |
| 344 | - | |
| 345 | -.quote-text { | |
| 346 | - font-family: var(--font-display); | |
| 347 | - font-size: clamp(28px, 4vw, 40px); | |
| 348 | - font-weight: 500; | |
| 349 | - letter-spacing: -0.02em; | |
| 350 | - line-height: 1.2; | |
| 351 | - max-width: 860px; | |
| 352 | -} | |
| 353 | - | |
| 354 | -.page { | |
| 355 | - padding: 96px 0; | |
| 356 | -} | |
| 357 | - | |
| 358 | -.project-table { | |
| 359 | - overflow-x: auto; | |
| 360 | - border-top: 1px solid var(--text); | |
| 361 | -} | |
| 362 | - | |
| 363 | -.project-row { | |
| 160 | +.row { | |
| 364 | 161 | display: grid; |
| 365 | - grid-template-columns: 56px minmax(200px, 1fr) minmax(220px, 1.4fr) 24px; | |
| 162 | + grid-template-columns: 176px minmax(0, 1fr); | |
| 366 | 163 | gap: 16px; |
| 367 | 164 | align-items: baseline; |
| 368 | - min-width: 600px; | |
| 369 | - padding: 22px 0; | |
| 370 | - border-bottom: 1px solid var(--line); | |
| 165 | + padding: 10px 0; | |
| 166 | + border-top: 1px solid var(--line); | |
| 371 | 167 | } |
| 372 | 168 | |
| 373 | -.project-row-name { | |
| 374 | - font-family: var(--font-display); | |
| 375 | - font-stretch: 112%; | |
| 376 | - font-size: 24px; | |
| 377 | - font-weight: 600; | |
| 378 | - letter-spacing: -0.02em; | |
| 169 | +.row-key, | |
| 170 | +.meta, | |
| 171 | +.back, | |
| 172 | +.more, | |
| 173 | +.site-footer { | |
| 174 | + font-family: var(--font-mono); | |
| 175 | + font-size: 12px; | |
| 176 | + color: var(--muted); | |
| 379 | 177 | } |
| 380 | 178 | |
| 381 | -.project-row-summary { | |
| 382 | - color: var(--body); | |
| 383 | - font-size: 16px; | |
| 384 | - font-family: var(--font-sans); | |
| 179 | +.row-sub { | |
| 180 | + color: var(--muted); | |
| 385 | 181 | } |
| 386 | 182 | |
| 387 | 183 | .article { |
| 388 | 184 | display: flex; |
| 389 | 185 | flex-direction: column; |
| 390 | - gap: 40px; | |
| 391 | - max-width: 680px; | |
| 392 | - margin-inline: auto; | |
| 393 | - padding-inline: var(--gutter); | |
| 394 | - box-sizing: content-box; | |
| 395 | -} | |
| 396 | - | |
| 397 | -.back { | |
| 398 | - color: var(--accent); | |
| 399 | -} | |
| 400 | - | |
| 401 | -.meta { | |
| 402 | - color: var(--muted); | |
| 186 | + gap: 28px; | |
| 403 | 187 | } |
| 404 | 188 | |
| 405 | 189 | .blocks { |
| 406 | 190 | display: flex; |
| 407 | 191 | flex-direction: column; |
| 408 | - gap: 28px; | |
| 409 | - font-size: 19px; | |
| 192 | + gap: 22px; | |
| 193 | + font-size: 17px; | |
| 410 | 194 | line-height: 1.8; |
| 411 | - color: var(--body); | |
| 195 | + color: #c2c6d1; | |
| 412 | 196 | } |
| 413 | 197 | |
| 414 | 198 | .blocks h2 { |
| 415 | - font-family: var(--font-display); | |
| 416 | - font-stretch: 112%; | |
| 417 | - font-size: 28px; | |
| 418 | - font-weight: 600; | |
| 199 | + font-size: 20px; | |
| 200 | + font-weight: 500; | |
| 419 | 201 | color: var(--text); |
| 420 | 202 | } |
| 421 | 203 | |
| 422 | 204 | .site-footer { |
| 423 | - padding: 32px var(--gutter); | |
| 424 | - border-top: 1px solid var(--line); | |
| 425 | -} | |
| 426 | - | |
| 427 | -.footer-inner { | |
| 428 | 205 | display: flex; |
| 429 | 206 | justify-content: space-between; |
| 430 | 207 | gap: 16px; |
| 431 | 208 | flex-wrap: wrap; |
| 432 | - color: var(--muted); | |
| 209 | + padding-top: 20px; | |
| 210 | + border-top: 1px solid var(--line); | |
| 433 | 211 | } |
| 434 | 212 | |
| 435 | 213 | .footer-links { |
| 436 | 214 | display: flex; |
| 437 | - gap: 24px; | |
| 215 | + gap: 20px; | |
| 438 | 216 | } |
| 439 | 217 | |
| 440 | 218 | @media (max-width: 640px) { |
| 441 | 219 | :root { |
| 442 | - --gutter: 20px; | |
| 220 | + --gutter: 22px; | |
| 443 | 221 | } |
| 444 | 222 | |
| 445 | - .hero { | |
| 446 | - padding: 80px 0; | |
| 223 | + body { | |
| 224 | + padding: 16px 10px; | |
| 447 | 225 | } |
| 448 | 226 | |
| 449 | - .section, | |
| 450 | - .quote, | |
| 451 | - .page { | |
| 452 | - padding-top: 56px; | |
| 453 | - padding-bottom: 56px; | |
| 227 | + main { | |
| 228 | + padding: 56px 0 48px; | |
| 454 | 229 | } |
| 455 | 230 | |
| 456 | - .post-row { | |
| 457 | - grid-template-columns: 84px minmax(0, 1fr) 20px; | |
| 231 | + .row { | |
| 232 | + grid-template-columns: 1fr; | |
| 233 | + gap: 2px; | |
| 458 | 234 | } |
| 459 | 235 | } |
| 460 | 236 |
src/app.rsmodified+14 -66
| @@ -10,7 +10,7 @@ use topcoat::{ | ||
| 10 | 10 | view::{View, component, view}, |
| 11 | 11 | }; |
| 12 | 12 | |
| 13 | -use crate::content::{Block, posts::Post, projects::Project}; | |
| 13 | +use crate::content::{posts::Post, projects::Project}; | |
| 14 | 14 | |
| 15 | 15 | pub struct Title(pub fn(&Cx) -> String); |
| 16 | 16 | |
| @@ -27,14 +27,12 @@ async fn site_header(cx: &Cx) -> Result<impl View> { | ||
| 27 | 27 | |
| 28 | 28 | Ok(view! { |
| 29 | 29 | <header class="site-header"> |
| 30 | - <div class="wrap header-inner"> | |
| 31 | 30 | <a class="wordmark" href=(href!(home))>"tahinli"</a> |
| 32 | 31 | <nav class="nav" aria-label="Main"> |
| 33 | 32 | <a href=(posts) aria-current=(posts_current.then_some("page"))>"posts"</a> |
| 34 | 33 | <a href=(projects) aria-current=(projects_current.then_some("page"))>"projects"</a> |
| 35 | - <a href="https://git.tahinli.com/Tahinli">"forge ↗"</a> | |
| 34 | + <a href="https://git.tahinli.com/Tahinli">"forge"</a> | |
| 36 | 35 | </nav> |
| 37 | - </div> | |
| 38 | 36 | </header> |
| 39 | 37 | }) |
| 40 | 38 | } |
| @@ -43,29 +41,15 @@ async fn site_header(cx: &Cx) -> Result<impl View> { | ||
| 43 | 41 | async fn site_footer(cx: &Cx) -> Result<impl View> { |
| 44 | 42 | Ok(view! { |
| 45 | 43 | <footer class="site-footer"> |
| 46 | - <div class="wrap footer-inner"> | |
| 47 | 44 | <span>"Don't you dare go Hollow"</span> |
| 48 | 45 | <span class="footer-links"> |
| 49 | - <a href="https://git.tahinli.com/Tahinli">"forge"</a> | |
| 50 | 46 | <a href="https://github.com/Tahinli">"github"</a> |
| 51 | 47 | <a href="https://linkedin.com/in/ahmetkaangumus">"linkedin"</a> |
| 52 | 48 | </span> |
| 53 | - </div> | |
| 54 | 49 | </footer> |
| 55 | 50 | }) |
| 56 | 51 | } |
| 57 | 52 | |
| 58 | -fn awaken_first_line() -> &'static str { | |
| 59 | - Post::Awaken | |
| 60 | - .body() | |
| 61 | - .iter() | |
| 62 | - .find_map(|block| match block { | |
| 63 | - Block::Lines(lines) => lines.first().copied(), | |
| 64 | - _ => None, | |
| 65 | - }) | |
| 66 | - .unwrap_or_default() | |
| 67 | -} | |
| 68 | - | |
| 69 | 53 | #[layout(with(Title(|_| "Ahmet Kaan Gümüş".to_owned())))] |
| 70 | 54 | async fn root_layout(cx: &Cx, slot: Slot<'_>) -> Result<impl View> { |
| 71 | 55 | let Title(render) = context::<Title>(cx); |
| @@ -83,9 +67,11 @@ async fn root_layout(cx: &Cx, slot: Slot<'_>) -> Result<impl View> { | ||
| 83 | 67 | <link rel="icon" href="/favicon.ico" type="image/x-icon"> |
| 84 | 68 | </head> |
| 85 | 69 | <body> |
| 70 | + <div class="glass"> | |
| 86 | 71 | site_header() |
| 87 | 72 | <main>(slot)</main> |
| 88 | 73 | site_footer() |
| 74 | + </div> | |
| 89 | 75 | </body> |
| 90 | 76 | </html> |
| 91 | 77 | }) |
| @@ -93,67 +79,29 @@ async fn root_layout(cx: &Cx, slot: Slot<'_>) -> Result<impl View> { | ||
| 93 | 79 | |
| 94 | 80 | #[page] |
| 95 | 81 | async fn home(cx: &Cx) -> Result<impl View> { |
| 96 | - let latest = Post::ALL[0]; | |
| 97 | - let latest_label = format!("Latest {} →", latest.kind().label()); | |
| 98 | - let quote = Post::Awaken; | |
| 99 | - | |
| 100 | 82 | Ok(view! { |
| 101 | 83 | <section class="hero"> |
| 102 | - <div class="wrap stack"> | |
| 103 | - <span class="eyebrow"><span class="spark"></span>"software engineer · rust"</span> | |
| 104 | - <h1>"Ahmet Kaan" <br> "Gümüş"</h1> | |
| 105 | - <p class="lead">"I write Rust, poems and open letters. Software that stands the test of time."</p> | |
| 106 | - <div class="buttons"> | |
| 107 | - <a class="button primary" href=(posts::detail_url(cx, latest))>(latest_label)</a> | |
| 108 | - <a class="button" href=(href!(projects::index))>"Projects"</a> | |
| 109 | - </div> | |
| 84 | + <h1>"Ahmet Kaan Gümüş"</h1> | |
| 85 | + <p class="lead">"Computer Scientist."</p> | |
| 86 | + <div class="about"> | |
| 87 | + <p>"I’m Ahmet Kaan. I’m Turkish and was born in 2001. I graduated with a degree in Computer Engineering from Erciyes University. I’m keen on understanding computers as deeply as possible and I love the open‑source philosophy and the KISS principle."</p> | |
| 88 | + <p>"My passion is to create software that can stand the test of time. Developers should write versatile, bug‑free programs. It’s impossible to ignore the impact of software. Today’s world is led by it and will continue to be. As developers, we must consider as many possibilities as we can in order to build robust and secure applications."</p> | |
| 89 | + <p>"I hope to create free and open‑source software that is widely used, allowing people to benefit from it without having to worry about privacy or the reliability of the program."</p> | |
| 110 | 90 | </div> |
| 111 | 91 | </section> |
| 112 | 92 | |
| 113 | 93 | <section class="section"> |
| 114 | - <div class="wrap stack"> | |
| 115 | - <div class="section-head"> | |
| 116 | - <span class="index">"01"</span> | |
| 117 | - <h2>"Posts"</h2> | |
| 118 | - <span class="rule"></span> | |
| 119 | - <a class="more" href=(href!(posts::index))>"all →"</a> | |
| 120 | - </div> | |
| 121 | - <div class="post-list"> | |
| 94 | + <h2 class="label">"Writing"</h2> | |
| 122 | 95 | for post in Post::ALL { |
| 123 | 96 | posts::post_row(post: post) |
| 124 | 97 | } |
| 125 | - </div> | |
| 126 | - </div> | |
| 127 | 98 | </section> |
| 128 | 99 | |
| 129 | 100 | <section class="section"> |
| 130 | - <div class="wrap stack"> | |
| 131 | - <div class="section-head"> | |
| 132 | - <span class="index">"02"</span> | |
| 133 | - <h2>"Projects"</h2> | |
| 134 | - <span class="rule"></span> | |
| 135 | - <a class="more" href=(href!(projects::index))>"all →"</a> | |
| 136 | - </div> | |
| 137 | - <div class="project-grid"> | |
| 138 | - for (i, project) in Project::ALL.into_iter().take(8).enumerate() { | |
| 139 | - <a class="project-cell" href=(projects::detail_url(cx, project))> | |
| 140 | - <span class="project-index">(format!("{:02}", i + 1))</span> | |
| 141 | - <span class="project-text"> | |
| 142 | - <span class="project-name">(project.name())</span> | |
| 143 | - <span class="project-summary">(project.summary())</span> | |
| 144 | - </span> | |
| 145 | - </a> | |
| 101 | + <h2 class="label">"Projects"</h2> | |
| 102 | + for project in Project::ALL { | |
| 103 | + projects::project_row(project: project) | |
| 146 | 104 | } |
| 147 | - </div> | |
| 148 | - </div> | |
| 149 | - </section> | |
| 150 | - | |
| 151 | - <section class="quote"> | |
| 152 | - <div class="wrap stack"> | |
| 153 | - <span class="quote-mark" aria-hidden="true">"“"</span> | |
| 154 | - <p class="quote-text">(awaken_first_line())</p> | |
| 155 | - <a class="more" href=(posts::detail_url(cx, quote))>"— " (quote.title())</a> | |
| 156 | - </div> | |
| 157 | 105 | </section> |
| 158 | 106 | }) |
| 159 | 107 | } |
src/app/assets.rsmodified+0 -2
| @@ -29,8 +29,6 @@ pub async fn nav(cx: &Cx) -> Result<http::Response<Body>> { | ||
| 29 | 29 | #[route(GET "/fonts/{file}")] |
| 30 | 30 | pub async fn font(cx: &Cx) -> Result<http::Response<Body>> { |
| 31 | 31 | let bytes: &'static [u8] = match file(cx) { |
| 32 | - "archivo-latin-wdth.woff2" => include_bytes!("../../assets/fonts/archivo-latin-wdth.woff2"), | |
| 33 | - "archivo-latin-ext-wdth.woff2" => include_bytes!("../../assets/fonts/archivo-latin-ext-wdth.woff2"), | |
| 34 | 32 | "inter-latin-wght.woff2" => include_bytes!("../../assets/fonts/inter-latin-wght.woff2"), |
| 35 | 33 | "inter-latin-ext-wght.woff2" => include_bytes!("../../assets/fonts/inter-latin-ext-wght.woff2"), |
| 36 | 34 | "jetbrains-mono-latin-wght.woff2" => include_bytes!("../../assets/fonts/jetbrains-mono-latin-wght.woff2"), |
src/app/posts.rsmodified+4 -14
| @@ -16,13 +16,9 @@ pub fn detail_url(cx: &Cx, post: Post) -> String { | ||
| 16 | 16 | #[component] |
| 17 | 17 | pub async fn post_row(cx: &Cx, post: Post) -> Result<impl View> { |
| 18 | 18 | Ok(view! { |
| 19 | - <a class="post-row" href=(detail_url(cx, post))> | |
| 20 | - <span class="post-date">(post.date().unwrap_or("undated"))</span> | |
| 21 | - <span class="post-title"> | |
| 22 | - (post.title()) | |
| 23 | - <span class="post-kind">" · " (post.kind().label())</span> | |
| 24 | - </span> | |
| 25 | - <span class="arrow">"→"</span> | |
| 19 | + <a class="row" href=(detail_url(cx, post))> | |
| 20 | + <span class="row-key">(post.date().unwrap_or(post.kind().label()))</span> | |
| 21 | + <span>(post.title())</span> | |
| 26 | 22 | </a> |
| 27 | 23 | }) |
| 28 | 24 | } |
| @@ -30,15 +26,9 @@ pub async fn post_row(cx: &Cx, post: Post) -> Result<impl View> { | ||
| 30 | 26 | #[page(with(Title(|_| "Posts · tahinli".to_owned())))] |
| 31 | 27 | pub async fn index(cx: &Cx) -> Result<impl View> { |
| 32 | 28 | Ok(view! { |
| 33 | - <section class="page"> | |
| 34 | - <div class="wrap stack"> | |
| 35 | - <h1 class="page-title">"Posts"</h1> | |
| 36 | - <div class="post-list"> | |
| 29 | + <h2 class="label">"Writing"</h2> | |
| 37 | 30 | for post in Post::ALL { |
| 38 | 31 | post_row(post: post) |
| 39 | 32 | } |
| 40 | - </div> | |
| 41 | - </div> | |
| 42 | - </section> | |
| 43 | 33 | }) |
| 44 | 34 | } |
src/app/posts/slug.rsmodified+2 -2
| @@ -28,9 +28,9 @@ pub async fn detail(cx: &Cx) -> Result<impl View> { | ||
| 28 | 28 | }; |
| 29 | 29 | |
| 30 | 30 | Ok(view! { |
| 31 | - <article class="page article"> | |
| 31 | + <article class="article"> | |
| 32 | 32 | <a class="back" href=(href!(super::index))>"← posts"</a> |
| 33 | - <h1 class="page-title">(post.title())</h1> | |
| 33 | + <h1>(post.title())</h1> | |
| 34 | 34 | <span class="meta">(meta)</span> |
| 35 | 35 | blocks(items: post.body()) |
| 36 | 36 | </article> |
src/app/projects.rsmodified+14 -15
| @@ -4,7 +4,7 @@ use topcoat::{ | ||
| 4 | 4 | Result, |
| 5 | 5 | context::Cx, |
| 6 | 6 | router::{href, page}, |
| 7 | - view::{View, view}, | |
| 7 | + view::{View, component, view}, | |
| 8 | 8 | }; |
| 9 | 9 | |
| 10 | 10 | use crate::{app::Title, content::projects::Project}; |
| @@ -13,23 +13,22 @@ pub fn detail_url(cx: &Cx, project: Project) -> String { | ||
| 13 | 13 | href!(slug::detail, slug: project.slug()).resolve(cx) |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | +#[component] | |
| 17 | +pub async fn project_row(cx: &Cx, project: Project) -> Result<impl View> { | |
| 18 | + Ok(view! { | |
| 19 | + <a class="row" href=(detail_url(cx, project))> | |
| 20 | + <span class="row-key">(project.slug())</span> | |
| 21 | + <span>(project.name()) <span class="row-sub">" · " (project.summary())</span></span> | |
| 22 | + </a> | |
| 23 | + }) | |
| 24 | +} | |
| 25 | + | |
| 16 | 26 | #[page(with(Title(|_| "Projects · tahinli".to_owned())))] |
| 17 | 27 | pub async fn index(cx: &Cx) -> Result<impl View> { |
| 18 | 28 | Ok(view! { |
| 19 | - <section class="page"> | |
| 20 | - <div class="wrap stack"> | |
| 21 | - <h1 class="page-title">"Projects"</h1> | |
| 22 | - <div class="project-table"> | |
| 23 | - for (i, project) in Project::ALL.into_iter().enumerate() { | |
| 24 | - <a class="project-row" href=(detail_url(cx, project))> | |
| 25 | - <span class="project-index">(format!("{:02}", i + 1))</span> | |
| 26 | - <span class="project-row-name">(project.name())</span> | |
| 27 | - <span class="project-row-summary">(project.summary())</span> | |
| 28 | - <span class="arrow">"→"</span> | |
| 29 | - </a> | |
| 29 | + <h2 class="label">"Projects"</h2> | |
| 30 | + for project in Project::ALL { | |
| 31 | + project_row(project: project) | |
| 30 | 32 | } |
| 31 | - </div> | |
| 32 | - </div> | |
| 33 | - </section> | |
| 34 | 33 | }) |
| 35 | 34 | } |
src/app/projects/slug.rsmodified+2 -2
| @@ -24,9 +24,9 @@ pub async fn detail(cx: &Cx) -> Result<impl View> { | ||
| 24 | 24 | let project = Project::from_slug(slug(cx)).ok_or_not_found()?; |
| 25 | 25 | |
| 26 | 26 | Ok(view! { |
| 27 | - <article class="page article"> | |
| 27 | + <article class="article"> | |
| 28 | 28 | <a class="back" href=(href!(super::index))>"← projects"</a> |
| 29 | - <h1 class="page-title">(project.name())</h1> | |
| 29 | + <h1>(project.name())</h1> | |
| 30 | 30 | <p class="lead">(project.summary())</p> |
| 31 | 31 | <a class="more" href=(project.source())>"source ↗"</a> |
| 32 | 32 | blocks(items: project.body()) |