Add Gitea Actions CI/CD pipeline
Build and push images to the private registry, then deploy to the VPS by commit SHA with health check and rollback.
This commit is contained in:
@@ -73,15 +73,12 @@ export default function ProjectsCarousel({
|
||||
.sort((a, b) => a.carouselOrder - b.carouselOrder);
|
||||
|
||||
const cardsToShow = useCardsToShow();
|
||||
const [index, setIndex] = useState(0);
|
||||
const [rawIndex, setIndex] = useState(0);
|
||||
const maxIndex = Math.max(0, projects.length - cardsToShow);
|
||||
|
||||
// Clamp index when viewport resize shrinks maxIndex
|
||||
useEffect(() => {
|
||||
if (index > maxIndex) {
|
||||
setIndex(maxIndex);
|
||||
}
|
||||
}, [index, maxIndex]);
|
||||
// Clamp during render rather than in an effect: a resize that shrinks
|
||||
// maxIndex takes effect on the same render instead of a second one.
|
||||
const index = Math.min(rawIndex, maxIndex);
|
||||
|
||||
// ─── PIXEL-BASED MOTION VALUE ─────────────────────────────────
|
||||
const trackRef = useRef<HTMLDivElement>(null);
|
||||
@@ -348,7 +345,6 @@ export default function ProjectsCarousel({
|
||||
width: `calc(${cardPercent}% - ${(gapPx * (cardsToShow - 1)) / cardsToShow}px)`,
|
||||
}}
|
||||
>
|
||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
|
||||
<div
|
||||
className="group h-full"
|
||||
style={{ cursor: "pointer" }}
|
||||
|
||||
Reference in New Issue
Block a user