@nebularstreams/statify 3.0.0
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/dist/.DS_Store +0 -0
- package/dist/website.simple/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.eot +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.svg +4649 -0
- package/dist/website.simple/webfonts/fa-solid-900.ttf +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.woff +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/website.simple/website.css +32 -0
- package/dist/website.simple/website.min.js +6 -0
- package/dist/website.software/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/website.software/webfonts/fa-solid-900.eot +0 -0
- package/dist/website.software/webfonts/fa-solid-900.svg +4649 -0
- package/dist/website.software/webfonts/fa-solid-900.ttf +0 -0
- package/dist/website.software/webfonts/fa-solid-900.woff +0 -0
- package/dist/website.software/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/website.software/website.css +32 -0
- package/dist/website.software/website.min.js +6 -0
- package/dist/website.worlds/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.eot +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.svg +4649 -0
- package/dist/website.worlds/webfonts/fa-solid-900.ttf +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.woff +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/website.worlds/website.css +32 -0
- package/dist/website.worlds/website.min.js +6 -0
- package/package.json +49 -0
- package/readme.md +105 -0
- package/src/publisher-lib.js +179 -0
- package/src/publisher-list.js +91 -0
- package/src/publisher.js +38 -0
- package/src/util/cdn/nobj.cdn.js +88 -0
- package/src/util/htmlroute.js +39 -0
- package/src/util/markdown/lib.showdown.icon.js +62 -0
- package/src/util/markdown/lib.showdown.yt.js +54 -0
- package/src/util/markdown/markdown.js +144 -0
- package/src/util/navibar/util.navibar.js +63 -0
- package/src/util/sha.js +20 -0
- package/src/util/tokenizer.js +234 -0
- package/src/util/widgets/NoticeWidget.js +30 -0
- package/src/util/widgets/app.widgets.js +70 -0
- package/src/util/widgets/util.definewidget.js +14 -0
- package/src/widgets/Cookies.js +55 -0
- package/src/widgets/Frameset-simple.js +114 -0
- package/src/widgets/Frameset.js +124 -0
- package/src/widgets/Page.js +356 -0
- package/src/widgets/RightSide.js +93 -0
- package/src/widgets/Snippets.js +75 -0
- package/src/widgets/Tail.js +11 -0
- package/src/widgets/Widgets.js +10 -0
- package/src/widgets.client/Client.js +22 -0
- package/src/widgets.features/FeatureList.js +364 -0
- package/src/widgets.features/Youtube.js +23 -0
- package/src/widgets.features/bootcol.js +29 -0
- package/src/widgets.features/css/feature.css +112 -0
- package/src/widgets.features/css/tail.css +4 -0
- package/src/widgets.howto/Faq.js +201 -0
- package/src/widgets.howto/HowTo.js +419 -0
- package/src/widgets.howto/Tiles.js +51 -0
- package/src/widgets.howto/script-contractable.js +31 -0
- package/src/widgets.markdown/Document.js +84 -0
- package/src/widgets.market/MarketItem.js +278 -0
- package/src/widgets.market/MarketItem.orig.js +268 -0
- package/src/widgets.market/MarketItem.strips.js +276 -0
- package/src/widgets.market/StoryLicenseWIdget.js +45 -0
- package/src/widgets.market/app.utils.js +238 -0
- package/src.website/css/app/animations.css +27 -0
- package/src.website/css/app/ismobile.css +7 -0
- package/src.website/css/app/style.css +51 -0
- package/src.website/css/app/style.fullheight.css +9 -0
- package/src.website/css/app/style.mdblocks.css +59 -0
- package/src.website/css/app/style.putosafari.css +3 -0
- package/src.website/css/bootstrap/bootstrap-tiny-core.css +47 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-columns.css +1276 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-custom.css +59 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-display.css +279 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-flex.css +881 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-fonts.css +39 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-paddings.css +1348 -0
- package/src.website/css/css-core/core.ext.css +65 -0
- package/src.website/css/css-core/frontpage.css +28 -0
- package/src.website/css/css-core/root.css +34 -0
- package/src.website/css/css-core/root.fullheight.css +12 -0
- package/src.website/css/css-core/ui.dialog.round.css +14 -0
- package/src.website/css/css-core/ui.navibar.css +28 -0
- package/src.website/css/css-core/ui.notifications.css +12 -0
- package/src.website/css/css-featurelist/feature.css +196 -0
- package/src.website/css/css-featurelist/tail.css +4 -0
- package/src.website/css/css-screens/doc.css +22 -0
- package/src.website/css/css-screens/screens-meta.css +3 -0
- package/src.website/css/css-unsplash/unsplash.css +32 -0
- package/src.website/css/css-videos/youtube.css +28 -0
- package/src.website/css/css-wiki/wiki.css +206 -0
- package/src.website/css/css-wiki/wiki.sidepane.css +16 -0
- package/src.website/css/fontawesome/fa-brands.css +18 -0
- package/src.website/css/fontawesome/fa-solid.css +16 -0
- package/src.website/css/fontawesome/fa.css +4359 -0
- package/src.website/css/skin/mierda.css +15 -0
- package/src.website/css/skin/skin.dark.css +85 -0
- package/src.website/css/skin/skin.light.css +27 -0
- package/src.website/css/skin/vars.font.css +8 -0
- package/src.website/css/skin/vars.sizes.css +4 -0
- package/src.website/package-lock.json +2160 -0
- package/src.website/package.json +28 -0
- package/src.website/public/webfonts/fa-brands-400.woff2 +0 -0
- package/src.website/public/webfonts/fa-solid-900.eot +0 -0
- package/src.website/public/webfonts/fa-solid-900.svg +4649 -0
- package/src.website/public/webfonts/fa-solid-900.ttf +0 -0
- package/src.website/public/webfonts/fa-solid-900.woff +0 -0
- package/src.website/public/webfonts/fa-solid-900.woff2 +0 -0
- package/src.website/rollup.simple.mjs +36 -0
- package/src.website/rollup.software.mjs +36 -0
- package/src.website/rollup.terser.mjs +24 -0
- package/src.website/rollup.worlds.mjs +36 -0
- package/src.website/src/app/app.style.mjs +36 -0
- package/src.website/src/app/index.mjs +118 -0
- package/src.website/src/config.js +8 -0
- package/src.website/src/core/cdnmodel.mjs +7 -0
- package/src.website/src/core/clientruntime.mjs +41 -0
- package/src.website/src/core.cookies/analytics.mjs +96 -0
- package/src.website/src/core.cookies/cookiemanager.mjs +128 -0
- package/src.website/src/core.cookies/css/cookies.css +80 -0
- package/src.website/src/core.cookies/css/nocookies.css +48 -0
- package/src.website/src/core.extra/css/contractable.css +12 -0
- package/src.website/src/core.extra/css/faq.css +42 -0
- package/src.website/src/core.extra/css/howto.css +81 -0
- package/src.website/src/core.extra/extra.document.mjs +83 -0
- package/src.website/src/core.extra/extra.faq.mjs +30 -0
- package/src.website/src/core.extra/extra.mjs +62 -0
- package/src.website/src/main.simple.mjs +4 -0
- package/src.website/src/main.software.mjs +10 -0
- package/src.website/src/main.worlds.mjs +9 -0
- package/src.website/src/support/ismobile.mjs +4 -0
- package/src.website/src/support/nonce.mjs +4 -0
- package/src.website/src/support/persistsettings.mjs +41 -0
- package/src.website/src/support/qrcode.mjs +1269 -0
- package/src.website/src/support/timeutils.mjs +237 -0
- package/src.website/src/widgets/index.mjs +22 -0
- package/src.website/src.widgets/widgets.market/index.mjs +11 -0
- package/src.website/src.widgets/widgets.market/widgets/market/DiscoverWidget.mjs +401 -0
- package/src.website/src.widgets/widgets.market/widgets/market/EmptyNew.mjs +28 -0
- package/src.website/src.widgets/widgets.market/widgets/market/MarketDetail.mjs +78 -0
- package/src.website/src.widgets/widgets.market/widgets/market/MarketItem.mjs +349 -0
- package/src.website/src.widgets/widgets.market/widgets/market/MarketWidget.mjs +437 -0
- package/src.website/src.widgets/widgets.market/widgets/market/StoryLicenseWidget.mjs +34 -0
- package/src.website/src.widgets/widgets.market/widgets/market/css/market.css +394 -0
- package/src.website/src.widgets/widgets.market/widgets/market/css/notice.css +6 -0
- package/src.website/src.widgets/widgets.market/widgets/navibar/NaviBarWidget.mjs +58 -0
- package/src.website/src.widgets/widgets.market/widgets/navibar/css/titlebar.css +68 -0
- package/src.website/src.widgets/widgets.market/widgets/navibar/css/ui.navibar.css +28 -0
- package/src.website/src.widgets/widgets.software/index.mjs +9 -0
- package/src.website/src.widgets/widgets.software/widgets/BootStrapColumnWidget.mjs +17 -0
- package/src.website/src.widgets/widgets.software/widgets/DownloadWidget.mjs +210 -0
- package/src.website/src.widgets/widgets.software/widgets/LicenseWidget.js +103 -0
- package/src.website/src.widgets/widgets.software/widgets/css/download/download.css +110 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/beta.css +28 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/button.css +30 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/front.css +46 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/licenses.css +13 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/overstate.css +15 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/story.css +8 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/toolbar.css +9 -0
- package/src.website/src.widgets/widgets.software/widgets/support/version.mjs +88 -0
- package/src.website/src.widgets/widgets.worlds/index.mjs +11 -0
- package/src.website/src.widgets/widgets.worlds/widgets/LocalBrowser.mjs +386 -0
- package/src.website/src.widgets/widgets.worlds/widgets/LocalLauncher.code.mjs +247 -0
- package/src.website/src.widgets/widgets.worlds/widgets/LocalLauncher.mjs +239 -0
- package/src.website/src.widgets/widgets.worlds/widgets/css/input.css +32 -0
- package/src.website/src.widgets/widgets.worlds/widgets/css/localprojects.css +188 -0
- package/templates/documentation/assets/docs.css +7 -0
- package/templates/documentation/assets/images/right.webp +0 -0
- package/templates/documentation/images.json +12 -0
- package/templates/documentation/metadata.json +120 -0
- package/templates/documentation/pages/cookies.md +25 -0
- package/templates/documentation/pages/index.md +13 -0
- package/templates/documentation/pages/privacy.md +50 -0
- package/templates/documentation/pages/tos.md +49 -0
- package/templates/landing/assets/res/carousel/image-1.webp +0 -0
- package/templates/landing/assets/res/carousel/image-2.webp +0 -0
- package/templates/landing/assets/res/carousel/image-3.webp +0 -0
- package/templates/landing/assets/res/custom.css +122 -0
- package/templates/landing/assets/res/logos/favicon.ico +0 -0
- package/templates/landing/assets/res/logos/favicon.png +0 -0
- package/templates/landing/assets/res/logos/logo.medallion.png +0 -0
- package/templates/landing/assets/res/logos/logo.white.png +0 -0
- package/templates/landing/assets/res/proj/banda-tech-client.webp +0 -0
- package/templates/landing/assets/res/proj/banda-tech-server.webp +0 -0
- package/templates/landing/assets/res/proj/proj-common-ground.webp +0 -0
- package/templates/landing/assets/res/proj/proj-fieldnote.webp +0 -0
- package/templates/landing/assets/res/proj/proj-tribes.webp +0 -0
- package/templates/landing/images.json +932 -0
- package/templates/landing/metadata.json +115 -0
- package/templates/landing/pages/index.json +268 -0
- package/tool/cli.js +183 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import copy from 'rollup-plugin-copy';
|
|
4
|
+
import postcss from "rollup-plugin-postcss";
|
|
5
|
+
import minifyJavascript from "./rollup.terser.mjs";
|
|
6
|
+
|
|
7
|
+
const COPYRIGHT_BANNER = `/*!
|
|
8
|
+
* Nebular Statify Website - Simple Website
|
|
9
|
+
* Copyright (c) 2026 Nebular Streams
|
|
10
|
+
* All rights reserved.
|
|
11
|
+
*/`;
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
input: 'src/main.simple.mjs',
|
|
15
|
+
output: {
|
|
16
|
+
file: '../dist/website.simple/website.min.js',
|
|
17
|
+
format: 'iife',
|
|
18
|
+
sourcemap: false
|
|
19
|
+
},
|
|
20
|
+
plugins: [
|
|
21
|
+
resolve(),
|
|
22
|
+
commonjs(),
|
|
23
|
+
copy({
|
|
24
|
+
targets: [
|
|
25
|
+
{src: 'public/*', dest: '../dist/website.simple'}
|
|
26
|
+
]
|
|
27
|
+
}),
|
|
28
|
+
postcss({
|
|
29
|
+
extract: "website.css",
|
|
30
|
+
minimize: true, // Minify the CSS
|
|
31
|
+
warning_level: "VERBOSE"
|
|
32
|
+
}),
|
|
33
|
+
|
|
34
|
+
minifyJavascript(COPYRIGHT_BANNER)
|
|
35
|
+
]
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import copy from 'rollup-plugin-copy';
|
|
4
|
+
import postcss from "rollup-plugin-postcss";
|
|
5
|
+
import minifyJavascript from "./rollup.terser.mjs";
|
|
6
|
+
|
|
7
|
+
const COPYRIGHT_BANNER = `/*!
|
|
8
|
+
* Nebular Statify Website - Software Application
|
|
9
|
+
* Copyright (c) 2026 Nebular Streams
|
|
10
|
+
* All rights reserved.
|
|
11
|
+
*/`;
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
input: 'src/main.software.mjs',
|
|
15
|
+
output: {
|
|
16
|
+
file: '../dist/website.software/website.min.js',
|
|
17
|
+
format: 'iife',
|
|
18
|
+
sourcemap: false
|
|
19
|
+
},
|
|
20
|
+
plugins: [
|
|
21
|
+
resolve(),
|
|
22
|
+
commonjs(),
|
|
23
|
+
copy({
|
|
24
|
+
targets: [
|
|
25
|
+
{src: 'public/*', dest: '../dist/website.software'}
|
|
26
|
+
]
|
|
27
|
+
}),
|
|
28
|
+
postcss({
|
|
29
|
+
extract: "website.css",
|
|
30
|
+
minimize: true, // Minify the CSS
|
|
31
|
+
warning_level: "VERBOSE"
|
|
32
|
+
}),
|
|
33
|
+
|
|
34
|
+
minifyJavascript(COPYRIGHT_BANNER)
|
|
35
|
+
]
|
|
36
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { minify } from "terser";
|
|
2
|
+
|
|
3
|
+
export default function minifyJavascript(copyrightBanner) {
|
|
4
|
+
return {
|
|
5
|
+
name: "statify-terser",
|
|
6
|
+
async renderChunk(code) {
|
|
7
|
+
const result = await minify(code, {
|
|
8
|
+
compress: {
|
|
9
|
+
passes: 3,
|
|
10
|
+
drop_console: true,
|
|
11
|
+
drop_debugger: true,
|
|
12
|
+
unsafe: true,
|
|
13
|
+
unsafe_arrows: true,
|
|
14
|
+
unsafe_methods: true
|
|
15
|
+
},
|
|
16
|
+
format: {
|
|
17
|
+
comments: false,
|
|
18
|
+
preamble: copyrightBanner
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return { code: result.code, map: result.map || null };
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import copy from 'rollup-plugin-copy';
|
|
4
|
+
import postcss from "rollup-plugin-postcss";
|
|
5
|
+
import minifyJavascript from "./rollup.terser.mjs";
|
|
6
|
+
|
|
7
|
+
const COPYRIGHT_BANNER = `/*!
|
|
8
|
+
* Nebular Statify Website - Nebular Worlds
|
|
9
|
+
* Copyright (c) 2026 Nebular Streams
|
|
10
|
+
* All rights reserved.
|
|
11
|
+
*/`;
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
input: 'src/main.worlds.mjs',
|
|
15
|
+
output: {
|
|
16
|
+
file: '../dist/website.worlds/website.min.js',
|
|
17
|
+
format: 'iife',
|
|
18
|
+
sourcemap: false
|
|
19
|
+
},
|
|
20
|
+
plugins: [
|
|
21
|
+
resolve(),
|
|
22
|
+
commonjs(),
|
|
23
|
+
copy({
|
|
24
|
+
targets: [
|
|
25
|
+
{src: 'public/*', dest: '../dist/website.worlds'}
|
|
26
|
+
]
|
|
27
|
+
}),
|
|
28
|
+
postcss({
|
|
29
|
+
extract: "website.css",
|
|
30
|
+
minimize: true, // Minify the CSS
|
|
31
|
+
warning_level: "VERBOSE"
|
|
32
|
+
}),
|
|
33
|
+
|
|
34
|
+
minifyJavascript(COPYRIGHT_BANNER)
|
|
35
|
+
]
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
import "../../css/app/animations.css";
|
|
3
|
+
import "../../css/app/ismobile.css";
|
|
4
|
+
import "../../css/app/style.css";
|
|
5
|
+
import "../../css/app/style.fullheight.css";
|
|
6
|
+
import "../../css/app/style.mdblocks.css";
|
|
7
|
+
import "../../css/app/style.putosafari.css";
|
|
8
|
+
|
|
9
|
+
import "../../css/bootstrap/bootstrap-tiny-core.css";
|
|
10
|
+
import "../../css/bootstrap/bootstrap-tiny-media-columns.css";
|
|
11
|
+
import "../../css/bootstrap/bootstrap-tiny-media-flex.css";
|
|
12
|
+
import "../../css/bootstrap/bootstrap-tiny-media-display.css";
|
|
13
|
+
import "../../css/bootstrap/bootstrap-tiny-media-custom.css";
|
|
14
|
+
import "../../css/bootstrap/bootstrap-tiny-media-fonts.css";
|
|
15
|
+
import "../../css/bootstrap/bootstrap-tiny-media-paddings.css";
|
|
16
|
+
|
|
17
|
+
import "../../css/fontawesome/fa.css"
|
|
18
|
+
import "../../css/fontawesome/fa-brands.css"
|
|
19
|
+
import "../../css/fontawesome/fa-solid.css"
|
|
20
|
+
|
|
21
|
+
import "../../css/css-core/core.ext.css";
|
|
22
|
+
import "../../css/css-core/frontpage.css";
|
|
23
|
+
import "../../css/css-core/root.css";
|
|
24
|
+
import "../../css/css-core/root.fullheight.css";
|
|
25
|
+
import "../../css/css-core/ui.dialog.round.css";
|
|
26
|
+
import "../../css/css-core/ui.notifications.css";
|
|
27
|
+
|
|
28
|
+
import "../../css/css-featurelist/feature.css";
|
|
29
|
+
import "../../css/css-featurelist/tail.css";
|
|
30
|
+
|
|
31
|
+
import "../../css/css-screens/screens-meta.css";
|
|
32
|
+
|
|
33
|
+
import "../../css/css-unsplash/unsplash.css";
|
|
34
|
+
import "../../css/css-videos/youtube.css";
|
|
35
|
+
import "../../css/css-wiki/wiki.css";
|
|
36
|
+
import "../../css/css-wiki/wiki.sidepane.css";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import isMobile from "../support/ismobile.mjs";
|
|
2
|
+
import initClient from "../core/clientruntime.mjs";
|
|
3
|
+
import {run} from "../core.cookies/cookiemanager.mjs";
|
|
4
|
+
import {get, set} from "../support/persistsettings.mjs";
|
|
5
|
+
|
|
6
|
+
import "./app.style"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
let
|
|
11
|
+
withSkin = false,
|
|
12
|
+
atTop = false,
|
|
13
|
+
skinState = get("skin");
|
|
14
|
+
|
|
15
|
+
const
|
|
16
|
+
$ = (id) => document.getElementById(id),
|
|
17
|
+
classList = (element) => element.classList,
|
|
18
|
+
documentElementClassList = classList(document.documentElement);
|
|
19
|
+
|
|
20
|
+
function domcontentloaded(doStuff) {
|
|
21
|
+
// add event listener to trigger your function when DOMContentLoaded
|
|
22
|
+
if (document.readyState === "loading") {
|
|
23
|
+
document.addEventListener("DOMContentLoaded", doStuff);
|
|
24
|
+
} else {
|
|
25
|
+
// DOMContentLoaded already loaded, so better trigger your function
|
|
26
|
+
doStuff();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function setSkin(skinState) {
|
|
31
|
+
if (withSkin) {
|
|
32
|
+
documentElementClassList.toggle("dark", !skinState);
|
|
33
|
+
documentElementClassList.toggle("light", !!skinState);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function skinButton(el) {
|
|
38
|
+
|
|
39
|
+
withSkin = !!el;
|
|
40
|
+
if (!el) return;
|
|
41
|
+
|
|
42
|
+
const classes = classList(el.childNodes[0]);
|
|
43
|
+
classes.toggle("fa-sun", !!skinState);
|
|
44
|
+
classes.toggle("fa-moon", !skinState);
|
|
45
|
+
setSkin(skinState);
|
|
46
|
+
|
|
47
|
+
el.addEventListener("click", () => {
|
|
48
|
+
skinState = !skinState;
|
|
49
|
+
set("skin", !!skinState);
|
|
50
|
+
classes.toggle("fa-sun", !!skinState);
|
|
51
|
+
classes.toggle("fa-moon", !skinState);
|
|
52
|
+
setSkin(skinState);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function initScroll() {
|
|
57
|
+
const dom = $("scrolltracker");
|
|
58
|
+
if (dom) {
|
|
59
|
+
dom.addEventListener("scroll", scrollListener, {passive: true});
|
|
60
|
+
classList(document.body).toggle("scrolltop", dom.scrollTop === 0);
|
|
61
|
+
atTop = dom.scrollTop === 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function initCarousels() {
|
|
66
|
+
const carousels = document.getElementsByClassName("item-image-carousel");
|
|
67
|
+
if (!carousels) return;
|
|
68
|
+
for (const carousel of carousels) {
|
|
69
|
+
|
|
70
|
+
const
|
|
71
|
+
total = parseInt(carousel.getAttribute("data-total"), 10) || 0,
|
|
72
|
+
time = parseInt(carousel.getAttribute("data-time"), 10) || 5;
|
|
73
|
+
|
|
74
|
+
if (total > 1) initCarousel(carousel, total, time);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function initCarousel(carousel, total, time) {
|
|
79
|
+
|
|
80
|
+
const
|
|
81
|
+
currentImage = parseInt(carousel.getAttribute("data-index"), 10) || 0,
|
|
82
|
+
nextImage = (currentImage + 1) % total;
|
|
83
|
+
|
|
84
|
+
carousel.setAttribute("data-index", nextImage);
|
|
85
|
+
carousel.setAttribute("data-current", nextImage + 1);
|
|
86
|
+
|
|
87
|
+
for (let i = 0; i < carousel.childNodes.length; i++) {
|
|
88
|
+
classList(carousel.childNodes[i]).toggle("active", i === currentImage);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
setTimeout(() => initCarousel(carousel, total, time), time * 1000)
|
|
92
|
+
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function scrollListener(event) {
|
|
96
|
+
if (event.target.scrollTop === 0 && !atTop) {
|
|
97
|
+
atTop = true;
|
|
98
|
+
classList(document.body).toggle("scrolltop", true)
|
|
99
|
+
} else if (event.target.scrollTop > 0 && atTop) {
|
|
100
|
+
classList(document.body).toggle("scrolltop", false);
|
|
101
|
+
atTop = false;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function bootStrap(...widgets) {
|
|
106
|
+
|
|
107
|
+
setSkin(skinState);
|
|
108
|
+
documentElementClassList.toggle("ismobile", !!isMobile);
|
|
109
|
+
domcontentloaded(() => {
|
|
110
|
+
run();
|
|
111
|
+
skinButton($("skin"));
|
|
112
|
+
initClient(widgets);
|
|
113
|
+
initScroll();
|
|
114
|
+
initCarousels();
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export default bootStrap;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import m from "mithril";
|
|
2
|
+
import Inits from "../core.extra/extra";
|
|
3
|
+
import {install, InstancedWidget} from "../widgets";
|
|
4
|
+
|
|
5
|
+
function initClient(...widgets) {
|
|
6
|
+
|
|
7
|
+
if (Array.isArray(widgets)) widgets.forEach((library)=>install(library));
|
|
8
|
+
|
|
9
|
+
const w = document.getElementsByTagName("widget");
|
|
10
|
+
if (w && w[0]) {
|
|
11
|
+
const data = w[0].getAttribute("data-info");
|
|
12
|
+
if (data) {
|
|
13
|
+
const
|
|
14
|
+
decode = JSON.parse(window.atob(data));
|
|
15
|
+
|
|
16
|
+
if (decode && decode.widget) {
|
|
17
|
+
|
|
18
|
+
const
|
|
19
|
+
initialWidget = InstancedWidget(decode),
|
|
20
|
+
routes = {
|
|
21
|
+
"/": initialWidget,
|
|
22
|
+
"/:subtype": initialWidget
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
if (initialWidget) {
|
|
26
|
+
m.route(w[0], "/", routes);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
Inits.Common();
|
|
33
|
+
|
|
34
|
+
const {WIDGET} = window;
|
|
35
|
+
if (WIDGET && Inits[WIDGET]) {
|
|
36
|
+
window.setTimeout(Inits[WIDGET], 150);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default initClient;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import D from "../config.js"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
if (!window.dataLayer) {
|
|
5
|
+
window.dataLayer = window.dataLayer || [];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const
|
|
9
|
+
TAG = "[Analytics]",
|
|
10
|
+
{dataLayer, location} = window,
|
|
11
|
+
ObjectAssign = Object.assign;
|
|
12
|
+
|
|
13
|
+
let
|
|
14
|
+
mIsInited = false;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
function loadScript(url, callback, doc = document) {
|
|
18
|
+
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
|
|
21
|
+
const
|
|
22
|
+
head = doc.getElementsByTagName("head")[0],
|
|
23
|
+
script = doc.createElement("script");
|
|
24
|
+
|
|
25
|
+
ObjectAssign(script, {
|
|
26
|
+
type: "text/javascript",
|
|
27
|
+
charset: "UTF-8",
|
|
28
|
+
src: url,
|
|
29
|
+
onerror: () => reject(new Error("loading error"))
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// noinspection JSUndefinedPropertyAssignment
|
|
33
|
+
script.onload = script.onreadystatechange = function () {
|
|
34
|
+
if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
|
|
35
|
+
// script successfully loaded
|
|
36
|
+
resolve();
|
|
37
|
+
} else {
|
|
38
|
+
reject(new Error("loading error"));
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
script.onerror = () => reject(new Error("loading error"));
|
|
43
|
+
|
|
44
|
+
head.appendChild(script);
|
|
45
|
+
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function gtag() {
|
|
50
|
+
if (D) console.log(TAG, "push", arguments);
|
|
51
|
+
dataLayer.push(arguments);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function stag(title, options = {}) {
|
|
55
|
+
if (!options.event) {
|
|
56
|
+
gtag("event", "screen_view", {
|
|
57
|
+
"app_name": location.hostname,
|
|
58
|
+
"screen_name": title,
|
|
59
|
+
...(options.props || {})
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
gtag("event", options.event, {
|
|
63
|
+
event_category: "UserAction",
|
|
64
|
+
event_action: options.event,
|
|
65
|
+
event_label: title,
|
|
66
|
+
...(options.props || {})
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
function start(id) {
|
|
74
|
+
|
|
75
|
+
if (mIsInited) return Promise.resolve();
|
|
76
|
+
|
|
77
|
+
mIsInited = true;
|
|
78
|
+
|
|
79
|
+
gtag("js", new Date());
|
|
80
|
+
gtag("config", id);
|
|
81
|
+
gtag("create", id);
|
|
82
|
+
|
|
83
|
+
loadScript(`https://www.googletagmanager.com/gtag/js?id=${id}`)
|
|
84
|
+
.then(() => {
|
|
85
|
+
if (D) console.log(TAG, "Analytics running for", id);
|
|
86
|
+
|
|
87
|
+
})
|
|
88
|
+
.catch((e) => {
|
|
89
|
+
if (D) console.log(TAG, "Analytics blocked", e.message);
|
|
90
|
+
mIsInited = false;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// <script async src="https://www.googletagmanager.com/gtag/js?id=G-YWSF487STG"></script>
|
|
95
|
+
|
|
96
|
+
export {stag, gtag, start};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @author Rodolfo Lopez Pintor <rlp@nebular.tv>
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import "./css/cookies.css";
|
|
8
|
+
|
|
9
|
+
import {get, set} from "../support/persistsettings.mjs"
|
|
10
|
+
|
|
11
|
+
function hasThirdParty() {
|
|
12
|
+
return get("cookies.third");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function hasAnalytics() {
|
|
16
|
+
return get("cookies.anal");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function run(force) {
|
|
20
|
+
|
|
21
|
+
const
|
|
22
|
+
cookies = document.getElementById("cookies"),
|
|
23
|
+
cookies_dialog = document.getElementById("cookies-dialog"),
|
|
24
|
+
cookies_custom = document.getElementById("cookies-custom");
|
|
25
|
+
|
|
26
|
+
if (!cookies) return;
|
|
27
|
+
|
|
28
|
+
const
|
|
29
|
+
window_location = window.location,
|
|
30
|
+
window_setTimeout = window.setTimeout,
|
|
31
|
+
page = (window_location.origin + window_location.pathname)
|
|
32
|
+
.split(SITE.canonical)[1]?.substring(1);
|
|
33
|
+
|
|
34
|
+
if (page && page === SITE.cookiesPage) {
|
|
35
|
+
// cookies page !
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function showMainDialog(stat) {
|
|
40
|
+
cookies.classList.toggle("d-none", !stat);
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function close(saveSettings, useAnalytics, useThidParty) {
|
|
45
|
+
showMainDialog(false);
|
|
46
|
+
set("cookies", saveSettings);
|
|
47
|
+
const
|
|
48
|
+
anal = get("cookies.anal"),
|
|
49
|
+
third = get("cookies.third");
|
|
50
|
+
// eslint-disable-next-line no-use-before-define
|
|
51
|
+
initServices(useAnalytics, useThidParty);
|
|
52
|
+
if (saveSettings && (useAnalytics !== anal || third !== useThidParty)) {
|
|
53
|
+
window_setTimeout(() => window_location.reload(), 50);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function customize(state) {
|
|
58
|
+
cookies_dialog.classList.toggle("d-none", state);
|
|
59
|
+
cookies_custom.classList.toggle("d-none", !state);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const
|
|
63
|
+
actions = {
|
|
64
|
+
customize: () => customize(true),
|
|
65
|
+
accept: () => close(true, true, true),
|
|
66
|
+
"accept-analytics": () => close(true, true, false),
|
|
67
|
+
"accept-thirdparty": () => close(true, false, true),
|
|
68
|
+
reject: () => close(true, false, false)
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
initServices(get("cookies.anal"), get("cookies.third"));
|
|
72
|
+
|
|
73
|
+
if (get("cookies") && !force) {
|
|
74
|
+
showMainDialog(false);
|
|
75
|
+
// eslint-disable-next-line no-use-before-define
|
|
76
|
+
} else {
|
|
77
|
+
showMainDialog(true);
|
|
78
|
+
cookies.addEventListener("click", (e) => {
|
|
79
|
+
const action = e.target.getAttribute("data-action");
|
|
80
|
+
if (actions[action]) actions[action]();
|
|
81
|
+
}, { capture: true });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
document.documentElement.classList.toggle("nocookies", !hasThirdParty());
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function initServices(useAnalytics, useThidParty) {
|
|
89
|
+
|
|
90
|
+
if (useAnalytics && SITE && SITE.analytics) {
|
|
91
|
+
|
|
92
|
+
try {
|
|
93
|
+
const
|
|
94
|
+
[, , startAnalytics] = require("support/statify-v3/land/src/client/util.cookies/analytics.mjs");
|
|
95
|
+
|
|
96
|
+
startAnalytics(SITE.analytics);
|
|
97
|
+
} catch (e) {
|
|
98
|
+
//
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (useThidParty) {
|
|
103
|
+
const iframes = document.getElementsByTagName("iframe");
|
|
104
|
+
for (const iframe of iframes) {
|
|
105
|
+
const dataSrc = iframe.getAttribute("data-src");
|
|
106
|
+
if (dataSrc) {
|
|
107
|
+
iframe.setAttribute("src", dataSrc);
|
|
108
|
+
iframe.removeAttribute("data-src");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
const iframes = document.getElementsByTagName("iframe");
|
|
113
|
+
for (const iframe of iframes) {
|
|
114
|
+
const dataSrc = iframe.getAttribute("data-img");
|
|
115
|
+
if (dataSrc) {
|
|
116
|
+
iframe.parentNode.style.backgroundImage = "url(" + dataSrc + ")";
|
|
117
|
+
iframe.removeAttribute("data-img");
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
set("cookies.anal", useAnalytics);
|
|
122
|
+
set("cookies.third", useThidParty);
|
|
123
|
+
|
|
124
|
+
const d = document.getElementById("showCookies");
|
|
125
|
+
if (d) d.addEventListener("click", () => run(true));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export { run, initServices, hasAnalytics, hasThirdParty };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.cookies-notice, .cookies-custom {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: auto;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
background: black;
|
|
7
|
+
color: white;
|
|
8
|
+
border-top: solid 1px var(--border-color);
|
|
9
|
+
bottom: 0;
|
|
10
|
+
padding: 0 1rem;
|
|
11
|
+
align-items: center;
|
|
12
|
+
transition: all 0.5s ease-in-out;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
div#cookies-custom div {
|
|
16
|
+
font-size: 0.8rem;
|
|
17
|
+
padding-left: 1rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#cookies p {
|
|
21
|
+
user-select: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
#cookies > * {
|
|
25
|
+
user-select: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
#cookies {
|
|
29
|
+
position: fixed;
|
|
30
|
+
top: 0;
|
|
31
|
+
left: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
z-index: 100000000;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
padding: 0 1rem;
|
|
36
|
+
cursor: no-drop;
|
|
37
|
+
background: rgba(0,0,0,0.5);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#cookies:active .cookies-notice, #cookies:active .cookies-custom {
|
|
41
|
+
background: red;
|
|
42
|
+
color: white;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
#cookies a {
|
|
46
|
+
color: var(--accent);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#cookies button.bg-ok {
|
|
50
|
+
background: var(--green);
|
|
51
|
+
color:var(--text-over-accent);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#cookies button.bg-warning {
|
|
55
|
+
background: var(--orange);
|
|
56
|
+
color:var(--text-over-accent);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
#cookies button.bg-error {
|
|
60
|
+
background: var(--red);
|
|
61
|
+
color:var(--text-over-accent);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#cookies button {
|
|
65
|
+
margin: 0.25rem;
|
|
66
|
+
min-width: 2.54rem;
|
|
67
|
+
min-height: 2.54rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
footer.footer.consent button {
|
|
71
|
+
width: 100%;
|
|
72
|
+
padding: 0.5rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
footer.footer.consent {
|
|
76
|
+
background: var(--black);
|
|
77
|
+
border-top: solid 1px var(--border-color);
|
|
78
|
+
padding: 0.5rem;
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
}
|