SEO changes
This commit is contained in:
+15
-2
@@ -6,6 +6,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="theme-color" content="#e82517" />
|
||||
<meta name="application-name" content="Toothless' TSS Bot" />
|
||||
<style>
|
||||
html { background: #130d08; }
|
||||
html[data-theme="dark"] { background: #130d08; color-scheme: dark; }
|
||||
@@ -105,25 +106,37 @@
|
||||
/>
|
||||
<meta
|
||||
name="keywords"
|
||||
content="TSS Bot, Toothless TSS Bot, War Thunder TSS, TSS leaderboard, TSS battle logs, TSS teams"
|
||||
content="War Thunder TSS, Tournament Service, TSS leaderboard, TSS teams, TSS battle logs, War Thunder tournaments, Toothless TSS Bot"
|
||||
/>
|
||||
<meta name="author" content="Toothless' TSS Bot" />
|
||||
<meta name="robots" content="__SEO_ROBOTS__" />
|
||||
<link rel="canonical" href="__SEO_CANONICAL__" />
|
||||
|
||||
<meta property="og:site_name" content="Toothless' TSS Bot" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:locale" content="en_GB" />
|
||||
<meta property="og:type" content="__SEO_OG_TYPE__" />
|
||||
<meta property="og:url" content="__SEO_CANONICAL__" />
|
||||
<meta property="og:title" content="__SEO_TITLE__" />
|
||||
<meta
|
||||
property="og:description"
|
||||
content="__SEO_DESCRIPTION__"
|
||||
/>
|
||||
<meta property="og:image" content="__SEO_IMAGE__" />
|
||||
<meta property="og:image:secure_url" content="__SEO_IMAGE__" />
|
||||
<meta property="og:image:type" content="image/png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:image:alt" content="Toothless' TSS Bot War Thunder TSS dashboard" />
|
||||
<meta property="article:author" content="__SEO_AUTHOR__" />
|
||||
<meta property="article:published_time" content="__SEO_PUBLISHED_TIME__" />
|
||||
<meta property="article:modified_time" content="__SEO_MODIFIED_TIME__" />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="__SEO_TITLE__" />
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content="__SEO_DESCRIPTION__"
|
||||
/>
|
||||
<meta name="twitter:image" content="__SEO_IMAGE__" />
|
||||
<link rel="icon" type="image/svg+xml" href="/embed-icon.svg" />
|
||||
<link rel="apple-touch-icon" href="/embed-icon.svg" />
|
||||
<script type="application/ld+json" id="site-structured-data">
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
+216
-90
@@ -57,6 +57,9 @@ const themePreferenceKey = 'tssbot.theme'
|
||||
const themePreferenceCookie = 'tssbot_theme'
|
||||
const liveRefreshMs = 15000
|
||||
const siteVersion = import.meta.env.VITE_SITE_VERSION || '1.0.0'
|
||||
const seoImagePath = '/embed.png'
|
||||
const indexRobots = 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1'
|
||||
const noindexRobots = 'noindex, follow'
|
||||
|
||||
const turnstileSiteKey = import.meta.env.VITE_TURNSTILE_SITE_KEY || ''
|
||||
const siteGateSetting = import.meta.env.VITE_SITE_GATE
|
||||
@@ -893,6 +896,14 @@ function canonicalPathForRoute(route) {
|
||||
return '/'
|
||||
}
|
||||
|
||||
function seoImageUrl() {
|
||||
return `${currentPublicOrigin()}${seoImagePath}`
|
||||
}
|
||||
|
||||
function openGraphType(seo) {
|
||||
return seo.type === 'BlogPosting' ? 'article' : 'website'
|
||||
}
|
||||
|
||||
function seoForRoute(route, profileDetail = null) {
|
||||
const teamName =
|
||||
route.page === 'team'
|
||||
@@ -908,116 +919,134 @@ function seoForRoute(route, profileDetail = null) {
|
||||
teamBattles ? `${formatNumber(teamBattles)} battles` : '',
|
||||
].filter(Boolean)
|
||||
return {
|
||||
title: `${teamName} TSS Team Profile | Toothless' TSS Bot`,
|
||||
title: `${teamName} War Thunder TSS Team Profile | Toothless' TSS Bot`,
|
||||
description: stats.length
|
||||
? `${teamName} TSS team profile with ${stats.join(', ')}, roster details, battle history, and recent War Thunder squadron activity.`
|
||||
: `${teamName} TSS team profile with roster details, battle history, and recent War Thunder squadron activity.`,
|
||||
robots: 'index, follow',
|
||||
? `${teamName} War Thunder TSS team profile with ${stats.join(', ')}, roster details, battle history, and recent squadron activity.`
|
||||
: `${teamName} War Thunder TSS team profile with roster details, battle history, and recent squadron activity.`,
|
||||
robots: indexRobots,
|
||||
path: canonicalPathForRoute({ ...route, teamName }),
|
||||
type: 'ProfilePage',
|
||||
}
|
||||
}
|
||||
|
||||
if (route.page === 'player' && route.uid) {
|
||||
return {
|
||||
title: `Player ${route.uid} | Toothless' TSS Bot`,
|
||||
description: `TSS career stats for player ${route.uid} — battles, win rate, kills, and teams seen with.`,
|
||||
robots: 'noindex, follow',
|
||||
description: `War Thunder TSS career stats for player ${route.uid}: battles, win rate, kills, and teams seen with.`,
|
||||
robots: noindexRobots,
|
||||
path: canonicalPathForRoute(route),
|
||||
type: 'ProfilePage',
|
||||
}
|
||||
}
|
||||
|
||||
if (route.page === 'game' && route.gameId) {
|
||||
return {
|
||||
title: `Game ${route.gameId} | Toothless' TSS Bot`,
|
||||
description: `TSS battle log details for game ${route.gameId}, including participants, map, player counts, and combat stats.`,
|
||||
robots: 'noindex, follow',
|
||||
description: `War Thunder TSS battle log details for game ${route.gameId}, including participants, map, player counts, and combat stats.`,
|
||||
robots: noindexRobots,
|
||||
path: canonicalPathForRoute(route),
|
||||
type: 'WebPage',
|
||||
}
|
||||
}
|
||||
|
||||
if (route.page === 'tournament' && route.tournamentId) {
|
||||
return {
|
||||
title: `Tournament ${route.tournamentId} | Toothless' TSS Bot`,
|
||||
description: `TSS tournament ${route.tournamentId} bracket, matches, standings, and games tracked by Toothless' TSS Bot.`,
|
||||
robots: 'index, follow',
|
||||
title: `War Thunder TSS Tournament ${route.tournamentId} | Toothless' TSS Bot`,
|
||||
description: `War Thunder TSS tournament ${route.tournamentId} bracket, matches, standings, and games tracked by Toothless' TSS Bot.`,
|
||||
robots: indexRobots,
|
||||
path: canonicalPathForRoute(route),
|
||||
type: 'CollectionPage',
|
||||
}
|
||||
}
|
||||
|
||||
const byPage = {
|
||||
teams: {
|
||||
title: "TSS Team Leaderboard | Toothless' TSS Bot",
|
||||
description: 'Browse the live TSS team leaderboard, compare War Thunder squadron rankings, points, players, and recent team activity.',
|
||||
robots: 'index, follow',
|
||||
title: "War Thunder TSS Team Leaderboard | Toothless' TSS Bot",
|
||||
description: 'Browse the live War Thunder TSS team leaderboard with squadron rankings, points, players, win rates, battles, and recent activity.',
|
||||
robots: indexRobots,
|
||||
path: '/teams',
|
||||
type: 'CollectionPage',
|
||||
},
|
||||
players: {
|
||||
title: "TSS Player Leaderboard | Toothless' TSS Bot",
|
||||
description: 'Browse the TSS player leaderboard, compare War Thunder player score, kills, win rate, KDR, and battle activity.',
|
||||
robots: 'index, follow',
|
||||
title: "War Thunder TSS Player Leaderboard | Toothless' TSS Bot",
|
||||
description: 'Browse the War Thunder TSS player leaderboard and compare player score, kills, assists, win rate, KDR, teams, and battle activity.',
|
||||
robots: indexRobots,
|
||||
path: '/players',
|
||||
type: 'CollectionPage',
|
||||
},
|
||||
'battle-logs': {
|
||||
title: "TSS Battle Logs | Toothless' TSS Bot",
|
||||
description: 'Read recent TSS battle logs with team names, map history, player counts, battle times, and War Thunder match context.',
|
||||
robots: 'index, follow',
|
||||
title: "War Thunder TSS Battle Logs | Toothless' TSS Bot",
|
||||
description: 'Read recent War Thunder TSS battle logs with teams, maps, player counts, battle times, replays, and match context.',
|
||||
robots: indexRobots,
|
||||
path: '/battle-logs',
|
||||
type: 'CollectionPage',
|
||||
},
|
||||
'tournaments-list': {
|
||||
title: "TSS Tournaments | Toothless' TSS Bot",
|
||||
description: 'Browse tracked TSS tournaments with authoritative brackets, standings, and linked replay availability.',
|
||||
robots: 'index, follow',
|
||||
title: "War Thunder TSS Tournaments | Brackets and Standings",
|
||||
description: "Browse War Thunder TSS tournaments with brackets, standings, teams, matches, and replay links tracked by Toothless' TSS Bot.",
|
||||
robots: indexRobots,
|
||||
path: '/tournaments',
|
||||
type: 'CollectionPage',
|
||||
},
|
||||
blog: {
|
||||
title: "TSS Bot Blog | Toothless' TSS Bot",
|
||||
description: 'News, updates, and announcements from Toothless TSS Bot.',
|
||||
robots: 'index, follow',
|
||||
title: "War Thunder TSS Bot Blog | Toothless' TSS Bot",
|
||||
description: 'News, feature updates, tournament tracking notes, and War Thunder TSS Bot announcements from Toothless TSS Bot.',
|
||||
robots: indexRobots,
|
||||
path: '/blog',
|
||||
type: 'Blog',
|
||||
},
|
||||
'blog-post': {
|
||||
title: `${blogPostsBySlug.get(route.slug)?.title || 'Blog post'} | Toothless' TSS Bot`,
|
||||
description: blogPostsBySlug.get(route.slug)?.excerpt || 'News and updates from Toothless TSS Bot.',
|
||||
robots: blogPostsBySlug.has(route.slug) ? 'index, follow' : 'noindex, follow',
|
||||
robots: blogPostsBySlug.has(route.slug) ? indexRobots : noindexRobots,
|
||||
path: route.slug ? blogPostPath(route.slug) : '/blog',
|
||||
type: 'BlogPosting',
|
||||
publishedAt: blogPostsBySlug.get(route.slug)?.date || '',
|
||||
author: blogPostsBySlug.get(route.slug)?.author || "Toothless' TSS Bot",
|
||||
},
|
||||
uptime: {
|
||||
title: "TSS Bot Uptime Status | Toothless' TSS Bot",
|
||||
description: 'Check Toothless TSS Bot uptime, API health, TSS data proxy status, and recent availability history.',
|
||||
robots: 'index, follow',
|
||||
robots: indexRobots,
|
||||
path: '/uptime',
|
||||
type: 'WebPage',
|
||||
},
|
||||
viewers: {
|
||||
title: "Viewer Analytics | Toothless' TSS Bot",
|
||||
description: 'Opt-in viewer analytics for Toothless TSS Bot, including active pages, broad device signals, and privacy-safe activity trends.',
|
||||
robots: 'noindex, follow',
|
||||
robots: noindexRobots,
|
||||
path: '/viewers',
|
||||
type: 'WebPage',
|
||||
},
|
||||
privacy: {
|
||||
title: "Privacy Notice | Toothless' TSS Bot",
|
||||
description: 'How Toothless TSS Bot handles cookies, opt-in analytics, viewer data, retention, deletion, and privacy rights.',
|
||||
robots: 'index, follow',
|
||||
robots: indexRobots,
|
||||
path: '/privacy',
|
||||
type: 'WebPage',
|
||||
},
|
||||
docs: {
|
||||
title: "Docs | Toothless' TSS Bot",
|
||||
description: 'Documentation and command reference for Toothless TSS Bot.',
|
||||
robots: 'noindex, follow',
|
||||
robots: noindexRobots,
|
||||
path: '/docs',
|
||||
type: 'WebPage',
|
||||
},
|
||||
settings: {
|
||||
title: "Settings | Toothless' TSS Bot",
|
||||
description: 'Customize layout and appearance preferences for Toothless TSS Bot, including custom theme accent colors.',
|
||||
robots: 'noindex, nofollow',
|
||||
path: '/settings',
|
||||
type: 'WebPage',
|
||||
},
|
||||
}
|
||||
|
||||
return byPage[route.page] || {
|
||||
title: "Toothless' TSS Bot | Live TSS Leaderboards and Battle Logs",
|
||||
description: 'Live War Thunder TSS team leaderboards, battle logs, team profiles, uptime, and privacy-safe viewer analytics from Toothless TSS Bot.',
|
||||
robots: 'index, follow',
|
||||
title: "War Thunder TSS Leaderboards, Teams and Battle Logs | Toothless' TSS Bot",
|
||||
description: 'Track War Thunder Tournament Service teams, live TSS leaderboards, squadron profiles, battle logs, player stats, and tournament brackets.',
|
||||
robots: indexRobots,
|
||||
path: '/',
|
||||
type: 'WebApplication',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1045,13 +1074,18 @@ function upsertLink(rel, href) {
|
||||
|
||||
function structuredDataForSeo(seo, canonicalUrl) {
|
||||
const base = currentPublicOrigin()
|
||||
const siteId = `${base}/#website`
|
||||
const pageId = `${canonicalUrl}#webpage`
|
||||
const imageUrl = seoImageUrl()
|
||||
const items = [
|
||||
{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebSite',
|
||||
'@id': siteId,
|
||||
name: "Toothless' TSS Bot",
|
||||
alternateName: ['TSS Bot', 'War Thunder TSS Bot', 'Toothless TSS Bot'],
|
||||
url: `${base}/`,
|
||||
description: "Live War Thunder TSS leaderboards, battle logs, and team profiles.",
|
||||
description: 'Live War Thunder Tournament Service leaderboards, battle logs, tournaments, and team profiles.',
|
||||
potentialAction: {
|
||||
'@type': 'SearchAction',
|
||||
target: `${base}/teams/{search_term_string}`,
|
||||
@@ -1060,18 +1094,64 @@ function structuredDataForSeo(seo, canonicalUrl) {
|
||||
},
|
||||
{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebPage',
|
||||
'@type': seo.type || 'WebPage',
|
||||
'@id': pageId,
|
||||
name: seo.title,
|
||||
url: canonicalUrl,
|
||||
description: seo.description,
|
||||
image: imageUrl,
|
||||
isPartOf: {
|
||||
'@type': 'WebSite',
|
||||
name: "Toothless' TSS Bot",
|
||||
url: `${base}/`,
|
||||
'@id': siteId,
|
||||
},
|
||||
},
|
||||
{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'BreadcrumbList',
|
||||
itemListElement: [
|
||||
{
|
||||
'@type': 'ListItem',
|
||||
position: 1,
|
||||
name: 'Home',
|
||||
item: `${base}/`,
|
||||
},
|
||||
...(seo.path === '/' ? [] : [{
|
||||
'@type': 'ListItem',
|
||||
position: 2,
|
||||
name: seo.title.replace(/\s+\|\s+Toothless' TSS Bot$/, ''),
|
||||
item: canonicalUrl,
|
||||
}]),
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
if (seo.type === 'BlogPosting') {
|
||||
items.push({
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'BlogPosting',
|
||||
headline: seo.title.replace(/\s+\|\s+Toothless' TSS Bot$/, ''),
|
||||
description: seo.description,
|
||||
url: canonicalUrl,
|
||||
image: imageUrl,
|
||||
datePublished: seo.publishedAt || undefined,
|
||||
dateModified: seo.publishedAt || undefined,
|
||||
author: {
|
||||
'@type': 'Person',
|
||||
name: seo.author || "Toothless' TSS Bot",
|
||||
},
|
||||
publisher: {
|
||||
'@type': 'Organization',
|
||||
name: "Toothless' TSS Bot",
|
||||
logo: {
|
||||
'@type': 'ImageObject',
|
||||
url: imageUrl,
|
||||
},
|
||||
},
|
||||
mainEntityOfPage: {
|
||||
'@id': pageId,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
return JSON.stringify(items)
|
||||
}
|
||||
|
||||
@@ -1083,10 +1163,20 @@ function applySeo(route, profileDetail = null) {
|
||||
upsertMeta('meta[name="description"]', { name: 'description' }, 'content', seo.description)
|
||||
upsertMeta('meta[name="robots"]', { name: 'robots' }, 'content', seo.robots)
|
||||
upsertMeta('meta[property="og:title"]', { property: 'og:title' }, 'content', seo.title)
|
||||
upsertMeta('meta[property="og:type"]', { property: 'og:type' }, 'content', openGraphType(seo))
|
||||
upsertMeta('meta[property="og:description"]', { property: 'og:description' }, 'content', seo.description)
|
||||
upsertMeta('meta[property="og:url"]', { property: 'og:url' }, 'content', canonicalUrl)
|
||||
upsertMeta('meta[property="og:image"]', { property: 'og:image' }, 'content', seoImageUrl())
|
||||
upsertMeta('meta[property="og:image:secure_url"]', { property: 'og:image:secure_url' }, 'content', seoImageUrl())
|
||||
upsertMeta('meta[property="og:image:type"]', { property: 'og:image:type' }, 'content', 'image/png')
|
||||
upsertMeta('meta[property="og:image:width"]', { property: 'og:image:width' }, 'content', '1200')
|
||||
upsertMeta('meta[property="og:image:height"]', { property: 'og:image:height' }, 'content', '630')
|
||||
upsertMeta('meta[property="article:author"]', { property: 'article:author' }, 'content', seo.author || "Toothless' TSS Bot")
|
||||
upsertMeta('meta[property="article:published_time"]', { property: 'article:published_time' }, 'content', seo.publishedAt || '')
|
||||
upsertMeta('meta[property="article:modified_time"]', { property: 'article:modified_time' }, 'content', seo.publishedAt || '')
|
||||
upsertMeta('meta[name="twitter:title"]', { name: 'twitter:title' }, 'content', seo.title)
|
||||
upsertMeta('meta[name="twitter:description"]', { name: 'twitter:description' }, 'content', seo.description)
|
||||
upsertMeta('meta[name="twitter:image"]', { name: 'twitter:image' }, 'content', seoImageUrl())
|
||||
upsertLink('canonical', canonicalUrl)
|
||||
|
||||
let structuredData = document.getElementById('site-structured-data')
|
||||
@@ -2227,32 +2317,38 @@ function AppContent() {
|
||||
className="flex max-w-[calc(100vw-2rem)] items-center gap-1.5 rounded-full border border-border bg-fury-white/92 py-1.5 pl-1.5 pr-11 shadow-[0_8px_24px_rgba(0,0,0,0.13)] backdrop-blur sm:pl-2"
|
||||
ref={navPillRef}
|
||||
>
|
||||
<button
|
||||
<a
|
||||
aria-label="Go to Toothless' TSS Bot home"
|
||||
className="hidden h-8 w-8 shrink-0 place-items-center rounded-full transition hover:bg-surface sm:grid"
|
||||
onClick={() => navigate('/')}
|
||||
type="button"
|
||||
href="/"
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate('/')
|
||||
}}
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
className="h-7 w-7 rounded-full"
|
||||
src="/embed-icon.svg"
|
||||
/>
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<nav className="flex min-w-0 items-center gap-0.5 overflow-x-auto">
|
||||
{primaryNavItems.map((item) => (
|
||||
<button
|
||||
<a
|
||||
className={`shrink-0 rounded-full px-2.5 py-1.5 text-[13px] font-semibold leading-5 transition sm:px-3 ${activeNavPath === item.path
|
||||
? 'bg-text text-bg apricot-button-text'
|
||||
: 'text-text-soft hover:bg-surface hover:text-text'
|
||||
}`}
|
||||
href={item.path}
|
||||
key={item.path}
|
||||
onClick={() => navigate(item.path)}
|
||||
type="button"
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate(item.path)
|
||||
}}
|
||||
>
|
||||
{item.label}
|
||||
</button>
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
|
||||
@@ -2260,17 +2356,20 @@ function AppContent() {
|
||||
|
||||
<nav className="flex shrink-0 items-center gap-0.5">
|
||||
{utilityNavItems.map((item) => (
|
||||
<button
|
||||
<a
|
||||
className={`shrink-0 rounded-full px-2.5 py-1.5 text-[13px] font-semibold leading-5 transition ${activeNavPath === item.path
|
||||
? 'bg-text text-bg apricot-button-text'
|
||||
: 'text-text-soft hover:bg-surface hover:text-text'
|
||||
}`}
|
||||
href={item.path}
|
||||
key={item.path}
|
||||
onClick={() => navigate(item.path)}
|
||||
type="button"
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate(item.path)
|
||||
}}
|
||||
>
|
||||
{item.label}
|
||||
</button>
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
@@ -3185,10 +3284,13 @@ function BlogPage({ navigate, posts }) {
|
||||
<div className="mt-8 grid gap-4">
|
||||
{posts.map((post) => (
|
||||
<article className="rounded-lg border border-border bg-fury-white p-5 shadow-sm" key={post.slug}>
|
||||
<button
|
||||
<a
|
||||
className="block w-full text-left"
|
||||
onClick={() => navigate(post.path)}
|
||||
type="button"
|
||||
href={post.path}
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate(post.path)
|
||||
}}
|
||||
>
|
||||
<p className="text-sm font-semibold uppercase tracking-wide text-fury-cyan">
|
||||
{formatBlogDate(post.date)}
|
||||
@@ -3200,7 +3302,7 @@ function BlogPage({ navigate, posts }) {
|
||||
<span className="mt-4 inline-block text-sm font-semibold text-fury-cyan">
|
||||
Read post
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
</article>
|
||||
))}
|
||||
|
||||
@@ -3668,27 +3770,36 @@ function Landing({
|
||||
</p>
|
||||
<div className="mt-8 w-full max-w-xl">
|
||||
<div className="grid gap-4 sm:grid-cols-3">
|
||||
<button
|
||||
<a
|
||||
className="apricot-button-text min-h-15 rounded-lg bg-text px-5 py-4 text-base font-semibold text-bg transition hover:bg-fury-cyan"
|
||||
onClick={() => navigate('/teams')}
|
||||
type="button"
|
||||
href="/teams"
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate('/teams')
|
||||
}}
|
||||
>
|
||||
Team Leaderboard
|
||||
</button>
|
||||
<button
|
||||
</a>
|
||||
<a
|
||||
className="min-h-15 rounded-lg border-2 border-text bg-fury-white px-5 py-4 text-base font-semibold text-text transition hover:bg-surface"
|
||||
onClick={() => navigate('/players')}
|
||||
type="button"
|
||||
href="/players"
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate('/players')
|
||||
}}
|
||||
>
|
||||
Player Leaderboard
|
||||
</button>
|
||||
<button
|
||||
</a>
|
||||
<a
|
||||
className="min-h-15 rounded-lg border-2 border-ring px-5 py-4 text-base font-semibold text-fury-cyan transition hover:bg-surface hover:text-text"
|
||||
onClick={() => navigate('/battle-logs')}
|
||||
type="button"
|
||||
href="/battle-logs"
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate('/battle-logs')
|
||||
}}
|
||||
>
|
||||
Battle Logs
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<form
|
||||
@@ -3719,10 +3830,13 @@ function Landing({
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<button
|
||||
<a
|
||||
className="mt-4 grid w-full gap-3 border-l-2 border-fury-cyan bg-fury-white/80 px-4 py-3 text-left shadow-sm backdrop-blur transition hover:bg-surface sm:grid-cols-[1fr_auto] sm:items-center"
|
||||
onClick={() => navigate(latestBlogPost?.path || '/blog')}
|
||||
type="button"
|
||||
href={latestBlogPost?.path || '/blog'}
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate(latestBlogPost?.path || '/blog')
|
||||
}}
|
||||
>
|
||||
<span className="min-w-0">
|
||||
<span className="block text-xs font-semibold uppercase tracking-wide text-fury-cyan">
|
||||
@@ -3738,7 +3852,7 @@ function Landing({
|
||||
<span className="text-sm font-semibold text-fury-cyan">
|
||||
{latestBlogPost ? 'Read post' : 'Open blog'}
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4233,12 +4347,15 @@ function TeamsPage({ leaderboard, navigate, teams }) {
|
||||
{teams.map((team, index) => {
|
||||
const name = bestTeamName(team)
|
||||
return (
|
||||
<button
|
||||
className="grid w-full gap-4 border-b border-surface px-5 py-4 text-left transition hover:bg-surface md:grid-cols-[4rem_1fr_repeat(4,auto)] md:items-center"
|
||||
key={`${name}-${team.clan_id || index}`}
|
||||
onClick={() => navigate(teamPath(name))}
|
||||
type="button"
|
||||
>
|
||||
<a
|
||||
className="grid w-full gap-4 border-b border-surface px-5 py-4 text-left transition hover:bg-surface md:grid-cols-[4rem_1fr_repeat(4,auto)] md:items-center"
|
||||
href={teamPath(name)}
|
||||
key={`${name}-${team.clan_id || index}`}
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate(teamPath(name))
|
||||
}}
|
||||
>
|
||||
<span className="text-sm font-semibold text-fury-cyan">#{index + 1}</span>
|
||||
<span className="min-w-0">
|
||||
<span className="block truncate text-lg font-semibold">{name}</span>
|
||||
@@ -4249,7 +4366,7 @@ function TeamsPage({ leaderboard, navigate, teams }) {
|
||||
<span className="text-sm font-semibold">
|
||||
{formatNumber(team.points?.total_points || team.total_kills)}
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
)
|
||||
})}
|
||||
|
||||
@@ -4293,11 +4410,14 @@ function PlayersPage({ leaderboard, navigate, players }) {
|
||||
) : null}
|
||||
|
||||
{players.map((player, index) => (
|
||||
<button
|
||||
<a
|
||||
className="grid w-full grid-cols-[4rem_minmax(220px,1fr)_repeat(7,92px)] gap-3 border-b border-surface px-5 py-4 text-left text-sm transition hover:bg-surface"
|
||||
href={playerPath(player.uid)}
|
||||
key={player.uid}
|
||||
onClick={() => navigate(playerPath(player.uid))}
|
||||
type="button"
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate(playerPath(player.uid))
|
||||
}}
|
||||
>
|
||||
<p className="font-semibold text-fury-cyan">#{index + 1}</p>
|
||||
<div className="min-w-0">
|
||||
@@ -4313,7 +4433,7 @@ function PlayersPage({ leaderboard, navigate, players }) {
|
||||
<p className="text-right">{Number(player.win_rate || 0).toFixed(1)}%</p>
|
||||
<p className="text-right">{Number(player.kdr || 0).toFixed(2)}</p>
|
||||
<p className="text-right">{formatNumber(player.teams_seen)}</p>
|
||||
</button>
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
@@ -4903,11 +5023,14 @@ function BattleLogsPage({ live, matches, navigate }) {
|
||||
|
||||
<div className="overflow-hidden rounded-lg border border-border bg-fury-white shadow-sm">
|
||||
{matches.map((match) => (
|
||||
<button
|
||||
<a
|
||||
className="grid w-full gap-x-6 gap-y-2 border-b border-surface px-5 py-4 text-left transition hover:bg-surface md:grid-cols-[minmax(0,1fr)_minmax(18rem,0.9fr)_auto] md:items-center"
|
||||
href={gamePath(match.session_id)}
|
||||
key={match.session_id}
|
||||
onClick={() => navigate(gamePath(match.session_id))}
|
||||
type="button"
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate(gamePath(match.session_id))
|
||||
}}
|
||||
>
|
||||
<div className="min-w-0">
|
||||
<p className="truncate font-semibold">{match.map_name || 'Unknown map'}</p>
|
||||
@@ -4917,7 +5040,7 @@ function BattleLogsPage({ live, matches, navigate }) {
|
||||
</div>
|
||||
<ParticipantNames participants={gameParticipants(match)} spread />
|
||||
<p className="text-sm">{formatMatchSize(match.player_count)}</p>
|
||||
</button>
|
||||
</a>
|
||||
))}
|
||||
|
||||
{!matches.length ? (
|
||||
@@ -4997,11 +5120,14 @@ function TournamentsPage({ navigate }) {
|
||||
|
||||
<div className="overflow-hidden rounded-lg border border-border bg-fury-white shadow-sm">
|
||||
{tournaments.map((tournament) => (
|
||||
<button
|
||||
<a
|
||||
className="grid w-full gap-x-4 gap-y-1 border-b border-surface px-5 py-4 text-left transition hover:bg-surface md:grid-cols-[1fr_repeat(3,auto)] md:items-center"
|
||||
href={tournamentPath(tournament.tournament_id)}
|
||||
key={tournament.tournament_id}
|
||||
onClick={() => navigate(tournamentPath(tournament.tournament_id))}
|
||||
type="button"
|
||||
onClick={(event) => {
|
||||
event.preventDefault()
|
||||
navigate(tournamentPath(tournament.tournament_id))
|
||||
}}
|
||||
>
|
||||
<div className="min-w-0">
|
||||
<div className="flex flex-wrap items-center gap-x-2 gap-y-1">
|
||||
@@ -5019,7 +5145,7 @@ function TournamentsPage({ navigate }) {
|
||||
<span className="text-sm">{formatNumber(tournament.match_count)} matches</span>
|
||||
<span className="text-sm">{formatNumber(tournament.team_count)} teams</span>
|
||||
<span className="text-sm font-semibold text-fury-cyan">View</span>
|
||||
</button>
|
||||
</a>
|
||||
))}
|
||||
|
||||
{!tournaments.length ? (
|
||||
|
||||
Reference in New Issue
Block a user