Samad14 commited on
Commit
5ca5f6e
·
1 Parent(s): a729ce3

feat(landing): add cursor glow to hero and hover/tap polish to analyze cards

Browse files
bioai-platform/frontend/src/app/(dashboard)/analyze/page.tsx CHANGED
@@ -3,7 +3,7 @@
3
  import { useRouter } from 'next/navigation';
4
  import { Dna, SquaresFour as Layout, MagnifyingGlass as Search, Globe, GitBranch, Flask as Beaker, Stack as Layers, ShareNetwork as Share2, TestTube as FlaskConical, Shuffle, GitFork, Atom, Pill, Pulse as Activity, Brain, ArrowsLeftRight as ArrowSwap } from '@phosphor-icons/react';
5
  import { motion } from 'framer-motion';
6
- import { fadeUp, stagger, cardHover } from '@/lib/animations';
7
  import { ReactNode } from 'react';
8
  import { CriticalButton } from '@/components/ui';
9
 
@@ -59,16 +59,20 @@ const groups: { title: string; items: Operation[] }[] = [
59
  function OperationCard({ op, router }: { op: Operation; router: ReturnType<typeof useRouter> }) {
60
  const Icon = op.icon;
61
  return (
62
- <motion.div variants={fadeUp} whileHover={op.active ? cardHover : undefined}>
63
  <button
64
  onClick={() => op.active && router.push(`/analyze/${op.id}`)}
65
  disabled={!op.active}
66
  className="relative text-left p-5 rounded-2xl glass-card cursor-pointer hover:bg-surface-1 transition w-full disabled:opacity-50"
67
  >
68
  <div className="flex items-start gap-4">
69
- <div className="p-3 rounded-xl bg-accent-cyan/10">
 
 
 
 
70
  <Icon className="w-5 h-5 text-accent-cyan" />
71
- </div>
72
  <div className="flex-1 min-w-0">
73
  <div className="flex items-center gap-2">
74
  <h3 className="font-semibold text-text-primary">{op.name}</h3>
 
3
  import { useRouter } from 'next/navigation';
4
  import { Dna, SquaresFour as Layout, MagnifyingGlass as Search, Globe, GitBranch, Flask as Beaker, Stack as Layers, ShareNetwork as Share2, TestTube as FlaskConical, Shuffle, GitFork, Atom, Pill, Pulse as Activity, Brain, ArrowsLeftRight as ArrowSwap } from '@phosphor-icons/react';
5
  import { motion } from 'framer-motion';
6
+ import { fadeUp, stagger, hoverGlow, press } from '@/lib/animations';
7
  import { ReactNode } from 'react';
8
  import { CriticalButton } from '@/components/ui';
9
 
 
59
  function OperationCard({ op, router }: { op: Operation; router: ReturnType<typeof useRouter> }) {
60
  const Icon = op.icon;
61
  return (
62
+ <motion.div variants={fadeUp} whileHover={op.active ? hoverGlow : undefined} whileTap={op.active ? press : undefined}>
63
  <button
64
  onClick={() => op.active && router.push(`/analyze/${op.id}`)}
65
  disabled={!op.active}
66
  className="relative text-left p-5 rounded-2xl glass-card cursor-pointer hover:bg-surface-1 transition w-full disabled:opacity-50"
67
  >
68
  <div className="flex items-start gap-4">
69
+ <motion.div
70
+ className="p-3 rounded-xl bg-accent-cyan/10"
71
+ whileHover={{ scale: 1.08, rotate: 3 }}
72
+ transition={{ type: 'spring', stiffness: 400, damping: 20 }}
73
+ >
74
  <Icon className="w-5 h-5 text-accent-cyan" />
75
+ </motion.div>
76
  <div className="flex-1 min-w-0">
77
  <div className="flex items-center gap-2">
78
  <h3 className="font-semibold text-text-primary">{op.name}</h3>
bioai-platform/frontend/src/app/page.tsx CHANGED
@@ -6,6 +6,7 @@ import { useRef } from 'react';
6
  import { motion, useScroll, useTransform } from 'framer-motion';
7
  import { ArrowRight, Database, FlowArrow, Brain, CaretDown as ChevronDown } from '@phosphor-icons/react';
8
  import { TiltCard } from '@/components/ui/TiltCard';
 
9
 
10
  const DNAHelix = dynamic(
11
  () => import('@/components/three/DNAHelix'),
@@ -59,6 +60,7 @@ export default function LandingPage() {
59
 
60
  return (
61
  <main className="relative bg-void text-text-primary overflow-x-hidden">
 
62
  <nav className="fixed top-4 inset-x-0 z-50 flex justify-center px-4 pointer-events-none">
63
  <div className="liquid-glass pointer-events-auto flex w-full max-w-5xl items-center justify-between px-6 py-3.5">
64
  <span className="font-display text-sm font-semibold tracking-widest uppercase">
 
6
  import { motion, useScroll, useTransform } from 'framer-motion';
7
  import { ArrowRight, Database, FlowArrow, Brain, CaretDown as ChevronDown } from '@phosphor-icons/react';
8
  import { TiltCard } from '@/components/ui/TiltCard';
9
+ import { CursorGlow } from '@/components/effects/CursorGlow';
10
 
11
  const DNAHelix = dynamic(
12
  () => import('@/components/three/DNAHelix'),
 
60
 
61
  return (
62
  <main className="relative bg-void text-text-primary overflow-x-hidden">
63
+ <CursorGlow />
64
  <nav className="fixed top-4 inset-x-0 z-50 flex justify-center px-4 pointer-events-none">
65
  <div className="liquid-glass pointer-events-auto flex w-full max-w-5xl items-center justify-between px-6 py-3.5">
66
  <span className="font-display text-sm font-semibold tracking-widest uppercase">