Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
alii committed Sep 20, 2023
1 parent 964357d commit a4e1a89
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 42 deletions.
14 changes: 11 additions & 3 deletions src/components/contact-form.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Turnstile } from '@marsidev/react-turnstile';
import { useState } from 'react';
import {Turnstile} from '@marsidev/react-turnstile';
import {useState} from 'react';
import toast from 'react-hot-toast';

export function ContactForm() {
Expand Down Expand Up @@ -59,7 +59,15 @@ export function ContactForm() {
</label>

<label htmlFor="body">
<textarea id="body" name="body" rows={5} minLength={10} required placeholder="Your message" className="w-full resize-y" />
<textarea
id="body"
name="body"
rows={5}
minLength={10}
required
placeholder="Your message"
className="w-full resize-y"
/>
</label>

<Turnstile
Expand Down
17 changes: 7 additions & 10 deletions src/components/time.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import clsx from 'clsx';
import { motion } from 'framer-motion';
import { useEffect, useRef, useState } from 'react';
import { UKTimeFormatter, daysUntilBirthday } from '../utils/constants';
import {motion} from 'framer-motion';
import {useEffect, useRef, useState} from 'react';
import {UKTimeFormatter, daysUntilBirthday} from '../utils/constants';

function Night({time}: {time: Date}) {
const canvasRef = useRef<HTMLCanvasElement | null>(null);
Expand Down Expand Up @@ -40,10 +40,7 @@ function Night({time}: {time: Date}) {
/>

<div className="z-10 text-center">
<h2
className={clsx('text-2xl font-light text-glow-sky-900 dark:text-glow-sky-500')}
suppressHydrationWarning
>
<h2 className={clsx('text-2xl font-light text-glow-sky-900 dark:text-glow-sky-500')} suppressHydrationWarning>
{UKTimeFormatter.format(time)}
</h2>

Expand All @@ -59,8 +56,8 @@ function Day({time}: {time: Date}) {
<div className="flex w-full items-center justify-center">
<div className="opacity-85 flex items-baseline space-x-1 md:space-x-2">
<div className="flex flex-col">
<h2 className="font-light text-2xl text-white">{UKTimeFormatter.format(time)}</h2>
<h2 className="text-2xl font-light text-white">{UKTimeFormatter.format(time)}</h2>

<p
className={clsx('text-center text-xs font-light', 'text-white text-glow-sky-900 dark:text-glow-sky-500')}
>
Expand Down Expand Up @@ -119,7 +116,7 @@ export function Time() {
}, []);

return (
<div className="col-span-3 grid grid-cols-1 gap-6 md:col-span-1 shrink-0 [&_>_div]:shrink-0">
<div className="col-span-3 grid shrink-0 grid-cols-1 gap-6 md:col-span-1 [&_>_div]:shrink-0">
{isNight ? <Night time={time} /> : <Day time={time} />}

<div className="flex items-center justify-center rounded-2xl bg-indigo-100 text-indigo-500 dark:bg-[#23224c] dark:text-indigo-400">
Expand Down
8 changes: 5 additions & 3 deletions src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import Link from "next/link";
import Link from 'next/link';

export default function Page404() {
return (
<main className="mx-auto max-w-3xl px-6 pb-40 pt-16 space-y-2">
<main className="mx-auto max-w-3xl space-y-2 px-6 pb-40 pt-16">
<p className="font-title text-3xl">404</p>
<p>Sorry, I couldn't locate that page for ya</p>

<div>
<Link href="/" className="px-2 py-1 rounded-full bg-pink-500">↖ home</Link>
<Link href="/" className="rounded-full bg-pink-500 px-2 py-1">
↖ home
</Link>
</div>
</main>
);
Expand Down
6 changes: 3 additions & 3 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import '../globals.css';

import type { AppProps } from 'next/app';
import { Newsreader } from 'next/font/google';
import type {AppProps} from 'next/app';
import {Newsreader} from 'next/font/google';
import font from 'next/font/local';
import Head from 'next/head';
import { Toaster } from 'react-hot-toast';
import {Toaster} from 'react-hot-toast';

const title = Newsreader({
subsets: ['latin'],
Expand Down
42 changes: 20 additions & 22 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import clsx from 'clsx';
import dayjs from 'dayjs';
import type { GetStaticProps } from 'next';
import type {GetStaticProps} from 'next';
import Link from 'next/link';
import { HiOutlineExternalLink } from 'react-icons/hi';
import {HiOutlineExternalLink} from 'react-icons/hi';
import {
SiAmazonaws,
SiBabel,
Expand All @@ -25,21 +25,21 @@ import {
SiWebpack,
SiWebstorm,
SiX,
SiYarn
SiYarn,
} from 'react-icons/si';
import type { Data } from 'use-lanyard';
import { ContactForm } from '../components/contact-form';
import { CardHoverEffect, hoverClassName } from '../components/hover-card';
import { Time } from '../components/time';
import { useUpdatingLanyard } from '../hooks/lanyard';
import type {Data} from 'use-lanyard';
import {ContactForm} from '../components/contact-form';
import {CardHoverEffect, hoverClassName} from '../components/hover-card';
import {Time} from '../components/time';
import {useUpdatingLanyard} from '../hooks/lanyard';
import matrix from '../images/matrix.gif';
import me from '../images/me.jpg';
import { getMapURL } from '../server/apple-maps';
import { PartialBlogPost, getRecentBlogPosts } from '../server/blog';
import { env } from '../server/env';
import { getLanyard } from '../server/lanyard';
import { age, discordId } from '../utils/constants';
import { formatList } from '../utils/lists';
import {getMapURL} from '../server/apple-maps';
import {PartialBlogPost, getRecentBlogPosts} from '../server/blog';
import {env} from '../server/env';
import {getLanyard} from '../server/lanyard';
import {age, discordId} from '../utils/constants';
import {formatList} from '../utils/lists';

export interface Props {
lanyard: Data;
Expand Down Expand Up @@ -75,10 +75,10 @@ export default function Home(props: Props) {

return (
<main className="mx-auto grid max-w-3xl grid-cols-6 gap-6 px-6 pb-40 pt-16">
<div className="col-span-4 flex flex-col justify-between overflow-hidden rounded-2xl bg-pink-200 px-8 py-8 dark:border-pink-500 dark:bg-pink-500/20 dark:shadow-none dark:backdrop-blur-2xl md:col-span-4 h-52">
<div className="col-span-4 flex h-52 flex-col justify-between overflow-hidden rounded-2xl bg-pink-200 px-8 py-8 dark:border-pink-500 dark:bg-pink-500/20 dark:shadow-none dark:backdrop-blur-2xl md:col-span-4">
<div className="flex">
<Link
className="flex items-center justify-center rounded-full bg-pink-300 dark:bg-pink-500/25 px-2 py-0.5"
className="flex items-center justify-center rounded-full bg-pink-300 px-2 py-0.5 dark:bg-pink-500/25"
href="https://alistair.blog"
target="_blank"
rel="noopener noreferrer"
Expand All @@ -89,9 +89,7 @@ export default function Home(props: Props) {

<div className="space-y-4">
<div>
<h1 className="text-xl text-pink-900 dark:text-pink-300 dark:text-glow-pink-500/50">
Alistair Smith
</h1>
<h1 className="text-xl text-pink-900 dark:text-pink-300 dark:text-glow-pink-500/50">Alistair Smith</h1>

<p className="text-pink-600 dark:text-pink-300/80 dark:text-glow-pink-500/50">
{age} y/o full stack typescript engineer
Expand All @@ -106,7 +104,7 @@ export default function Home(props: Props) {
target="_blank"
rel="noopener noreferrer"
className={clsx(
'flex h-full items-center justify-center rounded-2xl bg-neutral-200 dark:bg-neutral-800 text-4xl text-black dark:text-white',
'flex h-full items-center justify-center rounded-2xl bg-neutral-200 text-4xl text-black dark:bg-neutral-800 dark:text-white',
hoverClassName,
)}
>
Expand Down Expand Up @@ -221,7 +219,7 @@ export default function Home(props: Props) {
<span className="absolute inset-0 -z-10">
<img
src={lanyard.spotify.album_art_url}
className="absolute inset-0 h-full w-full bg-black object-cover object-center brightness-50 transition-all duration-500 will-change-[transform,_filter] scale-[1.15] group-hover:scale-[1.35] group-hover:brightness-[0.4]"
className="absolute inset-0 h-full w-full scale-[1.15] bg-black object-cover object-center brightness-50 transition-all duration-500 will-change-[transform,_filter] group-hover:scale-[1.35] group-hover:brightness-[0.4]"
alt="Album cover art"
/>
</span>
Expand Down Expand Up @@ -257,7 +255,7 @@ export default function Home(props: Props) {
<div className="group relative col-span-3 flex h-full min-h-[13rem] flex-shrink-0 overflow-hidden rounded-2xl">
<img
src={props.map}
className="absolute scale-[1.25] inset-0 h-full w-full bg-black object-cover object-center"
className="absolute inset-0 h-full w-full scale-[1.25] bg-black object-cover object-center"
alt="A map locating roughly where I am right now"
/>

Expand Down
2 changes: 1 addition & 1 deletion src/server/blog.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { APIResponse } from 'nextkit';
import {APIResponse} from 'nextkit';

export interface PartialBlogPost {
name: string;
Expand Down

1 comment on commit a4e1a89

@vercel
Copy link

@vercel vercel bot commented on a4e1a89 Sep 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.