Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 18 additions & 16 deletions src/Pages/Demo/marqu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ import { ImageIcon, FolderSync, Search, Code } from "lucide-react";

export default function TechMarquee() {
const technologies = [
{
text: "PictoAI",
{
text: "PictoAI",
icon: <ImageIcon className="inline-block ml-1 text-green-500" />,
},
{
text: "SmartSort",
{
text: "SmartSort",
icon: <FolderSync className="inline-block ml-1 text-yellow-500" />,
},
{
text: "QuickView",
{
text: "QuickView",
icon: <Search className="inline-block ml-1 text-green-500" />,
},
{
text: "CodeAI",
{
text: "CodeAI",
icon: <Code className="inline-block ml-1 text-yellow-500" />,
}
];

const duplicatedTechnologies = Array(16).fill(technologies).flat();

return (
<div className="relative w-full overflow-hidden
bg-white
Expand All @@ -30,22 +32,22 @@ export default function TechMarquee() {
dark:shadow-[0_0_50px_rgba(255,255,255,0.1)]
transition-shadow duration-500">
<motion.div
className="flex space-x-6 items-center"
initial={{ x: '0%' }}
animate={{ x: '100%' }}
className="flex w-max items-center"
initial={{ x: '-50%' }}
animate={{ x: '0%' }}
transition={{
duration: 15,
duration: 45,
ease: "linear",
repeat: Infinity,
repeatType: "loop"
}}
>
{[...technologies, ...technologies, ...technologies].map((tech, index) => (
{duplicatedTechnologies.map((tech, index) => (
<div
key={index}
className="flex-shrink-0 flex items-center text-gray-600 dark:text-gray-300 text-xs font-medium"
>
<motion.span
<motion.span
className="flex items-center
bg-gray-100 dark:bg-white/5
hover:bg-gray-200 dark:hover:bg-white/10
Expand All @@ -54,7 +56,7 @@ export default function TechMarquee() {
transition-all duration-300
border border-gray-200 dark:border-white/10
shadow-sm"
whileHover={{
whileHover={{
scale: 1.05,
transition: { duration: 0.2 }
}}
Expand All @@ -65,7 +67,7 @@ export default function TechMarquee() {
{tech.icon}
</span>
</motion.span>
<span className="mx-3 text-gray-300 dark:text-gray-600">•</span>
<span className="mx-6 text-gray-300 dark:text-gray-600">•</span>
</div>
))}
</motion.div>
Expand Down
Loading