From 85bde2d3d69a9f976d3e8ecc9343d1b52a0ec29f Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 23 May 2025 14:58:59 +0200 Subject: Add CenteredLayout with basic tailwind styles --- src/components/Counter.jsx | 7 +++++-- src/layouts/CenteredLayout.astro | 26 ++++++++++++++++++++++++++ src/pages/index.astro | 18 ++++++------------ 3 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 src/layouts/CenteredLayout.astro (limited to 'src') diff --git a/src/components/Counter.jsx b/src/components/Counter.jsx index a2ae7c3..8661dc0 100644 --- a/src/components/Counter.jsx +++ b/src/components/Counter.jsx @@ -4,8 +4,11 @@ export default function Counter() { const [count, setCount] = useState(0); return ( -
-
diff --git a/src/layouts/CenteredLayout.astro b/src/layouts/CenteredLayout.astro new file mode 100644 index 0000000..5505b65 --- /dev/null +++ b/src/layouts/CenteredLayout.astro @@ -0,0 +1,26 @@ +--- +import '../styles/global.css'; + +interface Props { + title?: string; +} + +const { title = "Astro Site" } = Astro.props; +--- + + + + + + + + {title} + + +
+
+ +
+
+ + diff --git a/src/pages/index.astro b/src/pages/index.astro index ce6dc4e..22adfcf 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,17 +1,11 @@ --- import Counter from '../components/Counter'; +import CenteredLayout from '../layouts/CenteredLayout.astro'; --- - - - - - - - Astro - - -

Astro

+ +
+

Astro

- - +
+
-- cgit v1.3.1