本文へ移動

Koyomi Calendars暦

カレンダーのページをSVGで描きます。1日を18種類のアイコンで、1か月をポスターや卓上カレンダーで、そして日めくりも使えます。

「暦」(こよみ) は、カレンダーのことです。 名前について(英語)

目次

リファレンス · カレンダーアイコン

CALENDAR_PRESETS定数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The named looks: flat, disc, ringed, tilted and disc-ringed.

An option you give yourself wins over the preset's.

インポート

import { CALENDAR_PRESETS } from "@johnmorrisdotca/koyomi-calendars";

定義

const CALENDAR_PRESETS: { readonly flat: {}; readonly disc: { readonly housing: "circle"; }; readonly ringed: { readonly rings: true; }; readonly tilted: { readonly turn: -8; }; readonly "disc-ringed": { readonly housing: "circle"; readonly rings: true; }; } = {
    flat: {},
    disc: { housing: "circle" },
    ringed: { rings: true },
    tilted: { turn: -8 },
    "disc-ringed": { housing: "circle", rings: true },
} as const satisfies Record<string, CalendarLook>

メンバー

名前型説明
flat{}

The icon alone, upright: what you get with no option.

disc{ readonly housing: "circle"; }

On a round disc.

ringed{ readonly rings: true; }

Spiral rings across the top.

tilted{ readonly turn: -8; }

Turned a little to the left, as the older macOS icons stood.

disc-ringed{ readonly housing: "circle"; readonly rings: true; }

Ringed, on a disc.

例

import { CALENDAR_PRESETS } from "@johnmorrisdotca/koyomi-calendars";

console.log(Object.keys(CALENDAR_PRESETS).join(", "));
flat, disc, ringed, tilted, disc-ringed

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/koyomi-calendars 0.3.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。