is this it?
This commit is contained in:
parent
1bd9364dcb
commit
5d37c79ad1
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@matthiesenxyz/astro-ghostcms-brutalbyelian",
|
||||
"description": "ElianCodes Brutal theme modified to work with Astro-GhostCMS",
|
||||
"version": "0.0.1-dev02",
|
||||
"version": "0.0.1-dev03",
|
||||
"homepage": "https://astro-ghostcms.xyz/",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
import type { Settings, Post } from "@matthiesenxyz/astro-ghostcms/api";
|
||||
import { formatDate } from "../../utils";
|
||||
import FeatureImage from "../generic/Featureimage.astro";
|
||||
import FeatureImage from "./FeatureImage.astro";
|
||||
|
||||
export type Props = {
|
||||
post: Post;
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
import { getGhostImgPath } from "../../utils";
|
||||
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
|
||||
export type Props = {
|
||||
image: string;
|
||||
alt?: string;
|
||||
caption?: string;
|
||||
settings: Settings;
|
||||
transitionName?: string;
|
||||
};
|
||||
const { image, alt, caption = "", settings, transitionName } = Astro.props as Props;
|
||||
---
|
||||
|
||||
<figure class="article-image">
|
||||
<img
|
||||
srcset={`
|
||||
${getGhostImgPath(settings.url, image, 300)} 300w,
|
||||
${getGhostImgPath(settings.url, image, 600)} 600w,
|
||||
`}
|
||||
sizes="(min-width: 300px) 600px, 92vw"
|
||||
src={getGhostImgPath(settings.url, image, 2000)}
|
||||
alt={alt}
|
||||
transition:name={transitionName}
|
||||
/>
|
||||
{caption && <figcaption class="text-ctp-overlay2"><Fragment set:html={caption}></figcaption>}
|
||||
</figure>
|
Loading…
Reference in New Issue