Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Landing hero: fix try-voting prompt translation, readability and responsiveness (#2943)

Luke Vella3b82f6109cab
diff --git a/apps/landing/src/components/home/hero-demo/hero-demo.tsx b/apps/landing/src/components/home/hero-demo/hero-demo.tsx
index a0dd675b7..335efb48c 100644
--- a/apps/landing/src/components/home/hero-demo/hero-demo.tsx
+++ b/apps/landing/src/components/home/hero-demo/hero-demo.tsx
@@ -34,14 +34,22 @@ export const HeroDemo = async ({ locale }: { locale: string }) => {
}));
return (
- <div className="relative z-10 mb-12 lg:mx-auto lg:w-fit lg:max-w-full">
- <div className="mr-[calc(50%-50vw)] overflow-hidden [mask-image:linear-gradient(to_left,transparent,black_6rem)] lg:mr-0 lg:overflow-visible lg:[mask-image:none]">
- <div aria-hidden="true" className="w-max [zoom:0.65] lg:[zoom:1]">
+ <div className="relative z-10 mb-12 md:mx-auto md:w-fit md:max-w-full">
+ <div className="mr-[calc(50%-50vw)] overflow-hidden [mask-image:linear-gradient(to_left,transparent,black_6rem)] md:mr-0 md:overflow-visible md:[mask-image:none]">
+ <div
+ aria-hidden="true"
+ className="w-max [zoom:0.65] md:[zoom:0.75] lg:[zoom:1]"
+ >
<DesktopDemo locale={locale} days={days} scores={scores} t={t} />
</div>
</div>
<div className="hidden lg:absolute lg:-right-6 lg:-bottom-12 lg:block lg:w-[320px]">
- <TryItPrompt />
+ <TryItPrompt
+ text={t("heroDemoTryIt", {
+ ns: "home",
+ defaultValue: "Go ahead, try voting!",
+ })}
+ />
<MobileDemo days={mobileDays} />
</div>
</div>
diff --git a/apps/landing/src/components/home/hero-demo/try-it-prompt.tsx b/apps/landing/src/components/home/hero-demo/try-it-prompt.tsx
index 1d1bd098c..709ab4eea 100644
--- a/apps/landing/src/components/home/hero-demo/try-it-prompt.tsx
+++ b/apps/landing/src/components/home/hero-demo/try-it-prompt.tsx
@@ -1,6 +1,5 @@
import { cn } from "@rallly/ui";
import { handwritten } from "@/fonts/handwritten";
-import { Trans } from "@/i18n/client/trans";
const ScribbleArrow = ({ className }: { className?: string }) => (
<svg
@@ -17,20 +16,16 @@ const ScribbleArrow = ({ className }: { className?: string }) => (
</svg>
);
-export const TryItPrompt = () => (
+export const TryItPrompt = ({ text }: { text: string }) => (
<div
className={cn(
- "pointer-events-none absolute -top-12 right-2 flex items-start gap-2 text-gray-600",
+ "pointer-events-none absolute -top-9 right-2 z-10 flex items-start text-gray-600",
handwritten.className,
)}
>
- <span className="-rotate-2 whitespace-nowrap text-sm">
- <Trans
- ns="home"
- i18nKey="heroDemoTryIt"
- defaults="Go ahead, try voting!"
- />
+ <span className="-rotate-2 whitespace-nowrap rounded-full bg-gray-800/80 px-2.5 py-1 text-sm text-white backdrop-blur-sm">
+ {text}
</span>
- <ScribbleArrow className="mt-3 size-6 text-gray-500" />
+ <ScribbleArrow className="mt-2.5 -ml-0.5 size-6 text-gray-800/80" />
</div>
);