@brillout/docpress 0.9.5 → 0.9.7

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/Layout.tsx CHANGED
@@ -277,7 +277,7 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
277
277
  }}
278
278
  >
279
279
  <TopNavigation />
280
- <div className="desktop-grow" />
280
+ {!isNavLeft && <div className="desktop-grow" />}
281
281
  <NavSecondaryContent
282
282
  style={{
283
283
  display: 'inline-flex',
@@ -324,7 +324,7 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
324
324
  }}
325
325
  >
326
326
  <NavLogo className="mobile-grow-half" />
327
- <div className="desktop-grow" />
327
+ {!isNavLeft && <div className="desktop-grow" />}
328
328
  <SearchLink className="mobile-grow-half" style={linkStyle} />
329
329
  <MenuLink className="mobile-grow-full" style={linkStyle} />
330
330
  {navSecondaryContent}
@@ -448,7 +448,7 @@ function NavHeaderLeftFullWidthBackground() {
448
448
 
449
449
  function NavLogo({ className }: { className: string }) {
450
450
  const pageContext = usePageContext()
451
- const iconSize = 39
451
+ const iconSize = pageContext.config.navLogoSize ?? 39
452
452
  const { projectName } = pageContext.meta
453
453
  return (
454
454
  <a
@@ -477,6 +477,7 @@ function NavLogo({ className }: { className: string }) {
477
477
  style={{
478
478
  marginLeft: `calc(var(--icon-text-padding) + 2px)`,
479
479
  fontSize: isProjectNameShort(projectName) ? '1.65em' : '1.3em',
480
+ ...pageContext.config.navLogoTextStyle,
480
481
  }}
481
482
  >
482
483
  {projectName}
package/dist/Layout.js CHANGED
@@ -184,7 +184,7 @@ function NavHead(_a) {
184
184
  width: mainViewMax, // guaranteed real estate
185
185
  })) },
186
186
  React.createElement(TopNavigation, null),
187
- React.createElement("div", { className: "desktop-grow" }),
187
+ !isNavLeft && React.createElement("div", { className: "desktop-grow" }),
188
188
  React.createElement(NavSecondaryContent, { style: {
189
189
  display: 'inline-flex',
190
190
  fontSize: '1.06em',
@@ -218,7 +218,7 @@ function NavHead(_a) {
218
218
  _b.justifyContent = 'center',
219
219
  _b) },
220
220
  React.createElement(NavLogo, { className: "mobile-grow-half" }),
221
- React.createElement("div", { className: "desktop-grow" }),
221
+ !isNavLeft && React.createElement("div", { className: "desktop-grow" }),
222
222
  React.createElement(SearchLink, { className: "mobile-grow-half", style: linkStyle }),
223
223
  React.createElement(MenuLink, { className: "mobile-grow-full", style: linkStyle }),
224
224
  navSecondaryContent)),
@@ -260,9 +260,10 @@ function NavHeaderLeftFullWidthBackground() {
260
260
  css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n@container container-viewport (min-width: 0px) {\n .nav-bg {\n width: 100cqw;\n }\n}\n"], ["\n@container container-viewport (min-width: 0px) {\n .nav-bg {\n width: 100cqw;\n }\n}\n"]))))));
261
261
  }
262
262
  function NavLogo(_a) {
263
+ var _b;
263
264
  var className = _a.className;
264
265
  var pageContext = usePageContext();
265
- var iconSize = 39;
266
+ var iconSize = (_b = pageContext.config.navLogoSize) !== null && _b !== void 0 ? _b : 39;
266
267
  var projectName = pageContext.meta.projectName;
267
268
  return (React.createElement("a", { className: cls(['nav-logo', className]), style: {
268
269
  display: 'flex',
@@ -279,10 +280,7 @@ function NavLogo(_a) {
279
280
  ev.preventDefault();
280
281
  navigate('/press#logo');
281
282
  } }),
282
- React.createElement("span", { style: {
283
- marginLeft: "calc(var(--icon-text-padding) + 2px)",
284
- fontSize: isProjectNameShort(projectName) ? '1.65em' : '1.3em',
285
- } }, projectName)));
283
+ React.createElement("span", { style: __assign({ marginLeft: "calc(var(--icon-text-padding) + 2px)", fontSize: isProjectNameShort(projectName) ? '1.65em' : '1.3em' }, pageContext.config.navLogoTextStyle) }, projectName)));
286
284
  }
287
285
  function isProjectNameShort(projectName) {
288
286
  return projectName.length <= 4;
@@ -28,4 +28,6 @@ type Config = {
28
28
  pressKit?: true;
29
29
  sponsorGithubAccount?: string;
30
30
  navMaxWidth?: number;
31
+ navLogoSize?: number;
32
+ navLogoTextStyle?: React.CSSProperties;
31
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.9.5",
3
+ "version": "0.9.7",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@brillout/picocolors": "^1.0.10",
package/types/Config.ts CHANGED
@@ -30,4 +30,6 @@ type Config = {
30
30
  pressKit?: true
31
31
  sponsorGithubAccount?: string
32
32
  navMaxWidth?: number
33
+ navLogoSize?: number
34
+ navLogoTextStyle?: React.CSSProperties
33
35
  }