Skip to content

Commit

Permalink
perf: convertita cover a webp
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelPanic92 committed Jun 12, 2024
1 parent fd04dc3 commit bce28b5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Binary file removed web/public/images/dungeon-world-cover.jpeg
Binary file not shown.
Binary file added web/public/images/dungeon-world-cover.webp
Binary file not shown.
5 changes: 3 additions & 2 deletions web/src/components/home-page-components/home-page-cover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Link } from "nextra-theme-docs";
import { FC } from "react";
import Image from "next/image";
import { Metal_Mania } from "next/font/google";
import cover from "../../../public/images/dungeon-world-cover.webp";

const metalMania = Metal_Mania({
weight: "400",
Expand All @@ -13,10 +14,10 @@ const metalMania = Metal_Mania({
export const Cover: FC = () => {
return (
<div className="w-full mx-auto max-w-[90rem] md:pl-[max(env(safe-area-inset-left),1.5rem)] md:pr-[max(env(safe-area-inset-right),1.5rem)]">
<div className="relative h-96 md:h-[41rem]">
<div className="relative h-96 md:h-[832px]">
<Image
priority
src="/images/dungeon-world-cover.jpeg"
src={cover}
className="object-center object-cover"
alt="Immagine di sfondo"
fill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ export const HomePageHomebrew = () => {
<div className="flex overflow-x-scroll pt-2 hide-scroll-bar w-full">
<div className="flex flex-nowrap">
{firstClasses.map((clazz) => (
<div className="inline-block px-3">
<div className="inline-block px-3" key={clazz.name + clazz.collection}>
<ClassCard
collection={clazz.collection}
image={clazz.showcase.imageUrl}
key={clazz.name + clazz.collection}
name={clazz.name}
link={`/homebrew/classi/${clazz.slug}`}
/>
Expand Down
2 changes: 1 addition & 1 deletion web/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const config: DocsThemeConfig = {
'https://dungeonworld-ita.vercel.app' +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`);

const socialCard = frontMatter.image ? 'https://dungeonworld-ita.vercel.app' + frontMatter.image : 'https://dungeonworld-ita.vercel.app/images/dungeon-world-cover.jpeg';
const socialCard = frontMatter.image ? 'https://dungeonworld-ita.vercel.app' + frontMatter.image : 'https://dungeonworld-ita.vercel.app/images/dungeon-world-cover.webp';
const description = frontMatter.description ?? 'Dungeon World Italia';

return (
Expand Down

0 comments on commit bce28b5

Please sign in to comment.