Skip to content

Commit be3da93

Browse files
committed
Add gradient
1 parent 33914a5 commit be3da93

File tree

5 files changed

+566
-41
lines changed

5 files changed

+566
-41
lines changed

.DS_Store

0 Bytes
Binary file not shown.

assets/footer-background.png

518 KB
Loading

pages/index.tsx

+14-40
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useState } from 'react';
22
import Head from 'next/head';
3+
import Script from 'next/script';
34
import Link from 'next/link';
45
import { Disclosure } from '@headlessui/react';
56
import {
@@ -80,6 +81,13 @@ export default function Example() {
8081

8182
return (
8283
<div>
84+
<Head>
85+
<title>docstring.ai - Detect any programming language</title>
86+
<meta
87+
name="description"
88+
content="Inferlang can detect the programming language of a given source code. Powered by Guesslang and hosted by Mintlify, it supports more than 50 programming with 90+% accuracy"
89+
/>
90+
</Head>
8391
<Disclosure as="div" className="relative pb-32 overflow-hidden">
8492
{({ open }: any) => (
8593
<>
@@ -156,23 +164,8 @@ export default function Example() {
156164
'absolute inset-x-0 left-1/2 transform -translate-x-1/2 w-full overflow-hidden lg:inset-y-0',
157165
)}
158166
>
159-
<div className="absolute inset-0 flex">
160-
<div className="h-full w-1/2 bg-primary" />
161-
<div className="h-full w-1/2 bg-secondary" />
162-
</div>
163-
<div className="relative flex justify-center">
164-
<svg
165-
className="flex-shrink-0"
166-
width={1750}
167-
height={308}
168-
viewBox="0 0 1750 308"
169-
xmlns="http://www.w3.org/2000/svg"
170-
>
171-
<path d="M284.161 308H1465.84L875.001 182.413 284.161 308z" fill="#18e299" />
172-
<path d="M1465.84 308L16.816 0H1750v308h-284.16z" fill="#18e299" />
173-
<path d="M1733.19 0L284.161 308H0V0h1733.19z" fill="#0c8c5e" />
174-
<path d="M875.001 182.413L1733.19 0H16.816l858.185 182.413z" fill="#0c8c5e" />
175-
</svg>
167+
<div className="relative h-full">
168+
<canvas id="gradient-canvas" />
176169
</div>
177170
</div>
178171
<header className="relative py-8">
@@ -184,15 +177,6 @@ export default function Example() {
184177
</>
185178
)}
186179
</Disclosure>
187-
188-
<Head>
189-
<title>Inferlang - Detect any programming language</title>
190-
<meta
191-
name="description"
192-
content="Inferlang can detect the programming language of a given source code. Powered by Guesslang and hosted by Mintlify, it supports more than 50 programming with 90+% accuracy"
193-
/>
194-
</Head>
195-
196180
<main className="relative -mt-32">
197181
<div className="max-w-screen-xl mx-auto pb-6 px-4 sm:px-6 lg:pb-16 lg:px-8">
198182
<div className="rounded-lg overflow-hidden">
@@ -205,7 +189,7 @@ export default function Example() {
205189
language={outputDisplay}
206190
/>
207191
</div>
208-
<div className="h-full mt-4 sm:m-0">
192+
<div className="h-full sm:m-0">
209193
<Output
210194
output={outputDisplay}
211195
isLoading={false}
@@ -215,19 +199,8 @@ export default function Example() {
215199
</div>
216200
</div>
217201
</main>
218-
<footer className="relative z-10 bg-white">
219-
<div className="max-w-7xl mx-auto py-12 px-4 overflow-hidden sm:px-6 lg:px-8">
220-
<nav className="-mx-5 -my-2 flex flex-wrap justify-center" aria-label="Footer">
221-
{footer.main.map((item) => (
222-
<div key={item.name} className="px-5 py-2">
223-
<Link key={item.name} href={item.href} passHref>
224-
<button type="button" className="text-base text-gray-500 hover:text-gray-900">
225-
{item.name}
226-
</button>
227-
</Link>
228-
</div>
229-
))}
230-
</nav>
202+
<footer className="fixed pb-8 z-10 bottom-0 w-full">
203+
<div className="max-w-7xl mx-auto px-4 overflow-hidden sm:px-6 lg:px-8">
231204
<div className="mt-8 flex justify-center space-x-6">
232205
{footer.social.map((item) => (
233206
<Link key={item.name} href={item.href} passHref>
@@ -241,6 +214,7 @@ export default function Example() {
241214
<p className="mt-8 text-center text-base text-gray-400">&copy; 2021 Mintlify, Inc. Powered by GuessLang.</p>
242215
</div>
243216
</footer>
217+
<Script src="gradient.js" />
244218
</div>
245219
);
246220
}

0 commit comments

Comments
 (0)