mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
some minor adjustments
This commit is contained in:
@@ -304,10 +304,13 @@ const CustomizableStack = () => {
|
||||
zoomOnPinch={false}
|
||||
preventScrolling={false}
|
||||
nodesConnectable={true}
|
||||
nodesDraggable={false}
|
||||
nodesDraggable={true}
|
||||
connectOnClick={true}
|
||||
deleteKeyCode="Delete"
|
||||
selectionKeyCode="Shift"
|
||||
proOptions={{
|
||||
hideAttribution: true,
|
||||
}}
|
||||
>
|
||||
<Background
|
||||
className="bg-gray-950/5"
|
||||
|
||||
@@ -41,7 +41,7 @@ const Navbar = () => {
|
||||
|
||||
return (
|
||||
<nav
|
||||
className={`fixed top-0 left-0 z-[100] w-screen px-8 py-5 flex items-center sm:justify-between justify-center transition-all duration-300 ${
|
||||
className={`fixed top-0 right-0 z-[100] w-screen px-8 py-5 flex items-center sm:justify-between justify-center transition-all duration-300 ${
|
||||
scrolled
|
||||
? "bg-transparent border-transparent"
|
||||
: "sm:bg-black/10 sm:backdrop-blur-xl sm:border-b border-white/10"
|
||||
|
||||
@@ -77,6 +77,22 @@ const TechConstellation = () => {
|
||||
const centerRef = useRef<HTMLDivElement>(null);
|
||||
const techRefs = useRef<{ [key: string]: HTMLDivElement | null }>({});
|
||||
const [isVisible, setIsVisible] = useState(false);
|
||||
const [stars, setStars] = useState<
|
||||
Array<{
|
||||
left: string;
|
||||
top: string;
|
||||
delay: string;
|
||||
}>
|
||||
>([]);
|
||||
|
||||
useEffect(() => {
|
||||
const newStars = Array.from({ length: 20 }, () => ({
|
||||
left: `${Math.random() * 100}%`,
|
||||
top: `${Math.random() * 100}%`,
|
||||
delay: `${Math.random() * 5}s`,
|
||||
}));
|
||||
setStars(newStars);
|
||||
}, []);
|
||||
|
||||
const calculateRadius = (category: string) => {
|
||||
switch (category) {
|
||||
@@ -210,15 +226,14 @@ const TechConstellation = () => {
|
||||
)}
|
||||
|
||||
<div className="absolute inset-0 overflow-hidden">
|
||||
{[...Array(20)].map((_, i) => (
|
||||
{stars.map((star) => (
|
||||
<div
|
||||
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
||||
key={`star-${i}`}
|
||||
key={star.top}
|
||||
className="absolute w-2 h-2 bg-blue-500 rounded-full opacity-20"
|
||||
style={{
|
||||
left: `${Math.random() * 100}%`,
|
||||
top: `${Math.random() * 100}%`,
|
||||
animationDelay: `${Math.random() * 5}s`,
|
||||
left: star.left,
|
||||
top: star.top,
|
||||
animationDelay: star.delay,
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user