@leadertechie/personal-site-kit 0.1.0-alpha.13 → 0.1.0-alpha.14
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.
|
@@ -398,15 +398,17 @@ class WebsiteUI {
|
|
|
398
398
|
apiUrl: this.config.apiUrl,
|
|
399
399
|
baseUrl: this.config.baseUrl
|
|
400
400
|
});
|
|
401
|
-
this.store.subscribe(() => {
|
|
401
|
+
this.store.subscribe((config) => {
|
|
402
402
|
this.applyTheme();
|
|
403
403
|
this.updateFavicon();
|
|
404
|
+
this.updateBanner(config);
|
|
404
405
|
if (this.router && window.location.pathname !== "/admin") {
|
|
405
406
|
this.router.navigate(window.location.pathname);
|
|
406
407
|
}
|
|
407
408
|
});
|
|
408
409
|
this.applyTheme();
|
|
409
410
|
this.updateFavicon();
|
|
411
|
+
this.updateBanner(this.store.getConfig());
|
|
410
412
|
this.router = new Router(this);
|
|
411
413
|
this.router.init(this.config.appElementId || "app");
|
|
412
414
|
if (this.config.onBootstrap) {
|
|
@@ -414,6 +416,13 @@ class WebsiteUI {
|
|
|
414
416
|
}
|
|
415
417
|
console.log("WebsiteUI bootstrapped");
|
|
416
418
|
}
|
|
419
|
+
updateBanner(config) {
|
|
420
|
+
const banner = document.querySelector("my-banner");
|
|
421
|
+
if (banner) {
|
|
422
|
+
banner.setAttribute("header", config.siteTitle || "My Site");
|
|
423
|
+
banner.setAttribute("logo", `${config.apiUrl}/api/logo?t=${Date.now()}`);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
417
426
|
applyTheme() {
|
|
418
427
|
if (!this.config.theme) return;
|
|
419
428
|
const { theme } = this.config;
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { A, B, M, R, W, c, a, g, b, d, h, e, r, s, v } from "./chunks/website-ap
|
|
|
2
2
|
import { WebsitePrerender } from "./prerender.js";
|
|
3
3
|
import { A as A2, a as a2, b as b2, c as c2, d as d2, e as e2, f, g as g2, h as h2, i, B as B2, F, M as M2, j, S, k } from "./chunks/index-B2jGIzSi.js";
|
|
4
4
|
import { S as S2, g as g3, i as i2, r as r2 } from "./chunks/site-store-CGV9c2DI.js";
|
|
5
|
-
import { R as R2, T, W as W2, b as b3, c as c3, g as g4, r as r3 } from "./chunks/template-
|
|
5
|
+
import { R as R2, T, W as W2, b as b3, c as c3, g as g4, r as r3 } from "./chunks/template-DXUSp0BG.js";
|
|
6
6
|
export {
|
|
7
7
|
A as AUTH_KV,
|
|
8
8
|
A2 as AdminAboutMeSection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-ui.d.ts","sourceRoot":"","sources":["../../src/shared/website-ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE;QACN,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvD;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAY;IACnC,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,MAAM,CAAuB;IAErC,OAAO;WAKO,WAAW,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS;IAU1C,SAAS;
|
|
1
|
+
{"version":3,"file":"website-ui.d.ts","sourceRoot":"","sources":["../../src/shared/website-ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE;QACN,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvD;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAY;IACnC,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,MAAM,CAAuB;IAErC,OAAO;WAKO,WAAW,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS;IAU1C,SAAS;IAsCtB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,UAAU;IAiBlB,OAAO,CAAC,aAAa;IAad,QAAQ;IAIR,SAAS;IAIT,SAAS;CAGjB;AAED,eAAO,MAAM,SAAS,GAAI,SAAS,QAAQ,kBAA8C,CAAC"}
|
package/dist/shared.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S, g, i, r } from "./chunks/site-store-CGV9c2DI.js";
|
|
2
|
-
import { R, T, W, b, c, g as g2, r as r2 } from "./chunks/template-
|
|
2
|
+
import { R, T, W, b, c, g as g2, r as r2 } from "./chunks/template-DXUSp0BG.js";
|
|
3
3
|
export {
|
|
4
4
|
R as Router,
|
|
5
5
|
S as SiteStore,
|
package/package.json
CHANGED