Skip to content

Commit 8372205

Browse files
committed
Fix Astro component structure and Netlify configuration
- Remove double Layout wrapping (Welcome component no longer wraps itself in Layout) - Fix index.astro to properly pass title to Layout - Remove problematic admin role condition from netlify.toml redirects - Clean up component architecture following Astro best practices
1 parent 1e15595 commit 8372205

3 files changed

Lines changed: 13 additions & 21 deletions

File tree

netlify.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
[build.environment]
66
NODE_VERSION = "20"
77

8-
# Redirect rules for SPA-like behavior (optional)
8+
# Redirect rules for SPA-like behavior
99
[[redirects]]
1010
from = "/*"
1111
to = "/index.html"
1212
status = 200
13-
conditions = {Role = ["admin"]}
1413

1514
# Optional: Handle form submissions (if you plan to add forms later)
1615
# [[redirects]]

src/components/Welcome.astro

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
import Layout from '../layouts/Layout.astro';
3-
42
// Simple data for our MVP
53
const contributorTip = {
64
week: 1,
@@ -138,18 +136,17 @@ const resources = [
138136
});
139137
</script>
140138

141-
<Layout title="Open Source Communities">
142-
<!-- Sticky Work in Progress Banner -->
143-
<div class="sticky top-0 bg-gradient-to-r from-orange-500 to-red-500 text-white py-6 px-6 text-center font-medium z-50 shadow-lg">
144-
<div class="max-w-6xl mx-auto flex items-center justify-center gap-2 text-sm md:text-base">
145-
<span class="text-lg">⚠️</span>
146-
<span class="font-semibold text-lg">PREVIEW SITE:</span>
147-
<span class="text-lg">This is a work-in-progress with placeholder data. Nothing is functional yet!</span>
148-
<span class="text-lg">⚠️</span>
149-
</div>
139+
<!-- Sticky Work in Progress Banner -->
140+
<div class="sticky top-0 bg-gradient-to-r from-orange-500 to-red-500 text-white py-6 px-6 text-center font-medium z-50 shadow-lg">
141+
<div class="max-w-6xl mx-auto flex items-center justify-center gap-2 text-sm md:text-base">
142+
<span class="text-lg">⚠️</span>
143+
<span class="font-semibold text-lg">PREVIEW SITE:</span>
144+
<span class="text-lg">This is a work-in-progress with placeholder data. Nothing is functional yet!</span>
145+
<span class="text-lg">⚠️</span>
150146
</div>
151-
<!-- Hero Section -->
152-
<section class="min-h-[80vh] flex flex-col justify-center items-center text-center px-4 relative overflow-hidden">
147+
</div>
148+
<!-- Hero Section -->
149+
<section class="min-h-[80vh] flex flex-col justify-center items-center text-center px-4 relative overflow-hidden">
153150
<div class="absolute inset-0 bg-gradient-to-br from-purple-500/20 to-pink-500/20 z-0"></div>
154151
<!-- Simple animated element -->
155152
<div class="absolute inset-0 z-0">
@@ -322,5 +319,4 @@ const resources = [
322319
))}
323320
</div>
324321
</div>
325-
</section>
326-
</Layout>
322+
</section>

src/pages/index.astro

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
---
22
import Welcome from '../components/Welcome.astro';
33
import Layout from '../layouts/Layout.astro';
4-
5-
// Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build
6-
// Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh.
74
---
85

9-
<Layout>
6+
<Layout title="Open Source Communities">
107
<Welcome />
118
</Layout>

0 commit comments

Comments
 (0)