Skip to content

armgit / ARTEX

Public Imported from GitHub
0

ARTEX - AI autonomous penetration testing system (English translation; upstream: Autumn-27/ARTEX, AGPL-3.0)

web: ship the logo at display size, and serve WebP when the browser takes it

Pedro Gomesb61306f7a83a
diff --git a/web/public/logo.png b/web/public/logo.png
index d449f25..3cab9c9 100644
Binary files a/web/public/logo.png and b/web/public/logo.png differ
diff --git a/web/public/logo.webp b/web/public/logo.webp
new file mode 100644
index 0000000..c41bbf5
Binary files /dev/null and b/web/public/logo.webp differ
diff --git a/web/src/app/(auth)/login/page.tsx b/web/src/app/(auth)/login/page.tsx
index 9d8d4c1..c309ffd 100644
--- a/web/src/app/(auth)/login/page.tsx
+++ b/web/src/app/(auth)/login/page.tsx
@@ -100,7 +100,10 @@ export default function LoginPage() {
<div className="absolute size-60 rounded-full border border-primary-foreground/15" />
<div className="absolute size-40 rounded-full border border-primary-foreground/20" />
{/* eslint-disable-next-line @next/next/no-img-element */}
- <img src="/logo.png" alt="ARTEX" width={160} height={160} className="relative brightness-0 invert" />
+ <picture className="contents">
+ <source srcSet="/logo.webp" type="image/webp" />
+ <img src="/logo.png" alt="ARTEX" width={160} height={160} className="relative brightness-0 invert" />
+ </picture>
</div>
</div>
diff --git a/web/src/app/(auth)/setup/page.tsx b/web/src/app/(auth)/setup/page.tsx
index 152bca3..272a397 100644
--- a/web/src/app/(auth)/setup/page.tsx
+++ b/web/src/app/(auth)/setup/page.tsx
@@ -70,7 +70,10 @@ export default function SetupPage() {
<div className="absolute size-60 rounded-full border border-primary-foreground/15" />
<div className="absolute size-40 rounded-full border border-primary-foreground/20" />
{/* eslint-disable-next-line @next/next/no-img-element */}
- <img src="/logo.png" alt="ARTEX" width={160} height={160} className="relative brightness-0 invert" />
+ <picture className="contents">
+ <source srcSet="/logo.webp" type="image/webp" />
+ <img src="/logo.png" alt="ARTEX" width={160} height={160} className="relative brightness-0 invert" />
+ </picture>
</div>
</div>
diff --git a/web/src/app/(main)/_components/sidebar/app-sidebar.tsx b/web/src/app/(main)/_components/sidebar/app-sidebar.tsx
index 7d72693..ea672b5 100644
--- a/web/src/app/(main)/_components/sidebar/app-sidebar.tsx
+++ b/web/src/app/(main)/_components/sidebar/app-sidebar.tsx
@@ -44,7 +44,10 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
<SidebarMenuButton asChild>
<Link prefetch={false} href="/function/tasks">
{/* eslint-disable-next-line @next/next/no-img-element */}
- <img src="/logo.png" alt="ARTEX" width={40} height={40} className="shrink-0" />
+ <picture className="contents">
+ <source srcSet="/logo.webp" type="image/webp" />
+ <img src="/logo.png" alt="ARTEX" width={40} height={40} className="shrink-0" />
+ </picture>
<span className="font-semibold text-base">{APP_CONFIG.name}</span>
</Link>
</SidebarMenuButton>
diff --git a/web/src/app/icon.png b/web/src/app/icon.png
index d449f25..3a5c3fa 100644
Binary files a/web/src/app/icon.png and b/web/src/app/icon.png differ