Remove unused favicon files and update layout metadata for icon definitions. Adjusted image handling in components for better responsiveness and consistency.
No files matched your search
|
After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 40 KiB |
@@ -0,0 +1,31 @@
|
||||
from PIL import Image
|
||||
from pathlib import Path
|
||||
|
||||
def to_white_transparent(src: Path, dest: Path) -> None:
|
||||
img = Image.open(src).convert("RGBA")
|
||||
pixels = list(img.getdata())
|
||||
out = []
|
||||
for r, g, b, a in pixels:
|
||||
lum = (r + g + b) // 3
|
||||
out.append((255, 255, 255, lum if a > 0 else 0))
|
||||
img.putdata(out)
|
||||
dest.parent.mkdir(parents=True, exist_ok=True)
|
||||
img.save(dest, "PNG")
|
||||
print(f"wrote {dest} {img.size}")
|
||||
|
||||
root = Path(r"e:\TeamProjects\AUT\ManagementWebsite")
|
||||
src = root / "public" / "brand" / "amirkabir.png"
|
||||
backup = root / "public" / "brand" / "amirkabir-black-bg.png"
|
||||
|
||||
if not backup.exists():
|
||||
Image.open(src).save(backup)
|
||||
print(f"backup {backup}")
|
||||
|
||||
to_white_transparent(backup, src)
|
||||
to_white_transparent(backup, root / "src" / "app" / "icon.png")
|
||||
to_white_transparent(backup, root / "src" / "app" / "apple-icon.png")
|
||||
to_white_transparent(backup, root / "public" / "favicon.png")
|
||||
|
||||
img = Image.open(src).convert("RGBA")
|
||||
img.save(root / "public" / "favicon.ico", format="ICO", sizes=[(32, 32), (16, 16)])
|
||||
print("done")
|
||||
@@ -60,7 +60,7 @@ function LoginForm() {
|
||||
alt="دانشگاه صنعتی امیرکبیر"
|
||||
fill
|
||||
sizes="56px"
|
||||
className="object-cover"
|
||||
className="object-contain p-[15%]"
|
||||
priority
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 20 KiB |
@@ -64,12 +64,8 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
},
|
||||
description: t("homeDescription"),
|
||||
icons: {
|
||||
icon: [
|
||||
{ url: "/brand/amirkabir.png", sizes: "32x32", type: "image/png" },
|
||||
{ url: "/brand/amirkabir.png", sizes: "192x192", type: "image/png" },
|
||||
],
|
||||
icon: [{ url: "/brand/amirkabir.png", type: "image/png" }],
|
||||
apple: [{ url: "/brand/amirkabir.png", type: "image/png" }],
|
||||
shortcut: ["/brand/amirkabir.png"],
|
||||
},
|
||||
openGraph: {
|
||||
type: "website",
|
||||
|
||||
@@ -13,7 +13,7 @@ type BrandLogoProps = {
|
||||
compact?: boolean;
|
||||
};
|
||||
|
||||
/** AUT seal on a dark disc — works on light and dark headers (asset is white-on-black). */
|
||||
/** AUT seal — white mark on transparent; sits on brand disc. */
|
||||
export function BrandLogo({
|
||||
href = "/",
|
||||
title,
|
||||
@@ -34,7 +34,7 @@ export function BrandLogo({
|
||||
<span
|
||||
className={cn(
|
||||
"relative shrink-0 overflow-hidden rounded-full bg-chart-3 shadow-sm ring-1",
|
||||
onDark ? "ring-background/20" : "ring-border",
|
||||
onDark ? "ring-background/25" : "ring-border",
|
||||
compact ? "size-9" : "size-11 sm:size-12",
|
||||
)}
|
||||
>
|
||||
@@ -44,7 +44,7 @@ export function BrandLogo({
|
||||
fill
|
||||
priority
|
||||
sizes="48px"
|
||||
className="object-cover"
|
||||
className="object-contain p-[18%]"
|
||||
/>
|
||||
</span>
|
||||
<span className="min-w-0 text-start leading-tight">
|
||||
|
||||
@@ -30,7 +30,7 @@ export function AdminShell({
|
||||
>
|
||||
<AdminSidebar userName={userName} />
|
||||
<SidebarInset className="bg-muted/30 md:peer-data-[variant=inset]:ms-2 md:peer-data-[variant=inset]:me-0 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:me-2">
|
||||
<header className="sticky top-0 z-20 flex h-(--header-height) shrink-0 items-center gap-2 border-b bg-background/95 px-4 backdrop-blur supports-backdrop-filter:bg-background/80">
|
||||
<header className="sticky top-0 z-20 flex h-(--header-height) shrink-0 items-center gap-2 border-b border-border bg-background/95 px-4 backdrop-blur supports-backdrop-filter:bg-background/80">
|
||||
<SidebarTrigger className="-ms-1" />
|
||||
<Separator orientation="vertical" className="me-1 data-[orientation=vertical]:h-4" />
|
||||
<div className="flex min-w-0 flex-1 items-center justify-between gap-3">
|
||||
@@ -41,7 +41,7 @@ export function AdminShell({
|
||||
alt=""
|
||||
fill
|
||||
sizes="24px"
|
||||
className="object-cover"
|
||||
className="object-contain p-[15%]"
|
||||
/>
|
||||
</span>
|
||||
<p className="truncate text-sm font-medium text-muted-foreground">
|
||||
|
||||
@@ -30,7 +30,6 @@ import {
|
||||
SidebarMenuButton,
|
||||
SidebarMenuItem,
|
||||
SidebarRail,
|
||||
SidebarSeparator,
|
||||
} from "@/components/ui/sidebar";
|
||||
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
||||
import { LogoutButton } from "@/components/organisms/admin/LogoutButton";
|
||||
@@ -88,7 +87,7 @@ export function AdminSidebar({ userName }: { userName: string }) {
|
||||
|
||||
return (
|
||||
<Sidebar side="right" collapsible="icon" variant="inset">
|
||||
<SidebarHeader className="gap-3 p-3">
|
||||
<SidebarHeader className="h-(--header-height) shrink-0 justify-center gap-0 border-b border-sidebar-border p-0 px-3">
|
||||
<SidebarMenu>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton
|
||||
@@ -102,7 +101,7 @@ export function AdminSidebar({ userName }: { userName: string }) {
|
||||
alt=""
|
||||
fill
|
||||
sizes="32px"
|
||||
className="object-cover"
|
||||
className="object-contain p-[15%]"
|
||||
priority
|
||||
/>
|
||||
</span>
|
||||
@@ -117,8 +116,6 @@ export function AdminSidebar({ userName }: { userName: string }) {
|
||||
</SidebarMenu>
|
||||
</SidebarHeader>
|
||||
|
||||
<SidebarSeparator />
|
||||
|
||||
<SidebarContent>
|
||||
{NAV_GROUPS.map((group) => (
|
||||
<SidebarGroup key={group.label}>
|
||||
|
||||