From 11dc299f120a42e34ba57bddc8c0facae6875889 Mon Sep 17 00:00:00 2001 From: Arunavo Ray Date: Wed, 9 Jul 2025 00:43:04 +0530 Subject: [PATCH] Optimsed for mobile --- www/src/components/CTA.tsx | 4 +-- www/src/components/GitHubButton.tsx | 47 +++++++++++++++++++-------- www/src/components/Header.tsx | 49 +++-------------------------- 3 files changed, 40 insertions(+), 60 deletions(-) diff --git a/www/src/components/CTA.tsx b/www/src/components/CTA.tsx index be0a137..51f4237 100644 --- a/www/src/components/CTA.tsx +++ b/www/src/components/CTA.tsx @@ -15,8 +15,8 @@ export function CTA() {

- Start Protecting Your - Code Today + Start Protecting + Your Code Today

Join developers who trust Gitea Mirror to keep their repositories safe and accessible. diff --git a/www/src/components/GitHubButton.tsx b/www/src/components/GitHubButton.tsx index 8ee482c..4c703d8 100644 --- a/www/src/components/GitHubButton.tsx +++ b/www/src/components/GitHubButton.tsx @@ -22,18 +22,39 @@ export function GitHubButton() { }, []); return ( - + <> + {/* Mobile version - compact with text */} + + + {/* Desktop version - full button */} + + ); } \ No newline at end of file diff --git a/www/src/components/Header.tsx b/www/src/components/Header.tsx index cee0b53..f1352bd 100644 --- a/www/src/components/Header.tsx +++ b/www/src/components/Header.tsx @@ -1,11 +1,8 @@ -import React, { useState, useEffect } from 'react'; +import React, { useEffect, useState } from 'react'; import { ThemeToggle } from './ThemeToggle'; -import { Menu, X } from 'lucide-react'; -import { Button } from './ui/button'; import { GitHubButton } from './GitHubButton'; export function Header() { - const [isMenuOpen, setIsMenuOpen] = useState(false); const [isScrolled, setIsScrolled] = useState(false); useEffect(() => { @@ -23,10 +20,6 @@ export function Header() { { href: '#installation', label: 'Installation' } ]; - const handleNavClick = () => { - setIsMenuOpen(false); - }; - return (

- Gitea Mirror + Gitea Mirror {/* Desktop Navigation */} @@ -68,47 +61,13 @@ export function Header() {
{/* Mobile Actions */} -
+
+ -
- {/* Mobile Menu */} -
-
- -
-
); } \ No newline at end of file