+ {/* Mobile-only Edit | Preview tab bar */}
+ {showPreview && (
+
+ )}
+
+ {/* Editor + Preview — desktop side-by-side, mobile single-pane via tabs */}
+
+
+
{/* Autocomplete dropdown */}
{showAutocomplete && autocompleteAssets.length > 0 && (
@@ -461,9 +498,13 @@ export default function Editor({ editSlug }: Props) {
)}
- {/* Live Preview — stretches to match editor height */}
+ {/* Live Preview — stretches to match editor height on desktop, full-pane via tabs on mobile */}
{showPreview && (
-
+
Preview
diff --git a/frontend/src/layouts/Layout.astro b/frontend/src/layouts/Layout.astro
index 82db0af..10cdc06 100644
--- a/frontend/src/layouts/Layout.astro
+++ b/frontend/src/layouts/Layout.astro
@@ -84,7 +84,6 @@ const fullTitle = `${title} | ${siteConfig.title}`;
diff --git a/frontend/src/pages/index.astro b/frontend/src/pages/index.astro
index 7c42e84..92946ae 100644
--- a/frontend/src/pages/index.astro
+++ b/frontend/src/pages/index.astro
@@ -1,6 +1,6 @@
---
import Layout from '../layouts/Layout.astro';
-import PostCard from '../components/PostCard.astro';
+import PostList from '../components/react/PostList';
const API_URL = process.env.PUBLIC_API_URL || 'http://localhost:3000';
@@ -41,14 +41,6 @@ try {
error = `Could not connect to backend at ${API_URL}: ${e instanceof Error ? e.message : String(e)}${cause ? ' (Cause: ' + (cause.message || cause.code || JSON.stringify(cause)) + ')' : ''}`;
console.error(error);
}
-
-function formatSlug(slug: string) {
- if (!slug) return '';
- return slug
- .split('-')
- .map(word => word.charAt(0).toUpperCase() + word.slice(1))
- .join(' ');
-}
---
@@ -75,18 +67,7 @@ function formatSlug(slug: string) {
)}
- {posts.map((post) => (
-
- ))}
+ {posts.length > 0 &&
}