perf(movimento): uma transição, 3D leve e vídeo certo por aparelho
Passagens com fade e 32 px, cena anterior termina em opacidade 0, sem visibility nem clip-path. 3D do hero como fundo ambiente, sob demanda e desligado em toque, aparelho fraco, saveData e movimento reduzido. Lenis fora do toque e salto direto em âncoras distantes. Vitrine só de clientes, até 3 capítulos, fixa só no desktop e carrossel no celular; vídeo só do projeto em cena com preload metadata. Rótulos mono a partir de 12 px e limão só no contato.
This commit is contained in:
1 parent
8d07b8c6bb
commit
c9a0b80656
48 files changed
+7210
-1241
No files matched your search
@@ -20,24 +20,39 @@ describe("displayUrl", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("falls back to the code address when there is no live demo", () => {
|
||||
expect(
|
||||
displayUrl({ demoUrl: null, githubUrl: "https://github.com/user/repo" }),
|
||||
).toEqual({ text: "github.com/user/repo", secure: true });
|
||||
it("shows only the project name, never a code address, when there is no live demo", () => {
|
||||
expect(displayUrl({ title: "AS Serviços", demoUrl: null })).toEqual({
|
||||
text: "AS Serviços",
|
||||
secure: false,
|
||||
});
|
||||
expect(displayUrl({ title: "AS Serviços" })).toEqual({
|
||||
text: "AS Serviços",
|
||||
secure: false,
|
||||
});
|
||||
// um projeto completo, com o endereço do código ainda nos dados, não vaza para a barra
|
||||
const project = {
|
||||
title: "Twins Lab",
|
||||
demoUrl: "",
|
||||
githubUrl: "https://github.com/user/repo",
|
||||
};
|
||||
expect(displayUrl(project)?.text).toBe("Twins Lab");
|
||||
});
|
||||
|
||||
it("skips an address that does not parse and uses the next one", () => {
|
||||
expect(
|
||||
displayUrl({
|
||||
demoUrl: "isso não é uma url",
|
||||
githubUrl: "https://github.com/a/b",
|
||||
}),
|
||||
).toEqual({ text: "github.com/a/b", secure: true });
|
||||
it("falls back to the project name when the address does not parse or points at github.com", () => {
|
||||
const title = "Meu projeto";
|
||||
const name = { text: title, secure: false };
|
||||
expect(displayUrl({ title, demoUrl: "isso não é uma url" })).toEqual(name);
|
||||
expect(displayUrl({ title, demoUrl: "https://github.com/a/b" })).toEqual(
|
||||
name,
|
||||
);
|
||||
expect(displayUrl({ title, demoUrl: "https://www.github.com/a" })).toEqual(
|
||||
name,
|
||||
);
|
||||
});
|
||||
|
||||
it("returns null when there is nothing to show", () => {
|
||||
expect(displayUrl({})).toBeNull();
|
||||
expect(displayUrl({ demoUrl: "", githubUrl: null })).toBeNull();
|
||||
expect(displayUrl({ title: "", demoUrl: "" })).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user