diff --git a/frontend/src/components/NavBarItem.tsx b/frontend/src/components/NavBarItem.tsx
index 6548433..2ef67e9 100644
--- a/frontend/src/components/NavBarItem.tsx
+++ b/frontend/src/components/NavBarItem.tsx
@@ -1,6 +1,5 @@
-import React, {useEffect, useRef} from 'react'
+import React, { useEffect, useRef, useState } from 'react'
import Link from 'next/link'
-import { useState } from 'react'
import { mdiChevronUp, mdiChevronDown } from '@mdi/js'
import BaseDivider from './BaseDivider'
import BaseIcon from './BaseIcon'
diff --git a/frontend/src/layouts/Authenticated.tsx b/frontend/src/layouts/Authenticated.tsx
index 1b9907d..73d8391 100644
--- a/frontend/src/layouts/Authenticated.tsx
+++ b/frontend/src/layouts/Authenticated.tsx
@@ -1,5 +1,4 @@
-import React, { ReactNode, useEffect } from 'react'
-import { useState } from 'react'
+import React, { ReactNode, useEffect, useState } from 'react'
import jwt from 'jsonwebtoken';
import { mdiForwardburger, mdiBackburger, mdiMenu } from '@mdi/js'
import menuAside from '../menuAside'
diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.tsx
index 61d525d..f2b0b64 100644
--- a/frontend/src/pages/index.tsx
+++ b/frontend/src/pages/index.tsx
@@ -1,166 +1,209 @@
-
-import React, { useEffect, useState } from 'react';
-import type { ReactElement } from 'react';
+import React, { ReactElement, useMemo, useState } 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 LayoutGuest from '../layouts/Guest';
import { getPageTitle } from '../config';
-import { useAppSelector } from '../stores/hooks';
-import CardBoxComponentTitle from "../components/CardBoxComponentTitle";
-import { getPexelsImage, getPexelsVideo } from '../helpers/pexels';
+type Product = {
+ id: string;
+ title: string;
+ category: string;
+ price: string;
+ description: string;
+ badge: string;
+};
+
+type Inquiry = {
+ id: number;
+ name: string;
+ email: string;
+ firm: string;
+ products: string[];
+ message: string;
+};
+
+const businessName = 'Texas Law Books Co.';
+const navItems = ['Catalog', 'Services', 'About', 'Contact'];
+const products: Product[] = [
+ {
+ id: 'civil',
+ title: 'Texas Civil Practice Library',
+ category: 'Practice Guides',
+ price: '$189',
+ description: 'Courthouse-ready procedure notes, pleadings checklists, and motion workflow references.',
+ badge: 'Best seller',
+ },
+ {
+ id: 'probate',
+ title: 'Estate & Probate Deskbook',
+ category: 'Law Books',
+ price: '$145',
+ description: 'Texas-specific estate planning, probate administration, forms, and desk reference guidance.',
+ badge: 'New edition',
+ },
+ {
+ id: 'business',
+ title: 'Texas Business Law Forms',
+ category: 'Forms & Products',
+ price: '$119',
+ description: 'Reusable entity formation, contract, compliance, and registered-office form templates.',
+ badge: 'Digital + print',
+ },
+];
+
+const buildDownloadHtml = () => `
+
${businessName}
+
+Texas-based legal bookseller
Professional law books and legal products for serious Texas practice. Curated law books, desk references, forms, and practice tools for attorneys, firms, libraries, and students who need reliable Texas-focused legal materials.
Business partner/dealer: Law Source
Browse products
Featured catalog Select editions for immediate quote requests.
${products.map((product) => `
${product.badge} ${product.title} ${product.category}
${product.description}
${product.price}
Request this title `).join('')}
Law library sourcing Locate dependable Texas practice guides, statutes, supplements, and deskbooks.
Bulk firm orders Request bundled pricing for firms, students, and library refreshes.
Product recommendations Tell us your practice area and we will suggest a practical starting set.
`;
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 [selectedBookIds, setSelectedBookIds] = useState([products[0].id]);
+ const [form, setForm] = useState({ name: '', email: '', firm: '', message: '' });
+ const [inquiries, setInquiries] = useState([]);
+ const [selectedInquiryId, setSelectedInquiryId] = useState(null);
+ const [formError, setFormError] = useState('');
+ const [downloadReady, setDownloadReady] = useState(false);
- const title = 'Texas Law Books Site'
+ const selectedProducts = useMemo(
+ () => products.filter((product) => selectedBookIds.includes(product.id)),
+ [selectedBookIds],
+ );
+ const selectedInquiry = inquiries.find((inquiry) => inquiry.id === selectedInquiryId) ?? inquiries[0];
- // Fetch Pexels image/video
- useEffect(() => {
- async function fetchData() {
- const image = await getPexelsImage();
- const video = await getPexelsVideo();
- setIllustrationImage(image);
- setIllustrationVideo(video);
- }
- fetchData();
- }, []);
-
- const imageBlock = (image) => (
-
+ const toggleProduct = (productId: string) => {
+ setSelectedBookIds((current) =>
+ current.includes(productId) ? current.filter((id) => id !== productId) : [...current, productId],
);
+ };
- const videoBlock = (video) => {
- if (video?.video_files?.length > 0) {
- return (
-
-
-
- Your browser does not support the video tag.
-
-
-
)
- }
+ const submitInquiry = (event: React.FormEvent) => {
+ event.preventDefault();
+ setFormError('');
+ if (!form.name.trim() || !form.email.trim()) {
+ setFormError('Please add your name and email before preparing the request.');
+ return;
+ }
+ if (selectedProducts.length === 0) {
+ setFormError('Please select at least one law book or product.');
+ return;
+ }
+ const newInquiry: Inquiry = {
+ id: Date.now(),
+ name: form.name.trim(),
+ email: form.email.trim(),
+ firm: form.firm.trim() || 'Independent buyer',
+ message: form.message.trim() || 'Please send availability and purchasing details.',
+ products: selectedProducts.map((product) => product.title),
};
+ setInquiries((current) => [newInquiry, ...current]);
+ setSelectedInquiryId(newInquiry.id);
+ setForm({ name: '', email: '', firm: '', message: '' });
+ };
+
+ const downloadHtml = () => {
+ const blob = new Blob([buildDownloadHtml()], { type: 'text/html;charset=utf-8' });
+ const url = URL.createObjectURL(blob);
+ const anchor = document.createElement('a');
+ anchor.href = url;
+ anchor.download = 'texas-law-books-partner-website.html';
+ document.body.appendChild(anchor);
+ anchor.click();
+ anchor.remove();
+ URL.revokeObjectURL(url);
+ setDownloadReady(true);
+ };
return (
-
+ <>
-
{getPageTitle('Starter Page')}
+
{getPageTitle('Texas Law Books Partner Website')}
+
-
-
-
- {contentType === 'image' && contentPosition !== 'background'
- ? imageBlock(illustrationImage)
- : null}
- {contentType === 'video' && contentPosition !== 'background'
- ? videoBlock(illustrationVideo)
- : null}
-
-
-
-
-
-
-
-
© 2026 {title} . All rights reserved
-
- Privacy Policy
-
-
+
+
+
+
+
Texas-based legal bookseller
+
Law books and legal products built for Texas practice.
+
A professional black, white, and light-green website for a law-focused retailer selling practice guides, deskbooks, forms, and firm-ready legal products.
+
+ Business partner/dealer:{' '}
+ Law Source
+
+
+ document.getElementById('request')?.scrollIntoView({ behavior: 'smooth' })} className='border-black bg-black px-6 py-3 text-white hover:bg-[#172018]' />
+
+
+
+ No extra external links
+ Single-file export
+
+
+
+
+
-
+
+
+
Featured catalog
Select products for the quote flow Choose products, prepare an inquiry, confirm the request, and download the static HTML file.
+
{products.map((product) => { const selected = selectedBookIds.includes(product.id); return (
{product.badge} {product.price}
{product.title} {product.category}
{product.description}
toggleProduct(product.id)} className={`mt-6 w-full rounded-full border px-4 py-3 text-sm font-black transition focus:outline-none focus:ring-2 focus:ring-[#57b66d] ${selected ? 'border-black bg-black text-white hover:bg-[#172018]' : 'border-black bg-white text-black hover:bg-[#b7efc5]'}`}>{selected ? 'Selected for quote' : 'Add to request'} ); })}
+
+
+
+
+
+
End-to-end workflow
Prepare a customer request The form validates required fields, creates a local confirmation, and shows a visible inquiry list before backend persistence is added.
Selected products {selectedProducts.length > 0 ?
{selectedProducts.map((product) => ({product.title} {product.price} ))} :
Empty state: choose at least one product from the catalog.
}
+
+
+ Full name setForm((current) => ({ ...current, name: event.target.value }))} className='mt-2 h-12 w-full rounded-2xl border border-[#cfe0d4] px-4 text-base font-medium outline-none transition focus:border-black focus:ring-4 focus:ring-[#b7efc5]' placeholder='Jordan Ellis' /> Email setForm((current) => ({ ...current, email: event.target.value }))} className='mt-2 h-12 w-full rounded-2xl border border-[#cfe0d4] px-4 text-base font-medium outline-none transition focus:border-black focus:ring-4 focus:ring-[#b7efc5]' placeholder='buyer@example.com' />
+ Firm or organization setForm((current) => ({ ...current, firm: event.target.value }))} className='mt-2 h-12 w-full rounded-2xl border border-[#cfe0d4] px-4 text-base font-medium outline-none transition focus:border-black focus:ring-4 focus:ring-[#b7efc5]' placeholder='Lone Star Legal Group' />
+ Message setForm((current) => ({ ...current, message: event.target.value }))} className='mt-2 min-h-[118px] w-full rounded-2xl border border-[#cfe0d4] px-4 py-3 text-base font-medium outline-none transition focus:border-black focus:ring-4 focus:ring-[#b7efc5]' placeholder='Tell us the practice area, quantity, or delivery needs.' />
+ {formError ? {formError}
: null}
+ Prepare request confirmation
+
+
Inquiry confirmations {inquiries.length} prepared {inquiries.length === 0 ?
No requests yet. Submit the form to create the first confirmation.
:
{inquiries.map((inquiry) => ( setSelectedInquiryId(inquiry.id)} className={`w-full rounded-2xl border px-4 py-3 text-left transition focus:outline-none focus:ring-2 focus:ring-[#57b66d] ${selectedInquiry?.id === inquiry.id ? 'border-black bg-black text-white' : 'border-[#dce8df] bg-white hover:bg-[#f6fbf7]'}`}>{inquiry.name} {inquiry.products.length} selected products ))}
{selectedInquiry ?
Confirmation detail
{selectedInquiry.name} {selectedInquiry.firm} · {selectedInquiry.email}
{selectedInquiry.products.map((product) => {product} )} {selectedInquiry.message}
: null}
}
+
+
+
+
+
Download deliverable
Single-page HTML file is ready. The downloaded file contains embedded CSS and JavaScript, demo # navigation links, and only one external URL: Law Source in the hero.
{downloadReady ?
Download started successfully.
: null}
Download website HTML
+
+
+
+
+ >
);
}
Starter.getLayout = function getLayout(page: ReactElement) {
return {page} ;
};
-