Skip to content

Commit 11e3c28

Browse files
authored
Merge branch 'typst-jp:main' into trans/foundations
2 parents b6427e1 + 18f7590 commit 11e3c28

38 files changed

+677
-241
lines changed

.textlintignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# hayagrivaのsrc/csl/archive.rsで管理されている参考文献フォーマット
2-
website/dist/docs/reference/model/bibliography/index.html
3-
website/dist/docs/reference/model/cite/index.html
2+
website/dist/reference/model/bibliography/index.html
3+
website/dist/reference/model/cite/index.html

bun.lockb

43.9 KB
Binary file not shown.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"scripts": {
55
"textlint-md": "textlint ./docs/",
66
"textlint-md:fix": "textlint --fix ./docs/",
7-
"textlint-html": "textlint ./website/dist/docs/"
7+
"textlint-html": "textlint ./website/dist/"
88
},
99
"devDependencies": {
1010
"@types/bun": "latest",
11-
"textlint": "^14.3.0",
11+
"textlint": "^15.2.2",
1212
"textlint-filter-rule-comments": "^1.2.2",
1313
"textlint-plugin-html": "^1.0.1",
14-
"textlint-rule-preset-jtf-style": "^2.3.14"
14+
"textlint-rule-preset-jtf-style": "^3.0.2"
1515
},
1616
"peerDependencies": {
1717
"typescript": "^5.0.0"

website/biome.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

website/biome.jsonc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"includes": ["**"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "tab"
15+
},
16+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
17+
"linter": {
18+
"enabled": true,
19+
"rules": {
20+
"recommended": true,
21+
"style": {
22+
"noParameterAssign": "error",
23+
"useAsConstAssertion": "error",
24+
"useDefaultParameterLast": "error",
25+
"useEnumInitializers": "error",
26+
"useSelfClosingElements": "error",
27+
"useSingleVarDeclarator": "error",
28+
"noUnusedTemplateLiteral": "error",
29+
"useNumberNamespace": "error",
30+
"noInferrableTypes": "error",
31+
"noUselessElse": "error"
32+
}
33+
}
34+
},
35+
"javascript": {
36+
"formatter": {
37+
"quoteStyle": "double"
38+
}
39+
}
40+
}

website/bun.lockb

0 Bytes
Binary file not shown.

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"test": "vitest"
1313
},
1414
"devDependencies": {
15-
"@biomejs/biome": "1.9.4",
15+
"@biomejs/biome": "2.0.6",
1616
"@hono/ssg-plugins-essential": "^0.1.0",
1717
"@hono/vite-dev-server": "^0.20.1",
1818
"@hono/vite-ssg": "^0.2.0",
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Tabler Icons
22
// https://tabler.io/icons
3-
export { HomeIcon } from "./HomeIcon";
3+
4+
export { AlertTriangleIcon } from "./AlertTriangleIcon";
45
export { CaretRightCircleIcon } from "./CaretRightCircleIcon";
5-
export { InfoCircleIcon } from "./InfoCircleIcon";
6-
export { HelpCircleIcon } from "./HelpCircleIcon";
76
export { ChevronLeftIcon } from "./ChevronLeftIcon";
87
export { ChevronRightIcon } from "./ChevronRightIcon";
9-
export { AlertTriangleIcon } from "./AlertTriangleIcon";
10-
export { MenuIcon } from "./MenuIcon";
118
export { CloseIcon } from "./CloseIcon";
12-
export { SearchIcon } from "./SearchIcon";
13-
export { LanguageIcon } from "./LanguageIcon";
14-
export { WorldIcon } from "./WorldIcon";
15-
9+
export { DiscordIcon } from "./DiscordIcon";
1610
// Simple Icons
1711
// https://simpleicons.org/
1812
export { GitHubIcon } from "./GitHubIcon";
19-
export { DiscordIcon } from "./DiscordIcon";
13+
export { HelpCircleIcon } from "./HelpCircleIcon";
14+
export { HomeIcon } from "./HomeIcon";
15+
export { InfoCircleIcon } from "./InfoCircleIcon";
16+
export { LanguageIcon } from "./LanguageIcon";
17+
export { MenuIcon } from "./MenuIcon";
18+
export { SearchIcon } from "./SearchIcon";
19+
export { WorldIcon } from "./WorldIcon";

website/src/components/templates/BaseTemplate.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import { html } from "hono/html";
22
import type { FC, PropsWithChildren } from "hono/jsx";
3-
import { basePath, originUrl, typstOfficialDocsUrl } from "../../metadata";
4-
import { Translation, translation } from "../../translation";
3+
import {
4+
basePath,
5+
displayTranslationStatus,
6+
originUrl,
7+
typstOfficialDocsUrl,
8+
} from "../../metadata";
9+
import { Translation, translation } from "../../translation/";
510
import type { Page } from "../../types/model";
6-
import { joinPath, removeBasePath } from "../../utils/path";
11+
import { joinPath, shiftBase } from "../../utils/path";
712
import { getTranslationStatus } from "../../utils/translationStatus";
813
import {
914
CaretRightCircleIcon,
@@ -50,9 +55,10 @@ export const BaseTemplate: FC<BaseTemplateProps> = ({
5055
joinPath(basePath, "/favicon.png"),
5156
originUrl,
5257
).toString();
53-
const typstOfficialRouteUrl = joinPath(
58+
const typstOfficialRouteUrl = shiftBase(
59+
route,
60+
basePath,
5461
typstOfficialDocsUrl,
55-
removeBasePath(basePath, route),
5662
);
5763
return (
5864
<html lang={translation.htmlLang()} class="scroll-pt-24">
@@ -207,7 +213,10 @@ export const BaseTemplate: FC<BaseTemplateProps> = ({
207213
<Breadcrumbs path={path} />
208214

209215
<div class="flex flex-col gap-2 my-4">
210-
<TranslationStatusAlert status={translationStatus} />
216+
{(displayTranslationStatus ||
217+
translationStatus === "community") && (
218+
<TranslationStatusAlert status={translationStatus} />
219+
)}
211220
</div>
212221

213222
{translationStatus !== "community" && (

website/src/components/templates/CategoryTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { FC } from "hono/jsx";
2-
import { Translation } from "../../translation";
2+
import { Translation } from "../../translation/";
33
import type { CategoryBody, Page } from "../../types/model";
44
import { HtmlContent } from "../ui/HtmlContent";
55
import BaseTemplate, { type BaseTemplateProps } from "./BaseTemplate";

0 commit comments

Comments
 (0)