From 376fd39203145eb0c3bedc7fe23ca4f47521bcba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Sat, 12 Sep 2026 01:39:58 +0300 Subject: [PATCH] feat(landing): build hero and product sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tek sayfa, on bölüm: hero, neden Hezarfen, ürünler, modüller, nasıl çalışır, roller, güven, kimler için, hakkımızda ve SSS; sayfa demo isteğiyle kapanır. Hero'nun merkezinde platformun tek ekran hâlinin çizimi var; ürün bölümleri kopya ile çizimi yan yana koyar ve satır satır yön değiştirir. Header çubuğun ortasına sabitlenmiş bir içindekiler listesidir: gezinme yerine çıpa, aktif bölüm IntersectionObserver ile işaretlenir. --- src/components/Footer.tsx | 119 ++++++++ src/components/Header.tsx | 121 ++++++++ src/components/home/Hero.tsx | 53 ++++ src/components/home/Sections.tsx | 469 +++++++++++++++++++++++++++++++ src/routes/index.tsx | 52 ++++ 5 files changed, 814 insertions(+) create mode 100644 src/components/Footer.tsx create mode 100644 src/components/Header.tsx create mode 100644 src/components/home/Hero.tsx create mode 100644 src/components/home/Sections.tsx create mode 100644 src/routes/index.tsx diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx new file mode 100644 index 0000000..79ad116 --- /dev/null +++ b/src/components/Footer.tsx @@ -0,0 +1,119 @@ +import { For } from "solid-js"; +import { FiArrowUpRight, FiLinkedin } from "solid-icons/fi"; +import Logo from "./Logo"; +import { anchors, mailto, site } from "~/config"; +import { t } from "~/i18n"; + +export default function Footer() { + // Icons keyed by the `site.social` account names, so the row below iterates + // the config itself: an account added in `config.ts` fails the typecheck + // until it gains an icon here, and a removed one vanishes from the footer + // and from the JsonLd `sameAs` together — the list is never half-updated. + const socialMeta = { + linkedin: { label: "LinkedIn", icon: FiLinkedin }, + } as const; + + const columns = [ + { + title: t.footer.sections.product, + links: [ + { label: t.nav.products, href: anchors.products }, + { label: t.nav.platform, href: anchors.platform }, + { label: t.nav.theory, href: anchors.theory }, + { label: t.nav.roles, href: anchors.roles }, + ], + }, + { + title: t.footer.sections.company, + links: [ + { label: t.nav.problem, href: anchors.problem }, + { label: t.nav.trust, href: anchors.trust }, + { label: t.nav.audience, href: anchors.audience }, + { label: t.nav.about, href: anchors.about }, + { label: t.nav.faq, href: anchors.faq }, + ], + }, + ]; + + const socials = (Object.keys(site.social) as (keyof typeof site.social)[]).map(key => ({ + label: socialMeta[key].label, + href: site.social[key], + icon: socialMeta[key].icon, + })); + + return ( + + ); +} diff --git a/src/components/Header.tsx b/src/components/Header.tsx new file mode 100644 index 0000000..31ad0c4 --- /dev/null +++ b/src/components/Header.tsx @@ -0,0 +1,121 @@ +import { createSignal, For, onCleanup, onMount, Show } from "solid-js"; +import Logo from "./Logo"; +import { PixelClose, PixelMenu } from "./icons/pixel"; +import { anchors, mailto, site } from "~/config"; +import { t } from "~/i18n"; + +/** + * The site is one page, so the bar is a table of contents rather than a set of + * routes: every label is an in-page anchor, and the band currently under the + * header is the one marked as current. + */ +export default function Header() { + const [open, setOpen] = createSignal(false); + const [active, setActive] = createSignal(null); + + /** The bar carries four bands; the sheet carries all of them. */ + const primary = [ + { href: anchors.products, label: t.nav.products }, + { href: anchors.theory, label: t.nav.theory }, + { href: anchors.audience, label: t.nav.audience }, + { href: anchors.about, label: t.nav.about }, + ]; + + const all = [ + { href: anchors.problem, label: t.nav.problem }, + ...primary, + { href: anchors.platform, label: t.nav.platform }, + { href: anchors.roles, label: t.nav.roles }, + { href: anchors.trust, label: t.nav.trust }, + { href: anchors.faq, label: t.nav.faq }, + ]; + + const id = (href: string) => href.split("#")[1]!; + + /** + * Which band is current. The observer's top margin is the header's own + * height, so a section counts as "under the bar" rather than merely on + * screen, and the bottom margin keeps a band that is only just visible from + * taking the mark from the one filling the viewport. + */ + onMount(() => { + if (!("IntersectionObserver" in window)) return; + + const sections = all + .map(item => document.getElementById(id(item.href))) + .filter((node): node is HTMLElement => node !== null); + + const observer = new IntersectionObserver( + entries => { + const visible = entries + .filter(entry => entry.isIntersecting) + .sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top); + if (visible.length > 0) setActive(visible[0]!.target.id); + }, + { rootMargin: "-72px 0px -55% 0px", threshold: 0 }, + ); + + sections.forEach(section => observer.observe(section)); + onCleanup(() => observer.disconnect()); + }); + + return ( +
+
+ + + + +
+ + {t.nav.demo} + + +
+
+ + + + +
+ ); +} diff --git a/src/components/home/Hero.tsx b/src/components/home/Hero.tsx new file mode 100644 index 0000000..5ed782b --- /dev/null +++ b/src/components/home/Hero.tsx @@ -0,0 +1,53 @@ +import { For } from "solid-js"; +import { PixelArrowRight } from "../icons/pixel"; +import { AppScreenIllustration } from "../illustrations/edu"; +import { anchors, mailto } from "~/config"; +import { t } from "~/i18n"; + +/** + * The first screen: a sentence, what it means, two actions, and a drawing of + * the thing itself on a framed card. The roles the platform serves close the + * hero on a ruled row, so the page visibly continues below without anything + * having to move. + */ +export default function Hero() { + return ( +
+
+

+ {t.hero.line1} +
+ {t.hero.line2} +

+

{t.hero.lead}

+ +

{t.hero.note}

+
+ + {/* The product as one screen, on a card that reads as a frame without + pretending to be a screenshot. */} +
+ +
+ +
+ + {role => ( + +