Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Temporary files
temp/

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

Expand Down
42 changes: 0 additions & 42 deletions app/(blogs)/blog/(categoryAndTag)/category/[title]/page.jsx

This file was deleted.

46 changes: 0 additions & 46 deletions app/(blogs)/blog/(categoryAndTag)/tag/[title]/page.jsx

This file was deleted.

46 changes: 41 additions & 5 deletions app/(blogs)/blog/[title]/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
export const metadata = {
title:
"Blog Details || Tecvity - Delivering Creative Technological Solutions",
description: "Explore in-depth blog posts from Tecvity.",
};
export async function generateMetadata({ params }) {
const { title } = params;

try {
const baseUrl = process.env.API_BASE_URL || 'http://localhost:3000/';
const response = await fetch(`${baseUrl}/api/Blog/${title}/Meta`);
const data = await response.json();

if (!data || !data.blog) {
return {
title: "Blog Details || Tecvity - Delivering Creative Technological Solutions",
description: "Explore in-depth blog posts from Tecvity.",
};
}

return {
title: `${data.blog.title} || Tecvity`,
description: data.blog.description,
openGraph: {
title: data.blog.title,
description: data.blog.description,
images: [
{
url: data.blog.image,
width: 1200,
height: 630,
alt: data.blog.title,
},
],
},
};
} catch (error) {
console.error("Error fetching blog metadata:", error);
}

return {
title: "Blog Details || Tecvity - Delivering Creative Technological Solutions",
description: "Explore in-depth blog posts from Tecvity.",
};
}


export default function BlogLayout({ children }) {
return <>{children}</>;
Expand Down
46 changes: 46 additions & 0 deletions app/(portfolio)/our-portfolio/(projects)/[type]/[title]/layout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
export async function generateMetadata({ params }) {
const { type, title } = params;

try {
const baseUrl = process.env.API_BASE_URL || 'http://localhost:3000/';
const response = await fetch(`${baseUrl}/api/Portfolio/${type}/${title}/Meta`);
const data = await response.json();

if (!data || !data.portfolio) {
return {
title: "Portfolio || Tecvity - Delivering Creative Technological Solutions",
description: "Explore our portfolio of successful projects at Tecvity.",
};
}

return {
title: `${data.portfolio.title} || Tecvity`,
description: data.portfolio.description,
openGraph: {
title: `${data.portfolio.title} - ${data.portfolio.category}`,
description: data.portfolio.contentDescription || data.portfolio.description,
images: [
{
url: data.portfolio.image,
width: 1200,
height: 630,
alt: data.portfolio.title,
},
],
},
};
} catch (error) {
console.error("Error fetching portfolio metadata:", error);
}

return {
title: "Portfolio || Tecvity - Delivering Creative Technological Solutions",
description: "Explore our portfolio of successful projects at Tecvity.",
};
}


export default function portfoliolayout({ children }) {
return <>{children}</>;
}

31 changes: 31 additions & 0 deletions app/(portfolio)/our-portfolio/(projects)/[type]/[title]/page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"use client";
import Header from "@/components/header/Header";
import DetailBreadcrumb from "@/components/portfolio/components/DetailBreadcrumb";
import ProjectDetails from "@/components/portfolio/components/ProjectDetails";
import MarqueeComponent from "@/components/common/Marquee";
import Footer from "@/components/footer/Footer";
import { useEffect } from "react";
import { useGetData } from "@/utils/hooks";
import Loader from "@/components/common/Loader";

export default function ProjectPageDetails({ params }) {
const { title, type } = params;
const { data , isLoading, error, getData } = useGetData();
useEffect(() => {
getData(`/api/Portfolio/${type}/${title}`)
}, [title]);

if(isLoading) {
return <Loader />;
}

return (
<>
<Header />
{data && <DetailBreadcrumb portfolioTitle={data.portfolio?.title} />}
{data && <ProjectDetails project={data}/>}
<MarqueeComponent />
<Footer />
</>
);
}
12 changes: 12 additions & 0 deletions app/(portfolio)/our-portfolio/(projects)/[type]/layout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export async function generateMetadata({ params }) {
const { type } = params;

return {
title: `${type.charAt(0).toUpperCase() + type.slice(1)} Portfolio`,
};
}

export default function PortfolioLayout({ children }) {
return <>{children}</>;
}

23 changes: 23 additions & 0 deletions app/(portfolio)/our-portfolio/(projects)/[type]/page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Header from "@/components/header/Header";
import Breadcumb from "@/components/portfolio/components/BaseBreadcrumb";
import PortfolioSub from "@/components/portfolio/components/PortfolioSub";
import MarqueeComponent from "@/components/common/Marquee";
import Footer from "@/components/footer/Footer";
import PortfolioPd from "@/components/portfolio/components/PortfolioPd";
export default function ProjectsType({ params }) {
const { type } = params;
const isFullScreenSlideshow = 'pd' === type;

return (
<>
<Header darkMode={isFullScreenSlideshow}/>
{!isFullScreenSlideshow ?
<>
<Breadcumb />
<PortfolioSub sub={type && type} />
<MarqueeComponent />
<Footer />
</> : <PortfolioPd sub={type && type} />}
</>
);
}
26 changes: 0 additions & 26 deletions app/(portfolio)/our-portfolio/(projects)/cloud/[title]/page.jsx

This file was deleted.

23 changes: 0 additions & 23 deletions app/(portfolio)/our-portfolio/(projects)/cloud/page.jsx

This file was deleted.

26 changes: 0 additions & 26 deletions app/(portfolio)/our-portfolio/(projects)/pd/[title]/page.jsx

This file was deleted.

21 changes: 0 additions & 21 deletions app/(portfolio)/our-portfolio/(projects)/pd/page.jsx

This file was deleted.

26 changes: 0 additions & 26 deletions app/(portfolio)/our-portfolio/(projects)/vapt/[title]/page.jsx

This file was deleted.

Loading