Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions site/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ import Footer from "../components/Footer.astro";
Start Building
</a>
<a
href="#how-it-works"
href="#license-usage"
class="px-8 py-3 border border-teal-400/50 text-teal-400 hover:bg-teal-400/10 rounded-lg font-semibold transition-colors"
>
See How It Works
License & Usage Restrictions
</a>
<a class="github-button" href="https://github.com/Aureliolo/synthorg" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star Aureliolo/synthorg on GitHub">Star</a>
</div>

<!-- Scroll hint -->
<a href="#how-it-works" class="mt-12 inline-block text-gray-500 hover:text-gray-300 transition-colors animate-bounce" aria-label="Scroll down for more details">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
</a>
Comment on lines +52 to +54

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better maintainability and reusability, it's a good practice to extract SVG icons into their own Astro components. This keeps the markup cleaner and makes icons easier to manage, especially if this icon or others are used elsewhere on the site.

For example, you could create a component src/components/icons/ChevronDown.astro:

// src/components/icons/ChevronDown.astro
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" {...Astro.props}>
  <path d="m6 9 6 6 6-6"/>
</svg>

And then use it in this file:

---
import ChevronDown from '../components/icons/ChevronDown.astro';
---
<a href="#how-it-works" class="mt-12 inline-block text-gray-500 hover:text-gray-300 transition-colors animate-bounce" aria-label="Scroll down for more details">
  <ChevronDown />
</a>

</div>
</section>

Expand Down Expand Up @@ -307,7 +312,7 @@ import Footer from "../components/Footer.astro";
<!-- ============================================================ -->
<!-- LICENSE & USAGE -->
<!-- ============================================================ -->
<section class="py-16 px-6 bg-gradient-to-b from-[#1a1f2e] to-[#0F1219]">
<section id="license-usage" class="py-16 px-6 bg-gradient-to-b from-[#1a1f2e] to-[#0F1219]">
<div class="max-w-5xl mx-auto">
<h2 class="text-3xl md:text-4xl font-bold text-center mb-4">License & Usage</h2>
<p class="text-gray-400 text-center max-w-2xl mx-auto mb-16">
Expand Down
Loading