Skip to content

Commit a9c7fda

Browse files
committed
sup
1 parent 30cd4eb commit a9c7fda

11 files changed

Lines changed: 133 additions & 62 deletions

File tree

src/parts/dev/block.project.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<script lang="ts">
44
55
import { shardify, display_date } from "#scripts/utils";
6-
import type { ProjectData } from "#routes/(sup)/sup/projects/projects";
6+
import type { ProjectData } from "#sup/projects/projects";
77
88
import { AnimationData, register_animation, calc_delay } from "#scripts/anim.svelte.ts";
99
@@ -123,7 +123,7 @@ onMount(() => {
123123
<div class="lower">
124124
<ul class="tags">
125125
{#each project.tech ?? [] as tech}
126-
<li class="tech {shardify(tech)}"> {tech} </li>
126+
<li class="tech {tech?.shard}"> {tech?.name ?? "????"} </li>
127127
{/each}
128128
</ul>
129129
</div>

src/parts/loves/block.game.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A block displaying info for a game.
66
<script lang="ts">
77
88
import { display_date } from "#scripts/utils";
9-
import { type GameData } from "#routes/(sup)/sup/loves/games/games";
9+
import { type GameData } from "#sup/loves/games/games";
1010
1111
import { AnimationData, register_animation, calc_delay } from "#scripts/anim.svelte.ts";
1212

src/routes/(sup)/sup/dev/dev.langs.ts

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,73 @@
1+
import { shardify } from "#scripts/utils";
12
import { Fluency, type LangData } from "#scripts/types/dev";
23

34

4-
export const Lang: Record<string, LangData> =
5+
type LangsData = Record<string, LangData>;
6+
7+
8+
export const Lang: LangsData = prep(
59
{
610
CSHARP: {
711
name: "C#",
812
date: "fall 2023",
9-
love: 2,
13+
love: 1,
1014
fluency: Fluency.TIER_2,
1115
icon: "csharp.svg",
1216
},
1317
CSS: {
1418
name: "CSS",
19+
date: "spring 2024",
20+
love: 3,
1521
fluency: Fluency.TIER_3,
1622
icon: "css.svg",
1723
},
1824
HASKELL: {
1925
name: "Haskell",
26+
date: "fall 2025",
27+
love: 1,
2028
fluency: Fluency.TIER_1,
2129
icon: "haskell.svg",
2230
},
2331
HTML: {
2432
name: "HTML",
25-
date: ["winter 2023", "present"],
26-
love: 1,
33+
date: "winter 2023",
34+
love: null,
2735
fluency: Fluency.TIER_3,
2836
icon: "html.svg",
2937
},
3038
JAVASCRIPT: {
3139
name: "JavaScript",
3240
date: "early 2024",
33-
love: 1,
41+
love: null,
3442
fluency: Fluency.TIER_3,
3543
icon: "javascript.png",
3644
_style: "round",
3745
},
3846
JSON: {
3947
name: "JSON",
48+
date: 2021,
49+
love: 1,
4050
fluency: Fluency.TIER_3,
4151
icon: "json.svg",
4252
},
53+
KATEX: {
54+
name: "KaTeX / LaTeX",
55+
date: 2024,
56+
love: 2,
57+
fluency: Fluency.TIER_3,
58+
icon: "vscpde.svg",
59+
},
4360
KOTLIN: {
4461
name: "Kotlin",
62+
date: "fall 2025",
63+
love: null,
4564
fluency: Fluency.TIER_1,
4665
icon: "kotlin.png",
4766
},
4867
LATEX: {
4968
name: "LaTeX",
5069
date: 2022,
51-
love: 1,
70+
love: null,
5271
fluency: Fluency.TIER_2,
5372
icon: "latex.svg",
5473
},
@@ -79,17 +98,20 @@ export const Lang: Record<string, LangData> =
7998
date: 2022,
8099
love: 2,
81100
fluency: Fluency.TIER_2,
101+
icon: undefined,
82102
},
83103
RUBY: {
84104
name: "Ruby",
85105
date: "summer 2023",
86-
love: 3,
106+
love: 2,
87107
fluency: Fluency.TIER_1,
88108
icon: "ruby.svg",
89109
related: ["PYTHON"],
90110
},
91111
RUST: {
92112
name: "Rust",
113+
date: "fall 2025",
114+
love: 2,
93115
fluency: Fluency.TIER_2,
94116
icon: "rust.svg",
95117
},
@@ -102,9 +124,17 @@ export const Lang: Record<string, LangData> =
102124
},
103125
SQLITE: {
104126
name: "SQLite",
127+
date: 2024,
128+
love: null,
105129
fluency: Fluency.TIER_1,
106130
icon: "sqlite.svg",
107131
},
132+
SUPCODE: {
133+
name: "supcode",
134+
date: 2021,
135+
love: null,
136+
icon: "latex.svg",
137+
},
108138
SVELTE: {
109139
name: "Svelte",
110140
date: "spring 2024",
@@ -120,4 +150,13 @@ export const Lang: Record<string, LangData> =
120150
icon: "typescript.svg",
121151
_style: "round",
122152
},
153+
});
154+
155+
function prep(data: LangsData): LangsData
156+
{
157+
for (let [shard, lang] of Object.entries(data)) {
158+
lang.shard = shardify(shard);
159+
}
160+
161+
return data;
123162
}

src/routes/(sup)/sup/dev/dev.techs.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
import { shardify } from "#scripts/utils";
12
import type { TechData } from "#scripts/types/dev";
23

34

4-
export const Tech: Record<string, TechData> =
5+
type TechsData = Record<string, TechData>;
6+
7+
8+
export const Tech: TechsData = prep(
59
{
610
CODESPACES: {
711
name: "Codespaces",
@@ -20,10 +24,18 @@ export const Tech: Record<string, TechData> =
2024
name: "GitHub",
2125
icon: "github.svg",
2226
},
27+
NEXTCORD: {
28+
name: "Nextcord",
29+
icon: undefined,
30+
},
2331
NUSHELL: {
2432
name: "NuShell",
2533
icon: "nushell.png",
2634
},
35+
OPENGL: {
36+
name: "OpenGL",
37+
icon: undefined,
38+
},
2739
POWERPOINT: {
2840
name: "PowerPoint",
2941
icon: "powerpoint.svg",
@@ -36,4 +48,13 @@ export const Tech: Record<string, TechData> =
3648
name: "VSCode",
3749
icon: "vscode.svg",
3850
},
51+
});
52+
53+
function prep(data: TechsData): TechsData
54+
{
55+
for (let [shard, tech] of Object.entries(data)) {
56+
tech.shard = shardify(shard);
57+
}
58+
59+
return data;
3960
}

src/routes/(sup)/sup/dev/overlay.svelte

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
<script lang="ts">
44
55
import { display_date } from "#scripts/utils";
6+
import { any } from "#scripts/utils";
67
import type { DevEntity } from "#scripts/types/dev";
78
89
import SearchFilters from "#parts/ui/search-filters.svelte";
910
import ProjectBlock from "#parts/dev/block.project.svelte";
1011
11-
import { projects_list } from "#routes/(sup)/sup/projects/projects";
12-
import { ProjectSearchFilter } from "#routes/(sup)/sup/projects/filter.projects.svelte.ts";
12+
import { projects_list, type ProjectData } from "#sup/projects/projects";
13+
import { ProjectSearchFilter } from "#sup/projects/filter.projects.svelte.ts";
1314
1415
import { fade, scale, slide } from "svelte/transition";
1516
import { expoOut } from "svelte/easing";
@@ -25,10 +26,14 @@ let { entity = $bindable() }: Props = $props();
2526
// svelte-ignore non_reactive_update
2627
let filters = new ProjectSearchFilter();
2728
28-
const relevant_projects = projects_list.filter(proj => proj.tech.includes("Svelte/Kit"));
29-
3029
let displayed_projects = $derived(
31-
filters.apply(relevant_projects)
30+
entity
31+
? filters.apply(
32+
projects_list.filter(
33+
proj => any(proj.tech.map(t => t.shard === entity!.shard))
34+
)
35+
) as ProjectData[]
36+
: []
3237
);
3338
3439
</script>
@@ -67,10 +72,12 @@ let displayed_projects = $derived(
6772
</tr>
6873
{/if}
6974

70-
<tr>
71-
<th> FLUENCY </th>
72-
<td> {entity.fluency.toUpperCase()} </td>
73-
</tr>
75+
{#if entity.fluency}
76+
<tr>
77+
<th> FLUENCY </th>
78+
<td> {entity.fluency.toUpperCase()} </td>
79+
</tr>
80+
{/if}
7481

7582
{#if entity.technicals}
7683
<tr>

src/routes/(sup)/sup/music/create/albums/archives/[album]/+page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { albums_list } from "#routes/(sup)/sup/music/create/create";
1+
import { albums_list } from "#sup/music/create/create";
22
import type { AlbumData } from "#scripts/types";
33

44

src/routes/(sup)/sup/projects/filter.projects.svelte.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import { partial_ratio } from "fuzzball";
22

33
import { SearchFilter, type FilterResults } from "#scripts/search-filter.svelte";
4-
import { any, all, sum, get_enabled, datepoint_to_date } from "#scripts/utils";
4+
import { any, all, get_enabled, datepoint_to_date } from "#scripts/utils";
55
import type { States } from "#scripts/types";
66

7-
import { Lang, Tool, Flavour, Kind, State } from "./projects";
7+
import { Flavour, Kind, State } from "./projects";
88
import type { ProjectData } from "./projects";
9+
import { Lang } from "#sup/dev/dev.langs";
10+
import { Tech } from "#sup/dev/dev.techs";
911

1012

1113
export class ProjectSearchFilter extends SearchFilter<ProjectData>
1214
{
13-
tech = $state({ ...SearchFilter.init_states(Lang), ...SearchFilter.init_states(Tool) })
15+
tech = $state({ ...SearchFilter.init_states(Lang), ...SearchFilter.init_states(Tech) })
1416
flavour = $state(SearchFilter.init_states(Flavour));
1517
kind = $state(SearchFilter.init_states(Kind));
1618
state = $state(SearchFilter.init_states(State));

0 commit comments

Comments
 (0)