-
Notifications
You must be signed in to change notification settings - Fork 200
feat: redesign testimonial marquee with manual controls, add security,headers, and fix SEO issues #335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: redesign testimonial marquee with manual controls, add security,headers, and fix SEO issues #335
Changes from all commits
d2bd412
7e29072
7979489
c0565d4
07e60d4
14b865e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,28 @@ | ||||||||||||||||||||||||||||||||||||||||||
| import React from "react"; | ||||||||||||||||||||||||||||||||||||||||||
| import React, { useState } from "react"; | ||||||||||||||||||||||||||||||||||||||||||
| import { useRouter } from "next/router"; | ||||||||||||||||||||||||||||||||||||||||||
| import { Marquee } from "./Marquee"; | ||||||||||||||||||||||||||||||||||||||||||
| import Tweets from "../services/Tweets"; | ||||||||||||||||||||||||||||||||||||||||||
| const firstRow = Tweets.slice(0, Tweets.length / 2); | ||||||||||||||||||||||||||||||||||||||||||
| const secondRow = Tweets.slice(Tweets.length / 2); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| const firstRow = Tweets.slice(0, Math.ceil(Tweets.length / 2)); | ||||||||||||||||||||||||||||||||||||||||||
| const secondRow = Tweets.slice(Math.ceil(Tweets.length / 2)); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| import { User } from "lucide-react"; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| /** Generates a two-letter initial from a name string */ | ||||||||||||||||||||||||||||||||||||||||||
| const getInitials = (name: string): string => { | ||||||||||||||||||||||||||||||||||||||||||
| const parts = name.trim().split(/\s+/); | ||||||||||||||||||||||||||||||||||||||||||
| if (parts.length >= 2) { | ||||||||||||||||||||||||||||||||||||||||||
| return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase(); | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| return name.slice(0, 2).toUpperCase(); | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| /** Fallback avatar component – renders a user icon/initials in a branded circle */ | ||||||||||||||||||||||||||||||||||||||||||
| const FallbackAvatar = ({ name }: { name: string }) => ( | ||||||||||||||||||||||||||||||||||||||||||
| <div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 ring-2 ring-gray-100 p-1"> | ||||||||||||||||||||||||||||||||||||||||||
| <User className="h-full w-full opacity-60" /> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+20
to
26
|
||||||||||||||||||||||||||||||||||||||||||
| /** Fallback avatar component – renders a user icon/initials in a branded circle */ | |
| const FallbackAvatar = ({ name }: { name: string }) => ( | |
| <div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 ring-2 ring-gray-100 p-1"> | |
| <User className="h-full w-full opacity-60" /> | |
| </div> | |
| ); | |
| /** Fallback avatar component – renders initials when available, otherwise a user icon */ | |
| const FallbackAvatar = ({ name }: { name: string }) => { | |
| const initials = name.trim() ? getInitials(name) : ""; | |
| return ( | |
| <div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 ring-2 ring-gray-100 p-1"> | |
| {initials ? ( | |
| <span className="text-sm font-medium leading-none">{initials}</span> | |
| ) : ( | |
| <User className="h-full w-full opacity-60" /> | |
| )} | |
| </div> | |
| ); | |
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CoverImagenow usescn(...)but the helper isn’t imported in this file, which will cause a runtime/compile failure. Also, the Tailwind classestransition-borderandtransition-scaledon’t exist in this repo’s Tailwind config, so the intended transitions won’t apply; use valid Tailwind transition utilities (or extend Tailwind) instead.