optimierte texte
This commit is contained in:
1 parent
f7dd547f8d
commit
7e58e43e18
55 files changed
+6318
-210
No files matched your search
+7
-44
@@ -4,6 +4,7 @@ import React, { useState, useEffect, useRef } from "react";
|
||||
import { useTheme } from "next-themes";
|
||||
import Silk from "@/components/Silk";
|
||||
import CountUp from "@/components/CountUp";
|
||||
import { trackCtaClick } from "@/lib/analytics";
|
||||
|
||||
const SPARKLE_SVG = (
|
||||
<svg className="btn-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden>
|
||||
@@ -16,24 +17,7 @@ const SPARKLE_SVG = (
|
||||
);
|
||||
|
||||
function DemoButtonLetters({ text }: { text: string }) {
|
||||
// #region agent log
|
||||
const chars = text.split("");
|
||||
const spaceIndex = chars.findIndex((c) => c === " ");
|
||||
const lastIndex = chars.length - 1;
|
||||
const lastChar = chars[lastIndex];
|
||||
fetch("http://127.0.0.1:7244/ingest/72f53105-0a54-4d4c-a295-fb93aa72afcc", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
location: "Hero.tsx:DemoButtonLetters",
|
||||
message: "Letter split for button text",
|
||||
data: { text, len: chars.length, spaceIndex, spaceChar: spaceIndex >= 0 ? chars[spaceIndex] : null, lastIndex, lastChar },
|
||||
timestamp: Date.now(),
|
||||
sessionId: "debug-session",
|
||||
hypothesisId: "A,C",
|
||||
}),
|
||||
}).catch(() => {});
|
||||
// #endregion
|
||||
return (
|
||||
<>
|
||||
{chars.map((char, i) => (
|
||||
@@ -53,30 +37,6 @@ const Hero = () => {
|
||||
const [companyAge, setCompanyAge] = useState("");
|
||||
const secondBtnRef = useRef<HTMLButtonElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const el = secondBtnRef.current;
|
||||
if (!el) return;
|
||||
const firstTxtWrapper = el.querySelector(".txt-wrapper");
|
||||
const letters = firstTxtWrapper ? firstTxtWrapper.querySelectorAll(".btn-letter") : [];
|
||||
const spaceIdx = 8;
|
||||
const lastIdx = 16;
|
||||
const wSpace = letters[spaceIdx]?.getBoundingClientRect?.()?.width ?? -1;
|
||||
const wLast = letters[lastIdx]?.getBoundingClientRect?.()?.width ?? -1;
|
||||
fetch("http://127.0.0.1:7244/ingest/72f53105-0a54-4d4c-a295-fb93aa72afcc", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
location: "Hero.tsx:useEffect:measure",
|
||||
message: "Measured btn-letter widths (space + last)",
|
||||
data: { letterCount: letters.length, wSpace, wLast, spaceIdx, lastIdx },
|
||||
timestamp: Date.now(),
|
||||
sessionId: "debug-session",
|
||||
runId: "post-fix",
|
||||
hypothesisId: "B,D,E",
|
||||
}),
|
||||
}).catch(() => {});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const calculateAge = () => {
|
||||
const now = new Date();
|
||||
@@ -129,7 +89,7 @@ const Hero = () => {
|
||||
<div className="max-w-6xl">
|
||||
{/* Label */}
|
||||
<div className="label-tag mb-8 animate-fade-in" style={{ animationDelay: '0.1s' }}>
|
||||
Webentwicklung & Design
|
||||
Digitalisierung für KMU
|
||||
</div>
|
||||
|
||||
{/* Main Heading - Large Uppercase */}
|
||||
@@ -140,7 +100,7 @@ const Hero = () => {
|
||||
|
||||
{/* Subheadline */}
|
||||
<p className="text-xl md:text-2xl text-foreground/90 max-w-3xl mb-6 font-medium animate-fade-in" style={{ animationDelay: '0.3s' }}>
|
||||
Wir digitalisieren, automatisieren und vernetzen Ihre gesamte Firma in einem einzigen System – damit Ihr Unternehmen wachsen kann, ohne dass Sie mehr arbeiten müssen.
|
||||
Website, Automatisierung und vernetzte Prozesse – aus einer Hand. So wächst Ihr Unternehmen, ohne dass Ihr Team mehr Aufwand im Alltag hat.
|
||||
</p>
|
||||
|
||||
{/* CTA Buttons */}
|
||||
@@ -149,7 +109,10 @@ const Hero = () => {
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary w-full sm:w-auto justify-center"
|
||||
onClick={() => navigate("/kontakt")}
|
||||
onClick={() => {
|
||||
trackCtaClick("Kostenlose Potenzialanalyse sichern", "hero");
|
||||
navigate("/kontakt");
|
||||
}}
|
||||
aria-label="Kostenlose Potenzialanalyse sichern"
|
||||
>
|
||||
<ArrowRight className="btn-icon" size={24} strokeWidth={2} aria-hidden />
|
||||
|
||||
Reference in new issue
Block a user