Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix(web): improve mobile feature showcase — tap-to-flip and ASCII art scaling

Gus34bc7a4811c9
diff --git a/src/web/src/app/globals.css b/src/web/src/app/globals.css
index 5921e6596..10a758d77 100644
--- a/src/web/src/app/globals.css
+++ b/src/web/src/app/globals.css
@@ -161,11 +161,19 @@
}
/* ─── Feature flip cards ─── */
-.flip-card:hover .flip-card-inner {
- transform: rotateY(180deg);
+@media (hover: hover) {
+ .flip-card:hover .flip-card-inner {
+ transform: rotateY(180deg);
+ }
+ .flip-card:hover .flip-card-front {
+ pointer-events: none;
+ }
}
-.flip-card:hover .flip-card-front {
- pointer-events: none;
+
+@media (prefers-reduced-motion: reduce) {
+ .flip-card-inner {
+ transition-duration: 0s !important;
+ }
}
/* ─── Front-Facing Typewriter Illustration ───
diff --git a/src/web/src/components/home/feature-showcase.tsx b/src/web/src/components/home/feature-showcase.tsx
index a49c9cfec..4c9ad7d83 100644
--- a/src/web/src/components/home/feature-showcase.tsx
+++ b/src/web/src/components/home/feature-showcase.tsx
@@ -1,6 +1,6 @@
"use client";
-import { useEffect, useRef } from "react";
+import { useEffect, useRef, useState } from "react";
import gsap from "gsap";
import { useGSAP } from "@gsap/react";
import { ScrollTrigger } from "gsap/ScrollTrigger";
@@ -189,7 +189,7 @@ export function FeatureShowcase() {
</p>
</div>
- <div className="mx-auto flex max-w-5xl flex-col gap-24 px-6 lg:gap-32 lg:px-12">
+ <div className="mx-auto flex max-w-5xl flex-col gap-16 px-6 sm:gap-24 lg:gap-32 lg:px-12">
{features.map((feature, i) => (
<FeaturePanel key={feature.number} feature={feature} reversed={i % 2 === 1} />
))}
@@ -245,7 +245,7 @@ function FeaturePanel({ feature, reversed }: { feature: Feature; reversed: boole
</div>
{/* Flip card */}
- <div className={`mx-auto w-full max-w-sm sm:max-w-md ${reversed ? "lg:[direction:ltr]" : ""}`}>
+ <div className={`mx-auto w-full max-w-sm sm:max-w-md ${reversed ? "lg:[direction:ltr]" : ""}`} style={{ isolation: "isolate" }}>
<FlipCard feature={feature} />
</div>
</div>
@@ -253,12 +253,18 @@ function FeaturePanel({ feature, reversed }: { feature: Feature; reversed: boole
}
function FlipCard({ feature }: { feature: Feature }) {
+ const [flipped, setFlipped] = useState(false);
+
return (
<div
- className="flip-card panel-crt cursor-pointer"
+ className="flip-card panel-crt relative z-[1] cursor-pointer"
style={{ perspective: "1200px" }}
+ onClick={() => setFlipped((f) => !f)}
>
- <div className="flip-card-inner relative w-full transition-transform duration-500 ease-out [transform-style:preserve-3d]">
+ <div
+ className="flip-card-inner relative w-full transition-transform duration-500 ease-out [transform-style:preserve-3d]"
+ style={flipped ? { transform: "rotateY(180deg)" } : undefined}
+ >
{/* Front — ASCII art */}
<div
className="flip-card-front rounded-lg p-2"
@@ -395,9 +401,9 @@ function AnimatedArt({ lines }: { lines: string[] }) {
return (
<pre
ref={preRef}
- className="text-[10px] sm:text-[13px]"
style={{
fontFamily: "'Menlo', 'Consolas', 'DejaVu Sans Mono', monospace",
+ fontSize: "clamp(7px, 2.5vw, 13px)",
color: "var(--landing-phosphor)",
textShadow: "0 0 8px oklch(0.75 0.18 80 / 40%)",
opacity: 0.8,