@koehler8/cms 1.0.0-beta.5
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/LICENSE +21 -0
- package/README.md +202 -0
- package/bin/cms-generate-public-assets.js +27 -0
- package/bin/cms-validate-extensions.js +18 -0
- package/bin/cms-validate-themes.js +7 -0
- package/extensions/manifest.schema.json +125 -0
- package/package.json +84 -0
- package/public/img/preloaders/preloader-black.svg +1 -0
- package/public/img/preloaders/preloader-white.svg +1 -0
- package/public/robots.txt +5 -0
- package/scripts/check-overflow.mjs +33 -0
- package/scripts/generate-public-assets.js +401 -0
- package/scripts/patch-lru-cache-tla.js +164 -0
- package/scripts/validate-extensions.mjs +392 -0
- package/scripts/validate-themes.mjs +64 -0
- package/src/App.vue +3 -0
- package/src/components/About.vue +481 -0
- package/src/components/AboutValue.vue +361 -0
- package/src/components/BackToTop.vue +42 -0
- package/src/components/ComingSoon.vue +411 -0
- package/src/components/ComingSoonModal.vue +230 -0
- package/src/components/Contact.vue +518 -0
- package/src/components/Footer.vue +65 -0
- package/src/components/FooterMinimal.vue +153 -0
- package/src/components/Header.vue +583 -0
- package/src/components/Hero.vue +327 -0
- package/src/components/Home.vue +144 -0
- package/src/components/Intro.vue +130 -0
- package/src/components/IntroGate.vue +444 -0
- package/src/components/Plan.vue +116 -0
- package/src/components/Portfolio.vue +459 -0
- package/src/components/Preloader.vue +20 -0
- package/src/components/Principles.vue +67 -0
- package/src/components/Spacer15.vue +9 -0
- package/src/components/Spacer30.vue +9 -0
- package/src/components/Spacer40.vue +9 -0
- package/src/components/Spacer60.vue +9 -0
- package/src/components/StickyCTA.vue +263 -0
- package/src/components/Team.vue +432 -0
- package/src/components/icons/IconLinkedIn.vue +22 -0
- package/src/components/icons/IconX.vue +22 -0
- package/src/components/ui/SbCard.vue +52 -0
- package/src/components/ui/SkeletonPulse.vue +117 -0
- package/src/components/ui/UnitChip.vue +69 -0
- package/src/composables/useComingSoonConfig.js +120 -0
- package/src/composables/useComingSoonInterstitial.js +27 -0
- package/src/composables/useComponentResolver.js +196 -0
- package/src/composables/useEngagementTracking.js +187 -0
- package/src/composables/useIntroGate.js +46 -0
- package/src/composables/useLazyImage.js +77 -0
- package/src/composables/usePageConfig.js +184 -0
- package/src/composables/usePageMeta.js +76 -0
- package/src/composables/usePromoBackgroundStyles.js +67 -0
- package/src/constants/locales.js +20 -0
- package/src/extensions/extensionLoader.js +512 -0
- package/src/main.js +175 -0
- package/src/router/index.js +112 -0
- package/src/styles/base.css +896 -0
- package/src/styles/layout.css +342 -0
- package/src/styles/theme-base.css +84 -0
- package/src/themes/themeLoader.js +124 -0
- package/src/themes/themeManager.js +257 -0
- package/src/themes/themeValidator.js +380 -0
- package/src/utils/analytics.js +100 -0
- package/src/utils/appInfo.js +9 -0
- package/src/utils/assetResolver.js +162 -0
- package/src/utils/componentRegistry.js +46 -0
- package/src/utils/contentRequirements.js +67 -0
- package/src/utils/cookieConsent.js +281 -0
- package/src/utils/ctaCopy.js +58 -0
- package/src/utils/formatNumber.js +115 -0
- package/src/utils/imageSources.js +179 -0
- package/src/utils/inflateFlatConfig.js +30 -0
- package/src/utils/loadConfig.js +271 -0
- package/src/utils/semver.js +49 -0
- package/src/utils/siteStyles.js +40 -0
- package/src/utils/themeColors.js +65 -0
- package/src/utils/trackingContext.js +142 -0
- package/src/utils/unwrapDefault.js +14 -0
- package/src/utils/useScrollReveal.js +48 -0
- package/templates/index.html +36 -0
- package/themes/base/README.md +23 -0
- package/themes/base/theme.config.js +214 -0
- package/vite-plugin.js +637 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { createRouter, createMemoryHistory, createWebHistory, RouterView } from 'vue-router';
|
|
2
|
+
import { h } from 'vue';
|
|
3
|
+
|
|
4
|
+
import Home from '../components/Home.vue';
|
|
5
|
+
|
|
6
|
+
import { SUPPORTED_LOCALES } from '../constants/locales.js';
|
|
7
|
+
|
|
8
|
+
const LocaleLayout = {
|
|
9
|
+
name: 'LocaleLayout',
|
|
10
|
+
render() {
|
|
11
|
+
return h(RouterView);
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const routes = [
|
|
16
|
+
{
|
|
17
|
+
path: '/',
|
|
18
|
+
name: 'Home',
|
|
19
|
+
component: Home,
|
|
20
|
+
props: { pageId: 'home', pagePath: '/' },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
path: `/:locale(${SUPPORTED_LOCALES.join('|')})`,
|
|
24
|
+
component: LocaleLayout,
|
|
25
|
+
children: [
|
|
26
|
+
{
|
|
27
|
+
path: '',
|
|
28
|
+
name: 'HomeLocale',
|
|
29
|
+
component: Home,
|
|
30
|
+
props: (route) => ({ pageId: 'home', pagePath: '/', locale: route.params.locale }),
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
path: ':pathMatch(.*)*',
|
|
34
|
+
name: 'LocaleDynamicPage',
|
|
35
|
+
component: Home,
|
|
36
|
+
props: (route) => {
|
|
37
|
+
const pathMatch = route.params.pathMatch;
|
|
38
|
+
const slugSegments = Array.isArray(pathMatch) ? pathMatch : [pathMatch || ''];
|
|
39
|
+
const rawSlug = `/${slugSegments.filter(Boolean).join('/')}`;
|
|
40
|
+
const normalizedSlug = rawSlug.replace(/\/+/g, '/').replace(/\/$/, '') || '/';
|
|
41
|
+
return { pagePath: normalizedSlug, locale: route.params.locale };
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
path: '/:pathMatch(.*)*',
|
|
48
|
+
name: 'DynamicPage',
|
|
49
|
+
component: Home,
|
|
50
|
+
props: (route) => ({ pagePath: route.path || '/' }),
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
function normalizeLocale(value = '') {
|
|
55
|
+
return value.toLowerCase().split('-')[0];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function applyRouterGuards(router) {
|
|
59
|
+
router.beforeEach((to) => {
|
|
60
|
+
const rawLocale = (to.params.locale || '').toString().trim();
|
|
61
|
+
|
|
62
|
+
if (rawLocale) {
|
|
63
|
+
const normalized = normalizeLocale(rawLocale);
|
|
64
|
+
|
|
65
|
+
if (!SUPPORTED_LOCALES.includes(normalized)) {
|
|
66
|
+
return { path: '/', replace: true };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (rawLocale !== normalized) {
|
|
70
|
+
const rest = to.fullPath.replace(/^\/[a-zA-Z-]{2,5}/, '');
|
|
71
|
+
return { path: `/${normalized}${rest || ''}`.replace(/\/$/, ''), replace: true };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (!import.meta.env.SSR) {
|
|
75
|
+
try {
|
|
76
|
+
document.documentElement.lang = normalized;
|
|
77
|
+
} catch {}
|
|
78
|
+
try {
|
|
79
|
+
localStorage.setItem('locale', normalized);
|
|
80
|
+
} catch {}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (!import.meta.env.SSR) {
|
|
87
|
+
const navLang = (navigator.language || navigator.userLanguage || '').toString();
|
|
88
|
+
const shortLang = normalizeLocale(navLang || '');
|
|
89
|
+
|
|
90
|
+
if (to.path === '/' && SUPPORTED_LOCALES.includes(shortLang)) {
|
|
91
|
+
return { path: `/${shortLang}`, replace: true };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function resolveHistory(base = import.meta.env.BASE_URL) {
|
|
98
|
+
return import.meta.env.SSR ? createMemoryHistory(base) : createWebHistory(base);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function createRouterInstance() {
|
|
102
|
+
const router = createRouter({
|
|
103
|
+
history: resolveHistory(),
|
|
104
|
+
routes,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
applyRouterGuards(router);
|
|
108
|
+
|
|
109
|
+
return router;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export default createRouterInstance;
|