diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-10-19 11:12:21 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-10-19 11:12:21 +0900 |
| commit | fea67022a933d8c55b89c1c96bc3a62661c1fd6e (patch) | |
| tree | ecd60d2aee0fc8f8af2bbd93b30a7c5e87825e06 | |
| parent | 21036e75a699a01a4b0383f40e1c96dc0a11560a (diff) | |
| download | phpstudy-180-slides-fea67022a933d8c55b89c1c96bc3a62661c1fd6e.tar.gz phpstudy-180-slides-fea67022a933d8c55b89c1c96bc3a62661c1fd6e.tar.zst phpstudy-180-slides-fea67022a933d8c55b89c1c96bc3a62661c1fd6e.zip | |
first commit
| -rw-r--r-- | .envrc | 5 | ||||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | assets/deco.svg | 27 | ||||
| -rw-r--r-- | assets/me.svg | 61 | ||||
| -rw-r--r-- | flake.lock | 64 | ||||
| -rw-r--r-- | flake.nix | 21 | ||||
| -rw-r--r-- | justfile | 2 | ||||
| -rw-r--r-- | setoka.typ | 120 | ||||
| -rw-r--r-- | slides.typ | 27 |
9 files changed, 328 insertions, 0 deletions
@@ -0,0 +1,5 @@ +# shellcheck shell=bash +if ! has nix_direnv_version || ! nix_direnv_version 3.1.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.1.0/direnvrc" "sha256-yMJ2OVMzrFaDPn7q8nCBZFRYpL/f0RcHzhmw/i6btJM=" +fi +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b6fc77 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/slides.pdf diff --git a/assets/deco.svg b/assets/deco.svg new file mode 100644 index 0000000..2071659 --- /dev/null +++ b/assets/deco.svg @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg + width="100" height="100" viewBox="0 0 100 100" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" +> + <defs> + <g id="l"> + <line x1="50" y1="5" x2="50" y2="50" stroke="white" stroke-width="2"/> + <path d="M 50 10 L 46 5 L 54 5" fill="white"/> + <path d="M 50 30 L 47 50 L 53 50" fill="white"/> + </g> + </defs> + <circle cx="50" cy="50" r="50" fill="orange"/> + + <circle cx="50" cy="50" r="45" fill="transparent" stroke="white" stroke-width="4"/> + <use xlink:href="#l" transform="rotate( 0, 50, 50)"/> + <use xlink:href="#l" transform="rotate( 36, 50, 50)"/> + <use xlink:href="#l" transform="rotate( 72, 50, 50)"/> + <use xlink:href="#l" transform="rotate(108, 50, 50)"/> + <use xlink:href="#l" transform="rotate(144, 50, 50)"/> + <use xlink:href="#l" transform="rotate(180, 50, 50)"/> + <use xlink:href="#l" transform="rotate(216, 50, 50)"/> + <use xlink:href="#l" transform="rotate(252, 50, 50)"/> + <use xlink:href="#l" transform="rotate(288, 50, 50)"/> + <use xlink:href="#l" transform="rotate(324, 50, 50)"/> +</svg> diff --git a/assets/me.svg b/assets/me.svg new file mode 100644 index 0000000..3eebcd7 --- /dev/null +++ b/assets/me.svg @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg + width="100" height="100" viewBox="0 0 100 100" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" +> + <defs> + <g id="l"> + <line x1="50" y1="5" x2="50" y2="50" stroke="white" stroke-width="2"/> + <path d="M 50 10 L 46 5 L 54 5" fill="white"/> + <path d="M 50 30 L 47 50 L 53 50" fill="white"/> + </g> + <g id="s"> + <rect x="0" y="0" width="10" height="10" fill-opacity="0.75"/> + </g> + </defs> + <circle cx="50" cy="50" r="50" fill="orange"/> + + <circle cx="50" cy="50" r="45" fill="transparent" stroke="white" stroke-width="4"/> + <use xlink:href="#l" transform="rotate( 0, 50, 50)"/> + <use xlink:href="#l" transform="rotate( 36, 50, 50)"/> + <use xlink:href="#l" transform="rotate( 72, 50, 50)"/> + <use xlink:href="#l" transform="rotate(108, 50, 50)"/> + <use xlink:href="#l" transform="rotate(144, 50, 50)"/> + <use xlink:href="#l" transform="rotate(180, 50, 50)"/> + <use xlink:href="#l" transform="rotate(216, 50, 50)"/> + <use xlink:href="#l" transform="rotate(252, 50, 50)"/> + <use xlink:href="#l" transform="rotate(288, 50, 50)"/> + <use xlink:href="#l" transform="rotate(324, 50, 50)"/> + + <use xlink:href="#s" x="50" y="0" fill="darkorange"/> + <use xlink:href="#s" x="50" y="20" fill="gold"/> + <use xlink:href="#s" x="50" y="30" fill="orange"/> + <use xlink:href="#s" x="50" y="70" fill="orange"/> + <use xlink:href="#s" x="50" y="90" fill="gold"/> + <use xlink:href="#s" x="60" y="10" fill="orange"/> + <use xlink:href="#s" x="60" y="20" fill="orange"/> + <use xlink:href="#s" x="60" y="30" fill="gold"/> + <use xlink:href="#s" x="60" y="50" fill="gold"/> + <use xlink:href="#s" x="60" y="70" fill="gold"/> + <use xlink:href="#s" x="60" y="80" fill="gold"/> + <use xlink:href="#s" x="70" y="0" fill="#ffcd72"/> + <use xlink:href="#s" x="70" y="10" fill="orange"/> + <use xlink:href="#s" x="70" y="20" fill="gold"/> + <use xlink:href="#s" x="70" y="30" fill="gold"/> + <use xlink:href="#s" x="70" y="70" fill="darkorange"/> + <use xlink:href="#s" x="70" y="90" fill="#ffcd72"/> + <use xlink:href="#s" x="80" y="10" fill="#ffd27f"/> + <use xlink:href="#s" x="80" y="20" fill="orange"/> + <use xlink:href="#s" x="80" y="40" fill="gold"/> + <use xlink:href="#s" x="80" y="60" fill="orange"/> + <use xlink:href="#s" x="80" y="70" fill="orange"/> + <use xlink:href="#s" x="80" y="80" fill="#ffd27f"/> + <use xlink:href="#s" x="90" y="30" fill="#ffc04c"/> + <use xlink:href="#s" x="90" y="40" fill="#ffa90c"/> + <use xlink:href="#s" x="90" y="60" fill="#ffc04c"/> + <use xlink:href="#s" x="90" y="70" fill="#ffe4b2"/> + + <rect x="30" y="35" width="6" height="25" rx="2" ry="2" fill="black"/> + <rect x="64" y="35" width="6" height="25" rx="2" ry="2" fill="black"/> +</svg> diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..dc73124 --- /dev/null +++ b/flake.lock @@ -0,0 +1,64 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1760596604, + "narHash": "sha256-J/i5K6AAz/y5dBePHQOuzC7MbhyTOKsd/GLezSbEFiM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3cbe716e2346710d6e1f7c559363d14e11c32a43", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "systems": "systems" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3bc1509 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + description = "A basic flake with a shell"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.systems.url = "github:nix-systems/default"; + inputs.flake-utils = { + url = "github:numtide/flake-utils"; + inputs.systems.follows = "systems"; + }; + + outputs = + { nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = pkgs.mkShell { packages = [ pkgs.typst ]; }; + } + ); +} diff --git a/justfile b/justfile new file mode 100644 index 0000000..0a01ca2 --- /dev/null +++ b/justfile @@ -0,0 +1,2 @@ +build: + typst compile slides.typ diff --git a/setoka.typ b/setoka.typ new file mode 100644 index 0000000..5dffea8 --- /dev/null +++ b/setoka.typ @@ -0,0 +1,120 @@ +#import "@preview/touying:0.6.1": * + +#let slide(..args) = touying-slide-wrapper(self => { + let header(self) = { + set align(top) + set text(size: 0.3em) + place( + left + top, + dx: 0.7em, + dy: 0.7em, + image("./assets/deco.svg", width: 2em, height: 2em), + ) + place( + left + top, + dx: 3em, + dy: 0.7em, + image("./assets/deco.svg", width: 1em, height: 1em), + ) + } + let footer(self) = { + set align(bottom) + set text(fill: self.colors.neutral-darkest, size: 0.3em) + pad(x: 0.7em, y: 0.7em, { + h(1fr) + context utils.slide-counter.display() + " / " + utils.last-slide-number + }) + } + self = utils.merge-dicts( + self, + config-page( + header: header, + footer: footer, + ), + ) + touying-slide(self: self, ..args) +}) + +#let title-slide(..args) = touying-slide-wrapper(self => { + let info = self.info + args.named() + let body = { + set align(center) + components.cell( + fill: self.colors.neutral-darkest, + width: 100%, + height: 50%, + inset: 0.5em, + components.cell( + width: 80%, + height: 100%, + { + set align(bottom) + set text(size: 1em, fill: self.colors.neutral-lightest, weight: "bold") + info.title + }, + ), + ) + components.cell( + width: 100%, + height: 50%, + { + set align(horizon) + set text(fill: self.colors.neutral-darkest, size: 0.5em) + if info.author != none { + block(info.author) + } + block() + if info.subtitle != none { + block(info.subtitle) + } + if info.date != none { + block(utils.display-info-date(self)) + } + }, + ) + } + self = utils.merge-dicts( + self, + config-page( + margin: 0pt, + ), + ) + touying-slide(self: self, body) +}) + +#let about-slide(..args) = slide({ + set align(center + horizon) + [ + #text(size: 0.4em)[いまむら] \ + #text(size: 0.9em)[nsfisis] \ + ] + image("./assets/me.svg", width: 2em, height: 2em) +}) + +#let setoka-theme( + aspect-ratio: "16-9", + footer: none, + ..args, + body, +) = { + set text(size: 48pt) + + show: touying-slides.with( + config-page( + paper: "presentation-" + aspect-ratio, + margin: 2em, + ), + config-common( + slide-fn: slide, + slide-level: 0, + ), + config-colors( + primary: rgb("#ffa500"), + neutral-lightest: white, + neutral-darkest: black, + ), + ..args, + ) + + body +} diff --git a/slides.typ b/slides.typ new file mode 100644 index 0000000..3bf2fa9 --- /dev/null +++ b/slides.typ @@ -0,0 +1,27 @@ +#import "@preview/touying:0.6.1": * +#import "setoka.typ": * + +#show: setoka-theme.with( + aspect-ratio: "16-9", + config-info( + title: [ + 浮動小数点数の半開区間で \ + 単一値を指定する + ], + subtitle: [PHP 勉強会\@東京 第 180 回], + author: [nsfisis (いまむら)], + date: datetime(year: 2025, month: 10, day: 29), + ), +) + +#set text(font: "Noto Sans CJK JP") + +#title-slide() + +#about-slide() + +Hoge + +--- + +Piyo |
