@olenbetong/appframe-vite 2.2.2 → 2.2.4
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/lib/devServer.js +37 -8
- package/package.json +3 -3
package/lib/devServer.js
CHANGED
|
@@ -64,14 +64,43 @@ export function createHtmlTransformer() {
|
|
|
64
64
|
let isPartner = appPkg.appframe?.article?.hostname === "partner.olenbetong.no";
|
|
65
65
|
let userSession = await getUserSession();
|
|
66
66
|
return html
|
|
67
|
-
.replace("<!-- {Appframe} -->",
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
.replace("<!-- {Appframe} -->", `<script>
|
|
68
|
+
var SkipToConfig = {
|
|
69
|
+
'settings': {
|
|
70
|
+
'skipTo': {
|
|
71
|
+
landmarks: 'main, [role="main"], [role="search"], nav, [role="navigation"], aside, [role="complementary"], section',
|
|
72
|
+
headings: 'main h1, main h2, main h3',
|
|
73
|
+
colorTheme: 'default',
|
|
74
|
+
displayOption: "popup",
|
|
75
|
+
positionLeft: "0",
|
|
76
|
+
buttonLabel: af?.common?.getLocalizedString("Skip to Content") ?? "Hopp til innhold",
|
|
77
|
+
buttonTooltipAccesskey: af?.common?.getLocalizedString('Accesskey is "$key"') ?? "Tastatursnarvei er '$key'",
|
|
78
|
+
menuLabel: af?.common?.getLocalizedString('Landmarks and Headings') ?? "Landemerker og overskrifter",
|
|
79
|
+
landmarkGroupLabel: af?.common?.getLocalizedString('Landmarks') ?? "Landemerker",
|
|
80
|
+
headingGroupLabel: af?.common?.getLocalizedString('Headings') ?? "Overskrifter",
|
|
81
|
+
mofnGroupLabel: af?.common?.getLocalizedString('$m of $n') ?? "$m av $n",
|
|
82
|
+
headingLevelLabel: af?.common?.getLocalizedString('Heading level') ?? "Overskriftsnivå",
|
|
83
|
+
mainLabel: af?.common?.getLocalizedString('main') ?? "main",
|
|
84
|
+
searchLabel: af?.common?.getLocalizedString('search') ?? "søk",
|
|
85
|
+
navLabel: af?.common?.getLocalizedString('navigation') ?? "navigasjon",
|
|
86
|
+
asideLabel: af?.common?.getLocalizedString('aside') ?? "aside",
|
|
87
|
+
footerLabel: af?.common?.getLocalizedString('footer') ?? "footer",
|
|
88
|
+
headerLabel: af?.common?.getLocalizedString('header') ?? "header",
|
|
89
|
+
formLabel: af?.common?.getLocalizedString('form') ?? "skjema",
|
|
90
|
+
msgNoLandmarksFound: af?.common?.getLocalizedString('No landmarks to skip to') ?? "Ingen landemerker å hoppe til",
|
|
91
|
+
msgNoHeadingsFound: af?.common?.getLocalizedString('No main headings to skip to') ?? "Ingen overskrifter å hoppe til"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
</script>
|
|
96
|
+
<script src="/lib/paypal-skipto/downloads/js/skipto.min.js" async></script>
|
|
97
|
+
<script src="/lib/@olenbetong/appframe-core/2.0.2/dist/iife/af.common.js"></script>
|
|
98
|
+
<script src="/lib/@olenbetong/appframe-data/0.2.3/dist/iife/af.data.js"></script>
|
|
99
|
+
<script>
|
|
100
|
+
af = globalThis.af ?? {};
|
|
101
|
+
af.userSession = ${JSON.stringify(userSession)};
|
|
102
|
+
</script>
|
|
103
|
+
<script src="/file/article/static-script/${appframe.article.id}.js"></script>`)
|
|
75
104
|
.replace(`<!-- {Theme} -->`, isPartner
|
|
76
105
|
? ` <link rel="stylesheet" href="/file/site/style/ob.application.min.css" />
|
|
77
106
|
<link rel="stylesheet" href="/file/site/style/ob.theme.base.less" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olenbetong/appframe-vite",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "Tools to use and deploy Vite applications to Appframe",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"author": "Bjørnar Vister Hansen <bvh@olenbetong.no>",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@olenbetong/appframe-data": "^0.2.
|
|
22
|
+
"@olenbetong/appframe-data": "^0.2.3",
|
|
23
23
|
"dotenv": "^16.0.1",
|
|
24
24
|
"rollup-plugin-visualizer": "^5.8.0",
|
|
25
25
|
"vite-plugin-externals": "^0.5.0"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"open": "^8.4.0",
|
|
40
40
|
"tcp-port-used": "^1.0.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "e8336d87d843ac989b1d63e5910e3b8e27e3ba52"
|
|
43
43
|
}
|