@hagicode/hagilight-starlight 0.9.10-dev.121.1.fc2e4a7 → 0.10.1-dev.123.1.28afdf0
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/content-width.css +30 -0
- package/package.json +2 -2
package/content-width.css
CHANGED
|
@@ -49,3 +49,33 @@
|
|
|
49
49
|
.hagilight-ai-disclosure a {
|
|
50
50
|
margin-inline-start: 0.5rem;
|
|
51
51
|
}
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* Promoto card placement. The fixed card is centered in the content column, not in
|
|
55
|
+
* the viewport, so it never covers the sidebar or the table of contents. The
|
|
56
|
+
* geometry mirrors Starlight's own layout: a left sidebar from 50em, and from 72em
|
|
57
|
+
* a main pane of min(F - sidebar, content + (F - content - sidebar) / 2) for
|
|
58
|
+
* F = 100% - sidebar, with the content flush to its right edge inside the panel
|
|
59
|
+
* padding when a table of contents is shown.
|
|
60
|
+
*/
|
|
61
|
+
@media (min-width: 50em) {
|
|
62
|
+
[data-has-sidebar] {
|
|
63
|
+
--hagilight-promoto-inset-start: var(--sl-sidebar-width);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@media (min-width: 72em) {
|
|
68
|
+
[data-has-sidebar][data-has-toc] {
|
|
69
|
+
--hagilight-promoto-main-width: min(
|
|
70
|
+
100% - 2 * var(--sl-sidebar-width),
|
|
71
|
+
var(--sl-content-width) + (100% - var(--sl-content-width) - 2 * var(--sl-sidebar-width)) / 2
|
|
72
|
+
);
|
|
73
|
+
--hagilight-promoto-inset-start: calc(
|
|
74
|
+
var(--sl-sidebar-width) +
|
|
75
|
+
max(var(--sl-content-pad-x), var(--hagilight-promoto-main-width) - var(--sl-content-pad-x) - var(--sl-content-width))
|
|
76
|
+
);
|
|
77
|
+
--hagilight-promoto-inset-end: calc(
|
|
78
|
+
100% - var(--sl-sidebar-width) - var(--hagilight-promoto-main-width) + var(--sl-content-pad-x)
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hagicode/hagilight-starlight",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1-dev.123.1.28afdf0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Starlight plugin and components for HagiCode documentation",
|
|
6
6
|
"repository": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"assets/showcase/*"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@hagicode/hagilight-core": "0.
|
|
56
|
+
"@hagicode/hagilight-core": "0.10.1-dev.123.1.28afdf0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@astrojs/starlight": "^0.42.4",
|