From 91e0fd96d2117e6f8fd65fe238fd3da5e94121fe Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Fri, 2 Oct 2026 00:03:46 +0100 Subject: [PATCH] web/home: add the social wall todo: this needs work Signed-off-by: oppiliappan --- web/src/app.css | 30 +++++++ .../home/SocialColumn.stories.svelte | 15 ++++ .../lib/components/home/SocialColumn.svelte | 51 +++++++++++ .../components/home/SocialPost.stories.svelte | 15 ++++ web/src/lib/components/home/SocialPost.svelte | 44 ++++++++++ .../components/home/SocialWall.stories.svelte | 15 ++++ web/src/lib/components/home/SocialWall.svelte | 42 +++++++++ web/src/lib/components/home/content.ts | 85 +++++++++++++++++++ 8 files changed, 297 insertions(+) create mode 100644 web/src/lib/components/home/SocialColumn.stories.svelte create mode 100644 web/src/lib/components/home/SocialColumn.svelte create mode 100644 web/src/lib/components/home/SocialPost.stories.svelte create mode 100644 web/src/lib/components/home/SocialPost.svelte create mode 100644 web/src/lib/components/home/SocialWall.stories.svelte create mode 100644 web/src/lib/components/home/SocialWall.svelte diff --git a/web/src/app.css b/web/src/app.css index 6581c2396..87b2bf4fc 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -260,6 +260,9 @@ html { --animate-spin-step: spin-step 2.5s infinite; --animate-stack-pop: stack-pop 620ms var(--ease-spring) both; --animate-stack-shift: stack-shift 520ms var(--ease-spring) both; + --animate-marquee-up: marquee-up 40s linear infinite; + --animate-marquee-down: marquee-down 40s linear infinite; + --animate-marquee-left: marquee-left 40s linear infinite; @keyframes stack-pop { from { @@ -281,6 +284,33 @@ html { } } + @keyframes marquee-up { + from { + transform: translateY(0); + } + to { + transform: translateY(-50%); + } + } + + @keyframes marquee-left { + from { + transform: translateX(0); + } + to { + transform: translateX(-50%); + } + } + + @keyframes marquee-down { + from { + transform: translateY(-50%); + } + to { + transform: translateY(0); + } + } + @keyframes spin-step { 0% { transform: rotate(0deg); diff --git a/web/src/lib/components/home/SocialColumn.stories.svelte b/web/src/lib/components/home/SocialColumn.stories.svelte new file mode 100644 index 000000000..7f1acee6a --- /dev/null +++ b/web/src/lib/components/home/SocialColumn.stories.svelte @@ -0,0 +1,15 @@ + + + + diff --git a/web/src/lib/components/home/SocialColumn.svelte b/web/src/lib/components/home/SocialColumn.svelte new file mode 100644 index 000000000..069d0489e --- /dev/null +++ b/web/src/lib/components/home/SocialColumn.svelte @@ -0,0 +1,51 @@ + + +{#if direction === "left"} +
+
+ {#each [0, 1] as lap (lap)} +
+ {#each posts as post, i (i)} + + {/each} +
+ {/each} +
+
+{:else} +
+
+ {#each [0, 1] as lap (lap)} + {#each posts as post, i (`${lap}-${i}`)} +
+ +
+ {/each} + {/each} +
+
+{/if} diff --git a/web/src/lib/components/home/SocialPost.stories.svelte b/web/src/lib/components/home/SocialPost.stories.svelte new file mode 100644 index 000000000..6bb698605 --- /dev/null +++ b/web/src/lib/components/home/SocialPost.stories.svelte @@ -0,0 +1,15 @@ + + + + diff --git a/web/src/lib/components/home/SocialPost.svelte b/web/src/lib/components/home/SocialPost.svelte new file mode 100644 index 000000000..6d70d5244 --- /dev/null +++ b/web/src/lib/components/home/SocialPost.svelte @@ -0,0 +1,44 @@ + + +
+
+ +
+ {post.name} + @{post.handle} · {post.age} +
+
+

{post.text}

+
+ {#each stats as { icon: Icon, count, label } (label)} + + + {/each} +
+
diff --git a/web/src/lib/components/home/SocialWall.stories.svelte b/web/src/lib/components/home/SocialWall.stories.svelte new file mode 100644 index 000000000..795d78282 --- /dev/null +++ b/web/src/lib/components/home/SocialWall.stories.svelte @@ -0,0 +1,15 @@ + + + diff --git a/web/src/lib/components/home/SocialWall.svelte b/web/src/lib/components/home/SocialWall.svelte new file mode 100644 index 000000000..cd6264c5e --- /dev/null +++ b/web/src/lib/components/home/SocialWall.svelte @@ -0,0 +1,42 @@ + + +
+
+
+

Recent updates

+

+ The latest and greatest from the Tangled team. +

+ + + Follow @tangled.org + +
+ + + +
+
diff --git a/web/src/lib/components/home/content.ts b/web/src/lib/components/home/content.ts index a2d0df172..2703d30ae 100644 --- a/web/src/lib/components/home/content.ts +++ b/web/src/lib/components/home/content.ts @@ -191,6 +191,91 @@ export const knotPins: KnotPin[] = [ { lat: -41.3, lon: 174.8, host: "knot.kea.nz" } ]; +export interface SocialPostData { + handle: string; + name: string; + text: string; + likes: number; + reposts: number; + replies: number; + age: string; +} + +export const socialPosts: SocialPostData[] = [ + { + handle: "juniper.dev", + name: "Juniper", + text: "stacked PRs on tangled have ruined every other forge for me. jj + round-based review is just how code review should feel.", + likes: 214, + reposts: 31, + replies: 18, + age: "2h" + }, + { + handle: "kestrel.sh", + name: "Kestrel", + text: "moved my dotfiles onto a knot running on a raspberry pi in my closet. zero drama. still federated. very cute.", + likes: 96, + reposts: 12, + replies: 9, + age: "5h" + }, + { + handle: "pixel.pet", + name: "pixel", + text: "the nix microVM CI is absurdly fast once the cache is warm. 40s from push to green on a monorepo 🟢", + likes: 158, + reposts: 22, + replies: 14, + age: "7h" + }, + { + handle: "sage.sh", + name: "sage", + text: "opened my first PR on tangled with my bluesky account. no new login, no new password, just vibes.", + likes: 73, + reposts: 5, + replies: 3, + age: "9h" + }, + { + handle: "fennel.moe", + name: "Fennel", + text: "love that my repo lives on my own server and people can still star it, fork it and send patches from anywhere on the network.", + likes: 132, + reposts: 17, + replies: 11, + age: "12h" + }, + { + handle: "clover.tngl.sh", + name: "clover", + text: "the timeline is genuinely fun?? watching friends star repos and push stuff feels like early github in the best way", + likes: 187, + reposts: 26, + replies: 20, + age: "1d" + }, + { + handle: "wren.tngl.sh", + name: "wren", + text: "picked up a good-first-issue on tangled/core last night and it got merged this morning. contributor onboarding: ✨", + likes: 64, + reposts: 8, + replies: 6, + age: "1d" + }, + { + handle: "birch.tngl.sh", + name: "birch", + text: "self-hosting a knot took me one nixos module and ten minutes. the docs are that good.", + likes: 119, + reposts: 15, + replies: 7, + age: "2d" + } +]; + const opened = (actor: string): ChatCue => ({ at: 300, line: { -- 2.51.2