format all code (#386)
This commit is contained in:
1 parent
7ea2f7f40f
commit
286b050fa8
61 files changed
+1329
-1307
No files matched your search
@@ -1,46 +1,46 @@
|
||||
---
|
||||
import path from 'node:path'
|
||||
import { Icon } from 'astro-icon/components'
|
||||
import I18nKey from '../i18n/i18nKey'
|
||||
import { i18n } from '../i18n/translation'
|
||||
import { getDir } from '../utils/url-utils'
|
||||
import PostMetadata from './PostMeta.astro'
|
||||
import ImageWrapper from './misc/ImageWrapper.astro'
|
||||
import path from "node:path";
|
||||
import { Icon } from "astro-icon/components";
|
||||
import I18nKey from "../i18n/i18nKey";
|
||||
import { i18n } from "../i18n/translation";
|
||||
import { getDir } from "../utils/url-utils";
|
||||
import PostMetadata from "./PostMeta.astro";
|
||||
import ImageWrapper from "./misc/ImageWrapper.astro";
|
||||
|
||||
interface Props {
|
||||
class?: string
|
||||
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
||||
entry: any
|
||||
title: string
|
||||
url: string
|
||||
published: Date
|
||||
updated?: Date
|
||||
tags: string[]
|
||||
category: string
|
||||
image: string
|
||||
description: string
|
||||
draft: boolean
|
||||
style: string
|
||||
class?: string;
|
||||
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
||||
entry: any;
|
||||
title: string;
|
||||
url: string;
|
||||
published: Date;
|
||||
updated?: Date;
|
||||
tags: string[];
|
||||
category: string;
|
||||
image: string;
|
||||
description: string;
|
||||
draft: boolean;
|
||||
style: string;
|
||||
}
|
||||
const {
|
||||
entry,
|
||||
title,
|
||||
url,
|
||||
published,
|
||||
updated,
|
||||
tags,
|
||||
category,
|
||||
image,
|
||||
description,
|
||||
style,
|
||||
} = Astro.props
|
||||
const className = Astro.props.class
|
||||
entry,
|
||||
title,
|
||||
url,
|
||||
published,
|
||||
updated,
|
||||
tags,
|
||||
category,
|
||||
image,
|
||||
description,
|
||||
style,
|
||||
} = Astro.props;
|
||||
const className = Astro.props.class;
|
||||
|
||||
const hasCover = image !== undefined && image !== null && image !== ''
|
||||
const hasCover = image !== undefined && image !== null && image !== "";
|
||||
|
||||
const coverWidth = '28%'
|
||||
const coverWidth = "28%";
|
||||
|
||||
const { remarkPluginFrontmatter } = await entry.render()
|
||||
const { remarkPluginFrontmatter } = await entry.render();
|
||||
---
|
||||
<div class:list={["card-base flex flex-col-reverse md:flex-col w-full rounded-[var(--radius-large)] overflow-hidden relative", className]} style={style}>
|
||||
<div class:list={["pl-6 md:pl-9 pr-6 md:pr-2 pt-6 md:pt-7 pb-6 relative", {"w-full md:w-[calc(100%_-_52px_-_12px)]": !hasCover, "w-full md:w-[calc(100%_-_var(--coverWidth)_-_12px)]": hasCover}]}>
|
||||
|
||||
Reference in new issue
Block a user