Skip to content

Commit

Permalink
chore: update metadata and font (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaliCastle committed Jun 2, 2023
1 parent 3f371e2 commit e627505
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 10 deletions.
44 changes: 37 additions & 7 deletions src/app/layout.tsx
@@ -1,24 +1,54 @@
import Link from 'next/link'
import './globals.css'
import { Inter } from 'next/font/google'
import { Manrope } from 'next/font/google'
import { LogoHelmet } from '~/icons'
import type { Metadata } from 'next'

const inter = Inter({ subsets: ['latin'] })
const fontSans = Manrope({
subsets: ['latin'],
weight: ['400', '500', '600', '700', '800'],
variable: '--font-sans',
})

const title = 'Pong'
const description =
'Pong: The ultimate edge network speed test for your website'
export const metadata = {
title: 'Pong',
description: '',
title,
description,
manifest: '/site.webmanifest',
}
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
},
},
openGraph: {
title,
description,
type: 'website',
url: 'https://pong.zol.ai',
siteName: 'Pong, Powered by Zolplay',
},
twitter: {
site: '@zolplay',
creator: '@zolplay',
card: 'summary_large_image',
title,
description,
},
} satisfies Metadata

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body className={inter.className}>
<html lang="en" className={`${fontSans.variable} font-sans antialiased`}>
<body className="tracking-tight">
{children}
<footer className="w-full pt-4 pb-6 text-center text-sm text-slate-600">
<div className="inline-flex items-center">
Expand Down
Binary file added src/app/opengraph-image.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions src/app/page.tsx
Expand Up @@ -120,7 +120,7 @@ export default function Home() {
{!!task.url && (
<Card>
<Text>Regions tested</Text>
<Metric>
<Metric className="font-bold">
{finishedRegions}/{TOTAL_REGIONS}
</Metric>
</Card>
Expand All @@ -130,7 +130,7 @@ export default function Home() {
<Grid numCols={1} numColsMd={2} numColsLg={3} className="gap-3">
{task.jobs.map((job) => (
<Card key={job.region} className="mt-5 relative">
<Text className="text-xs">
<Text className="text-xs font-medium">
{regions[job.region].emoji} {regions[job.region].location}
</Text>

Expand All @@ -141,9 +141,12 @@ export default function Home() {
}))}
categories={['Latency']}
index="idx"
valueFormatter={(value) => `${value}ms`}
showLegend={false}
className="mt-3"
/>
<div className="text-sm font-bold text-gray-900 ml-auto flex flex-col items-end">
<Metric className="flex items-center">
<Metric className="flex items-center font-bold">
{isNaN(job.avg) ? '/' : job.avg.toFixed(0)}
<Subtitle className="text-xs text-black/40 ml-2">ms</Subtitle>
</Metric>
Expand Down
Binary file added src/app/twitter-image.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions tailwind.config.js
@@ -1,3 +1,5 @@
const { fontFamily } = require('tailwindcss/defaultTheme')

/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
Expand All @@ -13,6 +15,9 @@ module.exports = {
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
},
fontFamily: {
sans: ['var(--font-sans)', ...fontFamily.sans],
},
},
},
plugins: [],
Expand Down

1 comment on commit e627505

@vercel
Copy link

@vercel vercel bot commented on e627505 Jun 2, 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.