diff --git a/www/src/components/Features.astro b/www/src/components/Features.astro new file mode 100644 index 0000000..63a80da --- /dev/null +++ b/www/src/components/Features.astro @@ -0,0 +1,90 @@ +--- +import { + RefreshCw, + Building2, + FolderTree, + Activity, + Lock, + Heart, +} from 'lucide-react'; + +const features = [ + { + title: "Automated Mirroring", + description: "Set it and forget it. Automatically sync your GitHub repositories to Gitea on a schedule.", + icon: RefreshCw, + gradient: "from-primary/10 to-accent/10", + iconColor: "text-primary" + }, + { + title: "Bulk Operations", + description: "Mirror entire organizations or user accounts with a single configuration.", + icon: Building2, + gradient: "from-accent/10 to-accent-teal/10", + iconColor: "text-accent" + }, + { + title: "Preserve Structure", + description: "Maintain your GitHub organization structure or customize how repos are organized.", + icon: FolderTree, + gradient: "from-accent-teal/10 to-primary/10", + iconColor: "text-accent-teal" + }, + { + title: "Real-time Status", + description: "Monitor mirror progress with live updates and detailed activity logs.", + icon: Activity, + gradient: "from-accent-coral/10 to-primary/10", + iconColor: "text-accent-coral" + }, + { + title: "Secure & Private", + description: "Self-hosted solution keeps your code on your infrastructure with full control.", + icon: Lock, + gradient: "from-accent-purple/10 to-primary/10", + iconColor: "text-accent-purple" + }, + { + title: "Open Source", + description: "Free, transparent, and community-driven development. Contribute and customize.", + icon: Heart, + gradient: "from-primary/10 to-accent-purple/10", + iconColor: "text-primary" + } +]; +--- + +
+
+
+

+ Everything You Need for + Reliable Backups +

+

+ Powerful features designed to keep your code safe and accessible, no matter what happens. +

+
+ +
+ {features.map((feature) => { + const Icon = feature.icon; + return ( +
+
+
+
+ +
+ +

{feature.title}

+

{feature.description}

+
+
+ ); + })} +
+
+
\ No newline at end of file diff --git a/www/src/components/Features.tsx b/www/src/components/Features.tsx deleted file mode 100644 index 8af0f9f..0000000 --- a/www/src/components/Features.tsx +++ /dev/null @@ -1,94 +0,0 @@ -import React from 'react'; -import { - RefreshCw, - Building2, - FolderTree, - Activity, - Lock, - Heart, -} from 'lucide-react'; - -const features = [ - { - title: "Automated Mirroring", - description: "Set it and forget it. Automatically sync your GitHub repositories to Gitea on a schedule.", - icon: RefreshCw, - gradient: "from-primary/10 to-accent/10", - iconColor: "text-primary" - }, - { - title: "Bulk Operations", - description: "Mirror entire organizations or user accounts with a single configuration.", - icon: Building2, - gradient: "from-accent/10 to-accent-teal/10", - iconColor: "text-accent" - }, - { - title: "Preserve Structure", - description: "Maintain your GitHub organization structure or customize how repos are organized.", - icon: FolderTree, - gradient: "from-accent-teal/10 to-primary/10", - iconColor: "text-accent-teal" - }, - { - title: "Real-time Status", - description: "Monitor mirror progress with live updates and detailed activity logs.", - icon: Activity, - gradient: "from-accent-coral/10 to-primary/10", - iconColor: "text-accent-coral" - }, - { - title: "Secure & Private", - description: "Self-hosted solution keeps your code on your infrastructure with full control.", - icon: Lock, - gradient: "from-accent-purple/10 to-primary/10", - iconColor: "text-accent-purple" - }, - { - title: "Open Source", - description: "Free, transparent, and community-driven development. Contribute and customize.", - icon: Heart, - gradient: "from-primary/10 to-accent-purple/10", - iconColor: "text-primary" - } -]; - -export function Features() { - return ( -
-
-
-

- Everything You Need for - Reliable Backups -

-

- Powerful features designed to keep your code safe and accessible, no matter what happens. -

-
- -
- {features.map((feature, index) => { - const Icon = feature.icon; - return ( -
-
-
-
- -
- -

{feature.title}

-

{feature.description}

-
-
- ); - })} -
-
-
- ); -} \ No newline at end of file diff --git a/www/src/components/Footer.astro b/www/src/components/Footer.astro new file mode 100644 index 0000000..9d22c2e --- /dev/null +++ b/www/src/components/Footer.astro @@ -0,0 +1,88 @@ +--- +import { Github, Book, MessageSquare, Bug } from 'lucide-react'; + +const links = [ + { + title: "Source Code", + href: "https://github.com/RayLabsHQ/gitea-mirror", + icon: Github + }, + { + title: "Documentation", + href: "https://github.com/RayLabsHQ/gitea-mirror/tree/main/docs", + icon: Book + }, + { + title: "Discussions", + href: "https://github.com/RayLabsHQ/gitea-mirror/discussions", + icon: MessageSquare + }, + { + title: "Report Issue", + href: "https://github.com/RayLabsHQ/gitea-mirror/issues", + icon: Bug + } +]; + +const currentYear = new Date().getFullYear(); +--- + + \ No newline at end of file diff --git a/www/src/components/Footer.tsx b/www/src/components/Footer.tsx deleted file mode 100644 index adb5b9d..0000000 --- a/www/src/components/Footer.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import React from 'react'; -import { Github, Book, MessageSquare, Bug } from 'lucide-react'; - -export function Footer() { - const links = [ - { - title: "Source Code", - href: "https://github.com/RayLabsHQ/gitea-mirror", - icon: Github - }, - { - title: "Documentation", - href: "https://github.com/RayLabsHQ/gitea-mirror/tree/main/docs", - icon: Book - }, - { - title: "Discussions", - href: "https://github.com/RayLabsHQ/gitea-mirror/discussions", - icon: MessageSquare - }, - { - title: "Report Issue", - href: "https://github.com/RayLabsHQ/gitea-mirror/issues", - icon: Bug - } - ]; - - return ( - - ); -} \ No newline at end of file diff --git a/www/src/components/Screenshots.astro b/www/src/components/Screenshots.astro new file mode 100644 index 0000000..7e2b59c --- /dev/null +++ b/www/src/components/Screenshots.astro @@ -0,0 +1,245 @@ +--- +import { Image } from 'astro:assets'; +import { ChevronLeft, ChevronRight } from 'lucide-react'; +import { Button } from './ui/button'; + +// Import all images +import dashboardDesktop from '../../public/assets/dashboard.png'; +import dashboardMobile from '../../public/assets/dashboard_mobile.png'; +import organisationDesktop from '../../public/assets/organisation.png'; +import organisationMobile from '../../public/assets/organisation_mobile.png'; +import repositoriesDesktop from '../../public/assets/repositories.png'; +import repositoriesMobile from '../../public/assets/repositories_mobile.png'; +import configurationDesktop from '../../public/assets/configuration.png'; +import configurationMobile from '../../public/assets/configuration_mobile.png'; +import activityDesktop from '../../public/assets/activity.png'; +import activityMobile from '../../public/assets/activity_mobile.png'; + +const screenshots = [ + { + title: "Dashboard Overview", + description: "Monitor all your mirrored repositories in one place", + desktop: dashboardDesktop, + mobile: dashboardMobile + }, + { + title: "Organization Management", + description: "Easily manage and sync entire GitHub organizations", + desktop: organisationDesktop, + mobile: organisationMobile + }, + { + title: "Repository Control", + description: "Fine-grained control over individual repository mirrors", + desktop: repositoriesDesktop, + mobile: repositoriesMobile + }, + { + title: "Configuration", + description: "Simple and intuitive configuration interface", + desktop: configurationDesktop, + mobile: configurationMobile + }, + { + title: "Activity Monitoring", + description: "Track sync progress and view detailed logs", + desktop: activityDesktop, + mobile: activityMobile + } +]; +--- + +
+
+
+

+ See It In Action +

+

+ A clean, intuitive interface designed for efficiency and ease of use +

+
+ +
+ +
+
+ {screenshots.map((screenshot, index) => ( + + + {screenshot.title} + + ))} +
+ + + + +
+ + +
+

{screenshots[0].title}

+

{screenshots[0].description}

+
+ + +
+ {screenshots.map((_, index) => ( +
+ + +

+ Swipe left or right to navigate +

+
+ + + +
+
+ + \ No newline at end of file diff --git a/www/src/components/Screenshots.tsx b/www/src/components/Screenshots.tsx deleted file mode 100644 index 24ea817..0000000 --- a/www/src/components/Screenshots.tsx +++ /dev/null @@ -1,200 +0,0 @@ -import React, { useState, useRef, useEffect } from 'react'; -import { ChevronLeft, ChevronRight } from 'lucide-react'; -import { Button } from './ui/button'; - -const screenshots = [ - { - title: "Dashboard Overview", - description: "Monitor all your mirrored repositories in one place", - desktop: "/assets/dashboard.png", - mobile: "/assets/dashboard_mobile.png" - }, - { - title: "Organization Management", - description: "Easily manage and sync entire GitHub organizations", - desktop: "/assets/organisation.png", - mobile: "/assets/organisation_mobile.png" - }, - { - title: "Repository Control", - description: "Fine-grained control over individual repository mirrors", - desktop: "/assets/repositories.png", - mobile: "/assets/repositories_mobile.png" - }, - { - title: "Configuration", - description: "Simple and intuitive configuration interface", - desktop: "/assets/configuration.png", - mobile: "/assets/configuration_mobile.png" - }, - { - title: "Activity Monitoring", - description: "Track sync progress and view detailed logs", - desktop: "/assets/activity.png", - mobile: "/assets/activity_mobile.png" - } -]; - -export function Screenshots() { - const [currentIndex, setCurrentIndex] = useState(0); - const [touchStart, setTouchStart] = useState(0); - const [touchEnd, setTouchEnd] = useState(0); - const containerRef = useRef(null); - - const minSwipeDistance = 50; - - const onTouchStart = (e: React.TouchEvent) => { - setTouchEnd(0); - setTouchStart(e.targetTouches[0].clientX); - }; - - const onTouchMove = (e: React.TouchEvent) => { - setTouchEnd(e.targetTouches[0].clientX); - }; - - const onTouchEnd = () => { - if (!touchStart || !touchEnd) return; - - const distance = touchStart - touchEnd; - const isLeftSwipe = distance > minSwipeDistance; - const isRightSwipe = distance < -minSwipeDistance; - - if (isLeftSwipe && currentIndex < screenshots.length - 1) { - setCurrentIndex(currentIndex + 1); - } - if (isRightSwipe && currentIndex > 0) { - setCurrentIndex(currentIndex - 1); - } - }; - - const goToPrevious = () => { - setCurrentIndex((prevIndex) => - prevIndex === 0 ? screenshots.length - 1 : prevIndex - 1 - ); - }; - - const goToNext = () => { - setCurrentIndex((prevIndex) => - (prevIndex + 1) % screenshots.length - ); - }; - - // Keyboard navigation - useEffect(() => { - const handleKeyDown = (e: KeyboardEvent) => { - if (e.key === 'ArrowLeft') goToPrevious(); - if (e.key === 'ArrowRight') goToNext(); - }; - - window.addEventListener('keydown', handleKeyDown); - return () => window.removeEventListener('keydown', handleKeyDown); - }, [currentIndex]); - - const current = screenshots[currentIndex]; - - return ( -
-
-
-

- See It In Action -

-

- A clean, intuitive interface designed for efficiency and ease of use -

-
- -
- {/* Screenshot viewer */} -
-
- - - {current.title} - -
- - {/* Navigation buttons - hidden on mobile, visible on desktop */} - - -
- - {/* Screenshot info */} -
-

{current.title}

-

{current.description}

-
- - {/* Dots indicator */} -
- {screenshots.map((_, index) => ( -
- - {/* Mobile swipe hint */} -

- Swipe left or right to navigate -

-
- - {/* Thumbnail grid - visible on larger screens */} -
- {screenshots.map((screenshot, index) => ( - - ))} -
-
-
- ); -} \ No newline at end of file diff --git a/www/src/pages/index.astro b/www/src/pages/index.astro index 5c05d31..a3bc98f 100644 --- a/www/src/pages/index.astro +++ b/www/src/pages/index.astro @@ -2,11 +2,11 @@ import '../styles/global.css'; import { Header } from '../components/Header'; import { Hero } from '../components/Hero'; -import { Features } from '../components/Features'; -import { Screenshots } from '../components/Screenshots'; +import Features from '../components/Features.astro'; +import Screenshots from '../components/Screenshots.astro'; import { Installation } from '../components/Installation'; import { CTA } from '../components/CTA'; -import { Footer } from '../components/Footer'; +import Footer from '../components/Footer.astro'; const siteUrl = 'https://gitea-mirror.com'; const title = 'Gitea Mirror - Automated GitHub to Gitea Repository Mirroring & Backup'; @@ -118,13 +118,13 @@ const structuredData = {
- - + +
-