Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 51 additions & 53 deletions bun.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@
"class-variance-authority": "^0.7.1",
"cn": "^0.5.0",
"jsqr": "^1.4.0",
"lucide-react": "^1.57.0",
"motion": "^14.3.0",
"lucide-react": "^1.59.0",
"motion": "^14.4.0",
"next": "16.4.2",
"next-themes": "^0.4.6",
"react": "19.3.1",
"react-dom": "19.3.1",
"react-hook-form": "^7.90.0",
"recharts": "3.10.1",
"shadcn": "^4.22.0",
"shadcn": "^4.22.1",
"sonner": "^2.0.8",
"tailwindcss-animate": "^1.0.7",
"zod": "^4.6.7"
},
"devDependencies": {
"@commitlint/cli": "^21.2.3",
"@commitlint/config-conventional": "^21.2.3",
"@commitlint/cli": "^21.2.4",
"@commitlint/config-conventional": "^21.2.4",
"@playwright/test": "^1.64.1",
"@tailwindcss/postcss": "^4.3.3",
"@types/bun": "^1.4.3",
Expand All @@ -46,13 +46,13 @@
"ac-library-js": "^0.1.1",
"lefthook": "^2.2.2",
"oxfmt": "^0.74.0",
"oxlint": "^1.88.0",
"postcss": "^8.5.30",
"oxlint": "^1.89.0",
"postcss": "^8.5.31",
"tailwindcss": "^4.3.3",
"tw-animate-css": "^1.4.0",
"typescript": "^7.0.2",
"wawoff2": "^2.0.1",
"zxing-wasm": "^3.1.5"
"zxing-wasm": "^3.1.6"
},
"overrides": {
"@types/react": "19.3.0",
Expand Down
4 changes: 3 additions & 1 deletion src/app/_index/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ export default function Accounts() {
</a>
}
/>
<TooltipContent side="bottom">{account.id}</TooltipContent>
<TooltipContent side="bottom" className="font-code">
{account.id}
</TooltipContent>
</Tooltip>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ body {

--color-brand: var(--brand);

--font-code: var(--font-code);
--font-code: var(--font-geist-mono), var(--font-line-seed);

--font-heading: var(--font-sans);

Expand Down
25 changes: 14 additions & 11 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Source_Code_Pro } from "next/font/google";
import { Geist_Mono } from "next/font/google";
import { ThemeProvider } from "@/components/theme-provider";
import { Analytics, SpeedInsights } from "@/components/analytics";
import "./globals.css";
Expand All @@ -14,7 +14,6 @@ import {
import { ConfirmDialogProvider } from "@/hooks/useConfirm";
import { convertMetadata } from "@/lib/metadata";
import { cn } from "@/lib/utils";
import { buttonVariants } from "@/components/ui/button";
import type { Viewport } from "next";

const lineSeed = localFont({
Expand All @@ -39,9 +38,9 @@ const lineSeed = localFont({
variable: "--font-line-seed",
});

const sourceCodePro = Source_Code_Pro({
const geistMono = Geist_Mono({
subsets: ["latin"],
variable: "--font-code",
variable: "--font-geist-mono",
});

export const metadata = convertMetadata("", {
Expand Down Expand Up @@ -71,11 +70,14 @@ export default function RootLayout({
<html
lang="ja"
suppressHydrationWarning
className={cn("hidden-scrollbar", "font-sans")}
className={cn(
"hidden-scrollbar",
"font-sans",
lineSeed.variable,
geistMono.variable
)}
>
<body
className={`${lineSeed.className} ${lineSeed.variable} ${sourceCodePro.variable} antialiased `}
>
<body className={`${lineSeed.className} antialiased`}>
<Analytics />
<SpeedInsights />

Expand All @@ -96,23 +98,24 @@ export default function RootLayout({
</main>
<footer className="mt-auto">
<div className="flex flex-col justify-center items-center py-4">
<p className={`${sourceCodePro.className} text-sm`}>
<p className="font-code text-sm">
(C){" "}
<Tooltip>
<TooltipTrigger render={<span>{buildYear}</span>} />
<TooltipContent>
<TooltipContent className="font-code tabular-nums">
{buildTime.toLocaleString("ja-JP", {
timeZone: "Asia/Tokyo",
})}
(UTC+9)
</TooltipContent>
</Tooltip>{" "}
e6nlaq
{" - "}
<a
href="https://github.com/e6nlaq/website"
className={cn(buttonVariants({ variant: "link" }))}
target="_blank"
rel="noreferrer"
className="hover:underline"
>
Source
</a>
Expand Down
6 changes: 5 additions & 1 deletion src/app/tools/ajl-simulator/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ export default function AjlSimulator() {
type="number"
step="any"
aria-invalid={fieldState.invalid || undefined}
className="font-code"
/>
{fieldState.invalid && (
<FieldError errors={[fieldState.error]} />
Expand All @@ -267,8 +268,9 @@ export default function AjlSimulator() {
{...field}
id={field.name}
type="number"
placeholder="参加回数がD回未満なら空欄にしてください"
aria-invalid={fieldState.invalid || undefined}
className="font-code"
placeholder="参加回数がD回未満なら空欄にしてください"
/>
{fieldState.invalid && (
<FieldError errors={[fieldState.error]} />
Expand All @@ -293,6 +295,7 @@ export default function AjlSimulator() {
id={field.name}
type="number"
aria-invalid={fieldState.invalid || undefined}
className="font-code"
/>
<InputGroupAddon align="inline-end">
<Tooltip>
Expand Down Expand Up @@ -341,6 +344,7 @@ export default function AjlSimulator() {
id={field.name}
type="number"
aria-invalid={fieldState.invalid || undefined}
className="font-code"
/>
{fieldState.invalid && (
<FieldError errors={[fieldState.error]} />
Expand Down
24 changes: 17 additions & 7 deletions src/app/tools/clock/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Inter } from "next/font/google";
import { Inter, Source_Code_Pro } from "next/font/google";
import { SettingsIcon } from "lucide-react";
import { useEffect, useRef, useState, useSyncExternalStore } from "react";
import { toast } from "sonner";
Expand Down Expand Up @@ -55,15 +55,22 @@ const FONT_SELECT_ID = "clock-font-select";
const TIME_FORMAT_SELECT_ID = "clock-time-format-select";

// このページでだけ読み込むWebフォント(他ルートにはpreloadされない)。
// CSS変数は時計のコンテナにだけ付与する
// CSS変数は時計のコンテナにだけ付与する。
// Geist Mono(既定)はサイト共通の --font-code を使う
const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
});

const sourceCodePro = Source_Code_Pro({
subsets: ["latin"],
variable: "--font-source-code-pro",
});

/** 選べるフォント。保存値・グループ分けともにこの値を使う */
type ClockFont =
| "line-seed"
| "geist-mono"
| "source-code-pro"
| "inter"
| "system-ui"
Expand All @@ -73,6 +80,7 @@ type ClockFont =

const CLOCK_FONT_VALUES: readonly ClockFont[] = [
"line-seed",
"geist-mono",
"source-code-pro",
"inter",
"system-ui",
Expand All @@ -83,6 +91,7 @@ const CLOCK_FONT_VALUES: readonly ClockFont[] = [

const FONT_ITEMS: readonly { value: ClockFont; label: string }[] = [
{ value: "line-seed", label: "LINE Seed" },
{ value: "geist-mono", label: "Geist Mono" },
{ value: "source-code-pro", label: "Source Code Pro" },
{ value: "inter", label: "Inter" },
{ value: "system-ui", label: "system-ui" },
Expand All @@ -92,8 +101,8 @@ const FONT_ITEMS: readonly { value: ClockFont; label: string }[] = [
];

// ラベルはグループごとに分けて表示する(コンテンツ側だけを使う)
const WEB_FONT_ITEMS = FONT_ITEMS.slice(0, 3);
const SYSTEM_FONT_ITEMS = FONT_ITEMS.slice(3);
const WEB_FONT_ITEMS = FONT_ITEMS.slice(0, 4);
const SYSTEM_FONT_ITEMS = FONT_ITEMS.slice(4);

const TIME_FORMAT_ITEMS: readonly { value: ClockTimeFormat; label: string }[] =
[
Expand All @@ -104,7 +113,8 @@ const TIME_FORMAT_ITEMS: readonly { value: ClockTimeFormat; label: string }[] =
/** フォントの選択値 → CSSのfont-family */
const FONT_FAMILIES: Record<ClockFont, string> = {
"line-seed": "var(--font-line-seed, sans-serif)",
"source-code-pro": "var(--font-code)",
"geist-mono": "var(--font-code)",
"source-code-pro": "var(--font-source-code-pro)",
inter: "var(--font-inter)",
"system-ui": "system-ui",
monospace: "monospace",
Expand All @@ -120,7 +130,7 @@ type ClockSettings = {

const DEFAULT_SETTINGS: ClockSettings = {
wakelock: false,
font: "source-code-pro",
font: "geist-mono",
timeFormat: "hh",
};

Expand Down Expand Up @@ -320,7 +330,7 @@ export default function Clock() {
showSwipeHandle={!isDesktop}
>
<div
className={`${inter.variable} flex flex-col items-center gap-y-3 py-10`}
className={`${inter.variable} ${sourceCodePro.variable} flex flex-col items-center gap-y-3 py-10`}
>
<p
className="text-sm font-medium text-muted-foreground tabular-nums"
Expand Down
5 changes: 4 additions & 1 deletion src/app/tools/mod/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function Result({
}
/>
{dat !== undefined && (
<TooltipContent>
<TooltipContent className="font-code tabular-nums">
≈ {(Number(bunsi) / Number(dat)).toFixed(10)}
</TooltipContent>
)}
Expand Down Expand Up @@ -356,6 +356,7 @@ export default function Mod() {
id={field.name}
placeholder={exampleValues}
aria-invalid={fieldState.invalid}
className="font-code"
/>
<InputGroupAddon
align="inline-end"
Expand Down Expand Up @@ -466,6 +467,7 @@ export default function Mod() {
autoComplete="off"
list={modListId}
aria-invalid={fieldState.invalid || undefined}
className="font-code"
{...field}
/>
<datalist id={modListId}>
Expand Down Expand Up @@ -493,6 +495,7 @@ export default function Mod() {
spellCheck={false}
autoComplete="off"
aria-invalid={fieldState.invalid || undefined}
className="font-code"
{...field}
/>
<FieldDescription>分母の探索範囲</FieldDescription>
Expand Down
7 changes: 6 additions & 1 deletion src/app/tools/qr-reader/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,12 @@ export default function QrReader() {
<FieldLabel htmlFor={resultInputId}>
読み取ったデータ
</FieldLabel>
<Input id={resultInputId} value={result.data} readOnly />
<Input
id={resultInputId}
value={result.data}
readOnly
className="font-code"
/>
</Field>
</FieldGroup>
</CardContent>
Expand Down
3 changes: 2 additions & 1 deletion src/app/tools/rinu-checker/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function DetailTable({
<TableCell className="align-top font-medium">
{row.label}
</TableCell>
<TableCell className="whitespace-normal break-all align-top">
<TableCell className="whitespace-normal break-all align-top font-code">
{row.href !== undefined ? (
<a
href={row.href}
Expand Down Expand Up @@ -289,6 +289,7 @@ export default function RinuChecker() {
spellCheck={false}
autoComplete="off"
aria-invalid={fieldState.invalid || undefined}
className="font-code"
/>
<InputGroupAddon align="inline-end">
<Tooltip>
Expand Down
8 changes: 6 additions & 2 deletions src/app/tools/sum-times/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,16 @@ export default function SumTimes() {
</CardHeader>
<CardContent>
<div className="flex flex-col gap-1" aria-live="polite">
<p className="text-5xl font-bold tabular-nums tracking-wider">
<p className="text-5xl font-bold tabular-nums tracking-wider font-code">
{result.kind === "ok" ? result.formatted : PLACEHOLDER_TOTAL}
</p>
{result.kind === "ok" && (
<p className="text-sm text-muted-foreground">
合計 {result.totalMinutes.toLocaleString("ja-JP")} 分
合計{" "}
<span className="tabular-nums font-code">
{result.totalMinutes.toLocaleString("ja-JP")}
</span>{" "}
分
</p>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function ChartTooltipContent({
</span>
</div>
{item.value != null && (
<span className="font-mono font-medium text-foreground tabular-nums">
<span className="font-code font-medium text-foreground tabular-nums">
{typeof item.value === "number"
? item.value.toLocaleString()
: String(item.value)}
Expand Down
Loading