fix: tab hover on container, full-screen lightbox with nav
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 9s
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 9s
This commit is contained in:
+5
-9
@@ -139,27 +139,23 @@ export function App() {
|
||||
{toast.message}
|
||||
</div>
|
||||
)}
|
||||
<nav className="group mx-auto mt-[1vh] sm:mt-[1.5vh] flex trans-bloc rounded-[50px] w-[min(90vw,360px)] shrink-0 relative overflow-hidden">
|
||||
<nav className="mx-auto mt-[1vh] sm:mt-[1.5vh] flex trans-bloc rounded-[50px] w-[min(95vw,380px)] shrink-0 relative">
|
||||
<div
|
||||
className={`absolute inset-y-0 left-0 w-1/2 rounded-[50px] glass-button transition-transform duration-300 ease-in-out ${
|
||||
activeTab === "media" ? "translate-x-full" : "translate-x-0"
|
||||
}`}
|
||||
/>
|
||||
<button
|
||||
className={`relative z-10 flex-1 h-full py-2 sm:py-2.5 md:py-3 text-center text-sm sm:text-base md:text-lg transition-all active:scale-95 ${
|
||||
activeTab === "live"
|
||||
? "font-medium"
|
||||
: "group-hover:bg-white/10"
|
||||
className={`relative z-10 flex-1 h-full py-2 sm:py-2.5 md:py-3 text-center text-sm sm:text-base md:text-lg transition-all active:scale-95 hover:bg-white/10 ${
|
||||
activeTab === "live" ? "font-medium" : ""
|
||||
}`}
|
||||
onClick={() => setActiveTab("live")}
|
||||
>
|
||||
Live
|
||||
</button>
|
||||
<button
|
||||
className={`relative z-10 flex-1 h-full py-2 sm:py-2.5 md:py-3 text-center text-sm sm:text-base md:text-lg transition-all active:scale-95 ${
|
||||
activeTab === "media"
|
||||
? "font-medium"
|
||||
: "group-hover:bg-white/10"
|
||||
className={`relative z-10 flex-1 h-full py-2 sm:py-2.5 md:py-3 text-center text-sm sm:text-base md:text-lg transition-all active:scale-95 hover:bg-white/10 ${
|
||||
activeTab === "media" ? "font-medium" : ""
|
||||
}`}
|
||||
onClick={() => setActiveTab("media")}
|
||||
>
|
||||
|
||||
@@ -177,11 +177,33 @@ export function MediaGallery({ showToast }: MediaGalleryProps) {
|
||||
|
||||
{selectedItem && (
|
||||
<div
|
||||
className="fixed inset-0 bg-black/80 backdrop-blur-md flex items-center justify-center z-50 p-4 animate-fade-in"
|
||||
className="fixed top-0 left-0 w-screen h-screen bg-black/90 backdrop-blur-md flex items-center justify-center z-[9999] animate-fade-in"
|
||||
onClick={() => setSelectedItem(null)}
|
||||
>
|
||||
<button
|
||||
className="absolute left-2 sm:left-4 top-1/2 -translate-y-1/2 glass-button rounded-full w-10 h-10 flex items-center justify-center z-[10000]"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
const idx = media.findIndex((m) => m.filename === selectedItem.filename);
|
||||
const prev = media[(idx - 1 + media.length) % media.length];
|
||||
setSelectedItem(prev);
|
||||
}}
|
||||
>
|
||||
‹
|
||||
</button>
|
||||
<button
|
||||
className="absolute right-2 sm:right-4 top-1/2 -translate-y-1/2 glass-button rounded-full w-10 h-10 flex items-center justify-center z-[10000]"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
const idx = media.findIndex((m) => m.filename === selectedItem.filename);
|
||||
const next = media[(idx + 1) % media.length];
|
||||
setSelectedItem(next);
|
||||
}}
|
||||
>
|
||||
›
|
||||
</button>
|
||||
<div
|
||||
className="relative max-w-5xl w-full max-h-[90vh] flex items-center justify-center"
|
||||
className="relative w-full h-full flex items-center justify-center p-2 sm:p-4"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{selectedItem.type === "video" ? (
|
||||
@@ -189,13 +211,13 @@ export function MediaGallery({ showToast }: MediaGalleryProps) {
|
||||
src={selectedItem.url}
|
||||
controls
|
||||
autoPlay
|
||||
className="max-w-full max-h-[85vh] rounded-[30px] glass-card"
|
||||
className="w-full h-full object-contain rounded-[20px] sm:rounded-[30px]"
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
src={selectedItem.url}
|
||||
alt={selectedItem.filename}
|
||||
className="max-w-full max-h-[85vh] rounded-[30px] glass-card object-contain"
|
||||
className="w-full h-full object-contain rounded-[20px] sm:rounded-[30px]"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user