blog project added and structure of main project updated
This commit is contained in:
1 parent
585a9e20a2
commit
f0918f87b5
26 files changed
+234
-33
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 705 B |
File renamed without changes.
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2
-2
@@ -24,7 +24,7 @@ export default function MyProjects() {
|
||||
|
||||
useEffect(() => {
|
||||
const fetchProjects = async () => {
|
||||
const res = await fetch("/api/projects?sort=desc&per_page=20");
|
||||
const res = await fetch("/api/website/projects?sort=desc&per_page=20");
|
||||
const data = await res.json();
|
||||
const resProjects = data.projects.data;
|
||||
const resCategories = data.categories;
|
||||
@@ -119,7 +119,7 @@ export default function MyProjects() {
|
||||
key={idx}
|
||||
src={image.src}
|
||||
alt="UI/UX Vector"
|
||||
className={`absolute ${idx==0?"bottom-0 start-0":"top-0 end-0"} z-${image.zIndex} project-image w-[85%] max-w-[350px]`}
|
||||
className={`absolute ${idx == 0 ? "bottom-0 start-0" : "end-0 top-0"} z-${image.zIndex} project-image w-[85%] max-w-[350px]`}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
+1
-1
@@ -20,7 +20,7 @@ export default function Services() {
|
||||
useEffect(() => {
|
||||
const fetchServices = async () => {
|
||||
try {
|
||||
const response = await fetch("/api/services", {
|
||||
const response = await fetch("/api/website/services", {
|
||||
cache: "no-store",
|
||||
});
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1,40 @@
|
||||
import type { Metadata } from "next";
|
||||
import Header from "./components/header/page";
|
||||
import Footer from "./components/footer/page";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "parsa aghayi",
|
||||
description: "parsa aghayi personal website",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<>
|
||||
<link
|
||||
rel="icon"
|
||||
href="/images/favicons/website-icon.ico"
|
||||
type="image/ico"
|
||||
sizes="32x32"
|
||||
/>
|
||||
<div className="scroll-watcher" id="top"></div>
|
||||
<div className="absolute start-0 top-0 opacity-0" id="here-is-top"></div>
|
||||
<a
|
||||
href="/#here-is-top"
|
||||
className="scroll-to-top fixed bottom-10 end-5 flex h-[50px] w-[50px] items-center justify-center rounded-full border-2 bg-[#fd6f00] p-5 text-center text-[25px] font-[800] text-white hover:border-[#f3a66b] sm:bottom-[100px] sm:end-10"
|
||||
id="back-to-top"
|
||||
>
|
||||
^
|
||||
</a>
|
||||
|
||||
<Header />
|
||||
|
||||
<div className="main my-10 flex w-full justify-center">{children}</div>
|
||||
|
||||
<Footer />
|
||||
</>
|
||||
);
|
||||
}
|
||||
File renamed without changes.
@@ -1,9 +1,9 @@
|
||||
import Image from "next/image";
|
||||
import Testimonials from "./_components/testimonials/page";
|
||||
import Contact from "./_components/contact/page";
|
||||
import AboutMe from "./_components/about-me/page";
|
||||
import Services from "./_components/services/page";
|
||||
import MyProjects from "./_components/my-projects/page";
|
||||
import Testimonials from "./components/testimonials/page";
|
||||
import Contact from "./components/contact/page";
|
||||
import AboutMe from "./components/about-me/page";
|
||||
import Services from "./components/services/page";
|
||||
import MyProjects from "./components/my-projects/page";
|
||||
|
||||
export default async function Home() {
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1,26 @@
|
||||
"use client";
|
||||
import Image from "next/image";
|
||||
import React, { useState } from "react";
|
||||
import MobileMenu from "../mobile-menu/page";
|
||||
|
||||
export default function BurgerButton() {
|
||||
const [clicked, setClicked] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
className="flex items-center justify-center whitespace-nowrap rounded-md bg-[#FD6F00] px-4 py-2 text-[16px] font-[600] text-[#fff] lg:hidden xl:text-[20px] select-none"
|
||||
onClick={() => setClicked(!clicked)}
|
||||
>
|
||||
<Image
|
||||
src={"/images/icons/burger-menu.svg"}
|
||||
width={25}
|
||||
height={25}
|
||||
alt="burger-menu svg"
|
||||
className="burger-menu"
|
||||
onClick={() => setClicked(!clicked)}
|
||||
/>
|
||||
</button>
|
||||
<MobileMenu clicked={clicked} setClicked={setClicked} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
export default function Footer() {
|
||||
return <div className="flex w-full flex-col">Footer</div>;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
export default function Header() {
|
||||
return <div className="flex h-[70px] w-full bg-red-400">header</div>;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
type propsType = {
|
||||
clicked: boolean;
|
||||
setClicked: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
};
|
||||
export default function MobileMenu({ clicked, setClicked }: propsType) {
|
||||
return (
|
||||
<div className="flex">
|
||||
<div
|
||||
className={`${clicked ? "fixed end-0" : "end-[-1000px] hidden"} top-0 z-30 flex h-full w-full bg-slate-950 opacity-20 lg:hidden`}
|
||||
onClick={() => setClicked(false)}
|
||||
></div>
|
||||
<div
|
||||
className={`fixed start-0 top-0 z-40 flex h-full w-[250px] select-none flex-col items-start gap-10 bg-[#fd6f00] ${clicked ? "start-0" : "start-[-260px]"} mobile-menu lg:start-[-260px]`}
|
||||
>
|
||||
<div className="z-50 flex w-full flex-wrap items-center justify-start bg-white px-3 py-6">
|
||||
<div className="flex w-[50px]">
|
||||
<img src={"/images/logo.svg"} className="w-full" alt="logo" />
|
||||
</div>
|
||||
<p className="ms-2 text-[20px] font-[900] text-[#FD6F00] sm:text-[23px] xl:ms-3 xl:text-[30px]">
|
||||
Parsa Aghayi
|
||||
</p>
|
||||
</div>
|
||||
<ul className="flex w-full flex-col">
|
||||
<a
|
||||
href="/#home"
|
||||
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
||||
onClick={() => {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
href="/#about-me"
|
||||
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
||||
onClick={() => {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
About Me
|
||||
</a>
|
||||
<a
|
||||
href="/#services"
|
||||
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
||||
onClick={() => {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
Services
|
||||
</a>
|
||||
<a
|
||||
href="/#projects"
|
||||
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
||||
onClick={() => {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
Projects
|
||||
</a>
|
||||
<a
|
||||
href="/#testimonials"
|
||||
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
||||
onClick={() => {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
Testimonials
|
||||
</a>
|
||||
<a
|
||||
href="/#contact"
|
||||
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
||||
onClick={() => {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
Contact
|
||||
</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import type { Metadata } from "next";
|
||||
import Header from "./components/header/page";
|
||||
import Footer from "./components/footer/page";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "parsa aghayi",
|
||||
description: "parsa aghayi personal website",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<div className="flex w-full flex-wrap">
|
||||
<link
|
||||
rel="icon"
|
||||
href="/images/favicons/website-icon.ico"
|
||||
type="image/ico"
|
||||
sizes="32x32"
|
||||
/>
|
||||
|
||||
<Header />
|
||||
|
||||
<div className="main flex w-full flex-wrap justify-center">
|
||||
{children}
|
||||
</div>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function NotFound() {
|
||||
const imageUrl = `/images/404/${Math.floor(Math.random() * 5) + 1}.jpg`;
|
||||
return (
|
||||
<div className="mt-[120px] flex flex-col items-center justify-center gap-3">
|
||||
<Image src={imageUrl} width={500} height={500} alt="404 illustration" />
|
||||
<h2 className="text-[30px] font-[800]">Not Found</h2>
|
||||
<p className="font-[600]">Could not find requested resource</p>
|
||||
<Link
|
||||
href="/"
|
||||
className="rounded-md border border-[#fd6f00] px-5 py-3 font-[500] text-[#fd6f00]"
|
||||
>
|
||||
Return Home
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export default async function Blog() {
|
||||
return (
|
||||
<div className="flex">
|
||||
<link
|
||||
rel="icon"
|
||||
href="/images/favicons/blog-icon.png"
|
||||
type="image/png"
|
||||
sizes="32x32"
|
||||
/>
|
||||
salam
|
||||
</div>
|
||||
);
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3
-25
@@ -1,18 +1,11 @@
|
||||
import type { Metadata } from "next";
|
||||
import localFont from "next/font/local";
|
||||
import "./globals.css";
|
||||
import Header from "./_components/header/page";
|
||||
import Footer from "./_components/footer/page";
|
||||
|
||||
const geistSans = localFont({
|
||||
src: "./../../public/fonts/Mikhak-v3.2/Variable/Mikhak[DSTY,KSHD,wght].woff2",
|
||||
variable: "--font-geist-sans",
|
||||
weight: "100 900",
|
||||
});
|
||||
export const metadata: Metadata = {
|
||||
title: "parsa aghayi",
|
||||
description: "parsa aghayi personal website",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
@@ -25,24 +18,9 @@ export default function RootLayout({
|
||||
suppressHydrationWarning={true}
|
||||
className={`${geistSans.variable} relative flex w-full flex-col items-center justify-between antialiased`}
|
||||
>
|
||||
<div className="scroll-watcher" id="top"></div>
|
||||
<div
|
||||
className="absolute start-0 top-0 opacity-0"
|
||||
id="here-is-top"
|
||||
></div>
|
||||
<a
|
||||
href="/#here-is-top"
|
||||
className="scroll-to-top fixed bottom-10 end-5 flex h-[50px] w-[50px] items-center justify-center rounded-full border-2 bg-[#fd6f00] p-5 text-center text-[25px] font-[800] text-white hover:border-[#f3a66b] sm:bottom-[100px] sm:end-10"
|
||||
id="back-to-top"
|
||||
>
|
||||
^
|
||||
</a>
|
||||
|
||||
<Header />
|
||||
|
||||
<div className="main my-10 flex w-full justify-center">{children}</div>
|
||||
|
||||
<Footer />
|
||||
<div className="main flex w-full flex-wrap justify-center">
|
||||
{children}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user