@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
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const
|
|
2
|
+
|
|
3
|
+
m = require("mithril"),
|
|
4
|
+
HASH_SEPARATOR = "#",
|
|
5
|
+
{ Empty } = require("../util/widgets/app.widgets"),
|
|
6
|
+
RightSide = require("../widgets/RightSide");
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
view: ({ attrs, state }) => {
|
|
10
|
+
|
|
11
|
+
const
|
|
12
|
+
{ pageMetadata, metadata, cdnModel, source } = attrs,
|
|
13
|
+
{ document, class: contentClass, icon, message } = pageMetadata,
|
|
14
|
+
{ index, html } = document;
|
|
15
|
+
|
|
16
|
+
return [
|
|
17
|
+
m(
|
|
18
|
+
"nav.shadow-2.flexrow.pad-h.d-md-none",
|
|
19
|
+
{ "aria-label": "Table Of Contents Selector" },
|
|
20
|
+
...index
|
|
21
|
+
? [
|
|
22
|
+
m(
|
|
23
|
+
"select.w-100.pad-2.pad-h.unitheightsmall",
|
|
24
|
+
{ id: "selector", style: { fontWeight: "bold" } },
|
|
25
|
+
index.map(({ level, text, id }) => m("option", {
|
|
26
|
+
class: "level" + level,
|
|
27
|
+
value: id
|
|
28
|
+
}, text))
|
|
29
|
+
)
|
|
30
|
+
] : []
|
|
31
|
+
),
|
|
32
|
+
|
|
33
|
+
m(
|
|
34
|
+
"article.widget.wiki.flexrow.grows.ohidden.markdown",
|
|
35
|
+
html
|
|
36
|
+
? [
|
|
37
|
+
m(
|
|
38
|
+
"nav.sidepane.flexcol.noshrink.scrolly.d-none.d-md-flex",
|
|
39
|
+
{
|
|
40
|
+
"aria-label": "Table Of Contents"
|
|
41
|
+
},
|
|
42
|
+
[
|
|
43
|
+
...index
|
|
44
|
+
? index
|
|
45
|
+
.map(({ level, text, id }) => m(
|
|
46
|
+
"a.pointer.pad-2",
|
|
47
|
+
{
|
|
48
|
+
id: "link-" + id,
|
|
49
|
+
href: `${HASH_SEPARATOR}${id}`,
|
|
50
|
+
class: "level" + level
|
|
51
|
+
},
|
|
52
|
+
m.trust(text)
|
|
53
|
+
))
|
|
54
|
+
: []
|
|
55
|
+
]
|
|
56
|
+
),
|
|
57
|
+
m(
|
|
58
|
+
"section.relative.content.scrolly.grows.pad-4.pad-h.flexcol",
|
|
59
|
+
{
|
|
60
|
+
"aria-label": "Main Article Body",
|
|
61
|
+
class: contentClass || ""
|
|
62
|
+
},
|
|
63
|
+
m.trust(html)
|
|
64
|
+
),
|
|
65
|
+
m(RightSide, {
|
|
66
|
+
cdnModel,
|
|
67
|
+
source,
|
|
68
|
+
class: "grows d-none d-xl-flex",
|
|
69
|
+
ncsdom: metadata.site.domain,
|
|
70
|
+
site: metadata.site
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
: [
|
|
74
|
+
m(Empty, {
|
|
75
|
+
role: "presentation",
|
|
76
|
+
size: 4,
|
|
77
|
+
icon: state.loading ? "sync.fa-spin" : (icon || "file"),
|
|
78
|
+
message: state.loading ? "" : (message || "No document loaded")
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
)
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
};
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
const
|
|
2
|
+
m = require("mithril"),
|
|
3
|
+
{ Button, Icon } = require("../util/widgets/app.widgets"),
|
|
4
|
+
defineWidget = require("../util/widgets/util.definewidget"),
|
|
5
|
+
{ YouTube } = require("../widgets.features/Youtube"),
|
|
6
|
+
StoryLicenseWidget = require("./StoryLicenseWIdget");
|
|
7
|
+
|
|
8
|
+
const
|
|
9
|
+
|
|
10
|
+
Attributions = defineWidget(
|
|
11
|
+
({ attrs }) => {
|
|
12
|
+
|
|
13
|
+
const
|
|
14
|
+
{ attributions } = attrs,
|
|
15
|
+
sources = {};
|
|
16
|
+
|
|
17
|
+
attributions.reduce((all, item) => {
|
|
18
|
+
sources[item.source] = true;
|
|
19
|
+
return all;
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return [
|
|
23
|
+
m(
|
|
24
|
+
".flexcol.attribution.pad-3.pad-v.bg-accent-hi",
|
|
25
|
+
m("h2", "Content Attribution"),
|
|
26
|
+
m("div", "Template references or includes resources from " + (Object.keys(sources)
|
|
27
|
+
.join(", ")))
|
|
28
|
+
),
|
|
29
|
+
m(StoryLicenseWidget, { attributions })
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
|
|
34
|
+
Strip = defineWidget(
|
|
35
|
+
({ attrs }) => {
|
|
36
|
+
const
|
|
37
|
+
{
|
|
38
|
+
entityPath, item, scenes, max, state, label, itemType = "Scene"
|
|
39
|
+
} = attrs,
|
|
40
|
+
{ id_channel, type, id } = item;
|
|
41
|
+
|
|
42
|
+
return m(
|
|
43
|
+
"ul.scenesel.flexrow" + (attrs.class || ""),
|
|
44
|
+
{
|
|
45
|
+
class: max > 5 ? "wrap" : "",
|
|
46
|
+
"aria-label": label || "List of Items"
|
|
47
|
+
},
|
|
48
|
+
scenes.map(
|
|
49
|
+
({ title, image }, index) => (
|
|
50
|
+
index < max
|
|
51
|
+
? m(
|
|
52
|
+
"li.thumbnail.flexcol",
|
|
53
|
+
{
|
|
54
|
+
title: title || (itemType + " " + index),
|
|
55
|
+
class: state.image === image ? "current" : "",
|
|
56
|
+
"data-type": itemType,
|
|
57
|
+
"data-title": title
|
|
58
|
+
? title.split("-")
|
|
59
|
+
.join(" ")
|
|
60
|
+
: (itemType + " " + index)
|
|
61
|
+
},
|
|
62
|
+
m("img", {
|
|
63
|
+
class: "errorimage",
|
|
64
|
+
src: entityPath(id_channel, type, id, image),
|
|
65
|
+
alt: itemType + " " + title
|
|
66
|
+
})
|
|
67
|
+
)
|
|
68
|
+
: m(".d-none", { role: "presentation" }))
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
|
|
74
|
+
TemplateItem = defineWidget(
|
|
75
|
+
({ attrs, state }) => {
|
|
76
|
+
|
|
77
|
+
const
|
|
78
|
+
ICONS = {
|
|
79
|
+
template: "star",
|
|
80
|
+
facekit: "theater-masks",
|
|
81
|
+
room: "border-all",
|
|
82
|
+
library: "cubes"
|
|
83
|
+
},
|
|
84
|
+
{ item, all, scenes, templates, maximized, featured, cdnModel } = attrs,
|
|
85
|
+
{ channel } = cdnModel,
|
|
86
|
+
{ entityPath, path } = channel,
|
|
87
|
+
{ ext, id_channel, type, id, creationTime, meta } = item,
|
|
88
|
+
{ title = id, description = "legacy story", ytref, image } = (meta || {}),
|
|
89
|
+
{ icon = ICONS[type] } = ext,
|
|
90
|
+
imageEntity = image || entityPath(id_channel, type, id, state.image || "logo.jpg");
|
|
91
|
+
|
|
92
|
+
return m(
|
|
93
|
+
"li.templateitem.flexcol.pointer.grows.ohidden",
|
|
94
|
+
{
|
|
95
|
+
class: attrs.class,
|
|
96
|
+
"aria-label": title
|
|
97
|
+
},
|
|
98
|
+
m(
|
|
99
|
+
".inner.flexcol.pointer.bg-window-hi.relative",
|
|
100
|
+
{ class: attrs.innerClass },
|
|
101
|
+
[
|
|
102
|
+
...ytref
|
|
103
|
+
? [
|
|
104
|
+
m(YouTube, { class: "", videoItem: { ref: ytref } })
|
|
105
|
+
]
|
|
106
|
+
: [
|
|
107
|
+
m(
|
|
108
|
+
".image.divimage.relative.img169.coverimage",
|
|
109
|
+
{
|
|
110
|
+
class: attrs.imageClass || "asp169",
|
|
111
|
+
style: {
|
|
112
|
+
backgroundImage: "url(" + imageEntity + ")"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
],
|
|
117
|
+
|
|
118
|
+
m(".flexrow.pad-2.titlestrip", [
|
|
119
|
+
m(Icon, {
|
|
120
|
+
icon,
|
|
121
|
+
size: 2,
|
|
122
|
+
iconClass: "unitsize"
|
|
123
|
+
}),
|
|
124
|
+
m(".flexcol.grows.flex-place-center.ohidden", [
|
|
125
|
+
m(".title", title),
|
|
126
|
+
m("h6.diffdate", { "data-timems": creationTime }, `By ${id_channel}`)
|
|
127
|
+
]),
|
|
128
|
+
|
|
129
|
+
m(".unitsize.image.avatar.noshrink", {
|
|
130
|
+
style: { backgroundImage: "url(" + path(id_channel, "logo.jpg") + ")" },
|
|
131
|
+
title: id_channel
|
|
132
|
+
})
|
|
133
|
+
]),
|
|
134
|
+
|
|
135
|
+
...(maximized || featured) && description
|
|
136
|
+
? [
|
|
137
|
+
m(".descriptionstrip", description)
|
|
138
|
+
] : [],
|
|
139
|
+
|
|
140
|
+
(ext.scenes || state.has)
|
|
141
|
+
? [
|
|
142
|
+
m(".flexrow.marg-2", [
|
|
143
|
+
...ext.scenes
|
|
144
|
+
? [
|
|
145
|
+
m(
|
|
146
|
+
".unitheightsmall.metric.fa-object-ungroup.grows.al-center",
|
|
147
|
+
{
|
|
148
|
+
title: "Scenes contained in the template",
|
|
149
|
+
"data-metric": "scenes",
|
|
150
|
+
"data-num": String(ext.scenes.length)
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
] : [],
|
|
154
|
+
|
|
155
|
+
...state.has
|
|
156
|
+
? [
|
|
157
|
+
m(
|
|
158
|
+
".unitheightsmall.metric.fa-object-group.grows.al-center",
|
|
159
|
+
{
|
|
160
|
+
title: "Template Scenes contained in the template",
|
|
161
|
+
"data-metric": "templates",
|
|
162
|
+
"data-num": String(ext.templates.length)
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] : []
|
|
166
|
+
]),
|
|
167
|
+
|
|
168
|
+
...(all || templates) && ext.templates && ext.templates.length >= 2
|
|
169
|
+
? [m(Strip, {
|
|
170
|
+
class: ".templates", entityPath, itemType: "Scene Template", item, scenes: ext.templates, max: 64, state, label: "List of Templates"
|
|
171
|
+
})]
|
|
172
|
+
: [],
|
|
173
|
+
|
|
174
|
+
...(all || scenes) && ext.scenes && ext.scenes.length >= 2
|
|
175
|
+
? [m(Strip, {
|
|
176
|
+
class: ".scenes", entityPath, itemType: "Scene", item,
|
|
177
|
+
scenes: ext.scenes, max: 64, state, label: "List of Scenes"
|
|
178
|
+
})]
|
|
179
|
+
: []
|
|
180
|
+
]
|
|
181
|
+
: []
|
|
182
|
+
|
|
183
|
+
]
|
|
184
|
+
)
|
|
185
|
+
);
|
|
186
|
+
},
|
|
187
|
+
({ attrs, state }) => {
|
|
188
|
+
const { templates = [] } = attrs.item.ext;
|
|
189
|
+
Object.assign(state, {
|
|
190
|
+
ytref: attrs.item.ytref || null,
|
|
191
|
+
images: templates.map((t) => t.image),
|
|
192
|
+
has: templates.length,
|
|
193
|
+
index: 0
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
if (state.images.length === 1) {
|
|
197
|
+
delete state.images;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
|
|
202
|
+
TemplateInstall = defineWidget(
|
|
203
|
+
({ attrs, state }) => {
|
|
204
|
+
|
|
205
|
+
const
|
|
206
|
+
{ item, cdnModel, pageMetadata } = attrs,
|
|
207
|
+
{ ext } = item,
|
|
208
|
+
all = true;
|
|
209
|
+
|
|
210
|
+
return m(".marketdetail.flexrow.wrap.flex-lg-grows.h-100.fadein.flex-lg-row.scrolly", { role: "presentation" }, [
|
|
211
|
+
|
|
212
|
+
m(
|
|
213
|
+
".flexcol.maxcontainer.ohidden.col-12.col-lg-8.col-xl-6",
|
|
214
|
+
{ role: "presentation" },
|
|
215
|
+
m(TemplateItem, {
|
|
216
|
+
...all ? { templates: 10000, scenes: 10000 } : state.templates ? { templates: 10000 } : { scenes: 10000 },
|
|
217
|
+
item,
|
|
218
|
+
cdnModel,
|
|
219
|
+
class: "pad-2 w-100 max",
|
|
220
|
+
imageClass: "grows",
|
|
221
|
+
showattrib: false,
|
|
222
|
+
maximized: true,
|
|
223
|
+
onView: (what) => {
|
|
224
|
+
if (what === "templates" && !state.templates) {
|
|
225
|
+
state.templates = true;
|
|
226
|
+
m.redraw();
|
|
227
|
+
} else if (what === "scenes" && state.templates) {
|
|
228
|
+
state.templates = false;
|
|
229
|
+
m.redraw();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
})
|
|
233
|
+
),
|
|
234
|
+
m(".flexcol.pad-2.col-lg-4.col-xl-6", { role: "presentation" }, [
|
|
235
|
+
m(".flexcol.col-12.howto", [
|
|
236
|
+
|
|
237
|
+
m(".flexrow.w-100.buttoncontainer.no-mobile", [
|
|
238
|
+
m(Button, {
|
|
239
|
+
link: ext.url,
|
|
240
|
+
target: "_blank",
|
|
241
|
+
download: ext.url.substring(ext.url.lastIndexOf("/") + 1),
|
|
242
|
+
icon: "download",
|
|
243
|
+
text: "Download Bundle",
|
|
244
|
+
class: "button-accent grows unitheight"
|
|
245
|
+
})
|
|
246
|
+
]),
|
|
247
|
+
m("h2", "How to install Obscene Studio " + pageMetadata.title + "?"),
|
|
248
|
+
m("ol", { "aria-label": "How to install Downloaded Obscene Studio " + pageMetadata.title }, [
|
|
249
|
+
m("li.pad-2.pad-v.no-mobile", "Download the Bundle to your computer"),
|
|
250
|
+
m("li.pad-2.pad-v.no-desktop", "Visit this page from a computer and download the Package"),
|
|
251
|
+
m("li.pad-2.pad-v", "Drag and drop the file just downloaded from your Downloads folder into the running Obscene Studio Application"),
|
|
252
|
+
m("li.pad-2.pad-v", "The list of " + pageMetadata.title + " in Obscene Studio will show the new item. It is ready to use !")
|
|
253
|
+
]),
|
|
254
|
+
|
|
255
|
+
m(
|
|
256
|
+
"a",
|
|
257
|
+
{ class: "pad-2 pad-v", target: "manual", href: "/doc/manual/app-storyboard-create.html#installing-a-new-template" },
|
|
258
|
+
"Check out Obscene Studio Manual for further instructions"
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
]),
|
|
262
|
+
...(ext.attributions && ext.attributions.length)
|
|
263
|
+
? [
|
|
264
|
+
m(".flexcol.grows-col-12.attrib", [
|
|
265
|
+
m(Attributions, { attributions: ext.attributions })
|
|
266
|
+
])
|
|
267
|
+
] : []
|
|
268
|
+
])
|
|
269
|
+
]);
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
|
|
273
|
+
const
|
|
274
|
+
TemplateInstallDynamic = defineWidget(
|
|
275
|
+
({ attrs }) => m(TemplateInstall, { cdnModel: attrs.cdnModel, item: attrs.dynamicData.item, pageMetadata: attrs.pageMetadata })
|
|
276
|
+
);
|
|
277
|
+
|
|
278
|
+
module.exports = TemplateInstallDynamic;
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
const
|
|
2
|
+
m = require("mithril"),
|
|
3
|
+
{ Button, Icon } = require("../util/widgets/app.widgets"),
|
|
4
|
+
defineWidget = require("../util/widgets/util.definewidget"),
|
|
5
|
+
{ YouTube } = require("../widgets.features/Youtube"),
|
|
6
|
+
StoryLicenseWidget = require("./StoryLicenseWIdget");
|
|
7
|
+
|
|
8
|
+
const
|
|
9
|
+
|
|
10
|
+
Attributions = defineWidget(
|
|
11
|
+
({ attrs }) => {
|
|
12
|
+
|
|
13
|
+
const
|
|
14
|
+
{ attributions } = attrs,
|
|
15
|
+
sources = {};
|
|
16
|
+
|
|
17
|
+
attributions.reduce((all, item) => {
|
|
18
|
+
sources[item.source] = true;
|
|
19
|
+
return all;
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return [
|
|
23
|
+
m(
|
|
24
|
+
".flexcol.attribution.pad-3.pad-v.bg-accent-hi",
|
|
25
|
+
m("h2", "Content Attribution"),
|
|
26
|
+
m("div", "Template references or includes resources from " + (Object.keys(sources)
|
|
27
|
+
.join(", ")))
|
|
28
|
+
),
|
|
29
|
+
m(StoryLicenseWidget, { attributions })
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
|
|
34
|
+
Strip = defineWidget(
|
|
35
|
+
({ attrs }) => {
|
|
36
|
+
const
|
|
37
|
+
{
|
|
38
|
+
entityPath, item, scenes, max, state, label, itemType = "Scene"
|
|
39
|
+
} = attrs,
|
|
40
|
+
{ id_channel, type, id } = item;
|
|
41
|
+
|
|
42
|
+
return m(
|
|
43
|
+
"ul.scenesel.flexrow",
|
|
44
|
+
{
|
|
45
|
+
class: max > 5 ? "wrap" : "",
|
|
46
|
+
"aria-label": label || "List of Items"
|
|
47
|
+
},
|
|
48
|
+
scenes.map(
|
|
49
|
+
({ title, image }, index) => (
|
|
50
|
+
index < max
|
|
51
|
+
? m(
|
|
52
|
+
"li.thumbnail.flexcol",
|
|
53
|
+
{
|
|
54
|
+
title: title || (itemType + " " + index),
|
|
55
|
+
class: state.image === image ? "current" : "",
|
|
56
|
+
"data-type": itemType,
|
|
57
|
+
"data-title": title
|
|
58
|
+
? title.split("-")
|
|
59
|
+
.join(" ")
|
|
60
|
+
: (itemType + " " + index)
|
|
61
|
+
},
|
|
62
|
+
m("img", {
|
|
63
|
+
class: "errorimage",
|
|
64
|
+
src: entityPath(id_channel, type, id, image),
|
|
65
|
+
alt: itemType + " " + title
|
|
66
|
+
})
|
|
67
|
+
)
|
|
68
|
+
: m(".d-none", { role: "presentation" }))
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
|
|
74
|
+
TemplateItem = defineWidget(
|
|
75
|
+
({ attrs, state }) => {
|
|
76
|
+
|
|
77
|
+
const
|
|
78
|
+
ICONS = {
|
|
79
|
+
template: "star",
|
|
80
|
+
facekit: "theater-masks",
|
|
81
|
+
room: "border-all"
|
|
82
|
+
},
|
|
83
|
+
{ item, scenes, templates, maximized, featured, cdnModel } = attrs,
|
|
84
|
+
{ channel } = cdnModel,
|
|
85
|
+
{ entityPath, path } = channel,
|
|
86
|
+
{ ext, id_channel, type, id, creationTime, meta } = item,
|
|
87
|
+
{ title = id, description = "legacy story", ytref, image } = (meta || {}),
|
|
88
|
+
{ icon = ICONS[type] } = ext,
|
|
89
|
+
imageEntity = image || entityPath(id_channel, type, id, state.image || "logo.jpg");
|
|
90
|
+
|
|
91
|
+
return m(
|
|
92
|
+
"li.templateitem.flexcol.pointer.grows.ohidden",
|
|
93
|
+
{
|
|
94
|
+
class: attrs.class,
|
|
95
|
+
"aria-label": title
|
|
96
|
+
},
|
|
97
|
+
m(
|
|
98
|
+
".inner.flexcol.pointer.bg-window-hi.relative",
|
|
99
|
+
{ class: attrs.innerClass },
|
|
100
|
+
[
|
|
101
|
+
...ytref
|
|
102
|
+
? [
|
|
103
|
+
m(YouTube, { class: "", videoItem: { ref: ytref } })
|
|
104
|
+
]
|
|
105
|
+
: [
|
|
106
|
+
m(
|
|
107
|
+
".image.divimage.relative.img169.coverimage",
|
|
108
|
+
{
|
|
109
|
+
class: attrs.imageClass || "asp169",
|
|
110
|
+
style: {
|
|
111
|
+
backgroundImage: "url(" + imageEntity + ")"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
],
|
|
116
|
+
|
|
117
|
+
m(".flexrow.pad-2.titlestrip", [
|
|
118
|
+
m(Icon, {
|
|
119
|
+
icon,
|
|
120
|
+
size: 2,
|
|
121
|
+
iconClass: "unitsize"
|
|
122
|
+
}),
|
|
123
|
+
m(".flexcol.grows.flex-place-center.ohidden", [
|
|
124
|
+
m(".title", title),
|
|
125
|
+
m("h6.diffdate", { "data-timems": creationTime }, `By ${id_channel}`)
|
|
126
|
+
]),
|
|
127
|
+
|
|
128
|
+
m(".unitsize.image.avatar.noshrink", {
|
|
129
|
+
style: { backgroundImage: "url(" + path(id_channel, "logo.jpg") + ")" },
|
|
130
|
+
title: id_channel
|
|
131
|
+
})
|
|
132
|
+
]),
|
|
133
|
+
|
|
134
|
+
...(maximized || featured) && description
|
|
135
|
+
? [
|
|
136
|
+
m(".descriptionstrip", description)
|
|
137
|
+
] : [],
|
|
138
|
+
|
|
139
|
+
(ext.scenes || state.has)
|
|
140
|
+
? [
|
|
141
|
+
m(".flexrow.marg-2", [
|
|
142
|
+
...ext.scenes
|
|
143
|
+
? [
|
|
144
|
+
m(
|
|
145
|
+
".unitheightsmall.metric.fa-object-ungroup.grows.al-center",
|
|
146
|
+
{
|
|
147
|
+
title: "Scenes contained in the template",
|
|
148
|
+
"data-metric": "scenes",
|
|
149
|
+
"data-num": String(ext.scenes.length)
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
] : [],
|
|
153
|
+
|
|
154
|
+
...state.has
|
|
155
|
+
? [
|
|
156
|
+
m(
|
|
157
|
+
".unitheightsmall.metric.fa-object-group.grows.al-center",
|
|
158
|
+
{
|
|
159
|
+
title: "Template Scenes contained in the template",
|
|
160
|
+
"data-metric": "templates",
|
|
161
|
+
"data-num": String(ext.templates.length)
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
] : []
|
|
165
|
+
]),
|
|
166
|
+
...templates && ext.templates && ext.templates.length >= 3
|
|
167
|
+
? [m(Strip, { entityPath, itemType: "Scene Template", item, scenes: ext.templates, max: 3, state, label: "List of Templates" })]
|
|
168
|
+
: scenes && ext.scenes && ext.scenes.length >= 3
|
|
169
|
+
? [m(Strip, { entityPath, itemType: "Scene", item, scenes: ext.scenes, max: 3, state, label: "List of Scenes" })]
|
|
170
|
+
: []
|
|
171
|
+
]
|
|
172
|
+
: []
|
|
173
|
+
|
|
174
|
+
]
|
|
175
|
+
)
|
|
176
|
+
);
|
|
177
|
+
},
|
|
178
|
+
({ attrs, state }) => {
|
|
179
|
+
const { templates = [] } = attrs.item.ext;
|
|
180
|
+
Object.assign(state, {
|
|
181
|
+
ytref: attrs.item.ytref || null,
|
|
182
|
+
images: templates.map((t) => t.image),
|
|
183
|
+
has: templates.length,
|
|
184
|
+
index: 0
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
if (state.images.length === 1) {
|
|
188
|
+
delete state.images;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
|
|
193
|
+
TemplateInstall = defineWidget(
|
|
194
|
+
({ attrs, state }) => {
|
|
195
|
+
|
|
196
|
+
const
|
|
197
|
+
{ item, cdnModel, pageMetadata } = attrs,
|
|
198
|
+
{ ext } = item;
|
|
199
|
+
|
|
200
|
+
return m(".marketdetail.flexrow.wrap.flex-lg-grows.h-100.fadein.flex-lg-row.scrolly", { role: "presentation" }, [
|
|
201
|
+
|
|
202
|
+
m(
|
|
203
|
+
".flexcol.maxcontainer.ohidden.col-12.col-lg-8.col-xl-6",
|
|
204
|
+
{ role: "presentation" },
|
|
205
|
+
m(TemplateItem, {
|
|
206
|
+
...state.templates ? { templates: 10000 } : { scenes: 10000 },
|
|
207
|
+
item,
|
|
208
|
+
cdnModel,
|
|
209
|
+
class: "pad-2 w-100 max",
|
|
210
|
+
imageClass: "grows",
|
|
211
|
+
showattrib: false,
|
|
212
|
+
maximized: true,
|
|
213
|
+
onView: (what) => {
|
|
214
|
+
if (what === "templates" && !state.templates) {
|
|
215
|
+
state.templates = true;
|
|
216
|
+
m.redraw();
|
|
217
|
+
} else if (what === "scenes" && state.templates) {
|
|
218
|
+
state.templates = false;
|
|
219
|
+
m.redraw();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
})
|
|
223
|
+
),
|
|
224
|
+
m(".flexcol.pad-2.col-lg-4.col-xl-6", { role: "presentation" }, [
|
|
225
|
+
m(".flexcol.col-12.howto", [
|
|
226
|
+
|
|
227
|
+
m(".flexrow.w-100.buttoncontainer.no-mobile", [
|
|
228
|
+
m(Button, {
|
|
229
|
+
link: ext.url,
|
|
230
|
+
target: "_blank",
|
|
231
|
+
download: ext.url.substring(ext.url.lastIndexOf("/") + 1),
|
|
232
|
+
icon: "download",
|
|
233
|
+
text: "Download Bundle",
|
|
234
|
+
class: "button-accent grows unitheight"
|
|
235
|
+
})
|
|
236
|
+
]),
|
|
237
|
+
m("h2", "How to install Obscene Studio " + pageMetadata.title + "?"),
|
|
238
|
+
m("ol", { "aria-label": "How to install Downloaded Obscene Studio " + pageMetadata.title }, [
|
|
239
|
+
m("li.pad-2.pad-v.no-mobile", "Download the Bundle to your computer"),
|
|
240
|
+
m("li.pad-2.pad-v.no-desktop", "Visit this page from a computer and download the Package"),
|
|
241
|
+
m("li.pad-2.pad-v", "Drag and drop the file just downloaded from your Downloads folder into the running Obscene Studio Application"),
|
|
242
|
+
m("li.pad-2.pad-v", "The list of " + pageMetadata.title + " in Obscene Studio will show the new item. It is ready to use !")
|
|
243
|
+
]),
|
|
244
|
+
|
|
245
|
+
m(
|
|
246
|
+
"a",
|
|
247
|
+
{ class: "pad-2 pad-v", target: "manual", href: "/doc/manual/app-storyboard-create.html#installing-a-new-template" },
|
|
248
|
+
"Check out Obscene Studio Manual for further instructions"
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
]),
|
|
252
|
+
...(ext.attributions && ext.attributions.length)
|
|
253
|
+
? [
|
|
254
|
+
m(".flexcol.grows-col-12.attrib", [
|
|
255
|
+
m(Attributions, { attributions: ext.attributions })
|
|
256
|
+
])
|
|
257
|
+
] : []
|
|
258
|
+
])
|
|
259
|
+
]);
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
const
|
|
264
|
+
TemplateInstallDynamic = defineWidget(
|
|
265
|
+
({ attrs }) => m(TemplateInstall, { cdnModel: attrs.cdnModel, item: attrs.dynamicData.item, pageMetadata: attrs.pageMetadata })
|
|
266
|
+
);
|
|
267
|
+
|
|
268
|
+
module.exports = TemplateInstallDynamic;
|