Skip to content

Commit 5661f8a

Browse files
author
Callum McIntyre
committed
NextJS starter code w/ dependencies, images, starter components
1 parent 42a5097 commit 5661f8a

25 files changed

+3338
-9555
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ yarn-error.log*
2929
.env.development.local
3030
.env.test.local
3131
.env.production.local
32+
env.bat
3233

3334
# vercel
3435
.vercel

components/footer.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export default function Footer() {
2+
return (
3+
<footer className='mx-auto mt-48 text-center'>
4+
<a
5+
href='https://www.pointer.gg?utm_source=stackblitz-solidity'
6+
target='_blank'
7+
rel='noopener noreferrer'
8+
>
9+
Learn web3 dev and earn crypto rewards at{" "}
10+
<span className=''>Pointer</span>
11+
</a>
12+
<p>Art from Joanne Li @joanne on Figma <a href='keeybs.com' className='underline'>keeybs.com</a> <a href='https://creativecommons.org/licenses/by/4.0/' className="underline">CC 4.0</a></p>
13+
</footer>
14+
)
15+
}

components/keyboard.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export default function Keyboard({kind, isPBT, filter}) {
2+
const kindDir = {
3+
0: 'sixty-percent',
4+
1: 'seventy-five-percent',
5+
2: 'eighty-percent',
6+
3: 'iso-105',
7+
}[kind]
8+
9+
const fileName = isPBT ? 'PBT' : 'ABS'
10+
11+
const imagePath = `keyboards/${kindDir}/${fileName}.png`;
12+
const alt = `${kindDir} keyboard with ${isPBT? "PBT" : "ABS"} keys ${filter? `with ${filter}` : ""}`;
13+
14+
return (
15+
<div className="rounded-lg p-2 border border-white">
16+
<img className={"h-[230px] w-[360px] " + filter} src={imagePath} alt={alt} />
17+
</div>
18+
)}

components/primary-button.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default function PrimaryButton(props) {
2+
3+
const { type, children, ...rest } = props
4+
const className="max-w-fit inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 disabled:opacity-80 disabled:pointer-events-none"
5+
6+
if(type === "link") {
7+
return <a {...rest} className={className}>{children}</a>
8+
} else {
9+
return <button {...rest} className={className}>{children}</button>
10+
}
11+
}

components/secondary-button.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default function SecondaryButton(props) {
2+
return <button
3+
{...props}
4+
className="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-indigo-700 bg-indigo-100 hover:bg-indigo-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 disabled:opacity-80 disabled:pointer-events-none"
5+
>{props.children}</button>
6+
}

0 commit comments

Comments
 (0)