chore: Merge branch 'feat/custom_schema_and_layout'

This commit is contained in:
sauravniraula 2025-07-23 00:14:12 +05:45
commit bffcb22776
No known key found for this signature in database
GPG key ID: 60FCC1B5A5E83326
11 changed files with 30 additions and 167 deletions

View file

@ -35,7 +35,7 @@ const GenerateButton: React.FC<GenerateButtonProps> = ({
<Button
disabled={isDisabled}
onClick={onSubmit}
className="bg-[#5146E5] w-full rounded-lg text-base sm:text-lg py-4 sm:py-6 font-roboto font-semibold hover:bg-[#5146E5]/80 text-white disabled:opacity-50 disabled:cursor-not-allowed"
className="bg-[#5146E5] w-full rounded-lg text-base sm:text-lg py-4 sm:py-6 font-instrument_sans font-semibold hover:bg-[#5146E5]/80 text-white disabled:opacity-50 disabled:cursor-not-allowed"
>
<svg
className="mr-2"

View file

@ -41,7 +41,7 @@ const OutlineContent: React.FC<OutlineContentProps> = ({
);
return (
<div className="space-y-6 font-roboto">
<div className="space-y-6 font-instrument_sans">
<div className="flex items-center justify-between">
<h5 className="text-lg font-medium">
Presentation Outline

View file

@ -48,7 +48,7 @@ const OutlinePage: React.FC = () => {
duration={loadingState.duration}
/>
<div className="max-w-[1200px] mx-auto px-4 sm:px-6 pb-6">
<div className="max-w-[1200px] font-instrument_sans mx-auto px-4 sm:px-6 pb-6">
<div className="mt-4 sm:mt-8">
<PageHeader />

View file

@ -221,9 +221,7 @@ const SupportingDoc = ({ files, onFilesChange }: SupportingDocProps) => {
</div>
</div>
)}
{files.filter(file => file.type === 'text/csv').length > 0 && (
<p className="text-sm text-gray-500 font-roboto text-center pb-1">Analyzing CSV file may take some time... Be Patient!</p>
)}
</div>
</div>
)

View file

@ -1,115 +0,0 @@
import React from 'react'
import { Button } from '@/components/ui/button'
import { toast } from 'sonner'
const ToastTesting = () => {
return (
<div className="p-8 space-y-4">
<h2 className="text-2xl font-bold mb-6">Toast Testing - All Variants</h2>
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
{/* Success Toast */}
<Button
onClick={() => toast.success('Success! Operation completed successfully', {
description: 'Your data has been saved.',
duration: 4000,
richColors: true,
})}
className="bg-green-600 hover:bg-green-700"
>
Success Toast
</Button>
{/* Error Toast */}
<Button
onClick={() => toast.error('Error! Something went wrong', {
description: 'Please try again later.',
duration: 5000,
richColors: true,
})}
className="bg-red-600 hover:bg-red-700"
>
Error Toast
</Button>
{/* Info Toast */}
<Button
onClick={() => toast.info('Information', {
description: 'Here is some useful information for you.',
duration: 4000,
richColors: true,
})}
className="bg-blue-600 hover:bg-blue-700"
>
Info Toast
</Button>
{/* Warning Toast */}
<Button
onClick={() => toast.warning('Warning! Please be careful', {
description: 'This action cannot be undone.',
duration: 4000,
richColors: true,
})}
className="bg-yellow-600 hover:bg-yellow-700"
>
Warning Toast
</Button>
{/* Loading Toast */}
<Button
onClick={() => {
const loadingToast = toast.loading('Processing...', {
description: 'Please wait while we process your request.',
});
// Simulate loading completion after 3 seconds
setTimeout(() => {
toast.dismiss(loadingToast);
toast.success('Processing completed!');
}, 3000);
}}
className="bg-indigo-600 hover:bg-indigo-700"
>
Loading Toast
</Button>
{/* Promise Toast */}
<Button
onClick={() => {
const promise = new Promise((resolve, reject) => {
setTimeout(() => {
Math.random() > 0.5 ? resolve('Success!') : reject('Failed!');
}, 2000);
});
toast.promise(promise, {
loading: 'Uploading file...',
success: 'File uploaded successfully!',
error: 'Failed to upload file',
});
}}
className="bg-teal-600 hover:bg-teal-700"
>
Promise Toast
</Button>
</div>
</div>
)
}
export default ToastTesting

View file

@ -25,7 +25,6 @@ import { PresentationGenerationApi } from "../../services/api/presentation-gener
import { OverlayLoader } from "@/components/ui/overlay-loader";
import Wrapper from "@/components/Wrapper";
import { setPptGenUploadState } from "@/store/slices/presentationGenUpload";
import ToastTesting from "./ToastTesting";
// Types for loading state
interface LoadingState {

View file

@ -5,8 +5,8 @@ import Header from '@/app/dashboard/components/Header'
import { Metadata } from 'next'
export const metadata: Metadata = {
title: "Presenton | AI-Powered Presentation Generator & Design tool",
description: "Transform your data into compelling presentations. Upload your documents and let our AI generate professional, data-driven presentations tailored to your needs.",
title: "Presenton | Open Source AI presentation generator",
description: "Open-source AI presentation generator with custom layouts, multi-model support (OpenAI, Gemini, Ollama), and PDF/PPTX export. A free Gamma alternative.",
alternates: {
canonical: "https://presenton.ai/create"
},
@ -24,7 +24,7 @@ export const metadata: Metadata = {
],
openGraph: {
title: "Create Data Presentation | PresentOn",
description: "Transform your data into compelling presentations with AI",
description: "Open-source AI presentation generator with custom layouts, multi-model support (OpenAI, Gemini, Ollama), and PDF/PPTX export. A free Gamma alternative.",
type: "website",
url: "https://presenton.ai/create",
siteName: "PresentOn"
@ -32,7 +32,7 @@ export const metadata: Metadata = {
twitter: {
card: "summary_large_image",
title: "Create Data Presentation | PresentOn",
description: "Transform your data into compelling presentations with AI",
description: "Open-source AI presentation generator with custom layouts, multi-model support (OpenAI, Gemini, Ollama), and PDF/PPTX export. A free Gamma alternative.",
site: "@presenton_ai",
creator: "@presenton_ai"
}

View file

@ -4,7 +4,7 @@
body {
font-family: Arial, Helvetica, sans-serif;
font-family: var(--font-inter), var(--font-roboto), sans-serif;
}
@layer utilities {

View file

@ -1,26 +1,11 @@
import type { Metadata } from "next";
import localFont from "next/font/local";
import { Fraunces, Montserrat, Inria_Serif, Roboto, Instrument_Sans } from "next/font/google";
import { Roboto, Instrument_Sans } from "next/font/google";
import "./globals.css";
import { Providers } from "./providers";
import { LayoutProvider } from "./(presentation-generator)/context/LayoutContext";
import { Toaster } from "sonner";
const fraunces = Fraunces({
subsets: ["latin"],
weight: ["400"],
variable: "--font-fraunces",
});
const montserrat = Montserrat({
subsets: ["latin"],
weight: ["400"],
variable: "--font-montserrat",
});
const inria_serif = Inria_Serif({
subsets: ["latin"],
weight: ["400"],
variable: "--font-inria-serif",
});
const inter = localFont({
src: [
@ -33,26 +18,26 @@ const inter = localFont({
variable: "--font-inter",
});
const roboto = Roboto({
subsets: ["latin"],
weight: ["400"],
variable: "--font-roboto",
});
const instrument_sans = Instrument_Sans({
subsets: ["latin"],
weight: ["400"],
variable: "--font-instrument-sans",
});
const roboto = Roboto({
subsets: ["latin"],
weight: ["400"],
variable: "--font-roboto",
});
export const metadata: Metadata = {
metadataBase: new URL("https://presenton.ai"),
title: "Presenton.ai - AI Presentation Maker for Data Storytelling",
title: "Presenton - Open Source AI presentation generator",
description:
"Turn complex data into stunning, interactive presentations with Presenton.ai. Create professional slides from reports and analytics in minutes. Try now!",
"Open-source AI presentation generator with custom layouts, multi-model support (OpenAI, Gemini, Ollama), and PDF/PPTX export. A free Gamma alternative.",
keywords: [
"AI presentation maker",
"AI presentation generator",
"data storytelling",
"data visualization tool",
"AI data presentation",
@ -62,17 +47,17 @@ export const metadata: Metadata = {
"professional slides",
],
openGraph: {
title: "Presenton.ai - AI-Powered Data Presentations",
title: "Presenton - Open Source AI presentation generator",
description:
"Transform data into engaging presentations effortlessly with Presenton.ai, your go-to AI tool for stunning slides and data storytelling.",
"Open-source AI presentation generator with custom layouts, multi-model support (OpenAI, Gemini, Ollama), and PDF/PPTX export. A free Gamma alternative.",
url: "https://presenton.ai",
siteName: "Presenton.ai",
siteName: "Presenton",
images: [
{
url: "https://presenton.ai/presenton-feature-graphics.png",
width: 1200,
height: 630,
alt: "Presenton.ai Logo",
alt: "Presenton Logo",
},
],
type: "website",
@ -83,9 +68,9 @@ export const metadata: Metadata = {
},
twitter: {
card: "summary_large_image",
title: "Presenton.ai - AI Presentation Maker for Data Storytelling",
title: "Presenton - Open Source AI presentation generator",
description:
"Create stunning presentations from data with Presenton.ai. Simplify reports and analytics into interactive slides fast!",
"Open-source AI presentation generator with custom layouts, multi-model support (OpenAI, Gemini, Ollama), and PDF/PPTX export. A free Gamma alternative.",
images: ["https://presenton.ai/presenton-feature-graphics.png"],
},
};
@ -99,13 +84,11 @@ export default function RootLayout({
return (
<html lang="en">
<body
className={`$ ${inter.variable} ${fraunces.variable} ${montserrat.variable} ${inria_serif.variable} ${roboto.variable} ${instrument_sans.variable} antialiased`}
className={`${inter.variable} ${roboto.variable} ${instrument_sans.variable} antialiased`}
>
<Providers>
<LayoutProvider>
{children}
</LayoutProvider>
</Providers>
<Toaster position="top-center" richColors={true} />

View file

@ -49,11 +49,11 @@ const Type1SlideLayout: React.FC<Type1SlideLayoutProps> = ({ data: slideData })
</div>
{/* Image */}
<div className="w-full h-full min-h-[200px] lg:min-h-[300px]">
<div className="w-full max-h-[600px]">
<img
src={slideData?.image?.__image_url__ || ''}
alt={slideData?.image?.__image_prompt__ || slideData?.title || ''}
className="w-full h-full object-cover rounded-lg shadow-md"
className="w-full max-h-full object-cover rounded-lg shadow-md"
/>
</div>
</div>

View file

@ -83,12 +83,10 @@ const config: Config = {
'accordion-up': 'accordion-up 0.2s ease-out'
},
fontFamily: {
'instrument_sans':['var(--font-instrument-sans)'],
'instrument_sans':['var(--font-instrument-sans)'],
'inter':['var(--font-inter)'],
'roboto':['var(--font-roboto)'],
'fraunces':['var(--font-fraunces)'],
'montserrat':['var(--font-montserrat)'],
'inria_serif':['var(--font-inria-serif)']
},
}
},