From 48989c9ce2209ff6405bc7fd8783cc2176e13562 Mon Sep 17 00:00:00 2001 From: akash Date: Mon, 8 Dec 2025 23:39:21 +0530 Subject: [PATCH] new tab opening 404 issue solved --- deploy.bat | 39 ++++++++++ public/.htaccess | 52 ++++++------- .../about-antalya-restaurant/about.module.css | 17 +++-- src/components/Footer/Footer.module.css | 75 +++++++++++++++++++ src/components/Navbar/Navbar.module.css | 13 ++++ 5 files changed, 162 insertions(+), 34 deletions(-) create mode 100644 deploy.bat diff --git a/deploy.bat b/deploy.bat new file mode 100644 index 0000000..23244cf --- /dev/null +++ b/deploy.bat @@ -0,0 +1,39 @@ +@echo off +echo ======================================== +echo Antalya Restaurant - Deploy Script +echo ======================================== +echo. + +echo Step 1: Building site... +call npm run build + +if %ERRORLEVEL% NEQ 0 ( + echo Build failed! Please fix errors and try again. + pause + exit /b %ERRORLEVEL% +) + +echo. +echo ======================================== +echo Build successful! +echo ======================================== +echo. + +echo IMPORTANT: Upload ALL contents from the 'out' folder to your server. +echo. +echo Make sure to upload: +echo - All HTML files and folders +echo - The .htaccess file (Apache servers) +echo - The web.config file (IIS servers) +echo - All _next folder contents +echo - All images folder +echo. +echo Server upload location: public_html or www folder +echo. +echo After upload, test these URLs: +echo https://antalya.metatronnest.com/ +echo https://antalya.metatronnest.com/about-antalya-restaurant/ +echo https://antalya.metatronnest.com/antalya-turkish-food-blog/ +echo. + +pause diff --git a/public/.htaccess b/public/.htaccess index f9ae47e..2b71b1c 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,40 +1,36 @@ # Antalya Restaurant - Apache Configuration -# Handles trailing slashes and prevents 403 errors +# SIMPLIFIED - Fixes 404 errors on refresh/new tab 100% RewriteEngine On RewriteBase / - # Force HTTPS (optional, uncomment if needed) - # RewriteCond %{HTTPS} off - # RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] - - # Handle trailing slashes - # If a directory exists with the name, serve its index.html - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_URI} !(.*)/$ - RewriteCond %{REQUEST_FILENAME}/index.html -f - RewriteRule ^(.*)$ $1/ [R=301,L] - - # Serve index.html for directories - RewriteCond %{REQUEST_FILENAME} -d - RewriteRule ^(.*)$ $1/index.html [L] - - # Specific rewrites for main pages (with and without trailing slash) - RewriteRule ^about-antalya-restaurant/?$ about-antalya-restaurant/index.html [L] - RewriteRule ^antalya-restaurant-menu/?$ antalya-restaurant-menu/index.html [L] - RewriteRule ^antalya-restaurant-gallery/?$ antalya-restaurant-gallery/index.html [L] - RewriteRule ^book-a-table/?$ book-a-table/index.html [L] - RewriteRule ^catering-services-ontario/?$ catering-services-ontario/index.html [L] - RewriteRule ^antalya-turkish-food-blog/?$ antalya-turkish-food-blog/index.html [L] - - # Blog posts - RewriteRule ^antalya-turkish-food-blog/([^/]+)/?$ antalya-turkish-food-blog/$1/index.html [L] - # Prevent directory listing Options -Indexes - # Custom error pages + # Skip if file exists + RewriteCond %{REQUEST_FILENAME} -f + RewriteRule ^ - [L] + + # Skip if directory exists + RewriteCond %{REQUEST_FILENAME} -d + RewriteRule ^ - [L] + + # Add trailing slash if missing and directory exists + RewriteCond %{REQUEST_URI} !(.*)/$ + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}/ -d + RewriteRule ^(.*)$ $1/ [R=301,L] + + # Serve index.html from directory if it exists + RewriteCond %{REQUEST_URI} (.*)/$ + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}index.html -f + RewriteRule ^(.*)$ %{DOCUMENT_ROOT}%{REQUEST_URI}index.html [L] + + # Fallback: try to serve as directory with index.html + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}/index.html -f + RewriteRule ^(.*)$ %{DOCUMENT_ROOT}%{REQUEST_URI}/index.html [L] + + # Custom 404 page ErrorDocument 404 /404.html diff --git a/src/app/about-antalya-restaurant/about.module.css b/src/app/about-antalya-restaurant/about.module.css index 270e308..2ed52ee 100644 --- a/src/app/about-antalya-restaurant/about.module.css +++ b/src/app/about-antalya-restaurant/about.module.css @@ -591,6 +591,7 @@ .faqQuestion:hover { background-color: #c49c5c; + color: #fff; } .faqQuestionActive { @@ -602,11 +603,15 @@ font-size: 1.5rem; font-weight: bold; color: var(--color-paragraph); - transition: transform 0.3s ease; + transition: transform 0.3s ease, color 0.3s ease; flex-shrink: 0; margin-left: 1rem; } +.faqQuestion:hover .faqIcon { + color: #fff; +} + .faqQuestionActive .faqIcon { color: #fff; transform: rotate(180deg); @@ -670,12 +675,12 @@ } .sliderBtn:first-child { - left: -6px; -} + left: -6px; + } -.sliderBtn:last-child { - right: -6px; -} + .sliderBtn:last-child { + right: -6px; + } } diff --git a/src/components/Footer/Footer.module.css b/src/components/Footer/Footer.module.css index 23e395d..4030fc5 100644 --- a/src/components/Footer/Footer.module.css +++ b/src/components/Footer/Footer.module.css @@ -206,6 +206,81 @@ color: #d3cab3; } +/* Tablet Layout: 769px to 1200px */ +@media (min-width: 769px) and (max-width: 1200px) { + .footer { + padding: 50px 30px; + } + + .borderWrapper { + padding: 30px; + } + + .container { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 2rem; + max-width: 100%; + } + + .brandColumn { + flex: unset; + min-width: unset; + } + + .linksColumn { + flex: unset; + min-width: unset; + align-items: center; + justify-content: flex-start; + } + + .locationColumn { + flex: unset; + min-width: unset; + } + + .linkList { + text-align: center; + } + + /* Location and Hours Layout */ + .locationHoursWrapper { + display: flex; + flex-direction: column; + gap: 1.5rem; + } + + .locationBlock { + text-align: left; + } + + .hoursBlock { + text-align: left; + } + + .hoursBlock .subHeading { + margin-top: 0; + } + + .description { + max-width: 100%; + font-size: 0.9rem; + } + + .logoImage { + height: 100px; + } + + .heading { + font-size: 1.4rem; + } + + .link { + font-size: 1rem; + } +} + @media (max-width: 1024px) { .container { gap: 2rem; diff --git a/src/components/Navbar/Navbar.module.css b/src/components/Navbar/Navbar.module.css index 12b49d3..90cabc2 100644 --- a/src/components/Navbar/Navbar.module.css +++ b/src/components/Navbar/Navbar.module.css @@ -144,6 +144,19 @@ color: var(--color-paragraph); } +@media (max-width: 1200px) { +.navLink { + color: var(--color-paragraph); + text-decoration: none; + font-size: 22px; + font-weight: 400; + letter-spacing: 0.5px; + transition: all 0.3s ease; + position: relative; + font-family: 'Canva Sans', sans-serif; +} +} + @media (max-width: 1024px) { .desktopMenu { display: none;