@brillout/docpress 0.6.19 → 0.6.21
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/+config.ts +0 -4
- package/PageLayout.css +11 -11
- package/PageLayout.tsx +6 -6
- package/components/Note.tsx +1 -1
- package/dist/+config.d.ts +0 -5
- package/dist/+config.js +0 -4
- package/installSectionUrlHashs.ts +1 -1
- package/navigation/Navigation-layout.css +2 -2
- package/package.json +5 -7
package/+config.ts
CHANGED
|
@@ -9,9 +9,5 @@ export default {
|
|
|
9
9
|
Page: {
|
|
10
10
|
env: { client: false, server: true },
|
|
11
11
|
},
|
|
12
|
-
// Vike already defines the setting 'name', but we redundantly define it here for older Vike versions (otherwise older Vike versions will complain that 'name` is an unknown config).
|
|
13
|
-
name: {
|
|
14
|
-
env: { config: true },
|
|
15
|
-
},
|
|
16
12
|
},
|
|
17
13
|
} satisfies Config
|
package/PageLayout.css
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
.doc-page
|
|
1
|
+
.doc-page .page-container {
|
|
2
2
|
padding-bottom: 100px;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
.page-layout {
|
|
6
6
|
display: flex;
|
|
7
7
|
justify-content: center;
|
|
8
8
|
width: 100%;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
.page-layout > #navigation-wrapper,
|
|
11
|
+
.page-layout > .page-wrapper {
|
|
12
12
|
flex-grow: 1;
|
|
13
13
|
}
|
|
14
14
|
/* Avoid overflow, see https://stackoverflow.com/questions/36230944/prevent-flex-items-from-overflowing-a-container/66689926#66689926 */
|
|
15
|
-
|
|
15
|
+
.page-layout > .page-wrapper {
|
|
16
16
|
min-width: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.doc-page
|
|
19
|
+
.doc-page .page-wrapper {
|
|
20
20
|
--main-view-max-width: 800px;
|
|
21
21
|
}
|
|
22
|
-
.landing-page
|
|
22
|
+
.landing-page .page-wrapper {
|
|
23
23
|
--main-view-max-width: 1010px;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
.page-wrapper {
|
|
26
26
|
max-width: calc(var(--main-view-max-width) + 80px);
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
.page-content {
|
|
29
29
|
box-sizing: content-box;
|
|
30
30
|
max-width: var(--main-view-max-width);
|
|
31
31
|
padding: 20px var(--main-view-padding);
|
|
32
32
|
margin: auto;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
.page-content {
|
|
36
36
|
--main-view-padding: 20px;
|
|
37
37
|
}
|
|
38
38
|
@media screen and (max-width: 1139px) {
|
|
39
|
-
|
|
39
|
+
.page-content {
|
|
40
40
|
--main-view-padding: 10px;
|
|
41
41
|
}
|
|
42
42
|
}
|
package/PageLayout.tsx
CHANGED
|
@@ -10,22 +10,22 @@ import { NavigationFullscreenButton } from './navigation/navigation-fullscreen/N
|
|
|
10
10
|
export { PageLayout }
|
|
11
11
|
|
|
12
12
|
function PageLayout({ pageContext, children }: { pageContext: PageContextResolved; children: React.ReactNode }) {
|
|
13
|
-
const { isLandingPage, pageTitle } = pageContext
|
|
13
|
+
const { isLandingPage, pageTitle, navigationData } = pageContext
|
|
14
14
|
const { globalNote } = pageContext.config
|
|
15
15
|
return (
|
|
16
16
|
<React.StrictMode>
|
|
17
17
|
<PageContextProvider pageContext={pageContext}>
|
|
18
|
-
<div
|
|
18
|
+
<div className={`page-layout ${isLandingPage ? 'landing-page' : 'doc-page'}`}>
|
|
19
19
|
<div id="navigation-wrapper">
|
|
20
20
|
<Navigation {...pageContext.navigationData} />
|
|
21
21
|
</div>
|
|
22
22
|
<NavigationFullscreenButton />
|
|
23
|
-
<div
|
|
24
|
-
<div
|
|
23
|
+
<div className="page-wrapper">
|
|
24
|
+
<div className="page-container">
|
|
25
25
|
<MobileHeader />
|
|
26
|
-
<div
|
|
26
|
+
<div className="page-content">
|
|
27
27
|
{globalNote}
|
|
28
|
-
{pageTitle && <h1>{pageTitle}</h1>}
|
|
28
|
+
{pageTitle && <h1 id={`${navigationData.currentUrl.replace('/', '')}`}>{pageTitle}</h1>}
|
|
29
29
|
{children}
|
|
30
30
|
{!isLandingPage && <EditPageNote pageContext={pageContext} />}
|
|
31
31
|
</div>
|
package/components/Note.tsx
CHANGED
package/dist/+config.d.ts
CHANGED
package/dist/+config.js
CHANGED
|
@@ -7,9 +7,5 @@ export default {
|
|
|
7
7
|
Page: {
|
|
8
8
|
env: { client: false, server: true },
|
|
9
9
|
},
|
|
10
|
-
// Vike already defines the setting 'name', but we redundantly define it here for older Vike versions (otherwise older Vike versions will complain that 'name` is an unknown config).
|
|
11
|
-
name: {
|
|
12
|
-
env: { config: true },
|
|
13
|
-
},
|
|
14
10
|
},
|
|
15
11
|
};
|
|
@@ -6,7 +6,7 @@ jumpToSection()
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
function installSectionUrlHashs() {
|
|
9
|
-
const pageContainer = document.querySelector('.doc-page
|
|
9
|
+
const pageContainer = document.querySelector('.doc-page .page-container')
|
|
10
10
|
if (!pageContainer) {
|
|
11
11
|
assert(window.location.pathname === '/')
|
|
12
12
|
return
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
background: white;
|
|
57
57
|
z-index: 3;
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
.page-wrapper {
|
|
60
60
|
margin-left: calc(-1 * var(--navigation-fullscreen-button-width));
|
|
61
61
|
}
|
|
62
62
|
@media screen and (max-width: 1139px) {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
#navigation-fullscreen-button {
|
|
71
71
|
display: none;
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
.page-wrapper {
|
|
74
74
|
margin-left: 0 !important;
|
|
75
75
|
}
|
|
76
76
|
#navigation-container {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brillout/docpress",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"// Build vite.config.ts and +config.ts": "",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"react": ">=18.0.0",
|
|
35
35
|
"react-dom": ">=18.0.0",
|
|
36
36
|
"typescript": "*",
|
|
37
|
-
"vike": ">=0.4.
|
|
37
|
+
"vike": ">=0.4.195",
|
|
38
38
|
"vite": ">=5.2.0"
|
|
39
39
|
},
|
|
40
40
|
"exports": {
|
|
@@ -71,12 +71,10 @@
|
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@brillout/release-me": "^0.3.8",
|
|
73
73
|
"@types/node": "^15.12.1",
|
|
74
|
-
"@types/react": "^
|
|
75
|
-
"@types/react-dom": "^
|
|
76
|
-
"react": "^18.2.0",
|
|
77
|
-
"react-dom": "^18.2.0",
|
|
74
|
+
"@types/react": "^18.2.45",
|
|
75
|
+
"@types/react-dom": "^18.2.18",
|
|
78
76
|
"typescript": "^5.4.3",
|
|
79
|
-
"vike": "^0.4.
|
|
77
|
+
"vike": "^0.4.195",
|
|
80
78
|
"vite": "^5.2.2"
|
|
81
79
|
},
|
|
82
80
|
"repository": "https://github.com/brillout/docpress",
|