Sticky top bar

This commit is contained in:
Rahaf
2026-06-29 01:07:50 +03:00
parent dc64178f94
commit 03b39317c9
3 changed files with 4 additions and 4 deletions

View File

@ -725,10 +725,10 @@ export default function ClientLayout({ children }) {
)} )}
<main <main
className={`${!isAuthPage && !isProfilePage && !isAuthenticated ? "pt-20" : ""} flex-1 flex flex-col bg-gray-50 overflow-x-hidden ${currentLanguage === "ar" ? "text-right" : "text-left"} ${isHomePage ? "relative" : ""} ${isAuthenticated && !isAuthPage ? "pb-20" : ""}`} className={`${!isAuthPage && !isProfilePage && !isAuthenticated ? "pt-20" : ""} flex-1 flex flex-col bg-gray-50 ${currentLanguage === "ar" ? "text-right" : "text-left"} ${isHomePage ? "relative" : ""} ${isAuthenticated && !isAuthPage ? "pb-20" : ""}`}
> >
{!isAuthPage && ( {!isAuthPage && (
<div className={`flex items-center justify-between px-4 py-2 ${isHomePage ? "absolute top-0 left-0 right-0 z-20 bg-transparent backdrop-blur-3xl" : "border-b border-gray-200/20 bg-white/10 backdrop-blur-lg"}`}> <div className={`flex items-center justify-between px-4 py-2 sticky top-0 z-20 ${isHomePage ? "bg-transparent backdrop-blur-3xl" : "border-b border-gray-200/20 bg-white/10 backdrop-blur-lg"}`}>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span className={`text-sm font-semibold px-3 py-1 rounded-lg ${!isAuthenticated ? (isHomePage ? 'bg-white/20 text-white' : 'bg-gray-200 text-gray-600') : isOwner ? (isHomePage ? 'bg-amber-500/30 text-amber-200' : 'bg-amber-100 text-amber-700') : (isHomePage ? 'bg-blue-500/30 text-blue-200' : 'bg-blue-100 text-blue-700')}`}> <span className={`text-sm font-semibold px-3 py-1 rounded-lg ${!isAuthenticated ? (isHomePage ? 'bg-white/20 text-white' : 'bg-gray-200 text-gray-600') : isOwner ? (isHomePage ? 'bg-amber-500/30 text-amber-200' : 'bg-amber-100 text-amber-700') : (isHomePage ? 'bg-blue-500/30 text-blue-200' : 'bg-blue-100 text-blue-700')}`}>
{!isAuthenticated ? 'زائر' : isOwner ? 'مالك' : 'عميل'} {!isAuthenticated ? 'زائر' : isOwner ? 'مالك' : 'عميل'}

View File

@ -27,7 +27,7 @@ export const metadata = {
export default function Layout({ children }) { export default function Layout({ children }) {
return ( return (
<html lang="ar" dir="rtl"> <html lang="ar" dir="rtl" className="overflow-x-hidden">
<head> <head>
<link <link
rel="preload" rel="preload"

View File

@ -275,7 +275,7 @@ export default function HomePage() {
return ( return (
<div className="min-h-screen"> <div className="min-h-screen">
<section className="relative min-h-screen flex items-center justify-center overflow-hidden pt-16"> <section className="relative min-h-screen flex items-center justify-center overflow-hidden">
<div className="absolute inset-0 z-0"> <div className="absolute inset-0 z-0">
<motion.div <motion.div
className="absolute inset-0 bg-cover bg-center bg-no-repeat" className="absolute inset-0 bg-cover bg-center bg-no-repeat"