Skip to content

Commit 05f30e9

Browse files
committed
sup
1 parent 00752a2 commit 05f30e9

9 files changed

Lines changed: 140 additions & 133 deletions

File tree

src/parts/special/adventure.svelte

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { FrozenWeightedList, type LikeWeightedItem } from "@sup2.0/weighted-list
1010
import type { Description } from "#scripts/types";
1111
1212
import { onMount } from "svelte";
13+
import { slide } from "svelte/transition";
14+
import { expoInOut } from "svelte/easing";
1315
1416
1517
interface Props {
@@ -18,7 +20,11 @@ interface Props {
1820
tagless?: boolean;
1921
}
2022
21-
let { routes, multi = 0, tagless = false }: Props = $props();
23+
let {
24+
routes,
25+
multi = 0,
26+
tagless = false,
27+
}: Props = $props();
2228
2329
2430
let displayed_route: Description | null = $state(null);
@@ -57,11 +63,15 @@ onMount(() => {
5763

5864

5965
{#if displayed_routes}
60-
{#each displayed_routes as route}
61-
{@render parts(route)}
62-
{/each}
66+
<span transition:slide={{ duration: 800, easing: expoInOut }}>
67+
{#each displayed_routes as route}
68+
{@render parts(route)}
69+
{/each}
70+
</span>
6371

6472
{:else if displayed_route}
65-
{@render parts(displayed_route)}
73+
<span transition:slide={{ duration: 800, easing: expoInOut }}>
74+
{@render parts(displayed_route)}
75+
</span>
6676

6777
{/if}

src/parts/ui/block.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ onMount(() => {
9999
100100
:global(p) {
101101
padding: 0.25em 0;
102+
line-height: 125%;
102103
}
103104
104105
:global(a) {

src/parts/ui/card.link.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ onMount(() => {
8080

8181
{#if displayed_capt}
8282
<p transition:slide={{ duration: 1000, delay: 400, easing: expoInOut }}>
83-
{@html capt}
83+
{@html displayed_capt}
8484
</p>
8585
{/if}
8686

src/routes/(sup)/(home)/+page.svelte

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ import ProfileShowerthought from "./showerthought.svelte";
4141
<ProfileDirections />
4242
</div>
4343

44-
<button onclick={portal.set_state(true)}>explore...</button>
44+
<search>
45+
<button onclick={portal.set_state(true)}>explore...</button>
46+
<ProfileShowerthought />
47+
</search>
4548
</section>
4649

4750
<section><ProfileCards /></section>
4851
<section><ProfileLoves /></section>
49-
50-
<section><ProfileShowerthought /></section>
5152
</Main>
5253

5354
<Footer />
@@ -86,31 +87,39 @@ section.upper {
8687
}
8788
}
8889
89-
button {
90-
min-width: min(30em, 90vw);
91-
padding: 0.5rem 1rem 0.45rem;
92-
appearance: none;
93-
@include font-fun;
94-
font-size: 1.25rem;
95-
color: $col-text;
96-
@include shear-card($light: true);
97-
background: none;
98-
border: none;
99-
outline: none;
100-
101-
&::before {
102-
background: $col-card-light;
103-
}
104-
105-
&:hover {
106-
cursor: pointer;
90+
search {
91+
display: flex;
92+
flex-flow: column nowrap;
93+
align-items: center;
94+
gap: 1rem;
95+
96+
button {
97+
min-width: min(30em, 90vw);
98+
padding: 0.5rem 1rem 0.45rem;
99+
appearance: none;
100+
@include font-fun;
101+
font-size: 1.25rem;
102+
color: $col-text;
103+
@include shear-card($light: true);
104+
background: none;
105+
border: none;
106+
outline: none;
107107
108108
&::before {
109-
background: $col-card-light-hover;
109+
background: $col-card-light;
110+
}
111+
112+
&:hover {
113+
cursor: pointer;
114+
115+
&::before {
116+
background: $col-card-light-hover;
117+
}
110118
}
111119
}
112120
}
113121
122+
114123
@media (max-width: $width-shrink) {
115124
section.upper {
116125
flex-flow: column nowrap;

src/routes/(sup)/(home)/bio.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import Adventure from "#parts/special/adventure.svelte";
2828

2929
[2, `How many of these do you think there are?`],
3030

31+
[2, `Have you noticed anything interesting about the site?`],
32+
3133
[1, `woah, this is a rare bio. Looks like you just expended a cut of your lifetime RNG!`],
3234
]} />
3335
</Block>

src/routes/(sup)/(home)/create.svelte

Lines changed: 66 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -2,107 +2,78 @@
22

33
<script lang="ts">
44
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";
69
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";
1210
import { fade } from "svelte/transition";
1311
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-
6212
</script>
6313

6414

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" />
10677

10778

10879
<style lang="scss">

src/routes/(sup)/(home)/header.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import ProfileLinks from "./links.svelte";
66
77
import Adventure from "#parts/special/adventure.svelte";
88
9+
import { slide } from "svelte/transition";
10+
import { expoInOut } from "svelte/easing";
11+
912
</script>
1013

1114

@@ -19,7 +22,7 @@ import Adventure from "#parts/special/adventure.svelte";
1922
<img id="sup2point0" alt="Sup#2.0" src="sup2point0.png" >
2023
</section>
2124

22-
<p>
25+
<p transition:slide={{ duration: 1000, easing: expoInOut }}>
2326
<span class="shown">
2427
<Adventure tagless={true} routes={[
2528
[20, `an avid portal with way too much in their neural cortex`],
@@ -82,7 +85,7 @@ img#sup2point0 {
8285
8386
p {
8487
position: relative;
85-
padding: 2rem 0;
88+
padding: 2rem 0 1rem;
8689
@include font-fun;
8790
font-size: 150%;
8891
text-align: center;

src/routes/(sup)/(home)/link.profile.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ a.info {
109109
.content, &::before {
110110
opacity: 1;
111111
}
112+
113+
.content p {
114+
color: $col-text;
115+
}
112116
}
113117
114118
h3 {
@@ -123,6 +127,7 @@ a.info {
123127
@include font-ui;
124128
font-size: 75%;
125129
color: $col-text-deut;
130+
transition: #{trans()};
126131
}
127132
}
128133

0 commit comments

Comments
 (0)