stack-site-builder 1.23.1 → 1.24.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 +89 -0
- package/README.md +16 -1
- package/markdown.mjs +27 -0
- package/package.json +1 -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 +10 -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/md-tables.ts +21 -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/project.ts +14 -11
- package/src/lib/samples.ts +2 -1
- 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 +97 -4
package/src/styles/global.css
CHANGED
|
@@ -379,8 +379,9 @@ html[lang='ko'] h1 {
|
|
|
379
379
|
}
|
|
380
380
|
/* Doc tables: a touch larger, centered (shrink-to-content), roomier cells, and
|
|
381
381
|
a full-row hover highlight. `fit-content` + `margin-inline: auto` centers the
|
|
382
|
-
table block
|
|
383
|
-
|
|
382
|
+
table block. When the table sits in a `.aas-table-scroll` wrapper (the normal
|
|
383
|
+
case — see below) the centering moves to the wrapper and the table keeps its
|
|
384
|
+
natural column widths instead. */
|
|
384
385
|
.aas-reading.aas-reading :where(table) {
|
|
385
386
|
display: table;
|
|
386
387
|
width: fit-content;
|
|
@@ -727,6 +728,18 @@ summary {
|
|
|
727
728
|
margin-inline: auto;
|
|
728
729
|
}
|
|
729
730
|
|
|
731
|
+
/* Mermaid draws its labels as real HTML inside <foreignObject> and sizes nodes
|
|
732
|
+
and subgraph frames from the measured box. Mermaid 11 wraps label text in a
|
|
733
|
+
<p>, which then inherits the PAGE's paragraph typography — on a slide that is
|
|
734
|
+
26px/41px, while mermaid only reserves ~25px for a subgraph title, so every
|
|
735
|
+
subgraph title overlapped the first node inside it by ~16px. Pin label
|
|
736
|
+
typography back to mermaid's own so its measurements hold. */
|
|
737
|
+
.mermaid foreignObject p {
|
|
738
|
+
margin: 0;
|
|
739
|
+
font-size: inherit;
|
|
740
|
+
line-height: inherit;
|
|
741
|
+
}
|
|
742
|
+
|
|
730
743
|
/* Mermaid theme: rounded corners + soft pastel fills, derived from the site
|
|
731
744
|
accent so it adapts to light/dark. `!important` overrides Mermaid's own
|
|
732
745
|
id-scoped <style> block. Applies wherever a diagram renders (prose + samples). */
|
|
@@ -794,7 +807,10 @@ summary {
|
|
|
794
807
|
}
|
|
795
808
|
|
|
796
809
|
|
|
797
|
-
/* Markdown tables — without these, columns collapse together.
|
|
810
|
+
/* Markdown tables — without these, columns collapse together. This is also the
|
|
811
|
+
fallback for a table that reaches the page WITHOUT the scroll wrapper below
|
|
812
|
+
(raw HTML in MDX, say): `display: block` + `overflow-x` at least keeps it
|
|
813
|
+
from pushing the page sideways. */
|
|
798
814
|
.prose :where(table) {
|
|
799
815
|
width: 100%;
|
|
800
816
|
border-collapse: collapse;
|
|
@@ -803,6 +819,39 @@ summary {
|
|
|
803
819
|
display: block;
|
|
804
820
|
overflow-x: auto;
|
|
805
821
|
}
|
|
822
|
+
|
|
823
|
+
/* Horizontal scroll box wrapped around every rendered table — by
|
|
824
|
+
`rehypeTableScroll` (markdown.mjs) for content collections, and by
|
|
825
|
+
`withTableScroll` (lib/md-tables.ts) for READMEs and sample descriptions.
|
|
826
|
+
A table cannot scroll itself: it needs `display: table` for real column
|
|
827
|
+
sizing, which makes `overflow-x` on the table a no-op, so a table wider than
|
|
828
|
+
its column had no escape but to wrap every cell — a 120px-tall table became
|
|
829
|
+
430px of cramped text. The wrapper takes the scrolling; the table gets its
|
|
830
|
+
natural column widths back (`max-content`, floored at the column width so a
|
|
831
|
+
narrow table still fills it). */
|
|
832
|
+
.aas-table-scroll {
|
|
833
|
+
max-width: 100%;
|
|
834
|
+
overflow-x: auto;
|
|
835
|
+
overscroll-behavior-x: contain;
|
|
836
|
+
margin: 1.25rem 0;
|
|
837
|
+
}
|
|
838
|
+
.aas-table-scroll > table {
|
|
839
|
+
display: table;
|
|
840
|
+
width: max-content;
|
|
841
|
+
min-width: 100%;
|
|
842
|
+
margin: 0;
|
|
843
|
+
}
|
|
844
|
+
/* In a reading column the wrapper shrinks to the table and centers, so a table
|
|
845
|
+
narrower than the column keeps its own width rather than being stretched. */
|
|
846
|
+
.aas-reading.aas-reading .aas-table-scroll {
|
|
847
|
+
width: fit-content;
|
|
848
|
+
margin-inline: auto;
|
|
849
|
+
}
|
|
850
|
+
.aas-reading.aas-reading .aas-table-scroll > table {
|
|
851
|
+
min-width: 0;
|
|
852
|
+
max-width: none;
|
|
853
|
+
margin-inline: 0;
|
|
854
|
+
}
|
|
806
855
|
.prose :where(th, td) {
|
|
807
856
|
border: 1px solid var(--aas-border);
|
|
808
857
|
padding: 0.55rem 0.85rem;
|
|
@@ -1271,13 +1320,25 @@ summary {
|
|
|
1271
1320
|
color: var(--aas-muted);
|
|
1272
1321
|
}
|
|
1273
1322
|
|
|
1274
|
-
/* Tables
|
|
1323
|
+
/* Tables. Same deal as prose tables: the `.aas-table-scroll` wrapper does the
|
|
1324
|
+
scrolling, so a wide table slides sideways instead of cramming its cells. */
|
|
1325
|
+
.aas-slide-inner .aas-table-scroll {
|
|
1326
|
+
width: 100%;
|
|
1327
|
+
margin: 0.5em 0;
|
|
1328
|
+
}
|
|
1275
1329
|
.aas-slide-inner table {
|
|
1276
1330
|
width: 100%;
|
|
1277
1331
|
border-collapse: collapse;
|
|
1278
1332
|
font-size: clamp(0.9rem, 1.5vw, 1.25rem);
|
|
1279
1333
|
margin: 0.5em 0;
|
|
1280
1334
|
}
|
|
1335
|
+
/* Declared after `.aas-slide-inner table` so the wrapped form wins: full column
|
|
1336
|
+
width normally, natural width (scrolling) once the table outgrows the slide. */
|
|
1337
|
+
.aas-slide-inner .aas-table-scroll > table {
|
|
1338
|
+
width: max-content;
|
|
1339
|
+
min-width: 100%;
|
|
1340
|
+
margin: 0;
|
|
1341
|
+
}
|
|
1281
1342
|
.aas-slide-inner th,
|
|
1282
1343
|
.aas-slide-inner td {
|
|
1283
1344
|
text-align: left;
|
|
@@ -1528,6 +1589,38 @@ summary {
|
|
|
1528
1589
|
/* 3b) Code stays pinned to the top of its filled box — that's the default block
|
|
1529
1590
|
flow of a tall <pre>, so nothing extra is needed. */
|
|
1530
1591
|
|
|
1592
|
+
/* 3c) Size the diagram against the box it was just given, not a fixed viewport
|
|
1593
|
+
fraction. The generic caps (`pre` 62vh, svg 52vh) don't know how much room
|
|
1594
|
+
the fill rules actually handed over — on a full-height slide that box is
|
|
1595
|
+
~78vh, so a tall flowchart rendered at a THIRD of its size with the unused
|
|
1596
|
+
height letterboxed as empty margins either side. The box already has a
|
|
1597
|
+
definite height here, so `100%` resolves against it; the svg's viewBox
|
|
1598
|
+
does the rest (it scales to fit and centers itself). Excludes the layouts
|
|
1599
|
+
that deliberately manage their own overflow: `compact` (natural size),
|
|
1600
|
+
`.aas-split.scroll` (vertical scroll box) and `scroll-x` (horizontal). */
|
|
1601
|
+
.aas-slide:not(.compact):not(.scroll-x) .aas-slide-inner > .aas-diagram > pre.mermaid,
|
|
1602
|
+
.aas-slide:not(.compact):not(.scroll-x)
|
|
1603
|
+
.aas-slide-inner
|
|
1604
|
+
> .aas-split:not(.scroll)
|
|
1605
|
+
> .aas-diagram
|
|
1606
|
+
> pre.mermaid {
|
|
1607
|
+
flex: 1 1 0;
|
|
1608
|
+
min-height: 0;
|
|
1609
|
+
max-height: 100%;
|
|
1610
|
+
width: 100%;
|
|
1611
|
+
}
|
|
1612
|
+
.aas-slide:not(.compact):not(.scroll-x) .aas-slide-inner > .aas-diagram > pre.mermaid > svg,
|
|
1613
|
+
.aas-slide:not(.compact):not(.scroll-x)
|
|
1614
|
+
.aas-slide-inner
|
|
1615
|
+
> .aas-split:not(.scroll)
|
|
1616
|
+
> .aas-diagram
|
|
1617
|
+
> pre.mermaid
|
|
1618
|
+
> svg {
|
|
1619
|
+
width: 100%;
|
|
1620
|
+
height: 100%;
|
|
1621
|
+
max-height: 100%;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1531
1624
|
/* Scrollable diagram (`<div class="aas-split scroll">`): the diagram column is a
|
|
1532
1625
|
fixed-height scroll box (opted out of the fill rules above) and the diagram
|
|
1533
1626
|
fits the column width, so a tall/complex flowchart scrolls vertically next to
|