loading progressbar added
This commit is contained in:
1 parent
eef5690a4a
commit
efb8dcd60c
6 files changed
+58
-25
No files matched your search
@@ -23,42 +23,42 @@ export default async function Header() {
|
||||
</p>
|
||||
</div>
|
||||
<ul className="hidden items-center justify-center rounded p-2 lg:flex">
|
||||
<a
|
||||
<Link
|
||||
href="/#home"
|
||||
className="mx-2 whitespace-nowrap rounded-lg px-1 py-[10px] text-[15px] font-[600] capitalize hover:text-[#FD6F00] xl:text-[20px]"
|
||||
>
|
||||
{dict.website.header.Home}
|
||||
</a>
|
||||
<a
|
||||
</Link>
|
||||
<Link
|
||||
href="/#about-me"
|
||||
className="mx-2 whitespace-nowrap rounded-lg px-1 py-[10px] text-[15px] font-[600] capitalize hover:text-[#FD6F00] xl:text-[20px]"
|
||||
>
|
||||
{dict.website.header.AboutMe}
|
||||
</a>
|
||||
<a
|
||||
</Link>
|
||||
<Link
|
||||
href="/#services"
|
||||
className="mx-2 whitespace-nowrap rounded-lg px-1 py-[10px] text-[15px] font-[600] capitalize hover:text-[#FD6F00] xl:text-[20px]"
|
||||
>
|
||||
{dict.website.header.Services}
|
||||
</a>
|
||||
<a
|
||||
</Link>
|
||||
<Link
|
||||
href="/#projects"
|
||||
className="mx-2 whitespace-nowrap rounded-lg px-1 py-[10px] text-[15px] font-[600] capitalize hover:text-[#FD6F00] xl:text-[20px]"
|
||||
>
|
||||
{dict.website.header.Projects}
|
||||
</a>
|
||||
<a
|
||||
</Link>
|
||||
<Link
|
||||
href="/#testimonials"
|
||||
className="mx-2 whitespace-nowrap rounded-lg px-1 py-[10px] text-[15px] font-[600] capitalize hover:text-[#FD6F00] xl:text-[20px]"
|
||||
>
|
||||
{dict.website.header.Testimonials}
|
||||
</a>
|
||||
<a
|
||||
</Link>
|
||||
<Link
|
||||
href="/#contact"
|
||||
className="mx-2 whitespace-nowrap rounded-lg px-1 py-[10px] text-[15px] font-[600] capitalize hover:text-[#FD6F00] xl:text-[20px]"
|
||||
>
|
||||
{dict.website.header.Contact}
|
||||
</a>
|
||||
</Link>
|
||||
<Link
|
||||
className="mx-2 whitespace-nowrap rounded-lg px-1 py-[10px] text-[15px] font-[600] capitalize hover:text-[#FD6F00] xl:text-[20px]"
|
||||
href={"/blog"}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { setCookie } from "cookies-next";
|
||||
import { LocaleCookieType } from "@/app/types/types";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import Link from "next/link";
|
||||
|
||||
interface SelectLanguageProps {
|
||||
selectedLocale: LocaleCookieType | undefined;
|
||||
@@ -22,14 +23,14 @@ export default function SelectLanguage({
|
||||
{selectedLocale ? (
|
||||
<p
|
||||
onClick={() => setisOpen(!isOpen)}
|
||||
className="mx-2 mb-[5px] cursor-pointer select-none whitespace-nowrap border-b-2 border-[#FD6F00] px-2 py-[10px] pb-[5px] text-[15px] xl:text-[20px] font-[600] text-[#FD6F00] hover:text-[#FD6F00]"
|
||||
className="mx-2 mb-[5px] cursor-pointer select-none whitespace-nowrap border-b-2 border-[#FD6F00] px-2 py-[10px] pb-[5px] text-[15px] font-[600] text-[#FD6F00] hover:text-[#FD6F00] xl:text-[20px]"
|
||||
>
|
||||
{selectedLocale?.value}
|
||||
</p>
|
||||
) : (
|
||||
<p
|
||||
onClick={() => setisOpen(!isOpen)}
|
||||
className="mx-2 mb-[5px] cursor-pointer select-none whitespace-nowrap px-2 py-[10px] pb-[5px] text-[15px] xl:text-[20px] font-[600] hover:text-[#FD6F00]"
|
||||
className="mx-2 mb-[5px] cursor-pointer select-none whitespace-nowrap px-2 py-[10px] pb-[5px] text-[15px] font-[600] hover:text-[#FD6F00] xl:text-[20px]"
|
||||
>
|
||||
{defaultLocale?.value}
|
||||
</p>
|
||||
@@ -38,24 +39,28 @@ export default function SelectLanguage({
|
||||
<ul
|
||||
className={`absolute start-0 z-20 flex w-full flex-col items-center gap-2 rounded-lg border bg-white py-3 transition-all ${isOpen ? "top-[50px] scale-100" : "top-0 scale-0"}`}
|
||||
>
|
||||
<li
|
||||
<Link
|
||||
href=""
|
||||
className="w-[70%] border-b-2 border-[rgba(0,0,0,0)] pb-1 text-center hover:cursor-pointer hover:border-[#FD6F00]"
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
setCookie("selectedLocale", "fa"), router.refresh();
|
||||
setisOpen(false);
|
||||
}}
|
||||
>
|
||||
فارسی
|
||||
</li>
|
||||
<li
|
||||
</Link>
|
||||
<Link
|
||||
href=""
|
||||
className="w-[70%] border-b-2 border-[rgba(0,0,0,0)] pb-1 text-center hover:cursor-pointer hover:border-[#FD6F00]"
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
setCookie("selectedLocale", "en"), router.refresh();
|
||||
setisOpen(false);
|
||||
}}
|
||||
>
|
||||
English
|
||||
</li>
|
||||
</Link>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { Metadata } from "next";
|
||||
import Header from "./components/header/header";
|
||||
import Footer from "./components/footer/footer";
|
||||
import NextTopLoader from "nextjs-toploader";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
@@ -46,7 +47,7 @@ export default function RootLayout({
|
||||
</a>
|
||||
|
||||
<Header />
|
||||
|
||||
<NextTopLoader color="rgb(253 111 0)" showAtBottom={false} />
|
||||
<div className="main my-10 flex w-full justify-center">{children}</div>
|
||||
|
||||
<Footer />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { Metadata } from "next";
|
||||
import Header from "./components/header/header";
|
||||
import Footer from "./components/footer/footer";
|
||||
import NextTopLoader from "nextjs-toploader";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
@@ -14,7 +15,9 @@ export const metadata: Metadata = {
|
||||
default: "parsa aghayi's blog",
|
||||
},
|
||||
description: "parsa aghayi personal blog",
|
||||
images: [`${process.env.NEXT_PUBLIC_FRONT_URL}/og-image?text=parsa aghayi's personal blog`],
|
||||
images: [
|
||||
`${process.env.NEXT_PUBLIC_FRONT_URL}/og-image?text=parsa aghayi's personal blog`,
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -33,7 +36,7 @@ export default function RootLayout({
|
||||
/>
|
||||
|
||||
<Header />
|
||||
|
||||
<NextTopLoader color="rgb(146 131 224)" showAtBottom={false} />
|
||||
<div className="main blog relative my-[100px] flex w-full flex-wrap justify-center md:my-[150px]">
|
||||
{children}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user