diff --git a/public/fonts/JetBrainsMono-Regular.ttf b/public/fonts/JetBrainsMono-Regular.ttf new file mode 100644 index 0000000..dff66cc Binary files /dev/null and b/public/fonts/JetBrainsMono-Regular.ttf differ diff --git a/public/img/me.jpg b/public/img/me.jpg new file mode 100644 index 0000000..697009b Binary files /dev/null and b/public/img/me.jpg differ diff --git a/public/img/me.png b/public/img/me.png deleted file mode 100644 index 7090360..0000000 Binary files a/public/img/me.png and /dev/null differ diff --git a/public/img/xkcd.png b/public/img/xkcd.png new file mode 100644 index 0000000..9533da5 Binary files /dev/null and b/public/img/xkcd.png differ diff --git a/src/global.css b/src/global.css index b271252..cd3afe3 100644 --- a/src/global.css +++ b/src/global.css @@ -1 +1,6 @@ -@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap"); +@font-face { + font-family: "JetBrains"; + src: + local("JetBrains"), + url(public/fonts/JetBrainsMono-Regular.ttf) format("truetype"); +} diff --git a/src/project.ts b/src/project.ts index 82af284..b403dc5 100644 --- a/src/project.ts +++ b/src/project.ts @@ -1,10 +1,7 @@ import { makeProject } from "@motion-canvas/core"; - -import "./global.css"; // <- import the css - -import example from "./scenes/example?scene"; -import me from "./scenes/me?scene"; +import { scenes } from "./scenes"; +import "./global.css"; export default makeProject({ - scenes: [example, me], + scenes, }); diff --git a/src/scenes/example.tsx b/src/scenes/example.tsx deleted file mode 100644 index 8e38187..0000000 --- a/src/scenes/example.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { Node, Txt, Layout, makeScene2D } from "@motion-canvas/2d"; -import { beginSlide, waitFor, createRef } from "@motion-canvas/core"; -import { palette } from "../palette"; - -export default makeScene2D(function* (view) { - const node = createRef(); - - view.add( - - - - Compiling The Lambda Calculus {"=> λ"} - - - Elizabeth Hunt (@simponic) - - - - ); - yield* beginSlide("Title"); - yield* node().opacity(0, 1); - yield* waitFor(1); -}); diff --git a/src/scenes/index.ts b/src/scenes/index.ts new file mode 100644 index 0000000..9d08ec5 --- /dev/null +++ b/src/scenes/index.ts @@ -0,0 +1,4 @@ +import title from "./title?scene"; +import me from "./me?scene"; + +export const scenes = [title, me]; diff --git a/src/scenes/me.tsx b/src/scenes/me.tsx index 9d5740f..2e36605 100644 --- a/src/scenes/me.tsx +++ b/src/scenes/me.tsx @@ -1,19 +1,74 @@ -import { Img, Txt, Layout, makeScene2D } from "@motion-canvas/2d"; -import { beginSlide, waitFor } from "@motion-canvas/core"; +import { Node, Img, Txt, Layout, makeScene2D } from "@motion-canvas/2d"; +import { beginSlide, createRef, waitFor, all } from "@motion-canvas/core"; -import me from "../../public/img/me.png"; +import me from "../../public/img/me.jpg"; +import { theme } from "../theme"; export default makeScene2D(function* (view) { - yield* beginSlide("Title"); - view.add( - - - + const img = createRef(); + const node = createRef(); + const layout = createRef(); + const src = createRef(); + + yield view.add( + <> + + + + Hello! + + + My name is Elizabeth{" "} + + (@simponic) + + . + + + I love 😍 + + + {"=>"} Common LISP + + + {"=>"}{" "} + + Elixir + + + + {"=>"} Functional Programming + + + + {" "} + + git.simponic.xyz/simponic/compiling-the-lambda-calculus + + ); + + yield img().fill(img().getColorAtPoint(0)); + + const diff = 370; + yield* all( + img().size([450, 450], 1), + img().radius(50, 1), + img().alpha(1, 1), + img().position.x(-diff, 1), + node().opacity(1, 1), + layout().position.x(diff, 1), + src().opacity(1, 1), + src().position.y(275, 1) + ); + + yield* beginSlide("About Me"); }); diff --git a/src/scenes/example.meta b/src/scenes/title.meta similarity index 100% rename from src/scenes/example.meta rename to src/scenes/title.meta diff --git a/src/scenes/title.tsx b/src/scenes/title.tsx new file mode 100644 index 0000000..775e9ec --- /dev/null +++ b/src/scenes/title.tsx @@ -0,0 +1,36 @@ +import { Img, Txt, Layout, makeScene2D } from "@motion-canvas/2d"; +import { beginSlide } from "@motion-canvas/core"; +import { theme } from "../theme"; + +import xkcd from "../../public/img/xkcd.png"; + +export default makeScene2D(function* (view) { + yield view.add( + <> + + + Compiling The Lambda Calculus{" "} + + {"=> λ"} + + + + + #2453 + + + + ); + yield* beginSlide("Title"); +}); diff --git a/src/palette.ts b/src/theme.ts similarity index 99% rename from src/palette.ts rename to src/theme.ts index af1017b..77aa48e 100644 --- a/src/palette.ts +++ b/src/theme.ts @@ -1,5 +1,6 @@ /* https://raw.githubusercontent.com/catppuccin/palette/main/palette.json */ -export const palette = { +export const theme = { + font: "JetBrains", rosewater: { hex: "#f5e0dc", rgb: {