Skip to content

Commit e5c9e76

Browse files
authored
site work (#3150)
2 parents f4f5d97 + b97e9ad commit e5c9e76

30 files changed

+500
-546
lines changed

site/package-lock.json

Lines changed: 31 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
"@netlify/functions": "^2.8.1",
2626
"@splinetool/runtime": "^1.9.27",
2727
"@splinetool/viewer": "^1.9.27",
28-
"astro": "^5.0.0-beta.1",
28+
"@types/gl-matrix": "^2.4.5",
29+
"@types/webgl2": "^0.0.11",
30+
"astro": "^5.0.0-beta.5",
2931
"astro-capo": "^0.0.1",
3032
"astro-font": "^0.1.81",
3133
"astro-seo": "^0.8.4",

site/src/components/ContainedSection.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const { className } = Astro.props
77
---
88

99
<section class=`flex w-full justify-center items-center ${className}`>
10-
<div class="max-w-[1200px] w-full z-10 px-4 overflow-hidden">
10+
<div class="max-w-6xl w-full z-10 px-4 overflow-hidden">
1111
<slot />
1212
</div>
1313
</section>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
interface Props {
3+
class: string
4+
}
5+
6+
const { class: className } = Astro.props
7+
---
8+
9+
<svg viewBox="0 0 24 24" class=`${className ? className : "size-4"}`>
10+
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
11+
d="M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
12+
</svg>

site/src/components/Header.astro

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
---
2-
import unionLogo from "#/assets/union-logo/logo.svg"
32
import { Icon } from "astro-icon/components"
3+
import ExternalLinkIcon from "./ExternalLinkIcon.astro"
44
const menuItems = [
55
{
66
url: "/learn",
77
name: "learn",
8-
highlight: false
9-
},
10-
{
11-
url: "https://docs.union.build/",
12-
name: "build",
13-
highlight: false
8+
highlight: false,
9+
external: false
1410
},
1511
{
1612
url: "/ecosystem",
1713
name: "ecosystem",
18-
highlight: false
14+
highlight: false,
15+
external: false
16+
},
17+
{
18+
url: "/blog",
19+
name: "blog",
20+
highlight: false,
21+
external: false
22+
},
23+
{
24+
url: "https://docs.union.build/",
25+
name: "docs",
26+
highlight: false,
27+
external: true
1928
},
2029
{
2130
url: "https://app.union.build",
2231
name: "testnet",
23-
highlight: false
32+
highlight: false,
33+
external: true
2434
}
2535
]
2636
---
@@ -60,7 +70,7 @@ const menuItems = [
6070
<header
6171
class="z-[100] w-full flex justify-around"
6272
>
63-
<div class="max-w-[1200px] flex flex-1 items-center px-4 sm:px-6 drop-shadow-2xl">
73+
<div class="max-w-6xl min-h-[68px] flex flex-1 items-center px-4 sm:px-6 drop-shadow-2xl">
6474
<a
6575
href="/"
6676
id="union-logo"
@@ -98,11 +108,12 @@ const menuItems = [
98108
<a
99109
href={menuItem.url}
100110
class:list={[
101-
"text-normal flex flex-col flex-1 uppercase font-mono font-bold",
111+
"text-normal flex items-center gap-1.5 flex-1 uppercase font-mono font-bold",
102112
{ "text-accent-500": menuItem.highlight },
103113
]}
104114
>
105115
{menuItem.name}
116+
{menuItem.external ? <ExternalLinkIcon class="-mt-0.5 size-4 text-neutral-500" /> : ""}
106117
</a>
107118
</li>
108119
))
@@ -113,7 +124,7 @@ const menuItems = [
113124
rel="noopener noreferrer"
114125
href="https://discord.union.build"
115126
>
116-
<Icon name="tabler:brand-discord-filled" color="#fff" size="1.2rem" />
127+
<Icon name="tabler:brand-discord-filled" color="#fff" size="20px" />
117128
<span class="sr-only">Discord</span>
118129
</a>
119130
</li>
@@ -123,7 +134,7 @@ const menuItems = [
123134
rel="noopener noreferrer"
124135
href="https://github.com/unionlabs/union"
125136
>
126-
<Icon name="tabler:brand-github-filled" color="#fff" size="1.2rem" />
137+
<Icon name="tabler:brand-github-filled" color="#fff" size="20px" />
127138
<span class="sr-only">GitHub</span>
128139
</a>
129140
</li>
@@ -133,7 +144,7 @@ const menuItems = [
133144
rel="noopener noreferrer"
134145
href="https://x.com/union_build"
135146
>
136-
<Icon name="fa6-brands:x-twitter" color="#fff" size="1.1rem" />
147+
<Icon name="fa6-brands:x-twitter" color="#fff" size="18px" />
137148
<span class="sr-only">X</span>
138149
</a>
139150
</li>
@@ -148,7 +159,7 @@ const menuItems = [
148159
title="Menu"
149160
class="bg-white h-[32px] w-[32px] flex items-center justify-center cursor-pointer !p-0"
150161
>
151-
<Icon name="tabler:menu-2" color="#000000" size="1.2rem" />
162+
<Icon name="tabler:menu-2" color="#000000" size="20px" />
152163
</button>
153164

154165
<ul
@@ -158,8 +169,9 @@ const menuItems = [
158169
{
159170
menuItems.map(menuItem => (
160171
<li class="py-2 px-4">
161-
<a href={menuItem.url} class="text-white text-shadow !text-lg text-normal flex flex-col flex-1 uppercase font-mono">
172+
<a href={menuItem.url} class="text-white text-shadow !text-lg text-normal flex gap-1.5 items-center flex-1 uppercase font-mono">
162173
{menuItem.name}
174+
{menuItem.external ? <ExternalLinkIcon class="-mt-0.5 size-4 text-neutral-500" /> : ""}
163175
</a>
164176
</li>
165177
))
@@ -172,7 +184,7 @@ const menuItems = [
172184
class="flex gap-2 text-lg px-4 py-2 uppercase"
173185
>
174186
<label>Discord</label>
175-
<Icon name="tabler:brand-discord-filled" color="#fff" size="1rem" class="my-auto" />
187+
<Icon name="tabler:brand-discord-filled" color="#fff" size="16px" class="my-auto" />
176188
</a>
177189
</li>
178190
<li class="">
@@ -183,7 +195,7 @@ const menuItems = [
183195
class="flex gap-2 text-lg px-4 py-2 uppercase"
184196
>
185197
<label>X.com</label>
186-
<Icon name="fa6-brands:x-twitter" color="#fff" size="1.1rem" class="my-auto" />
198+
<Icon name="fa6-brands:x-twitter" color="#fff" size="18px" class="my-auto" />
187199
</a>
188200
</li>
189201
</ul>

site/src/components/MatrixCover.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
// WaveCubes.astro
33
---
44
<!-- inline style is to prevent white flash on slow internet !-->
5-
<canvas style="background-color: black;" class="matrix-cover w-full h-full block" id="waveCanvas" width="3840" height="2160"></canvas>
5+
<canvas style="background-color: black;" class="w-full h-full block rounded" id="waveCanvas" width="3840"
6+
height="2160" transition:persist></canvas>
67
<script src="../lib/matrix-cover.ts"/>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
interface Props {
3+
gapless?: boolean
4+
}
5+
6+
const { gapless } = Astro.props
7+
---
8+
9+
<main class:list={["flex flex-col relative", {"gap-8 md:gap-16 lg:gap-32 my-8 md:my-16 lg:my-32": !gapless}]}>
10+
<slot />
11+
</main>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
import Card from "#/components/Card.astro"
3+
4+
interface Props {
5+
person: {
6+
twitterHandle: string
7+
name: string
8+
profilePicture: unknown
9+
title: string
10+
}
11+
}
12+
13+
const { person } = Astro.props
14+
---
15+
16+
<Card class="border-none group">
17+
<a
18+
href={`https://x.com/${person.twitterHandle}`}
19+
target="_blank"
20+
rel="noopener noreferrer"
21+
class="gap-4 flex flex-col"
22+
>
23+
<div class="object-cover overflow-hidden">
24+
<!-- We don't have a picture for every person !-->
25+
{person?.profilePicture?.fields?.file?.url ?
26+
<img
27+
class="w-full h-auto group-hover:scale-110 transition"
28+
src={person?.profilePicture?.fields?.file?.url}
29+
alt={`${person.name} - Union worker`}
30+
/>
31+
:
32+
<div class="bg-neutral-900 aspect-1 w-full"></div>
33+
}
34+
</div>
35+
<div class="leading-tight uppercase font-mono">
36+
<h1 class="text-2xl font-bold font-supermolot uppercase">{person.name}</h1>
37+
<div class="text-gray-400 -mt-1 text-lg">{person.title}</div>
38+
<div class="text-accent text-lg -mt-1 block">@{person.twitterHandle}</div>
39+
</div>
40+
</a>
41+
</Card>

0 commit comments

Comments
 (0)