test fix for new theme
This commit is contained in:
parent
e022ad5d9a
commit
1bd9364dcb
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@matthiesenxyz/astro-ghostcms-brutalbyelian",
|
||||
"description": "ElianCodes Brutal theme modified to work with Astro-GhostCMS",
|
||||
"version": "0.0.1-dev01",
|
||||
"version": "0.0.1-dev02",
|
||||
"homepage": "https://astro-ghostcms.xyz/",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
import type { Settings, Post } from "@matthiesenxyz/astro-ghostcms/api";
|
||||
import { formatDate } from "../../utils";
|
||||
import FeatureImage from "../generic/Featureimage.astro";
|
||||
|
||||
export type Props = {
|
||||
post: Post;
|
||||
settings: Settings;
|
||||
};
|
||||
|
||||
const { post, settings } = Astro.props as Props;
|
||||
---
|
||||
<header class="article-header gh-canvas">
|
||||
<div class="flex justify-between my-4">
|
||||
<section class="flex flex-grow align-middle">
|
||||
<div class="text-ctp-overlay2">
|
||||
{ post.primary_author && (
|
||||
<h4 class="text-ctp-teal">Author:
|
||||
{post.primary_author.name}
|
||||
</h4>
|
||||
)}
|
||||
<div class="text-ctp-overlay2">
|
||||
<time class="text-ctp-sapphire" datetime={formatDate(post.created_at)}
|
||||
>{formatDate(post.created_at)}
|
||||
</time>
|
||||
<span class="text-ctp-peach"
|
||||
><span class="text-ctp-overlay2">•</span>
|
||||
{post.reading_time} min read
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{post.feature_image && (
|
||||
<FeatureImage
|
||||
image={post.feature_image}
|
||||
alt={post.feature_image_alt ? post.feature_image_alt : post.title}
|
||||
caption={post.feature_image_caption || "" }
|
||||
settings={settings}
|
||||
transitionName={`img-${post.title}`}
|
||||
/>
|
||||
)}
|
||||
</header>
|
|
@ -5,6 +5,7 @@ import type { InferGetStaticPropsType } from "astro";
|
|||
import RecentBlogPosts from "../components/generic/RecentBlogPosts.astro";
|
||||
import FeatureImage from "../components/generic/Featureimage.astro";
|
||||
import { formatDate } from "../utils";
|
||||
import BlogPostHeader from "../components/blog/BlogPostHeader.astro";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const [posts, pages, settings] = await Promise.all([getAllPosts(), await getAllPages(), await getSettings()]);
|
||||
|
@ -22,37 +23,7 @@ invariant(settings, "Settings are required");
|
|||
<BlogPost title={post.title} description={post.excerpt}>
|
||||
<article class='prose-slate w-sm md:w-prose md:prose poppins pl-4'>
|
||||
|
||||
<header class="article-header gh-canvas">
|
||||
<div class="flex justify-between my-4">
|
||||
<section class="flex flex-grow align-middle">
|
||||
<div class="text-ctp-overlay2">
|
||||
{ post.primary_author && (
|
||||
<h4 class="text-ctp-teal">Author:
|
||||
{post.primary_author.name}
|
||||
</h4>
|
||||
)}
|
||||
<div class="text-ctp-overlay2">
|
||||
<time class="text-ctp-sapphire" datetime={formatDate(post.created_at)}
|
||||
>{formatDate(post.created_at)}
|
||||
</time>
|
||||
<span class="text-ctp-peach"
|
||||
><span class="text-ctp-overlay2">•</span>
|
||||
{post.reading_time} min read
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{post.feature_image && (
|
||||
<FeatureImage
|
||||
image={post.feature_image}
|
||||
alt={post.feature_image_alt ? post.feature_image_alt : post.title}
|
||||
caption={post.feature_image_caption || "" }
|
||||
settings={settings}
|
||||
transitionName={`img-${post.title}`}
|
||||
/>
|
||||
)}
|
||||
</header>
|
||||
<BlogPostHeader post={post} settings={settings} />
|
||||
|
||||
<Fragment set:html={post.html} />
|
||||
</article>
|
||||
|
|
Loading…
Reference in New Issue