📌
【GPT3.5turbo】NextJsで動くGPT3.5turbo【#2Create Input Form】
【#2Create Input Form】
YouTube:https://youtu.be/2-cu-mVqEwQ
今回は入力フォームの作成とスタイリングを行います。
スタイリングが中心になりますので、
動画を見ている時間がない方は
こちらの内容をコピペしてしまって大丈夫です!
styles/globals.css
@tailwind base;
@tailwind components;
@tailwind utilities;
body {
background-color: #000c22;
}
pages/index.tsx
export default function Home() {
return (
<main className=" flex min-h-screen flex-col items-center px-2">
<h1 className=' my-6 text-3xl font-bold tracking-tight text-white sm:text-4xl'>
Hello Chat-GPT
</h1>
<div className=" max-w-xl overflow-hidden bg-gray-900 py-4 sm:py-6 lg:py-8">
<div className=' mx-auto max-w-3xl px-6 lg:px-8'>
<div>
<div className=' max-w-xl lg:max-w-lg mb-3'>
<h2 className='text-3xl mb-3 font-bold tracking-tight text-white sm:text-4xl'>
Please Enter Your Message.
</h2>
</div>
</div>
<div>
<form className='flex flex-col items-center justify-center'>
<textarea name="" cols={20} rows={4} className=' w-full flex-auto rounded-md border-0 bg-white/5 px-3.5 py-2 text-white shadow-sm ring-1 ring-inset ring-white/10 focus:ring-2 focus:ring-inset focus:ring-indigo-500 sm:text-sm sm:leading-6'></textarea>
<button type="submit" className=' flex-none rounded-md bg-indigo-500 mt-3 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500'>Send Message</button>
</form>
</div>
</div>
</div>
</main>
)
}
Discussion