mirror of
https://github.com/Such-Software/such.software.git
synced 2026-10-17 05:32:05 +02:00
fix contact form and linking and favicon
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { FounderSignature } from "@/components/about/founder-signature";
|
||||
import { ContactForm } from "@/components/contact/contact-form";
|
||||
import { Header } from "@/components/layout/header";
|
||||
import { MobileNav } from "@/components/layout/mobile-nav";
|
||||
import { FaMapMarkerAlt, FaPhone, FaBuilding, FaExternalLinkAlt } from "react-icons/fa";
|
||||
@@ -95,6 +96,14 @@ export default function AboutPage() {
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="contact" className="mt-16 border-t border-border/50 pt-16">
|
||||
<h2 className="text-3xl font-bold mb-3 tracking-tight">Get in Touch</h2>
|
||||
<p className="text-muted-foreground text-lg mb-12 max-w-2xl">
|
||||
Have a project in mind? We'd love to hear about it.
|
||||
</p>
|
||||
<ContactForm />
|
||||
</div>
|
||||
</div>
|
||||
<MobileNav />
|
||||
</main>
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import { DynamicFavicon } from "@/components/dynamic-favicon";
|
||||
import { Footer } from "@/components/layout/footer";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
@@ -75,6 +76,7 @@ export default function RootLayout({
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<DynamicFavicon />
|
||||
<div className="relative z-10 flex flex-col min-h-screen">
|
||||
{children}
|
||||
<Footer />
|
||||
|
||||
@@ -81,7 +81,7 @@ export default function CustomWebsitesPage() {
|
||||
</div>
|
||||
|
||||
<div className="text-center">
|
||||
<Link href="/about">
|
||||
<Link href="/about#contact">
|
||||
<Button size="lg">Start a Project</Button>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -73,7 +73,7 @@ export default function WebshopsPage() {
|
||||
</div>
|
||||
|
||||
<div className="text-center">
|
||||
<Link href="/about">
|
||||
<Link href="/about#contact">
|
||||
<Button size="lg">Get in Touch</Button>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
'use client';
|
||||
|
||||
import { useTheme } from 'next-themes';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export function DynamicFavicon() {
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
||||
useEffect(() => {
|
||||
if (!resolvedTheme) return;
|
||||
|
||||
const variant = resolvedTheme === 'dark' ? 'dark' : 'light';
|
||||
|
||||
// Update all favicon link elements
|
||||
const links = document.querySelectorAll<HTMLLinkElement>('link[rel="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]');
|
||||
links.forEach((link) => {
|
||||
const href = link.getAttribute('href');
|
||||
if (href?.includes('/images/branding/favicon_')) {
|
||||
link.href = href.replace(/favicon_(dark|light)/, `favicon_${variant}`);
|
||||
}
|
||||
});
|
||||
}, [resolvedTheme]);
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user