mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
(fix:conv) perfect aligment
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { Fragment } from 'react';
|
|
||||||
import DocsGPT3 from './assets/cute_docsgpt3.svg';
|
import DocsGPT3 from './assets/cute_docsgpt3.svg';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export default function Hero({
|
export default function Hero({
|
||||||
handleQuestion,
|
handleQuestion,
|
||||||
}: {
|
}: {
|
||||||
@@ -17,41 +17,42 @@ export default function Hero({
|
|||||||
header: string;
|
header: string;
|
||||||
query: string;
|
query: string;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className="flex h-full w-full flex-col text-black-1000 dark:text-bright-gray items-center justify-between">
|
||||||
className={`pt-20 sm:pt-0 pb-6 sm:pb-12 flex h-full w-full flex-col text-black-1000 dark:text-bright-gray sm:w-full px-2 sm:px-0`}
|
{/* Header Section */}
|
||||||
>
|
<div className="flex flex-col items-center justify-center flex-grow pt-8 md:pt-0">
|
||||||
<div className="flex h-full w-full flex-col items-center justify-center">
|
<div className="flex items-center mb-4">
|
||||||
<div className="flex items-center">
|
<span className="text-4xl font-semibold">DocsGPT</span>
|
||||||
<span className="p-0 text-4xl font-semibold">DocsGPT</span>
|
<img className="mb-1 inline w-14" src={DocsGPT3} alt="docsgpt" />
|
||||||
<img className="mb-1 inline w-14 p-0" src={DocsGPT3} alt="docsgpt" />
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mb-4 flex flex-col items-center justify-center dark:text-white"></div>
|
{/* Demo Buttons Section */}
|
||||||
</div>
|
<div className="w-full max-w-full mb-8 md:mb-16">
|
||||||
<div className="mb-16 grid w-full grid-cols-1 items-center gap-4 self-center text-xs sm:w-auto sm:gap-6 md:mb-0 md:text-sm lg:grid-cols-2">
|
<div className="grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 gap-3 md:gap-4 text-xs">
|
||||||
{demos?.map(
|
{demos?.map(
|
||||||
(demo: { header: string; query: string }, key: number) =>
|
(demo: { header: string; query: string }, key: number) =>
|
||||||
demo.header &&
|
demo.header &&
|
||||||
demo.query && (
|
demo.query && (
|
||||||
<Fragment key={key}>
|
|
||||||
<button
|
<button
|
||||||
|
key={key}
|
||||||
onClick={() => handleQuestion({ question: demo.query })}
|
onClick={() => handleQuestion({ question: demo.query })}
|
||||||
className={`w-full rounded-full border bg-transparent px-6 py-4 text-left min-w-11/12 sm:min-w-[362px] focus:outline-none
|
className="w-full rounded-[66px] border bg-transparent px-6 py-[14px] text-left transition-colors
|
||||||
border-dark-gray text-just-black hover:bg-cultured
|
border-dark-gray text-just-black hover:bg-cultured
|
||||||
dark:border-dim-gray dark:text-chinese-white dark:hover:bg-charleston-green`}
|
dark:border-dim-gray dark:text-chinese-white dark:hover:bg-charleston-green"
|
||||||
>
|
>
|
||||||
<p className="mb-1 font-semibold text-black-1000 dark:text-bright-gray">
|
<p className="mb-2 font-semibold text-black-1000 dark:text-bright-gray">
|
||||||
{demo.header}
|
{demo.header}
|
||||||
</p>
|
</p>
|
||||||
<span className="text-gray-700 dark:text-gray-300 opacity-60">
|
<span className="text-gray-700 dark:text-gray-300 opacity-60 line-clamp-2">
|
||||||
{demo.query}
|
{demo.query}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</Fragment>
|
|
||||||
),
|
),
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export default function MessageInput({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full items-center rounded-[40px] border dark:border-grey border-dark-gray bg-lotion dark:bg-charleston-green-3">
|
<div className="flex w-full mx-2 items-center rounded-[40px] border dark:border-grey border-dark-gray bg-lotion dark:bg-charleston-green-3">
|
||||||
<label htmlFor="message-input" className="sr-only">
|
<label htmlFor="message-input" className="sr-only">
|
||||||
{t('inputPlaceholder')}
|
{t('inputPlaceholder')}
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export default function Conversation() {
|
|||||||
status={status}
|
status={status}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="flex flex-col items-end self-center rounded-2xl bg-opacity-0 z-3 w-full md:w-6/12 h-auto py-1">
|
<div className="flex flex-col items-end self-center rounded-2xl bg-opacity-0 z-3 w-full md:w-9/12 lg:w-8/12 xl:w-8/12 2xl:w-6/12 max-w-[1300px] h-auto py-1">
|
||||||
<div
|
<div
|
||||||
{...getRootProps()}
|
{...getRootProps()}
|
||||||
className="flex w-full items-center rounded-[40px]"
|
className="flex w-full items-center rounded-[40px]"
|
||||||
|
|||||||
@@ -155,9 +155,9 @@ export default function ConversationMessages({
|
|||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<div className="w-full md:w-9/12 lg:w-8/12 xl:w-8/12 2xl:w-6/12 max-w-[1300px] px-2">
|
||||||
{queries.length > 0 ? (
|
{queries.length > 0 ? (
|
||||||
<div className="w-full px-2 md:w-6/12">
|
queries.map((query, index) => (
|
||||||
{queries.map((query, index) => (
|
|
||||||
<Fragment key={index}>
|
<Fragment key={index}>
|
||||||
<ConversationBubble
|
<ConversationBubble
|
||||||
className={'first:mt-5'}
|
className={'first:mt-5'}
|
||||||
@@ -170,11 +170,11 @@ export default function ConversationMessages({
|
|||||||
/>
|
/>
|
||||||
{prepResponseView(query, index)}
|
{prepResponseView(query, index)}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
))}
|
))
|
||||||
</div>
|
|
||||||
) : (
|
) : (
|
||||||
<Hero handleQuestion={handleQuestion} />
|
<Hero handleQuestion={handleQuestion} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ export const SharedConversation = () => {
|
|||||||
/>
|
/>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="flex h-full flex-col items-center justify-between gap-2 overflow-y-hidden dark:bg-raisin-black ">
|
<div className="flex h-full flex-col items-center justify-between gap-2 overflow-y-hidden dark:bg-raisin-black ">
|
||||||
<div className="border-b p-2 dark:border-b-silver w-full md:w-6/12">
|
<div className="border-b p-2 dark:border-b-silver w-full md:w-9/12 lg:w-8/12 xl:w-8/12 2xl:w-6/12 max-w-[1200px]">
|
||||||
<h1 className="font-semi-bold text-4xl text-chinese-black dark:text-chinese-silver">
|
<h1 className="font-semi-bold text-4xl text-chinese-black dark:text-chinese-silver">
|
||||||
{title}
|
{title}
|
||||||
</h1>
|
</h1>
|
||||||
@@ -179,7 +179,7 @@ export const SharedConversation = () => {
|
|||||||
queries={queries}
|
queries={queries}
|
||||||
status={status}
|
status={status}
|
||||||
/>
|
/>
|
||||||
<div className="flex flex-col items-center gap-4 pb-2 w-full md:w-6/12">
|
<div className="flex flex-col items-center gap-4 pb-2 w-full md:w-9/12 lg:w-8/12 xl:w-8/12 2xl:w-6/12 max-w-[1200px]">
|
||||||
{apiKey ? (
|
{apiKey ? (
|
||||||
<MessageInput
|
<MessageInput
|
||||||
value={input}
|
value={input}
|
||||||
|
|||||||
Reference in New Issue
Block a user