diff --git a/src/components/Img.tsx b/src/components/Img.tsx index 23c9861..c097127 100644 --- a/src/components/Img.tsx +++ b/src/components/Img.tsx @@ -59,30 +59,22 @@ type ImgProps = { }; export default function Img(props: ImgProps): JSX.Element { - if (props.layout == "fill") { - return ( - {props.alt - ); - } else { - return ( - {props.alt - ); - } + const imgSize = getImgSizesByQuality( + props.image.width, + props.image.height, + props.quality ? props.quality : ImageQuality.Small + ); + return ( + {props.alt + ); } diff --git a/src/components/PanelComponents/NavOption.tsx b/src/components/PanelComponents/NavOption.tsx index 2721773..b68bae6 100644 --- a/src/components/PanelComponents/NavOption.tsx +++ b/src/components/PanelComponents/NavOption.tsx @@ -27,7 +27,7 @@ export default function NavOption(props: NavOptionProps): JSX.Element {

${props.title}

@@ -39,7 +39,7 @@ export default function NavOption(props: NavOptionProps): JSX.Element {
`} data-for={props.tooltipId} - data-multiline={true} + data-multiline className={`grid grid-flow-col grid-cols-[auto] auto-cols-fr justify-center ${ props.icon ? "text-left" : "text-center" } ${divCommon}`} diff --git a/src/hooks/useMediaQuery.ts b/src/hooks/useMediaQuery.ts index e16e37b..4ca4232 100644 --- a/src/hooks/useMediaQuery.ts +++ b/src/hooks/useMediaQuery.ts @@ -34,14 +34,14 @@ export default function useMediaQuery(query: string): boolean { } export function useMediaThin() { - return useMediaQuery("(max-width: 50ch)"); + return useMediaQuery("(max-width: 25rem)"); } export function useMediaMobile() { - return useMediaQuery("(max-width: 120ch)"); + return useMediaQuery("(max-width: 60rem)"); } export function useMediaDesktop() { - return useMediaQuery("(min-width: 120ch)"); + return useMediaQuery("(min-width: 60rem)"); } diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 58c1a9e..1873517 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -12,7 +12,7 @@ export default function Home(props: HomeProps): JSX.Element { const langui = props.langui.websiteInterfaces.data[0].attributes; const contentPanel = ( - +
); diff --git a/src/pages/library/items/[slug].tsx b/src/pages/library/items/[slug].tsx index 192310e..8738c53 100644 --- a/src/pages/library/items/[slug].tsx +++ b/src/pages/library/items/[slug].tsx @@ -63,7 +63,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element { dispatch(setSubPanelOpen(false))} /> @@ -71,7 +71,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element { dispatch(setSubPanelOpen(false))} /> ) : ( @@ -81,7 +81,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element { dispatch(setSubPanelOpen(false))} /> @@ -93,7 +93,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element { : langui.library_item_subitems } url={isVariantSet ? "#variants" : "#subitems"} - border={true} + border onClick={() => dispatch(setSubPanelOpen(false))} /> ) : ( @@ -104,7 +104,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element { ) : ( "" diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx index c4b7265..b970ec6 100644 --- a/src/pages/wiki/chronology.tsx +++ b/src/pages/wiki/chronology.tsx @@ -80,7 +80,7 @@ export default function DataChronology( subtitle={ era.attributes.starting_year + " → " + era.attributes.ending_year } - border={true} + border /> ))} diff --git a/tailwind.config.js b/tailwind.config.js index 834825a..1a685ac 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -15,9 +15,9 @@ module.exports = { monospace: ["monospace"], }, screens: { - desktop: { min: "120ch" }, - mobile: { max: "120ch" }, - thin: { max: "50ch" }, + desktop: { min: "60rem" }, + mobile: { max: "60rem" }, + thin: { max: "25rem" }, coarse: { raw: "(pointer: coarse)" }, fine: { raw: "(pointer: fine)" }, },