uploading index to repo
This commit is contained in:
BIN
web/app/favicon.ico
Normal file
BIN
web/app/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
290
web/app/globals.css
Normal file
290
web/app/globals.css
Normal file
@@ -0,0 +1,290 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
:root {
|
||||
--background: #ffffff;
|
||||
--foreground: #171717;
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--font-sans: var(--font-geist-sans);
|
||||
--font-mono: var(--font-geist-mono);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background: #0a0a0a;
|
||||
--foreground: #ededed;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--background);
|
||||
color: var(--foreground);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: orange;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
z-index: 1000;
|
||||
padding: 0.5rem 2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 70px;
|
||||
border-radius: 0px 0px 10px 10px;
|
||||
}
|
||||
|
||||
/* Add padding to body to account for fixed header */
|
||||
body {
|
||||
padding-top: 70px;
|
||||
margin: 0;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* Logo Styles */
|
||||
#logo {
|
||||
border-radius: 50%;
|
||||
transition: transform 0.5s ease;
|
||||
}
|
||||
|
||||
#logo:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
/* Navigation Links Container */
|
||||
.nav-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2rem;
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
/* Indivdual Link Styles */
|
||||
.nav-link {
|
||||
color: rgb(255, 255, 255);
|
||||
text-decoration: none;
|
||||
font-size: 1.1rem;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 4px;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Alternative Hover Effect - Background */
|
||||
.nav-link:hover {
|
||||
background-color: rgba(255, 255, 255, 0.171);
|
||||
}
|
||||
|
||||
|
||||
/* Home Page */
|
||||
.home-page {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* Slideshow Styles */
|
||||
.slideshow-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
overflow: hidden;
|
||||
/* margin-bottom: 4rem; */
|
||||
}
|
||||
|
||||
.slide {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
transition: opacity 1s ease-in-out;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.slide.active {
|
||||
opacity: 1;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.slide-image {
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.slideshow-indicators {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid white;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.indicator.active {
|
||||
background: white;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.indicator:hover {
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
/* Four Image Links Section */
|
||||
.image-links-section {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.image-links-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 2rem;
|
||||
justify-content: center;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.image-link-card {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: transform 0.3s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.image-link-card:hover {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
|
||||
.image-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.linked-image {
|
||||
object-fit: cover;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.image-link-card:hover .linked-image {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.image-title {
|
||||
text-align: center;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
/* Centered Title Section */
|
||||
.centered-title-section {
|
||||
text-align: center;
|
||||
padding: 4rem 2rem;
|
||||
background: linear-gradient(to bottom, #f9f9f9, #ffffff);
|
||||
/* margin-top: 2re; */
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 3rem;
|
||||
color: #333;
|
||||
margin-bottom: 1rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 1.5rem;
|
||||
color: #666;
|
||||
margin-bottom: 2rem;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.title-decoration {
|
||||
width: 100px;
|
||||
height: 4px;
|
||||
background: orange;
|
||||
margin: 2rem auto 0;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
@media (max-width: 1024px) {
|
||||
.slideshow-container {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.slideshow-container {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.image-links-container {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.image-links-section {
|
||||
padding: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.slideshow-container {
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.image-links-container {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.centered-title-section {
|
||||
padding: 2rem 1rem;
|
||||
}
|
||||
}
|
||||
19
web/app/layout.js
Normal file
19
web/app/layout.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import DisplayNav from "@/components/Navigation";
|
||||
|
||||
export const metadata = {
|
||||
title: "Leon's Pet Store",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>
|
||||
<DisplayNav />
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
83
web/app/page.js
Normal file
83
web/app/page.js
Normal file
@@ -0,0 +1,83 @@
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
export default function Home() {
|
||||
// Slideshow images array
|
||||
const slideshowImages = [
|
||||
{ src: "/images/home/slideshow/pet1.jpg", alt: "Happy pets" },
|
||||
{ src: "/images/home/slideshow/pet2.jpg", alt: "Pet supplies" },
|
||||
{ src: "/images/home/slideshow/pet3.jpg", alt: "Pet grooming" },
|
||||
{ src: "/images/home/slideshow/pet4.jpg", alt: "Pet food" },
|
||||
];
|
||||
|
||||
const [currentSlide, setCurrentSlide] = useState(0);
|
||||
|
||||
// Auto-advance slideshow
|
||||
useEffect(() => {
|
||||
//Change slide every 7.5 seconds
|
||||
const timer = setInterval(() => {setCurrentSlide((prev) => (prev + 1) % slideshowImages.length);}, 7500);
|
||||
|
||||
return () => clearInterval(timer);
|
||||
}, [slideshowImages.length]);
|
||||
|
||||
// Four images that link to other pages
|
||||
const navImages = [
|
||||
{ src: "/images/home/navimages/adopt.jpg", alt: "Adopt a Pet", link: "/adopt", title: "Adopt a Pet" },
|
||||
{ src: "/images/home/navimages/store.jpg", alt: "Online Store", link: "/store", title: "Online Store" },
|
||||
{ src: "/images/home/navimages/appointments.jpg", alt: "Appointments", link: "/appointments", title: "Appointments" },
|
||||
{ src: "/images/home/navimages/about.jpg", alt: "About Us", link: "/about", title: "About Us" },
|
||||
];
|
||||
|
||||
return (
|
||||
<main className="home-page">
|
||||
{/* Slideshow Section */}
|
||||
<section className="slideshow-container">
|
||||
{slideshowImages.map((image, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className={`slide ${index === currentSlide ? "active" : ""}`}
|
||||
>
|
||||
<Image
|
||||
src={image.src}
|
||||
alt={image.alt}
|
||||
fill
|
||||
priority={index === 0}
|
||||
className="slide-image"
|
||||
sizes="100vw"
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</section>
|
||||
|
||||
{/* Centered Title Section */}
|
||||
<section className="centered-title-section">
|
||||
<h1 className="main-title">Welcome to Leon's Pet Store</h1>
|
||||
<p className="subtitle">Your One-Stop Shop for All Things Pets</p>
|
||||
<div className="title-decoration"></div>
|
||||
</section>
|
||||
|
||||
{/* Four Image Links Section */}
|
||||
<section className="image-links-section">
|
||||
<div className="image-links-container">
|
||||
{navImages.map((item, index) => (
|
||||
<Link href={item.link} key={index} className="image-link-card">
|
||||
<div className="image-wrapper">
|
||||
<Image
|
||||
src={item.src}
|
||||
alt={item.alt}
|
||||
fill
|
||||
className="linked-image"
|
||||
sizes="(max-width: 768px) 100vw, 25vw"
|
||||
/>
|
||||
</div>
|
||||
<h3 className="image-title">{item.title}</h3>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user