Merge pull request #140 from tmshv/upd/next-image-updates
next/image updates
This commit is contained in:
10 files changed
+12
-9
No files matched your search
+1
-1
@@ -10,7 +10,7 @@ import { Youtube } from "@/components/Youtube"
|
||||
import { paramsToSlug } from "@/remote/lib"
|
||||
import { PageGrid } from "@/components/PageGrid"
|
||||
import { useRouter } from "next/router"
|
||||
import { FileCard } from "@/components/FIleCard"
|
||||
import { FileCard } from "@/components/FileCard"
|
||||
import { Picture } from "@/ui/Picture"
|
||||
import { tail } from "@/lib/array"
|
||||
import { getMenu, getPageBySlug, getUrls } from "@/remote/api"
|
||||
|
||||
@@ -5,10 +5,10 @@ export type CardGridProps = {
|
||||
style?: React.CSSProperties
|
||||
}
|
||||
|
||||
export const CardGrid: React.FC<CardGridProps> = props => {
|
||||
export const CardGrid: React.FC<CardGridProps> = ({ children, style }) => {
|
||||
return (
|
||||
<section className={s.grid} style={props.style}>
|
||||
{props.children}
|
||||
<section className={s.grid} style={style}>
|
||||
{children}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
File renamed without changes.
+1
@@ -10,6 +10,7 @@
|
||||
|
||||
.image {
|
||||
box-shadow: var(--shadow);
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.info {
|
||||
@@ -37,7 +37,6 @@ export const FileCard: React.FC<FileCardProps> = props => {
|
||||
alt={""}
|
||||
width={100}
|
||||
height={100}
|
||||
objectFit={"contain"}
|
||||
/>
|
||||
</div>
|
||||
</a>
|
||||
File renamed without changes.
@@ -42,8 +42,10 @@ export const PageGrid: React.FC<PageGridProps> = props => {
|
||||
href={item.url}
|
||||
cover={(
|
||||
<Image
|
||||
layout={"fill"}
|
||||
objectFit={"cover"}
|
||||
fill
|
||||
style={{
|
||||
objectFit: "cover",
|
||||
}}
|
||||
src={item.cover.src}
|
||||
alt={item.cover.alt ?? ""}
|
||||
placeholder={item.cover.blur ? "blur" : "empty"}
|
||||
|
||||
@@ -3,7 +3,6 @@ import s from "./styles.module.css"
|
||||
import cx from "classnames"
|
||||
import { ITag } from "src/types"
|
||||
import { Button } from "@/ui/Button"
|
||||
import Image from "next/image"
|
||||
|
||||
const directionClass = {
|
||||
horizontal: "",
|
||||
|
||||
@@ -41,7 +41,6 @@ export const Picture: React.FC<PictureProps> = memo(({
|
||||
alt={alt ?? ""}
|
||||
width={width}
|
||||
height={height}
|
||||
layout={"responsive"}
|
||||
blurDataURL={blur}
|
||||
placeholder={blur ? "blur" : "empty"}
|
||||
/>
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
/* override nextjs blurred placeholder filter */
|
||||
/* need for border radius */
|
||||
filter: none !important;
|
||||
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.pic figcaption {
|
||||
|
||||
Reference in new issue
Block a user