fix(home): oferta leva ao formulário, ofertas logo depois da vitrine
O botão das ofertas rola até o contato com o tipo marcado e não quebra mais as âncoras; ofertas com o que você recebe e primeiro passo, logo depois da vitrine; bloco de IA fora da home; cartão largo da SEV no hero do celular; separador da faixa de clientes só entre itens; favicon de 13 para 1,8 KB; pré-carregamento só no hover e nunca de /#... fora da home; X do menu e cabeçalho opaco; WhatsApp com "o case"; /ia com 3 passos e modelo de relatório ilustrativo; Sobre alinhado ao currículo; CSP Report-Only com os domínios do Ads.
This commit is contained in:
1 parent
fc44a69fb3
commit
9e2d65a926
51 files changed
+1730
-420
No files matched your search
@@ -0,0 +1,53 @@
|
||||
import { render } from "@testing-library/react";
|
||||
import { SEO_IDS } from "@/lib/seo";
|
||||
import CinematicHome from "./CinematicHome";
|
||||
|
||||
/**
|
||||
* Dados estruturados da home: um único script `application/ld+json` com o negócio (ProfessionalService). O WebSite e
|
||||
* a Person já saem do layout (app/layout.tsx), e repeti-los aqui duplicaria os dados.
|
||||
*/
|
||||
|
||||
jest.mock("../Hero", () => ({ __esModule: true, default: () => null }));
|
||||
jest.mock("../Projects", () => ({ __esModule: true, default: () => null }));
|
||||
jest.mock("../About", () => ({ __esModule: true, default: () => null }));
|
||||
jest.mock("../WorkModalities", () => ({ WorkModalities: () => null }));
|
||||
jest.mock("../HomeFaq", () => ({ __esModule: true, default: () => null }));
|
||||
jest.mock("../Testimonials", () => ({ __esModule: true, default: () => null }));
|
||||
jest.mock("../Contact", () => ({ __esModule: true, default: () => null }));
|
||||
jest.mock("./CinematicMain", () => ({
|
||||
__esModule: true,
|
||||
default: ({ children }: { children: React.ReactNode }) => (
|
||||
<main>{children}</main>
|
||||
),
|
||||
}));
|
||||
|
||||
function structuredData() {
|
||||
const { container } = render(<CinematicHome projects={[]} />);
|
||||
return Array.from(
|
||||
container.querySelectorAll('script[type="application/ld+json"]'),
|
||||
).map((script) => JSON.parse(script.textContent ?? ""));
|
||||
}
|
||||
|
||||
describe("CinematicHome: dados estruturados", () => {
|
||||
it("emits exactly one ld+json script, before the scenes", () => {
|
||||
const { container } = render(<CinematicHome projects={[]} />);
|
||||
|
||||
const scripts = container.querySelectorAll(
|
||||
'script[type="application/ld+json"]',
|
||||
);
|
||||
expect(scripts).toHaveLength(1);
|
||||
expect(container.firstElementChild).toBe(scripts[0]);
|
||||
});
|
||||
|
||||
it("describes only the business as a ProfessionalService, without repeating what the layout emits", () => {
|
||||
const [data] = structuredData();
|
||||
|
||||
expect(data["@context"]).toBe("https://schema.org");
|
||||
expect(data["@graph"]).toHaveLength(1);
|
||||
const [business] = data["@graph"];
|
||||
expect(business["@type"]).toBe("ProfessionalService");
|
||||
expect(business["@id"]).toBe(SEO_IDS.professionalService);
|
||||
expect(business.founder).toEqual({ "@id": SEO_IDS.person });
|
||||
expect(JSON.stringify(data)).not.toMatch(/"@type":"(WebSite|Person)"/);
|
||||
});
|
||||
});
|
||||
@@ -41,10 +41,6 @@ jest.mock("../WorkModalities", () => ({
|
||||
return <section data-testid="scene-modalities" />;
|
||||
},
|
||||
}));
|
||||
jest.mock("../EngineeringWithAI", () => ({
|
||||
__esModule: true,
|
||||
default: () => <section data-testid="scene-ai" />,
|
||||
}));
|
||||
jest.mock("../HomeFaq", () => ({
|
||||
__esModule: true,
|
||||
default: () => <section data-testid="scene-faq" />,
|
||||
@@ -167,7 +163,7 @@ describe("CinematicHome: props e estrutura", () => {
|
||||
expect(mockModalitiesProps).toHaveBeenCalledWith({});
|
||||
});
|
||||
|
||||
it("path: scenes sit in order inside <main> (FAQ right before the contact); the home has no footer of its own (it comes from the layout)", () => {
|
||||
it("path: scenes sit in order inside <main> (hero, projects, offers, about, FAQ, contact; no AI block); the home has no footer of its own (it comes from the layout)", () => {
|
||||
render(<CinematicHome projects={[]} />);
|
||||
|
||||
const main = screen.getByRole("main");
|
||||
@@ -178,9 +174,8 @@ describe("CinematicHome: props e estrutura", () => {
|
||||
).toEqual([
|
||||
"scene-hero",
|
||||
"scene-projects",
|
||||
"scene-about",
|
||||
"scene-modalities",
|
||||
"scene-ai",
|
||||
"scene-about",
|
||||
"scene-testimonials",
|
||||
"scene-faq",
|
||||
"scene-contact",
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { safeJsonLd } from "@/lib/jsonld";
|
||||
import type { PortfolioProjectView } from "@/lib/portfolio-data";
|
||||
import type { Testimonial } from "@/lib/proof";
|
||||
import { buildProfessionalServiceJsonLd } from "@/lib/seo";
|
||||
import About from "../About";
|
||||
import type { ClientLink } from "../ClientStrip";
|
||||
import Contact from "../Contact";
|
||||
import EngineeringWithAI from "../EngineeringWithAI";
|
||||
import Hero, { type HeroStats } from "../Hero";
|
||||
import HomeFaq from "../HomeFaq";
|
||||
import Projects from "../Projects";
|
||||
@@ -15,9 +16,21 @@ import CinematicMain from "./CinematicMain";
|
||||
/** Projeto cujo endereço aparece na barra do navegador de HeroWork (a SEV Moda Íntima, com domínio próprio). */
|
||||
const HERO_WORK_PROJECT = "sev-modaintima";
|
||||
|
||||
/**
|
||||
* Dados estruturados da home: o negócio como ProfessionalService (área de atendimento e as três ofertas). Só ele: o
|
||||
* WebSite e a Person já saem do layout, e repeti-los aqui duplicaria os dados. O script fica aqui, e não em
|
||||
* app/page.tsx, para a página continuar devolvendo só a home.
|
||||
*/
|
||||
const jsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [buildProfessionalServiceJsonLd()],
|
||||
};
|
||||
|
||||
/**
|
||||
* Cenas da home, em componente de servidor: sem hooks aqui. Os hooks de rolagem e de chegada por fragmento ficam
|
||||
* na ilha de cliente CinematicMain, que recebe as cenas como filhos.
|
||||
* A ordem é a da conversa de venda: hero, projetos (a prova), ofertas ("Escolha por onde começar"), quem conduz,
|
||||
* perguntas frequentes e contato. A revisão de app feito com IA não tem cena própria: a oferta e a FAQ levam a /ia.
|
||||
*/
|
||||
export default function CinematicHome({
|
||||
projects,
|
||||
@@ -40,22 +53,23 @@ export default function CinematicHome({
|
||||
shownUrl && !/vercel\.app/i.test(shownUrl.text) ? shownUrl : null;
|
||||
|
||||
return (
|
||||
<CinematicMain>
|
||||
<Hero stats={heroStats} clients={clients} workUrl={heroWorkUrl} />
|
||||
<>
|
||||
<script type="application/ld+json">{safeJsonLd(jsonLd)}</script>
|
||||
<CinematicMain>
|
||||
<Hero stats={heroStats} clients={clients} workUrl={heroWorkUrl} />
|
||||
|
||||
<Projects projects={projects} />
|
||||
<Projects projects={projects} />
|
||||
|
||||
<About />
|
||||
<WorkModalities />
|
||||
|
||||
<WorkModalities />
|
||||
<About />
|
||||
|
||||
<EngineeringWithAI />
|
||||
<Testimonials items={testimonials} />
|
||||
|
||||
<Testimonials items={testimonials} />
|
||||
<HomeFaq />
|
||||
|
||||
<HomeFaq />
|
||||
|
||||
<Contact />
|
||||
</CinematicMain>
|
||||
<Contact />
|
||||
</CinematicMain>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user