Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
589b369b5f | ||
|
|
657e91abc9 | ||
|
|
a7ce20d4da |
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,8 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
*/node_modules/
|
*/node_modules/
|
||||||
*/build/
|
*/build/
|
||||||
|
|
||||||
|
**/node_modules/
|
||||||
|
**/build/
|
||||||
|
.DS_Store
|
||||||
|
.env
|
||||||
File diff suppressed because one or more lines are too long
1
frontend/json/runtimeError.json
Normal file
1
frontend/json/runtimeError.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@ -2,9 +2,9 @@
|
|||||||
* @type {import('next').NextConfig}
|
* @type {import('next').NextConfig}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const output = process.env.NODE_ENV === 'production' ? 'export' : 'standalone';
|
const output = 'standalone';
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
trailingSlash: true,
|
trailingSlash: false,
|
||||||
distDir: 'build',
|
distDir: 'build',
|
||||||
output,
|
output,
|
||||||
basePath: '',
|
basePath: '',
|
||||||
@ -27,34 +27,6 @@ const nextConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
async rewrites() {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
source: '/home',
|
|
||||||
destination: '/web_pages/home',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
source: '/about',
|
|
||||||
destination: '/web_pages/about',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
source: '/services',
|
|
||||||
destination: '/web_pages/services',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
source: '/contact',
|
|
||||||
destination: '/web_pages/contact',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
source: '/blog',
|
|
||||||
destination: '/web_pages/blog',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||
56
frontend/src/pages/[slug].tsx
Normal file
56
frontend/src/pages/[slug].tsx
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { GetServerSideProps } from 'next';
|
||||||
|
import Head from 'next/head';
|
||||||
|
import LayoutGuest from '../layouts/Guest';
|
||||||
|
import WebSiteHeader from '../components/WebPageComponents/Header';
|
||||||
|
import WebSiteFooter from '../components/WebPageComponents/Footer';
|
||||||
|
import { baseURLApi, appTitle } from '../config';
|
||||||
|
|
||||||
|
interface PageProps {
|
||||||
|
pageData: { title: string; content: string } | null;
|
||||||
|
siteConfig?: { contactemail: string; contactphone: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Page({ pageData, siteConfig }: PageProps) {
|
||||||
|
if (!pageData) {
|
||||||
|
return <p className="p-8">Page not found</p>;
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col min-h-screen">
|
||||||
|
<Head>
|
||||||
|
<title>{`${pageData.title} — ${appTitle}`}</title>
|
||||||
|
<meta name="description" content={pageData.content.substring(0, 160)} />
|
||||||
|
</Head>
|
||||||
|
<WebSiteHeader projectName={appTitle} />
|
||||||
|
<main className="flex-grow container mx-auto py-8">
|
||||||
|
<h1 className="text-4xl font-bold mb-4">{pageData.title}</h1>
|
||||||
|
<div
|
||||||
|
className="prose mx-auto"
|
||||||
|
dangerouslySetInnerHTML={{ __html: pageData.content }}
|
||||||
|
/>
|
||||||
|
{siteConfig && (
|
||||||
|
<div className="mt-8">
|
||||||
|
<h2 className="text-2xl font-semibold mb-2">Contact Information</h2>
|
||||||
|
<p>Email: {siteConfig.contactemail}</p>
|
||||||
|
<p>Phone: {siteConfig.contactphone}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</main>
|
||||||
|
<WebSiteFooter projectName={appTitle} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getServerSideProps: GetServerSideProps = async ({ params }) => {
|
||||||
|
const slug = params?.slug as string;
|
||||||
|
const res = await fetch(`${baseURLApi}/pages?slug=${slug}`);
|
||||||
|
const data = await res.json();
|
||||||
|
const pageData = Array.isArray(data) && data.length > 0 ? data[0] : null;
|
||||||
|
let siteConfig = null;
|
||||||
|
if (slug === 'contact') {
|
||||||
|
const resSC = await fetch(`${baseURLApi}/siteconfigs`);
|
||||||
|
const sc = await resSC.json();
|
||||||
|
siteConfig = Array.isArray(sc) && sc.length > 0 ? sc[0] : null;
|
||||||
|
}
|
||||||
|
return { props: { pageData, siteConfig } };
|
||||||
|
};
|
||||||
@ -1,139 +1,9 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import type { GetServerSideProps } from 'next';
|
||||||
import type { ReactElement } from 'react';
|
import Page, { getServerSideProps as getSlugProps } from './[slug]';
|
||||||
import Head from 'next/head';
|
|
||||||
import Link from 'next/link';
|
|
||||||
import { useAppSelector } from '../stores/hooks';
|
|
||||||
import LayoutGuest from '../layouts/Guest';
|
|
||||||
import WebSiteHeader from '../components/WebPageComponents/Header';
|
|
||||||
import WebSiteFooter from '../components/WebPageComponents/Footer';
|
|
||||||
import {
|
|
||||||
HeroDesigns,
|
|
||||||
FeaturesDesigns,
|
|
||||||
AboutUsDesigns,
|
|
||||||
ContactFormDesigns,
|
|
||||||
} from '../components/WebPageComponents/designs';
|
|
||||||
|
|
||||||
import HeroSection from '../components/WebPageComponents/HeroComponent';
|
export const getServerSideProps: GetServerSideProps = async () => {
|
||||||
|
// Delegate to dynamic slug loader for home page
|
||||||
import FeaturesSection from '../components/WebPageComponents/FeaturesComponent';
|
return getSlugProps({ params: { slug: 'home' } } as any);
|
||||||
|
|
||||||
import AboutUsSection from '../components/WebPageComponents/AboutUsComponent';
|
|
||||||
|
|
||||||
import ContactFormSection from '../components/WebPageComponents/ContactFormComponent';
|
|
||||||
|
|
||||||
export default function WebSite() {
|
|
||||||
const cardsStyle = useAppSelector((state) => state.style.cardsStyle);
|
|
||||||
const bgColor = useAppSelector((state) => state.style.bgLayoutColor);
|
|
||||||
const projectName = 'test-salem';
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const darkElement = document.querySelector('body .dark');
|
|
||||||
if (darkElement) {
|
|
||||||
darkElement.classList.remove('dark');
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
const pages = [
|
|
||||||
{
|
|
||||||
href: '/home',
|
|
||||||
label: 'home',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
href: '/about',
|
|
||||||
label: 'about',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
href: '/services',
|
|
||||||
label: 'services',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
href: '/contact',
|
|
||||||
label: 'contact',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
href: '/blog',
|
|
||||||
label: 'blog',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const features_points = [
|
|
||||||
{
|
|
||||||
name: 'Emotion Analytics',
|
|
||||||
description:
|
|
||||||
'Gain insights into human emotions and behaviors with real-time analytics. Enhance safety and productivity in various environments.',
|
|
||||||
icon: 'mdiEmoticonHappyOutline',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Industrial Inspection',
|
|
||||||
description:
|
|
||||||
'Seamlessly integrate AI-driven inspection modules to detect defects and ensure quality without new hardware investments.',
|
|
||||||
icon: 'mdiFactory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Autonomous Robotics',
|
|
||||||
description:
|
|
||||||
'Automate complex manufacturing processes with modular robotic systems that adapt to changing production needs.',
|
|
||||||
icon: 'mdiRobotIndustrial',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='flex flex-col min-h-screen'>
|
|
||||||
<Head>
|
|
||||||
<title>{`IStreamLabs - Pioneering AI & Robotics Solutions`}</title>
|
|
||||||
<meta
|
|
||||||
name='description'
|
|
||||||
content={`Discover IStreamLabs, an Egyptian deep tech startup specializing in cutting-edge AI and robotics solutions. Explore our innovative services and connect with us for consultations.`}
|
|
||||||
/>
|
|
||||||
</Head>
|
|
||||||
<WebSiteHeader projectName={'test-salem'} pages={pages} />
|
|
||||||
<main
|
|
||||||
className={`flex-grow bg-skyBlueTheme-websiteBG rounded-none `}
|
|
||||||
>
|
|
||||||
<HeroSection
|
|
||||||
projectName={'test-salem'}
|
|
||||||
image={['AI-driven innovation in action']}
|
|
||||||
mainText={`Revolutionize with ${projectName} AI Solutions`}
|
|
||||||
subTitle={`${projectName} delivers cutting-edge AI and robotics solutions to transform industries, enhance productivity, and drive innovation. Join us in shaping the future.`}
|
|
||||||
design={HeroDesigns.IMAGE_BG || ''}
|
|
||||||
buttonText={`Explore Our Solutions`}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<FeaturesSection
|
|
||||||
projectName={'test-salem'}
|
|
||||||
image={['AI-powered solutions in action']}
|
|
||||||
withBg={0}
|
|
||||||
features={features_points}
|
|
||||||
mainText={`Discover ${projectName} Key Features`}
|
|
||||||
subTitle={`Explore the innovative features of ${projectName} that drive efficiency and innovation in AI and robotics.`}
|
|
||||||
design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<AboutUsSection
|
|
||||||
projectName={'test-salem'}
|
|
||||||
image={['Team of AI experts']}
|
|
||||||
mainText={`Meet the Innovators at ${projectName}`}
|
|
||||||
subTitle={`At ${projectName}, we are a team of passionate scientists and engineers dedicated to transforming AI and robotics into impactful solutions. Our mission is to advance industries, health, and education through cutting-edge technology.`}
|
|
||||||
design={AboutUsDesigns.IMAGE_LEFT || ''}
|
|
||||||
buttonText={`Learn More About Us`}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ContactFormSection
|
|
||||||
projectName={'test-salem'}
|
|
||||||
design={ContactFormDesigns.WITH_IMAGE || ''}
|
|
||||||
image={['Contact us for inquiries']}
|
|
||||||
mainText={`Connect with ${projectName} Today `}
|
|
||||||
subTitle={`Reach out to us anytime for inquiries or consultations. Our team at ${projectName} is ready to assist you with your AI and robotics needs.`}
|
|
||||||
/>
|
|
||||||
</main>
|
|
||||||
<WebSiteFooter projectName={'test-salem'} pages={pages} />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
WebSite.getLayout = function getLayout(page: ReactElement) {
|
|
||||||
return <LayoutGuest>{page}</LayoutGuest>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default Page;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user