blog header and footer created

This commit is contained in:
parsa aghaei committed 2024-09-30 19:57:26 +03:30
1 parent f0918f87b5
commit ff6149badd
29 files changed
+178 -38

No files matched your search

@@ -1,7 +1,7 @@
"use client";
import Image from "next/image";
import React, { useState } from "react";
import MobileMenu from "../mobile-menu/page";
import MobileMenu from "../mobile-menu/mobileMenu";
export default function BurgerButton() {
const [clicked, setClicked] = useState(false);
@@ -1,5 +1,5 @@
import React from "react";
import BurgerButton from "../burger-button/page";
import BurgerButton from "../burger-button/burgerButton";
export default function Header() {
return (
+2 -2
View File
@@ -1,6 +1,6 @@
import type { Metadata } from "next";
import Header from "./components/header/page";
import Footer from "./components/footer/page";
import Header from "./components/header/footer";
import Footer from "./components/footer/footer";
export const metadata: Metadata = {
title: "parsa aghayi",
+5 -5
View File
@@ -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/testimonials";
import Contact from "./components/contact/contact";
import AboutMe from "./components/about-me/aboutMe";
import Services from "./components/services/projects";
import MyProjects from "./components/projects/projects";
export default async function Home() {
@@ -1,7 +1,7 @@
"use client";
import Image from "next/image";
import React, { useState } from "react";
import MobileMenu from "../mobile-menu/page";
import MobileMenu from "../mobile-menu/mobileMenu";
export default function BurgerButton() {
const [clicked, setClicked] = useState(false);
@@ -0,0 +1,57 @@
type buttonPropsType = {
type?: "outline" | "curve" | "curveOutline";
color: "red" | "purple" | "yellow" | "green" | "background";
text: string;
};
export default function Button({ type, color, text }: buttonPropsType) {
return (
<button
className={`flex items-center justify-center rounded-[10px] px-[24px] py-[12px] text-[18px] font-[600] ${
color === "red"
? type === "outline"
? "border-blog-red text-blog-red rounded-[10px] border-[2px]"
: type === "curve"
? "bg-blog-red rounded-[40px] text-white"
: type === "curveOutline"
? "border-blog-red text-blog-red border-2px rounded-[40px]"
: "bg-blog-red text-white"
: color === "purple"
? type === "outline"
? "border-blog-purple text-blog-purple rounded-[10px] border-[2px]"
: type === "curve"
? "bg-blog-purple rounded-[40px] text-white"
: type === "curveOutline"
? "border-blog-purple text-blog-purple border-2px rounded-[40px]"
: "bg-blog-purple text-white"
: color === "yellow"
? type === "outline"
? "border-blog-yellow text-blog-yellow rounded-[10px] border-[2px]"
: type === "curve"
? "bg-blog-yellow rounded-[40px] text-white"
: type === "curveOutline"
? "border-blog-yellow text-blog-yellow border-2px rounded-[40px]"
: "bg-blog-yellow text-white"
: color === "green"
? type === "outline"
? "border-blog-green text-blog-green rounded-[10px] border-[2px]"
: type === "curve"
? "bg-blog-green rounded-[40px] text-white"
: type === "curveOutline"
? "border-blog-green text-blog-green border-2px rounded-[40px]"
: "bg-blog-green text-white"
: color === "background"
? type === "outline"
? "border-blog-background text-blog-background rounded-[10px] border-[2px]"
: type === "curve"
? "bg-blog-background text-blog-text-default rounded-[40px]"
: type === "curveOutline"
? "border-blog-background text-blog-background border-2px rounded-[40px]"
: "bg-blog-background text-blog-text-default"
: ""
} `}
>
{text}
</button>
);
}
@@ -0,0 +1,24 @@
import Image from "next/image";
import React from "react";
export default function Footer() {
return (
<div className="absolute bottom-10 flex w-full items-center justify-around">
<Image
src={"/images/blog/logo/logo-no-background.png"}
width={200}
height={50}
alt="parsaaghayi's blog logo"
/>
<Image
src={"/images/blog/icons/socials.svg"}
width={140}
height={50}
alt="parsaaghayi's blog logo"
/>
<p className="text-blog-text-passive text-[14px] font-[400]">
All Rights Reserved 2018 BehindMars
</p>
</div>
);
}
@@ -1,5 +0,0 @@
import React from "react";
export default function Footer() {
return <div className="flex w-full flex-col">Footer</div>;
}
@@ -0,0 +1,33 @@
import Image from "next/image";
import React from "react";
import Button from "../button/button";
export default function Header() {
return (
<div className="fixed top-10 flex w-full items-center justify-around">
<Image
src={"/images/blog/logo/logo-no-background.png"}
width={200}
height={50}
alt="parsaaghayi's blog logo"
/>
<div className="flex w-[50%] items-center justify-between">
<div className="menu flex flex-nowrap gap-5">
<a href="#">Popular</a>
<a className="active text-blog-text-hover">New</a>
<a href="#">Reading list</a>
<a href="#">Topics</a>
</div>
<div className="flex items-center justify-center gap-5">
<Image
src={"/images/blog/icons/search.svg"}
width={24}
height={24}
alt="search icon"
/>
<Button color={"purple"} text={"Subscribe"} />
</div>
</div>
</div>
);
}
@@ -1,5 +0,0 @@
import React from "react";
export default function Header() {
return <div className="flex h-[70px] w-full bg-red-400">header</div>;
}
+6 -6
View File
@@ -1,6 +1,6 @@
import type { Metadata } from "next";
import Header from "./components/header/page";
import Footer from "./components/footer/page";
import Header from "./components/header/header";
import Footer from "./components/footer/footer";
export const metadata: Metadata = {
title: "parsa aghayi",
@@ -13,17 +13,17 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<div className="flex w-full flex-wrap">
<div className="flex w-full flex-wrap pt-5">
<link
rel="icon"
href="/images/favicons/website-icon.ico"
type="image/ico"
href="/images/favicons/blog-icon.png"
type="image/png"
sizes="32x32"
/>
<Header />
<div className="main flex w-full flex-wrap justify-center">
<div className="main blog relative my-[120px] flex w-full flex-wrap justify-center">
{children}
</div>
+2 -8
View File
@@ -1,13 +1,7 @@
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 className="">
Blog
</div>
);
}
+6 -2
View File
@@ -279,6 +279,10 @@ html {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
.testimonial{
.testimonial {
transition: all ease-in-out 0.5s;
}
}
.center-center {
@apply items-center justify-center;
}
+2 -2
View File
@@ -16,9 +16,9 @@ export default function RootLayout({
<html lang="en">
<body
suppressHydrationWarning={true}
className={`${geistSans.variable} relative flex w-full flex-col items-center justify-between antialiased`}
className={`${geistSans.variable} relative flex h-[100vh] w-full flex-col items-center justify-between antialiased`}
>
<div className="main flex w-full flex-wrap justify-center">
<div className="main flex h-full w-full flex-wrap justify-center">
{children}
</div>
</body>