Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6cdd98b56 |
File diff suppressed because it is too large
Load Diff
@ -1,166 +1,192 @@
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React from 'react';
|
||||
import type { ReactElement } from 'react';
|
||||
import Head from 'next/head';
|
||||
import Link from 'next/link';
|
||||
import BaseButton from '../components/BaseButton';
|
||||
import CardBox from '../components/CardBox';
|
||||
import SectionFullScreen from '../components/SectionFullScreen';
|
||||
import LayoutGuest from '../layouts/Guest';
|
||||
import BaseDivider from '../components/BaseDivider';
|
||||
import BaseButtons from '../components/BaseButtons';
|
||||
import { getPageTitle } from '../config';
|
||||
import { useAppSelector } from '../stores/hooks';
|
||||
import CardBoxComponentTitle from "../components/CardBoxComponentTitle";
|
||||
import { getPexelsImage, getPexelsVideo } from '../helpers/pexels';
|
||||
import { mdiPackageVariant, mdiWarehouse, mdiInvoice, mdiTruck, mdiWrench } from '@mdi/js';
|
||||
import BaseIcon from '../components/BaseIcon';
|
||||
|
||||
const features = [
|
||||
{
|
||||
title: 'Inventory Management',
|
||||
description: 'Track stock levels, products, and movements in real-time.',
|
||||
icon: mdiPackageVariant,
|
||||
},
|
||||
{
|
||||
title: 'Storage & Warehouses',
|
||||
description: 'Manage multiple warehouses and locations with ease.',
|
||||
icon: mdiWarehouse,
|
||||
},
|
||||
{
|
||||
title: 'Accounting & Invoices',
|
||||
description: 'Complete billing system with payments and expense tracking.',
|
||||
icon: mdiInvoice,
|
||||
},
|
||||
{
|
||||
title: 'Shipping & Orders',
|
||||
description: 'Handle customer orders and shipping workflows efficiently.',
|
||||
icon: mdiTruck,
|
||||
},
|
||||
{
|
||||
title: 'Asset Management',
|
||||
description: 'Track equipment and assets across your organization.',
|
||||
icon: mdiWrench,
|
||||
},
|
||||
];
|
||||
|
||||
export default function Starter() {
|
||||
const [illustrationImage, setIllustrationImage] = useState({
|
||||
src: undefined,
|
||||
photographer: undefined,
|
||||
photographer_url: undefined,
|
||||
})
|
||||
const [illustrationVideo, setIllustrationVideo] = useState({video_files: []})
|
||||
const [contentType, setContentType] = useState('image');
|
||||
const [contentPosition, setContentPosition] = useState('right');
|
||||
const textColor = useAppSelector((state) => state.style.linkColor);
|
||||
|
||||
const title = 'DIGIHELP-IMS'
|
||||
|
||||
// Fetch Pexels image/video
|
||||
useEffect(() => {
|
||||
async function fetchData() {
|
||||
const image = await getPexelsImage();
|
||||
const video = await getPexelsVideo();
|
||||
setIllustrationImage(image);
|
||||
setIllustrationVideo(video);
|
||||
}
|
||||
fetchData();
|
||||
}, []);
|
||||
|
||||
const imageBlock = (image) => (
|
||||
<div
|
||||
className='hidden md:flex flex-col justify-end relative flex-grow-0 flex-shrink-0 w-1/3'
|
||||
style={{
|
||||
backgroundImage: `${
|
||||
image
|
||||
? `url(${image?.src?.original})`
|
||||
: 'linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5))'
|
||||
}`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'left center',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
}}
|
||||
>
|
||||
<div className='flex justify-center w-full bg-blue-300/20'>
|
||||
<a
|
||||
className='text-[8px]'
|
||||
href={image?.photographer_url}
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
Photo by {image?.photographer} on Pexels
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const videoBlock = (video) => {
|
||||
if (video?.video_files?.length > 0) {
|
||||
return (
|
||||
<div className='hidden md:flex flex-col justify-end relative flex-grow-0 flex-shrink-0 w-1/3'>
|
||||
<video
|
||||
className='absolute top-0 left-0 w-full h-full object-cover'
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
>
|
||||
<source src={video?.video_files[0]?.link} type='video/mp4'/>
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
<div className='flex justify-center w-full bg-blue-300/20 z-10'>
|
||||
<a
|
||||
className='text-[8px]'
|
||||
href={video?.user?.url}
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
Video by {video.user.name} on Pexels
|
||||
</a>
|
||||
</div>
|
||||
</div>)
|
||||
}
|
||||
};
|
||||
|
||||
export default function LandingPage() {
|
||||
return (
|
||||
<div
|
||||
style={
|
||||
contentPosition === 'background'
|
||||
? {
|
||||
backgroundImage: `${
|
||||
illustrationImage
|
||||
? `url(${illustrationImage.src?.original})`
|
||||
: 'linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5))'
|
||||
}`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'left center',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
}
|
||||
: {}
|
||||
}
|
||||
>
|
||||
<div className="bg-white text-gray-900 font-sans">
|
||||
<Head>
|
||||
<title>{getPageTitle('Starter Page')}</title>
|
||||
<title>{getPageTitle('DIGIHELP-IMS - Integrated Management Suite')}</title>
|
||||
<meta name="description" content="Next-generation SaaS for Inventory, Storage, Accounting, and Enterprise Management." />
|
||||
</Head>
|
||||
|
||||
<SectionFullScreen bg='violet'>
|
||||
<div
|
||||
className={`flex ${
|
||||
contentPosition === 'right' ? 'flex-row-reverse' : 'flex-row'
|
||||
} min-h-screen w-full`}
|
||||
>
|
||||
{contentType === 'image' && contentPosition !== 'background'
|
||||
? imageBlock(illustrationImage)
|
||||
: null}
|
||||
{contentType === 'video' && contentPosition !== 'background'
|
||||
? videoBlock(illustrationVideo)
|
||||
: null}
|
||||
<div className='flex items-center justify-center flex-col space-y-4 w-full lg:w-full'>
|
||||
<CardBox className='w-full md:w-3/5 lg:w-2/3'>
|
||||
<CardBoxComponentTitle title="Welcome to your DIGIHELP-IMS app!"/>
|
||||
|
||||
<div className="space-y-3">
|
||||
<p className='text-center '>This is a React.js/Node.js app generated by the <a className={`${textColor}`} href="https://flatlogic.com/generator">Flatlogic Web App Generator</a></p>
|
||||
<p className='text-center '>For guides and documentation please check
|
||||
your local README.md and the <a className={`${textColor}`} href="https://flatlogic.com/documentation">Flatlogic documentation</a></p>
|
||||
</div>
|
||||
|
||||
<BaseButtons>
|
||||
<BaseButton
|
||||
href='/login'
|
||||
label='Login'
|
||||
color='info'
|
||||
className='w-full'
|
||||
/>
|
||||
|
||||
</BaseButtons>
|
||||
</CardBox>
|
||||
{/* Hero Section */}
|
||||
<section className="relative py-20 overflow-hidden bg-gradient-to-br from-indigo-900 via-violet-800 to-indigo-900 text-white">
|
||||
<div className="absolute top-0 left-0 w-full h-full opacity-10">
|
||||
<div className="absolute top-10 left-10 w-64 h-64 bg-white rounded-full blur-3xl"></div>
|
||||
<div className="absolute bottom-10 right-10 w-96 h-96 bg-indigo-300 rounded-full blur-3xl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</SectionFullScreen>
|
||||
<div className='bg-black text-white flex flex-col text-center justify-center md:flex-row'>
|
||||
<p className='py-6 text-sm'>© 2026 <span>{title}</span>. All rights reserved</p>
|
||||
<Link className='py-6 ml-4 text-sm' href='/privacy-policy/'>
|
||||
Privacy Policy
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="container mx-auto px-6 relative z-10 text-center">
|
||||
<h1 className="text-5xl md:text-7xl font-extrabold mb-6 tracking-tight animate-fade-in">
|
||||
DIGIHELP-IMS
|
||||
</h1>
|
||||
<p className="text-xl md:text-2xl mb-10 text-indigo-100 max-w-2xl mx-auto leading-relaxed">
|
||||
The Integrated Management Suite for Modern Enterprise.
|
||||
Streamline Inventory, Accounting, and Logistics in one unified platform.
|
||||
</p>
|
||||
<div className="flex flex-col md:flex-row justify-center space-y-4 md:space-y-0 md:space-x-6">
|
||||
<BaseButton
|
||||
href="/register"
|
||||
label="Start Free Trial"
|
||||
color="white"
|
||||
className="px-10 py-4 text-lg font-bold rounded-xl shadow-2xl hover:scale-105 transition-all duration-300"
|
||||
/>
|
||||
<BaseButton
|
||||
href="/login"
|
||||
label="Sign In"
|
||||
outline
|
||||
color="white"
|
||||
className="px-10 py-4 text-lg font-bold rounded-xl border-2 hover:bg-white/10 transition-all duration-300"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Features Section */}
|
||||
<section className="py-24 bg-gray-50">
|
||||
<div className="container mx-auto px-6">
|
||||
<div className="text-center mb-20">
|
||||
<h2 className="text-3xl md:text-4xl font-bold mb-4 text-gray-900">Comprehensive Enterprise Modules</h2>
|
||||
<div className="w-20 h-1 bg-indigo-600 mx-auto mb-6"></div>
|
||||
<p className="text-gray-600 max-w-2xl mx-auto text-lg">
|
||||
Everything you need to run your business operations smoothly and efficiently.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10">
|
||||
{features.map((feature, index) => (
|
||||
<div key={index} className="bg-white p-10 rounded-3xl shadow-sm border border-gray-100 hover:shadow-2xl hover:-translate-y-2 transition-all duration-300 group">
|
||||
<div className="w-16 h-16 bg-indigo-50 text-indigo-600 rounded-2xl flex items-center justify-center mb-8 group-hover:bg-indigo-600 group-hover:text-white transition-colors duration-300">
|
||||
<BaseIcon path={feature.icon} size={36} />
|
||||
</div>
|
||||
<h3 className="text-2xl font-bold mb-4">{feature.title}</h3>
|
||||
<p className="text-gray-600 leading-relaxed text-lg">{feature.description}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* How It Works Section */}
|
||||
<section className="py-24 bg-indigo-900 text-white">
|
||||
<div className="container mx-auto px-6">
|
||||
<div className="text-center mb-16">
|
||||
<h2 className="text-3xl md:text-4xl font-bold mb-4">How It Works</h2>
|
||||
<p className="text-indigo-200">Scale your business in three simple steps.</p>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-12 text-center">
|
||||
{[
|
||||
{ step: '01', title: 'Register Tenant', desc: 'Create your organization account and subdomain.' },
|
||||
{ step: '02', title: 'Activate Modules', desc: 'Choose the modules your business needs to grow.' },
|
||||
{ step: '03', title: 'Start Scaling', desc: 'Onboard your team and automate your workflows.' },
|
||||
].map((item, idx) => (
|
||||
<div key={idx} className="relative">
|
||||
<div className="text-6xl font-black text-white/10 absolute -top-10 left-1/2 -translate-x-1/2 z-0">{item.step}</div>
|
||||
<h3 className="text-2xl font-bold mb-4 relative z-10">{item.title}</h3>
|
||||
<p className="text-indigo-200 relative z-10">{item.desc}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Pricing Section */}
|
||||
<section className="py-24 bg-white">
|
||||
<div className="container mx-auto px-6">
|
||||
<div className="text-center mb-16">
|
||||
<h2 className="text-3xl md:text-4xl font-bold mb-4 text-gray-900 text-center">Flexible Subscription Plans</h2>
|
||||
<p className="text-gray-600">Choose a plan that fits your business scale.</p>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
|
||||
{['Weekly', 'Monthly', 'Yearly', 'Lifetime'].map((plan) => (
|
||||
<div key={plan} className={`p-8 rounded-3xl border ${plan === 'Yearly' ? 'border-indigo-600 bg-indigo-50 ring-4 ring-indigo-600 ring-opacity-10' : 'border-gray-200'} hover:shadow-xl transition-all duration-300`}>
|
||||
<h3 className="text-lg font-semibold text-gray-500 mb-2 uppercase tracking-widest">{plan}</h3>
|
||||
<div className="text-4xl font-bold mb-6 text-indigo-600">
|
||||
{plan === 'Lifetime' ? 'Contact' : '$XX'}
|
||||
</div>
|
||||
<ul className="mb-8 space-y-3 text-gray-600 text-sm">
|
||||
<li>✓ All Modules Included</li>
|
||||
<li>✓ Unlimited Users</li>
|
||||
<li>✓ Priority Support</li>
|
||||
<li>✓ 99.9% Uptime SLA</li>
|
||||
</ul>
|
||||
<BaseButton label="Get Started" color={plan === 'Yearly' ? 'info' : 'white'} outline={plan !== 'Yearly'} className="w-full rounded-xl py-3 font-bold" href="/register" />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Footer */}
|
||||
<footer className="bg-gray-900 text-white py-16 border-t border-gray-800">
|
||||
<div className="container mx-auto px-6">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-12 mb-12">
|
||||
<div>
|
||||
<h3 className="text-2xl font-bold mb-6 text-indigo-400">DIGIHELP-IMS</h3>
|
||||
<p className="text-gray-400 leading-relaxed">
|
||||
Next-generation enterprise resource planning and management suite.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="font-bold mb-6 uppercase tracking-wider text-gray-500 text-sm">Product</h4>
|
||||
<ul className="space-y-4 text-gray-400">
|
||||
<li><Link href="/login" className="hover:text-white transition-colors">Dashboard</Link></li>
|
||||
<li><Link href="/register" className="hover:text-white transition-colors">Pricing</Link></li>
|
||||
<li><Link href="/modules" className="hover:text-white transition-colors">Modules</Link></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="font-bold mb-6 uppercase tracking-wider text-gray-500 text-sm">Legal</h4>
|
||||
<ul className="space-y-4 text-gray-400">
|
||||
<li><Link href="/privacy-policy" className="hover:text-white transition-colors">Privacy Policy</Link></li>
|
||||
<li><Link href="/terms-of-use" className="hover:text-white transition-colors">Terms of Service</Link></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div className="pt-12 border-t border-gray-800 text-center text-gray-500 text-sm">
|
||||
<p>© 2026 DIGIHELP-IMS. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Starter.getLayout = function getLayout(page: ReactElement) {
|
||||
LandingPage.getLayout = function getLayout(page: ReactElement) {
|
||||
return <LayoutGuest>{page}</LayoutGuest>;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user