|
2 | 2 |
|
3 | 3 | <script lang="ts"> |
4 | 4 |
|
5 | | -import { pick_random } from "#scripts/utils"; |
| 5 | +import Cards from "#parts/core/cards.svelte"; |
| 6 | +import Clicky from "#parts/ui/clicky.svelte"; |
| 7 | +import LinkCard from "#parts/ui/card.link.svelte"; |
| 8 | +import Adventure from "#parts/special/adventure.svelte"; |
6 | 9 |
|
7 | | -import Cards from "#parts/core/cards.svelte"; |
8 | | -import Clicky from "#parts/ui/clicky.svelte"; |
9 | | -import LinkCard from "#parts/ui/card.link.svelte"; |
10 | | -
|
11 | | -import { onMount } from "svelte"; |
12 | 10 | import { fade } from "svelte/transition"; |
13 | 11 |
|
14 | | -
|
15 | | -let displayed_title = $state(""); |
16 | | -let displayed_routes: Record<string, string> = {}; |
17 | | -
|
18 | | -onMount(() => { |
19 | | - displayed_title = pick_random(title_routes); |
20 | | -
|
21 | | - for (let [section, routes] of Object.entries(content_routes)) { |
22 | | - displayed_routes[section] = pick_random(routes); |
23 | | - } |
24 | | -}); |
25 | | -
|
26 | | -const title_routes = [ |
27 | | - `stuff I create`, |
28 | | - `my stuff`, |
29 | | - `stuff to check out`, |
30 | | -]; |
31 | | -
|
32 | | -const content_routes = { |
33 | | - games: [ |
34 | | - `I make games!`, |
35 | | - `game developer at heart.`, |
36 | | - `life-long love.`, |
37 | | - ], |
38 | | - websites: [ |
39 | | - `I make websites!`, |
40 | | - `can’t stop making them.`, |
41 | | - `too fun.`, |
42 | | - `certified web dev junkie`, |
43 | | - ], |
44 | | - software: [ |
45 | | - `I make... applications, I guess you could call them?`, |
46 | | - `tools and experiments `, |
47 | | - `what is a <code>.py</code> file anyway?`, |
48 | | - ], |
49 | | - graphics: [ |
50 | | - `I make posters, adverts and infographics!`, |
51 | | - `PowerPoint my beloved~`, |
52 | | - ], |
53 | | - writing: [ |
54 | | - `I like writing!`, |
55 | | - ], |
56 | | - poetry: [ |
57 | | - `yes, I write poetry.`, |
58 | | - `yes, I unironically enjoy it.`, |
59 | | - ], |
60 | | -}; |
61 | | -
|
62 | 12 | </script> |
63 | 13 |
|
64 | 14 |
|
65 | | -{#if displayed_title} |
66 | | - <h2 transition:fade={{ duration: 500 }}> |
67 | | - {displayed_title} |
68 | | - </h2> |
69 | | - |
70 | | - <Cards force_grid={true}> |
71 | | - <LinkCard |
72 | | - text="games" |
73 | | - link="sup/projects" |
74 | | - capt={displayed_routes.games} |
75 | | - /> |
76 | | - <LinkCard |
77 | | - link="sup/projects" |
78 | | - text="websites" |
79 | | - capt={displayed_routes.websites} |
80 | | - aspect="square" |
81 | | - /> |
82 | | - <LinkCard |
83 | | - link="sup/projects" |
84 | | - text="software" |
85 | | - capt={displayed_routes.software} |
86 | | - /> |
87 | | - <LinkCard |
88 | | - link="https://sup2point0.github.io/Assort/graphics" |
89 | | - text="graphics" |
90 | | - capt={displayed_routes.graphics} |
91 | | - /> |
92 | | - <LinkCard |
93 | | - link="https://sup2point0.github.io/Assort/writing" |
94 | | - text="writing" |
95 | | - capt={displayed_routes.writing} |
96 | | - /> |
97 | | - <LinkCard |
98 | | - link="https://sup2point0.github.io/Assort/poetry" |
99 | | - text="poetry" |
100 | | - capt={displayed_routes.poetry} |
101 | | - /> |
102 | | - </Cards> |
103 | | - <Clicky text="VIEW MORE" link="/sup/projects" /> |
104 | | - |
105 | | -{/if} |
| 15 | +<h2 transition:fade={{ duration: 500 }}> |
| 16 | + <Adventure tagless={true} routes={[ |
| 17 | + [20, `stuff I create`], |
| 18 | + [20, `my stuff`], |
| 19 | + [20, `stuff to check out`], |
| 20 | + ]} /> |
| 21 | +</h2> |
| 22 | + |
| 23 | +<Cards force_grid={true}> |
| 24 | + <!-- <LinkCard |
| 25 | + text="games" |
| 26 | + link="sup/projects" |
| 27 | + capt={[ |
| 28 | + [20, `I make games!`], |
| 29 | + [20, `game developer at heart.`], |
| 30 | + [20, `life-long love.`], |
| 31 | + ]} |
| 32 | + /> --> |
| 33 | + <LinkCard |
| 34 | + link="sup/projects" |
| 35 | + text="websites" |
| 36 | + capt={[ |
| 37 | + [20, `I make websites!`], |
| 38 | + [20, `can’t stop making them.`], |
| 39 | + [20, `too fun.`], |
| 40 | + [20, `certified web dev junkie`], |
| 41 | + ]} |
| 42 | + aspect="square" |
| 43 | + /> |
| 44 | + <LinkCard |
| 45 | + link="sup/projects" |
| 46 | + text="software" |
| 47 | + capt={[ |
| 48 | + [20, `Applications, websites and games I’ve made`], |
| 49 | + [20, `I make... applications, I guess you could call them?`], |
| 50 | + [20, `tools and experiments `], |
| 51 | + [1, `what is a <code>.py</code> file anyway?`], |
| 52 | + ]} |
| 53 | + /> |
| 54 | + <LinkCard |
| 55 | + link="https://sup2point0.github.io/Assort/graphics" |
| 56 | + text="graphics" |
| 57 | + capt={[ |
| 58 | + [20, `I make posters, infographics and more!`], |
| 59 | + [2, `PowerPoint my beloved~`], |
| 60 | + ]} |
| 61 | + /> |
| 62 | + <LinkCard |
| 63 | + link="https://sup2point0.github.io/Assort/writing" |
| 64 | + text="writing" |
| 65 | + capt={null} |
| 66 | + /> |
| 67 | + <LinkCard |
| 68 | + link="https://sup2point0.github.io/Assort/poetry" |
| 69 | + text="poetry" |
| 70 | + capt={[ |
| 71 | + [20, `ravings and ponderings on life`], |
| 72 | + ]} |
| 73 | + /> |
| 74 | +</Cards> |
| 75 | + |
| 76 | +<Clicky text="VIEW MORE" link="/sup/projects" /> |
106 | 77 |
|
107 | 78 |
|
108 | 79 | <style lang="scss"> |
|
0 commit comments