stack-site-builder 1.23.2 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +106 -0
- package/README.md +17 -2
- package/index.d.ts +8 -0
- package/index.mjs +6 -2
- package/markdown.mjs +61 -6
- package/package.json +4 -1
- package/src/components/CardsHome.astro +2 -2
- package/src/components/DeckView.astro +2 -3
- package/src/components/Home.astro +2 -2
- package/src/i18n/ui.ts +63 -12
- package/src/layouts/BaseLayout.astro +18 -6
- package/src/lib/articles.ts +3 -2
- package/src/lib/concepts.ts +3 -2
- package/src/lib/courses.ts +3 -2
- package/src/lib/locales.ts +30 -0
- package/src/lib/pages.ts +3 -2
- package/src/lib/papers.ts +3 -2
- package/src/lib/products.ts +3 -2
- package/src/lib/slides.ts +3 -2
- package/src/lib/stacks.ts +3 -2
- package/src/pages/[...lang]/[page].astro +2 -2
- package/src/pages/[...lang]/article/[...id].astro +2 -2
- package/src/pages/[...lang]/article/category/[id].astro +2 -2
- package/src/pages/[...lang]/article/index.astro +2 -3
- package/src/pages/[...lang]/categories/[id].astro +2 -2
- package/src/pages/[...lang]/concept/[...id].astro +2 -2
- package/src/pages/[...lang]/concept/category/[id].astro +2 -2
- package/src/pages/[...lang]/concept/index.astro +2 -3
- package/src/pages/[...lang]/course/[...id].astro +2 -2
- package/src/pages/[...lang]/course/category/[id].astro +2 -2
- package/src/pages/[...lang]/course/index.astro +2 -3
- package/src/pages/[...lang]/glossary.astro +2 -3
- package/src/pages/[...lang]/index.astro +2 -2
- package/src/pages/[...lang]/paper/[...id].astro +2 -2
- package/src/pages/[...lang]/paper/category/[id].astro +2 -2
- package/src/pages/[...lang]/paper/index.astro +2 -3
- package/src/pages/[...lang]/products/[...id].astro +2 -2
- package/src/pages/[...lang]/products/index.astro +2 -3
- package/src/pages/[...lang]/rss.xml.ts +2 -3
- package/src/pages/[...lang]/sample/[folder].astro +2 -2
- package/src/pages/[...lang]/sample/index.astro +2 -3
- package/src/pages/[...lang]/slides/index.astro +2 -3
- package/src/pages/[...lang]/stack/[...id].astro +2 -2
- package/src/pages/[...lang]/tags/[tag].astro +2 -2
- package/src/pages/[...lang]/vendors/[vendor].astro +2 -2
- package/src/styles/global.css +40 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import TagIndex from '../../../components/TagIndex.astro';
|
|
6
5
|
import { getAllTags } from '../../../lib/stacks';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
7
|
+
import { siteName } from '../../../i18n/ui';
|
|
8
8
|
|
|
9
9
|
export const getStaticPaths = (async () => {
|
|
10
10
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -19,6 +19,6 @@ export const getStaticPaths = (async () => {
|
|
|
19
19
|
const { lang, tag } = Astro.props;
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
<BaseLayout title={`#${tag} — ${
|
|
22
|
+
<BaseLayout title={`#${tag} — ${siteName(lang)}`} lang={lang} path={`tags/${tag}/`}>
|
|
23
23
|
<TagIndex lang={lang} tag={tag} />
|
|
24
24
|
</BaseLayout>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import VendorIndex from '../../../components/VendorIndex.astro';
|
|
6
5
|
import { getAllVendors } from '../../../lib/stacks';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
7
|
+
import { siteName } from '../../../i18n/ui';
|
|
8
8
|
|
|
9
9
|
export const getStaticPaths = (async () => {
|
|
10
10
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -19,6 +19,6 @@ export const getStaticPaths = (async () => {
|
|
|
19
19
|
const { lang, vendor } = Astro.props;
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
<BaseLayout title={`${vendor} — ${
|
|
22
|
+
<BaseLayout title={`${vendor} — ${siteName(lang)}`} lang={lang} path={`vendors/${vendor}/`}>
|
|
23
23
|
<VendorIndex lang={lang} vendor={vendor} />
|
|
24
24
|
</BaseLayout>
|
package/src/styles/global.css
CHANGED
|
@@ -866,6 +866,46 @@ summary {
|
|
|
866
866
|
background: color-mix(in srgb, var(--aas-panel) 45%, transparent);
|
|
867
867
|
}
|
|
868
868
|
|
|
869
|
+
/* Math (`$$…$$`, rendered to HTML + MathML at build time by rehype-katex).
|
|
870
|
+
KaTeX draws everything in `currentColor`, so it picks up the theme — and the
|
|
871
|
+
dark/light swap — with no palette work here. What it does NOT do is stay
|
|
872
|
+
inside its column: a long derivation is one unbreakable line, so the same
|
|
873
|
+
argument as `.aas-table-scroll` applies and the display block takes the
|
|
874
|
+
scroll. The vertical padding is what makes that safe — `overflow-x: auto`
|
|
875
|
+
promotes `overflow-y` to `auto` unless it is pinned, and pinning it to
|
|
876
|
+
`hidden` would shave the top of a tall fraction or the tail of a descender. */
|
|
877
|
+
.katex-display {
|
|
878
|
+
max-width: 100%;
|
|
879
|
+
overflow-x: auto;
|
|
880
|
+
overflow-y: hidden;
|
|
881
|
+
overscroll-behavior-x: contain;
|
|
882
|
+
padding: 0.5em 0;
|
|
883
|
+
}
|
|
884
|
+
/* Inline math sits in running text, so it must not introduce its own scrollbar
|
|
885
|
+
or stretch the line box; KaTeX's 1.21em default is a touch large next to our
|
|
886
|
+
body size. */
|
|
887
|
+
.prose .katex {
|
|
888
|
+
font-size: 1.1em;
|
|
889
|
+
}
|
|
890
|
+
/* KaTeX's fonts carry no Hangul, kana or Han glyphs, so for `\text{처리량}` it
|
|
891
|
+
tags the run with `.hangul_fallback` (or `.cjk_fallback` / `.brahmic_fallback`)
|
|
892
|
+
and ships NO rule for them — the font is left to the site on purpose. Without
|
|
893
|
+
one the run falls through KaTeX_Main to whatever the browser picks next, which
|
|
894
|
+
renders Korean loose and letterform-mismatched beside the prose it sits in.
|
|
895
|
+
Hand it the site stack (Pretendard first) so math text matches body text. */
|
|
896
|
+
.katex .hangul_fallback,
|
|
897
|
+
.katex .cjk_fallback,
|
|
898
|
+
.katex .brahmic_fallback {
|
|
899
|
+
font-family: var(--aas-sans);
|
|
900
|
+
}
|
|
901
|
+
/* A formula KaTeX could not parse. A production build fails on one (see
|
|
902
|
+
`rehypeMathErrors` in markdown.mjs), so this only ever shows in a dev server,
|
|
903
|
+
where being loud is exactly the point. */
|
|
904
|
+
.katex-error {
|
|
905
|
+
color: var(--aas-role-guard);
|
|
906
|
+
border-bottom: 1px dotted currentColor;
|
|
907
|
+
}
|
|
908
|
+
|
|
869
909
|
/* ── Listing density: gallery (compact mini-cards) ───────────────────────────
|
|
870
910
|
Toggled by [data-view='gallery'] on <html> (persisted in localStorage). A
|
|
871
911
|
denser grid plus a stripped-down card — logo, name, stars, pricing, and a
|