fix(site): satisfy theme-color and avatar contract tests for landing redesign
This commit is contained in:
1 parent
741f01e897
commit
cc58f16230
6 files changed
+117
-44
No files matched your search
@@ -26,7 +26,7 @@ export default async function RegisterPage() {
|
||||
]);
|
||||
const nonce = (await headers()).get("x-nonce") ?? undefined;
|
||||
|
||||
const [online, latestUsers] = await Promise.all([
|
||||
const [online, latestUsers, recentUsers] = await Promise.all([
|
||||
cached("online_count", 10_000, () =>
|
||||
db
|
||||
.select({ total: count() })
|
||||
@@ -41,6 +41,12 @@ export default async function RegisterPage() {
|
||||
.orderBy(desc(User.accountCreated))
|
||||
.limit(6),
|
||||
).catch(() => []),
|
||||
db
|
||||
.select({ username: User.username, look: User.look })
|
||||
.from(User)
|
||||
.where(eq(User.online, "1"))
|
||||
.limit(6)
|
||||
.catch(() => []),
|
||||
]);
|
||||
|
||||
const benefits = [
|
||||
@@ -58,28 +64,46 @@ export default async function RegisterPage() {
|
||||
side={
|
||||
<div className="flex flex-1 flex-col">
|
||||
<div className="text-left">
|
||||
<span className="inline-flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3.5 py-1.5 text-[11px] font-extrabold uppercase tracking-widest text-white/80">
|
||||
<span className="inline-flex items-center gap-2 rounded-full border border-white/10 landing-chip px-3.5 py-1.5 text-[11px] font-extrabold uppercase tracking-widest landing-text-secondary">
|
||||
<span className="relative flex h-2 w-2">
|
||||
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-[var(--color-primary)] opacity-75" />
|
||||
<span className="relative inline-flex h-2 w-2 rounded-full bg-[var(--color-primary)]" />
|
||||
</span>
|
||||
{tpr("usersOnline", { count: online })}
|
||||
</span>
|
||||
<h1 className="mt-5 text-3xl font-black leading-[1.08] tracking-tight text-white sm:text-4xl lg:text-5xl">
|
||||
<h1 className="mt-5 text-3xl font-black leading-[1.08] tracking-tight landing-text-primary sm:text-4xl lg:text-5xl">
|
||||
{tpr("title")}
|
||||
<br />
|
||||
<span className="text-gradient">{hotelName}</span>
|
||||
</h1>
|
||||
<p className="mt-4 max-w-md text-sm leading-relaxed text-white/60 sm:text-base">
|
||||
<p className="mt-4 max-w-md text-sm leading-relaxed landing-text-muted sm:text-base">
|
||||
{tpr("subtitle")}
|
||||
</p>
|
||||
{recentUsers.length > 0 && (
|
||||
<div className="mt-6 flex items-center gap-3">
|
||||
<div className="flex -space-x-2.5">
|
||||
{recentUsers.slice(0, 5).map((u) => (
|
||||
<UserAvatarThumbnail
|
||||
key={u.username}
|
||||
figure={u.look}
|
||||
alt=""
|
||||
options={{ direction: 2 }}
|
||||
className="rounded-full border-2 border-[#0b1020]"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
<p className="m-0 text-[11px] font-extrabold uppercase tracking-widest landing-text-faint">
|
||||
{tpr("whoIsOnline")}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="mt-6 hidden grid-cols-1 gap-2.5 sm:grid">
|
||||
{benefits.map((b) => (
|
||||
<div
|
||||
key={b.title}
|
||||
className="flex items-center gap-3 rounded-xl border border-white/10 bg-white/5 px-4 py-3"
|
||||
className="flex items-center gap-3 rounded-xl border border-white/10 landing-chip px-4 py-3"
|
||||
>
|
||||
<span
|
||||
className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full"
|
||||
@@ -104,10 +128,10 @@ export default async function RegisterPage() {
|
||||
</svg>
|
||||
</span>
|
||||
<div className="min-w-0">
|
||||
<p className="m-0 text-sm font-extrabold text-white">
|
||||
<p className="m-0 text-sm font-extrabold landing-text-primary">
|
||||
{b.title}
|
||||
</p>
|
||||
<p className="m-0 truncate text-xs text-white/55">
|
||||
<p className="m-0 truncate text-xs landing-text-muted">
|
||||
{b.desc}
|
||||
</p>
|
||||
</div>
|
||||
@@ -121,7 +145,7 @@ export default async function RegisterPage() {
|
||||
<div className="mb-1 text-right">
|
||||
{latestUsers.length > 0 && (
|
||||
<>
|
||||
<p className="m-0 text-[11px] font-extrabold uppercase tracking-widest text-white/45">
|
||||
<p className="m-0 text-[11px] font-extrabold uppercase tracking-widest landing-text-faint">
|
||||
Latest citizens
|
||||
</p>
|
||||
<div className="mt-2 flex items-center justify-end -space-x-2.5">
|
||||
|
||||
Reference in new issue
Block a user