Skip to content

Commit 45e2a66

Browse files
Copilothamster1963
andauthored
Replace jsdelivr resource references for better accessibility (#294)
* Initial plan * Initial exploration - add font-logos dependency Co-authored-by: hamster1963 <[email protected]> * Replace jsdelivr CDN with local npm package imports Co-authored-by: hamster1963 <[email protected]> * chore: auto-fix linting and formatting issues * chore: upgrade next.js version * chore: auto-fix linting and formatting issues * fix: update Card component styles to include ring-0 class for consistent appearance --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: hamster1963 <[email protected]>
1 parent c09ee96 commit 45e2a66

File tree

5 files changed

+13889
-68
lines changed

5 files changed

+13889
-68
lines changed

app/(main)/ClientComponents/detail/ServerIPInfo.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
3030
return (
3131
<section className="mb-4 flex flex-wrap gap-2">
3232
{data.asn?.autonomous_system_organization && (
33-
<Card className="rounded-[10px] border-none bg-transparent shadow-none">
33+
<Card className="rounded-[10px] border-none bg-transparent shadow-none ring-0">
3434
<CardContent className="px-1.5 py-1">
3535
<section className="flex flex-col items-start gap-0.5">
3636
<p className="text-muted-foreground text-xs">{"ASN"}</p>
@@ -40,7 +40,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
4040
</Card>
4141
)}
4242
{data.asn?.autonomous_system_number && (
43-
<Card className="rounded-[10px] border-none bg-transparent shadow-none">
43+
<Card className="rounded-[10px] border-none bg-transparent shadow-none ring-0">
4444
<CardContent className="px-1.5 py-1">
4545
<section className="flex flex-col items-start gap-0.5">
4646
<p className="text-muted-foreground text-xs">{t("asn_number")}</p>
@@ -50,7 +50,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
5050
</Card>
5151
)}
5252
{data.city?.registered_country?.names.en && (
53-
<Card className="rounded-[10px] border-none bg-transparent shadow-none">
53+
<Card className="rounded-[10px] border-none bg-transparent shadow-none ring-0">
5454
<CardContent className="px-1.5 py-1">
5555
<section className="flex flex-col items-start gap-0.5">
5656
<p className="text-muted-foreground text-xs">{t("registered_country")}</p>
@@ -60,7 +60,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
6060
</Card>
6161
)}
6262
{data.city?.country?.iso_code && (
63-
<Card className="rounded-[10px] border-none bg-transparent shadow-none">
63+
<Card className="rounded-[10px] border-none bg-transparent shadow-none ring-0">
6464
<CardContent className="px-1.5 py-1">
6565
<section className="flex flex-col items-start gap-0.5">
6666
<p className="text-muted-foreground text-xs">{"ISO"}</p>
@@ -70,7 +70,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
7070
</Card>
7171
)}
7272
{data.city?.city?.names.en && (
73-
<Card className="rounded-[10px] border-none bg-transparent shadow-none">
73+
<Card className="rounded-[10px] border-none bg-transparent shadow-none ring-0">
7474
<CardContent className="px-1.5 py-1">
7575
<section className="flex flex-col items-start gap-0.5">
7676
<p className="text-muted-foreground text-xs">{t("city")}</p>
@@ -80,7 +80,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
8080
</Card>
8181
)}
8282
{data.city?.location?.longitude && (
83-
<Card className="rounded-[10px] border-none bg-transparent shadow-none">
83+
<Card className="rounded-[10px] border-none bg-transparent shadow-none ring-0">
8484
<CardContent className="px-1.5 py-1">
8585
<section className="flex flex-col items-start gap-0.5">
8686
<p className="text-muted-foreground text-xs">{t("longitude")}</p>
@@ -90,7 +90,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
9090
</Card>
9191
)}
9292
{data.city?.location?.latitude && (
93-
<Card className="rounded-[10px] border-none bg-transparent shadow-none">
93+
<Card className="rounded-[10px] border-none bg-transparent shadow-none ring-0">
9494
<CardContent className="px-1.5 py-1">
9595
<section className="flex flex-col items-start gap-0.5">
9696
<p className="text-muted-foreground text-xs">{t("latitude")}</p>
@@ -100,7 +100,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
100100
</Card>
101101
)}
102102
{data.city?.location?.time_zone && (
103-
<Card className="rounded-[10px] border-none bg-transparent shadow-none">
103+
<Card className="rounded-[10px] border-none bg-transparent shadow-none ring-0">
104104
<CardContent className="px-1.5 py-1">
105105
<section className="flex flex-col items-start gap-0.5">
106106
<p className="text-muted-foreground text-xs">{t("time_zone")}</p>
@@ -110,7 +110,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
110110
</Card>
111111
)}
112112
{data.city?.postal && (
113-
<Card className="rounded-[10px] border-none bg-transparent shadow-none">
113+
<Card className="rounded-[10px] border-none bg-transparent shadow-none ring-0">
114114
<CardContent className="px-1.5 py-1">
115115
<section className="flex flex-col items-start gap-0.5">
116116
<p className="text-muted-foreground text-xs">{t("postal_code")}</p>

app/layout.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { ThemeColorManager } from "@/components/ThemeColorManager"
22
import getEnv from "@/lib/env-entry"
33
import { cn } from "@/lib/utils"
44
import "@/styles/globals.css"
5+
import "flag-icons/css/flag-icons.min.css"
6+
import "font-logos/assets/font-logos.css"
57
import type { Metadata, Viewport } from "next"
68
import { Inter as FontSans } from "next/font/google"
79
import { NextIntlClientProvider } from "next-intl"
@@ -49,14 +51,6 @@ export default async function LocaleLayout({ children }: { children: React.React
4951
<html lang={locale} suppressHydrationWarning>
5052
<head>
5153
<PublicEnvScript />
52-
<link
53-
rel="stylesheet"
54-
href="https://fastly.jsdelivr.net/gh/lipis/[email protected]/css/flag-icons.min.css"
55-
/>
56-
<link
57-
rel="stylesheet"
58-
href="https://fastly.jsdelivr.net/npm/font-logos@1/assets/font-logos.css"
59-
/>
6054
</head>
6155
<body className={cn("min-h-screen bg-background font-sans antialiased", fontSans.variable)}>
6256
<ThemeProvider

0 commit comments

Comments
 (0)