1
0
Fork 0

feat(TrainingLayout.tsx): if logo is svg, add invert class

- all svg tech icons are by default black, using css invert to make them visible on black background
This commit is contained in:
Vojtěch Mareš 2023-01-12 16:36:13 +01:00
parent b6c76bc29d
commit 6cf43eea68
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -1,5 +1,6 @@
import Head from "next/head"; import Head from "next/head";
import Image from "next/image"; import Image from "next/image";
import clsx from "clsx";
import { Header } from "@/components/layout/Header"; import { Header } from "@/components/layout/Header";
import { Footer } from "@/components/layout/Footer"; import { Footer } from "@/components/layout/Footer";
@ -38,11 +39,14 @@ export default function TrainingLayout({ content, meta }: Props) {
<Container className="flex justify-around"> <Container className="flex justify-around">
<Image <Image
src={meta.logo} src={meta.logo}
className="h-32 w-32 rounded-full"
width="1500" width="1500"
height="1500" height="1500"
alt="" alt=""
priority priority
className={clsx(
"h-32 w-32 rounded-full",
meta.logo.src.endsWith(".svg") ? "invert" : ""
)}
/> />
<h2 className="ml-4 text-center font-display self-center text-4xl tracking-tight text-white sm:text-6xl"> <h2 className="ml-4 text-center font-display self-center text-4xl tracking-tight text-white sm:text-6xl">
Školení {meta.name} Školení {meta.name}