Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update metadata and font #4

Merged
merged 2 commits into from Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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'
Copy link
Member

Choose a reason for hiding this comment

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

🤩

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