@mindful-web/marko-web-theme-monorail-magazine 1.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/.eslintignore +1 -0
- package/LICENSE +21 -0
- package/README.md +4 -0
- package/components/blocks/magazine-archived-issue.marko +23 -0
- package/components/blocks/magazine-archived-issue.marko.js +58 -0
- package/components/blocks/magazine-current-issue.marko +43 -0
- package/components/blocks/magazine-current-issue.marko.js +120 -0
- package/components/blocks/magazine-issue-cards.marko +33 -0
- package/components/blocks/magazine-issue-cards.marko.js +95 -0
- package/components/blocks/magazine-issues.marko +53 -0
- package/components/blocks/magazine-issues.marko.js +152 -0
- package/components/blocks/magazine-latest-issue.marko +34 -0
- package/components/blocks/magazine-latest-issue.marko.js +97 -0
- package/components/blocks/magazine-publication-card.marko +36 -0
- package/components/blocks/magazine-publication-card.marko.js +125 -0
- package/components/blocks/magazine-publications.marko +22 -0
- package/components/blocks/magazine-publications.marko.js +88 -0
- package/components/blocks/marko.json +23 -0
- package/components/flows/magazine-issue-archive.marko +12 -0
- package/components/flows/magazine-issue-archive.marko.js +55 -0
- package/components/flows/magazine-latest-issue.marko +22 -0
- package/components/flows/magazine-latest-issue.marko.js +69 -0
- package/components/flows/marko.json +21 -0
- package/components/marko.json +13 -0
- package/components/nodes/magazine-issue-archive.marko +29 -0
- package/components/nodes/magazine-issue-archive.marko.js +78 -0
- package/components/nodes/magazine-latest-issue.marko +33 -0
- package/components/nodes/magazine-latest-issue.marko.js +76 -0
- package/components/nodes/marko.json +21 -0
- package/components/publication-buttons.marko +61 -0
- package/components/publication-buttons.marko.js +176 -0
- package/components/publication-links.marko +61 -0
- package/components/publication-links.marko.js +176 -0
- package/graphql/fragments/issue-archive.js +19 -0
- package/graphql/fragments/latest-issue.js +28 -0
- package/graphql/fragments/magazine-content-feed-block.js +33 -0
- package/graphql/fragments/magazine-issue-archive.js +19 -0
- package/graphql/fragments/magazine-issue-page.js +31 -0
- package/graphql/fragments/magazine-latest-issue.js +30 -0
- package/graphql/fragments/magazine-publication-list.js +11 -0
- package/graphql/fragments/magazine-publication-page.js +12 -0
- package/graphql/fragments/section-feed-block.js +33 -0
- package/index.js +0 -0
- package/marko.json +5 -0
- package/package.json +34 -0
- package/routes/index.js +22 -0
- package/scss/index.scss +241 -0
- package/templates/index.marko +28 -0
- package/templates/index.marko.js +98 -0
- package/templates/issue.marko +96 -0
- package/templates/issue.marko.js +279 -0
- package/templates/publication.marko +61 -0
- package/templates/publication.marko.js +189 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/blocks/magazine-latest-issue.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
9
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
10
|
+
module_utils_module = require("@mindful-web/marko-web/utils"),
|
|
11
|
+
utils_module = module_utils_module.default || module_utils_module,
|
|
12
|
+
defaultValue = module_utils_module.defaultValue,
|
|
13
|
+
marko_web_magazine_issue_name_template = require("@mindful-web/marko-web/components/element/magazine-issue/name.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_magazine_issue_name_tag = marko_loadTag(marko_web_magazine_issue_name_template),
|
|
16
|
+
theme_magazine_publication_buttons_template = require("../publication-buttons.marko"),
|
|
17
|
+
theme_magazine_publication_buttons_tag = marko_loadTag(theme_magazine_publication_buttons_template),
|
|
18
|
+
marko_web_node_template = require("@mindful-web/marko-web/components/node/index.marko"),
|
|
19
|
+
marko_web_node_tag = marko_loadTag(marko_web_node_template);
|
|
20
|
+
|
|
21
|
+
function render(input, out, __component, component, state) {
|
|
22
|
+
var data = input;
|
|
23
|
+
|
|
24
|
+
const issue = getAsObject(input, "node");
|
|
25
|
+
|
|
26
|
+
const publication = getAsObject(issue, "publication");
|
|
27
|
+
|
|
28
|
+
const coverImage = getAsObject(issue, "coverImage");
|
|
29
|
+
|
|
30
|
+
const linkTitle = `${publication.name} ${issue.name}`;
|
|
31
|
+
|
|
32
|
+
const flush = defaultValue(input.flush, true);
|
|
33
|
+
|
|
34
|
+
const withTitle = defaultValue(input.withTitle, true);
|
|
35
|
+
|
|
36
|
+
const nodeClass = ["magazine-publication-card-block", input.class].join(" ");
|
|
37
|
+
|
|
38
|
+
marko_web_node_tag({
|
|
39
|
+
imagePosition: "top",
|
|
40
|
+
flush: flush,
|
|
41
|
+
class: nodeClass,
|
|
42
|
+
header: input.header,
|
|
43
|
+
image: {
|
|
44
|
+
src: coverImage.src,
|
|
45
|
+
alt: coverImage.alt || linkTitle,
|
|
46
|
+
fluid: true,
|
|
47
|
+
ar: "3:4",
|
|
48
|
+
width: input.imageWidth || 300,
|
|
49
|
+
link: {
|
|
50
|
+
href: issue.canonicalPath,
|
|
51
|
+
title: linkTitle
|
|
52
|
+
},
|
|
53
|
+
options: {
|
|
54
|
+
fit: "max"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
body: {
|
|
58
|
+
title: withTitle && {
|
|
59
|
+
tag: "h5",
|
|
60
|
+
renderBody: function(out) {
|
|
61
|
+
marko_web_magazine_issue_name_tag({
|
|
62
|
+
tag: null,
|
|
63
|
+
obj: issue,
|
|
64
|
+
link: {
|
|
65
|
+
title: linkTitle
|
|
66
|
+
}
|
|
67
|
+
}, out, __component, "4");
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
footer: {
|
|
71
|
+
left: {
|
|
72
|
+
renderBody: function(out) {
|
|
73
|
+
theme_magazine_publication_buttons_tag({
|
|
74
|
+
publication: publication,
|
|
75
|
+
issue: issue,
|
|
76
|
+
buttons: input.buttons
|
|
77
|
+
}, out, __component, "7");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, out, __component, "0");
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
marko_template._ = marko_renderer(render, {
|
|
86
|
+
d_: true,
|
|
87
|
+
e_: marko_componentType
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
marko_template.meta = {
|
|
91
|
+
id: "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/blocks/magazine-latest-issue.marko",
|
|
92
|
+
tags: [
|
|
93
|
+
"@mindful-web/marko-web/components/element/magazine-issue/name.marko",
|
|
94
|
+
"../publication-buttons.marko",
|
|
95
|
+
"@mindful-web/marko-web/components/node/index.marko"
|
|
96
|
+
]
|
|
97
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getAsObject } from "@mindful-web/object-path";
|
|
2
|
+
import defaultValue from "@mindful-web/marko-core/utils/default-value";
|
|
3
|
+
import latestIssueFragment from "../../graphql/fragments/latest-issue";
|
|
4
|
+
import issueArchiveListFragment from "../../graphql/fragments/issue-archive";
|
|
5
|
+
|
|
6
|
+
$ const blockName = "magazine-publication-card-block";
|
|
7
|
+
$ const requiresCoverImage = defaultValue(input.requiresCoverImage, true);
|
|
8
|
+
|
|
9
|
+
<div class=blockName>
|
|
10
|
+
<if(input.header)>
|
|
11
|
+
<div class=`${blockName}__header`>
|
|
12
|
+
<${input.header} block-name=blockName />
|
|
13
|
+
</div>
|
|
14
|
+
</if>
|
|
15
|
+
|
|
16
|
+
<div class=`${blockName}__body`>
|
|
17
|
+
<div class="row">
|
|
18
|
+
<marko-web-query|{ node: issue }| name="magazine-issue" params={ id: input.issueId, queryFragment: latestIssueFragment, requiresCoverImage }>
|
|
19
|
+
<div class="col-md-4 mb-block">
|
|
20
|
+
<theme-magazine-latest-issue-block ...getAsObject(input, "latestIssue") node=issue />
|
|
21
|
+
</div>
|
|
22
|
+
</marko-web-query>
|
|
23
|
+
<marko-web-query|{ nodes: issues }| name="magazine-active-issues" params={ publicationId: input.publicationId, excludeIssueIds: [input.issueId], queryFragment: issueArchiveListFragment, limit: 12, requiresCoverImage }>
|
|
24
|
+
<div class="col-md-8 mb-block">
|
|
25
|
+
<div class="row">
|
|
26
|
+
<for|issue| of=issues>
|
|
27
|
+
<div class="col-3 mb-block">
|
|
28
|
+
<theme-magazine-archived-issue-block ...getAsObject(input, "archivedIssue") node=issue />
|
|
29
|
+
</div>
|
|
30
|
+
</for>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</marko-web-query>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/blocks/magazine-publication-card.marko",
|
|
6
|
+
marko_component = require("./magazine-publication-card.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
11
|
+
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
12
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
13
|
+
module_latestIssueFragment = require("../../graphql/fragments/latest-issue"),
|
|
14
|
+
latestIssueFragment = module_latestIssueFragment.default || module_latestIssueFragment,
|
|
15
|
+
module_issueArchiveListFragment = require("../../graphql/fragments/issue-archive"),
|
|
16
|
+
issueArchiveListFragment = module_issueArchiveListFragment.default || module_issueArchiveListFragment,
|
|
17
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
18
|
+
marko_classAttr = require("marko/dist/runtime/html/helpers/class-attr"),
|
|
19
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
20
|
+
theme_magazine_latest_issue_block_template = require("./magazine-latest-issue.marko"),
|
|
21
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
22
|
+
theme_magazine_latest_issue_block_tag = marko_loadTag(theme_magazine_latest_issue_block_template),
|
|
23
|
+
marko_web_query_template = require("@mindful-web/marko-core/components/queries/index.marko"),
|
|
24
|
+
marko_web_query_tag = marko_loadTag(marko_web_query_template),
|
|
25
|
+
marko_forOf = require("marko/dist/runtime/helpers/for-of"),
|
|
26
|
+
theme_magazine_archived_issue_block_template = require("./magazine-archived-issue.marko"),
|
|
27
|
+
theme_magazine_archived_issue_block_tag = marko_loadTag(theme_magazine_archived_issue_block_template);
|
|
28
|
+
|
|
29
|
+
function render(input, out, __component, component, state) {
|
|
30
|
+
var data = input;
|
|
31
|
+
|
|
32
|
+
const blockName = "magazine-publication-card-block";
|
|
33
|
+
|
|
34
|
+
const requiresCoverImage = defaultValue(input.requiresCoverImage, true);
|
|
35
|
+
|
|
36
|
+
out.w("<div" +
|
|
37
|
+
marko_classAttr(blockName) +
|
|
38
|
+
">");
|
|
39
|
+
|
|
40
|
+
if (input.header) {
|
|
41
|
+
out.w("<div" +
|
|
42
|
+
marko_classAttr(blockName + "__header") +
|
|
43
|
+
">");
|
|
44
|
+
|
|
45
|
+
marko_dynamicTag(out, input.header, function() {
|
|
46
|
+
return {
|
|
47
|
+
"block-name": blockName
|
|
48
|
+
};
|
|
49
|
+
}, null, null, null, __component, "2");
|
|
50
|
+
|
|
51
|
+
out.w("</div>");
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
out.w("<div" +
|
|
55
|
+
marko_classAttr(blockName + "__body") +
|
|
56
|
+
"><div class=\"row\">");
|
|
57
|
+
|
|
58
|
+
marko_web_query_tag({
|
|
59
|
+
collapsible: true,
|
|
60
|
+
name: "magazine-issue",
|
|
61
|
+
params: {
|
|
62
|
+
id: input.issueId,
|
|
63
|
+
queryFragment: latestIssueFragment,
|
|
64
|
+
requiresCoverImage: requiresCoverImage
|
|
65
|
+
},
|
|
66
|
+
renderBody: function(out, { node: issue }) {
|
|
67
|
+
out.w("<div class=\"col-md-4 mb-block\">");
|
|
68
|
+
|
|
69
|
+
theme_magazine_latest_issue_block_tag(marko_assign({}, getAsObject(input, "latestIssue"), {
|
|
70
|
+
node: issue
|
|
71
|
+
}), out, __component, "7");
|
|
72
|
+
|
|
73
|
+
out.w("</div>");
|
|
74
|
+
}
|
|
75
|
+
}, out, __component, "5");
|
|
76
|
+
|
|
77
|
+
marko_web_query_tag({
|
|
78
|
+
collapsible: true,
|
|
79
|
+
name: "magazine-active-issues",
|
|
80
|
+
params: {
|
|
81
|
+
publicationId: input.publicationId,
|
|
82
|
+
excludeIssueIds: [
|
|
83
|
+
input.issueId
|
|
84
|
+
],
|
|
85
|
+
queryFragment: issueArchiveListFragment,
|
|
86
|
+
limit: 12,
|
|
87
|
+
requiresCoverImage: requiresCoverImage
|
|
88
|
+
},
|
|
89
|
+
renderBody: function(out, { nodes: issues }) {
|
|
90
|
+
out.w("<div class=\"col-md-8 mb-block\"><div class=\"row\">");
|
|
91
|
+
|
|
92
|
+
var $for$0 = 0;
|
|
93
|
+
|
|
94
|
+
marko_forOf(issues, function(issue) {
|
|
95
|
+
var $keyScope$0 = "[" + (($for$0++) + "]");
|
|
96
|
+
|
|
97
|
+
out.w("<div class=\"col-3 mb-block\">");
|
|
98
|
+
|
|
99
|
+
theme_magazine_archived_issue_block_tag(marko_assign({}, getAsObject(input, "archivedIssue"), {
|
|
100
|
+
node: issue
|
|
101
|
+
}), out, __component, "12" + $keyScope$0);
|
|
102
|
+
|
|
103
|
+
out.w("</div>");
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
out.w("</div></div>");
|
|
107
|
+
}
|
|
108
|
+
}, out, __component, "8");
|
|
109
|
+
|
|
110
|
+
out.w("</div></div></div>");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
marko_template._ = marko_renderer(render, {
|
|
114
|
+
e_: marko_componentType
|
|
115
|
+
}, marko_component);
|
|
116
|
+
|
|
117
|
+
marko_template.meta = {
|
|
118
|
+
id: "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/blocks/magazine-publication-card.marko",
|
|
119
|
+
component: "./magazine-publication-card.marko",
|
|
120
|
+
tags: [
|
|
121
|
+
"./magazine-latest-issue.marko",
|
|
122
|
+
"@mindful-web/marko-core/components/queries/index.marko",
|
|
123
|
+
"./magazine-archived-issue.marko"
|
|
124
|
+
]
|
|
125
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
import defaultValue from "@mindful-web/marko-core/utils/default-value";
|
|
3
|
+
import publicationListFragment from "../../graphql/fragments/magazine-publication-list";
|
|
4
|
+
|
|
5
|
+
$ const { site } = out.global;
|
|
6
|
+
$ const publicationIds = site.getAsArray("magazine.publicationIds");
|
|
7
|
+
$ const requiresCoverImage = defaultValue(input.requiresCoverImage, true);
|
|
8
|
+
$ const withHeader = defaultValue(input.withHeader, true);
|
|
9
|
+
|
|
10
|
+
<marko-web-query|{ nodes }| name="magazine-publications" params={ publicationIds: publicationIds, queryFragmet: publicationListFragment }>
|
|
11
|
+
<for|publication| of=nodes>
|
|
12
|
+
<marko-web-query|{ node: latestIssue }| name="magazine-latest-issue" params={ publicationId: publication.id, requiresCoverImage }>
|
|
13
|
+
<theme-magazine-publication-card-block publication-id=publication.id issue-id=latestIssue.id>
|
|
14
|
+
<if(withHeader)>
|
|
15
|
+
<@header>
|
|
16
|
+
<marko-web-magazine-publication-name tag=null obj=publication link=true />
|
|
17
|
+
</@header>
|
|
18
|
+
</if>
|
|
19
|
+
</theme-magazine-publication-card-block>
|
|
20
|
+
</marko-web-query>
|
|
21
|
+
</for>
|
|
22
|
+
</marko-web-query>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/blocks/magazine-publications.marko",
|
|
6
|
+
marko_component = require("./magazine-publications.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
11
|
+
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
12
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
13
|
+
module_publicationListFragment = require("../../graphql/fragments/magazine-publication-list"),
|
|
14
|
+
publicationListFragment = module_publicationListFragment.default || module_publicationListFragment,
|
|
15
|
+
marko_forOf = require("marko/dist/runtime/helpers/for-of"),
|
|
16
|
+
marko_web_magazine_publication_name_template = require("@mindful-web/marko-web/components/element/magazine-publication/name.marko"),
|
|
17
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
18
|
+
marko_web_magazine_publication_name_tag = marko_loadTag(marko_web_magazine_publication_name_template),
|
|
19
|
+
theme_magazine_publication_card_block_template = require("./magazine-publication-card.marko"),
|
|
20
|
+
theme_magazine_publication_card_block_tag = marko_loadTag(theme_magazine_publication_card_block_template),
|
|
21
|
+
marko_web_query_template = require("@mindful-web/marko-core/components/queries/index.marko"),
|
|
22
|
+
marko_web_query_tag = marko_loadTag(marko_web_query_template);
|
|
23
|
+
|
|
24
|
+
function render(input, out, __component, component, state) {
|
|
25
|
+
var data = input;
|
|
26
|
+
|
|
27
|
+
const { site } = out.global;
|
|
28
|
+
|
|
29
|
+
const publicationIds = site.getAsArray("magazine.publicationIds");
|
|
30
|
+
|
|
31
|
+
const requiresCoverImage = defaultValue(input.requiresCoverImage, true);
|
|
32
|
+
|
|
33
|
+
const withHeader = defaultValue(input.withHeader, true);
|
|
34
|
+
|
|
35
|
+
marko_web_query_tag({
|
|
36
|
+
collapsible: true,
|
|
37
|
+
name: "magazine-publications",
|
|
38
|
+
params: {
|
|
39
|
+
publicationIds: publicationIds,
|
|
40
|
+
queryFragmet: publicationListFragment
|
|
41
|
+
},
|
|
42
|
+
renderBody: function(out, { nodes }) {
|
|
43
|
+
var $for$0 = 0;
|
|
44
|
+
|
|
45
|
+
marko_forOf(nodes, function(publication) {
|
|
46
|
+
var $keyScope$0 = "[" + (($for$0++) + "]");
|
|
47
|
+
|
|
48
|
+
marko_web_query_tag({
|
|
49
|
+
collapsible: true,
|
|
50
|
+
name: "magazine-latest-issue",
|
|
51
|
+
params: {
|
|
52
|
+
publicationId: publication.id,
|
|
53
|
+
requiresCoverImage: requiresCoverImage
|
|
54
|
+
},
|
|
55
|
+
renderBody: function(out, { node: latestIssue }) {
|
|
56
|
+
theme_magazine_publication_card_block_tag({
|
|
57
|
+
publicationId: publication.id,
|
|
58
|
+
issueId: latestIssue.id,
|
|
59
|
+
header: withHeader && {
|
|
60
|
+
renderBody: function(out) {
|
|
61
|
+
marko_web_magazine_publication_name_tag({
|
|
62
|
+
tag: null,
|
|
63
|
+
obj: publication,
|
|
64
|
+
link: true
|
|
65
|
+
}, out, __component, "4" + $keyScope$0);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}, out, __component, "2" + $keyScope$0);
|
|
69
|
+
}
|
|
70
|
+
}, out, __component, "1" + $keyScope$0);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}, out, __component, "0");
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
marko_template._ = marko_renderer(render, {
|
|
77
|
+
e_: marko_componentType
|
|
78
|
+
}, marko_component);
|
|
79
|
+
|
|
80
|
+
marko_template.meta = {
|
|
81
|
+
id: "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/blocks/magazine-publications.marko",
|
|
82
|
+
component: "./magazine-publications.marko",
|
|
83
|
+
tags: [
|
|
84
|
+
"@mindful-web/marko-web/components/element/magazine-publication/name.marko",
|
|
85
|
+
"./magazine-publication-card.marko",
|
|
86
|
+
"@mindful-web/marko-core/components/queries/index.marko"
|
|
87
|
+
]
|
|
88
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<theme-magazine-archived-issue-block>": {
|
|
3
|
+
"template": "./magazine-archived-issue.marko"
|
|
4
|
+
},
|
|
5
|
+
"<theme-magazine-latest-issue-block>": {
|
|
6
|
+
"template": "./magazine-latest-issue.marko"
|
|
7
|
+
},
|
|
8
|
+
"<theme-magazine-current-issue-block>": {
|
|
9
|
+
"template": "./magazine-current-issue.marko"
|
|
10
|
+
},
|
|
11
|
+
"<theme-magazine-issues-block>": {
|
|
12
|
+
"template": "./magazine-issues.marko"
|
|
13
|
+
},
|
|
14
|
+
"<theme-magazine-issue-cards-block>": {
|
|
15
|
+
"template": "./magazine-issue-cards.marko"
|
|
16
|
+
},
|
|
17
|
+
"<theme-magazine-publication-card-block>": {
|
|
18
|
+
"template": "./magazine-publication-card.marko"
|
|
19
|
+
},
|
|
20
|
+
"<theme-magazine-publications-block>": {
|
|
21
|
+
"template": "./magazine-publications.marko"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const { aliases } = input;
|
|
4
|
+
$ const nodes = getAsArray(input, "nodes");
|
|
5
|
+
|
|
6
|
+
<if(nodes.length)>
|
|
7
|
+
<theme-card-deck-flow nodes=nodes modifiers=input.modifiers cols=4>
|
|
8
|
+
<@slot|{ node }|>
|
|
9
|
+
<theme-magazine-issue-archive-node node=node flush=input.flush with-title=input.withTitle />
|
|
10
|
+
</@slot>
|
|
11
|
+
</theme-card-deck-flow>
|
|
12
|
+
</if>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/flows/magazine-issue-archive.marko",
|
|
6
|
+
marko_component = require("./magazine-issue-archive.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
11
|
+
theme_magazine_issue_archive_node_template = require("../nodes/magazine-issue-archive.marko"),
|
|
12
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
13
|
+
theme_magazine_issue_archive_node_tag = marko_loadTag(theme_magazine_issue_archive_node_template),
|
|
14
|
+
theme_card_deck_flow_template = require("@mindful-web/marko-web-theme-monorail/components/flows/card-deck.marko"),
|
|
15
|
+
theme_card_deck_flow_tag = marko_loadTag(theme_card_deck_flow_template);
|
|
16
|
+
|
|
17
|
+
function render(input, out, __component, component, state) {
|
|
18
|
+
var data = input;
|
|
19
|
+
|
|
20
|
+
const { aliases } = input;
|
|
21
|
+
|
|
22
|
+
const nodes = getAsArray(input, "nodes");
|
|
23
|
+
|
|
24
|
+
if (nodes.length) {
|
|
25
|
+
theme_card_deck_flow_tag({
|
|
26
|
+
nodes: nodes,
|
|
27
|
+
modifiers: input.modifiers,
|
|
28
|
+
cols: 4,
|
|
29
|
+
slots: [
|
|
30
|
+
{
|
|
31
|
+
renderBody: function(out, { node }) {
|
|
32
|
+
theme_magazine_issue_archive_node_tag({
|
|
33
|
+
node: node,
|
|
34
|
+
flush: input.flush,
|
|
35
|
+
withTitle: input.withTitle
|
|
36
|
+
}, out, __component, "2");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}, out, __component, "0");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
marko_template._ = marko_renderer(render, {
|
|
45
|
+
e_: marko_componentType
|
|
46
|
+
}, marko_component);
|
|
47
|
+
|
|
48
|
+
marko_template.meta = {
|
|
49
|
+
id: "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/flows/magazine-issue-archive.marko",
|
|
50
|
+
component: "./magazine-issue-archive.marko",
|
|
51
|
+
tags: [
|
|
52
|
+
"../nodes/magazine-issue-archive.marko",
|
|
53
|
+
"@mindful-web/marko-web-theme-monorail/components/flows/card-deck.marko"
|
|
54
|
+
]
|
|
55
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getAsObject } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const nodes = [];
|
|
4
|
+
$ const issueNode = getAsObject(input, "issueNode");
|
|
5
|
+
$ if (issueNode) nodes.push(issueNode);
|
|
6
|
+
|
|
7
|
+
<marko-web-node-list
|
|
8
|
+
inner-justified=true
|
|
9
|
+
flush-x=true
|
|
10
|
+
flush-y=true
|
|
11
|
+
modifiers=[
|
|
12
|
+
"latest-issue",
|
|
13
|
+
]
|
|
14
|
+
header=input.header
|
|
15
|
+
footer=input.footer
|
|
16
|
+
>
|
|
17
|
+
<@nodes nodes=nodes>
|
|
18
|
+
<@slot|{ node: issue }| position="at" index=0>
|
|
19
|
+
<theme-magazine-latest-issue-node node=issue />
|
|
20
|
+
</@slot>
|
|
21
|
+
</@nodes>
|
|
22
|
+
</marko-web-node-list>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/flows/magazine-latest-issue.marko",
|
|
6
|
+
marko_component = require("./magazine-latest-issue.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
11
|
+
theme_magazine_latest_issue_node_template = require("../nodes/magazine-latest-issue.marko"),
|
|
12
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
13
|
+
theme_magazine_latest_issue_node_tag = marko_loadTag(theme_magazine_latest_issue_node_template),
|
|
14
|
+
marko_web_node_list_template = require("@mindful-web/marko-web/components/node-list/index.marko"),
|
|
15
|
+
marko_web_node_list_tag = marko_loadTag(marko_web_node_list_template);
|
|
16
|
+
|
|
17
|
+
function render(input, out, __component, component, state) {
|
|
18
|
+
var data = input;
|
|
19
|
+
|
|
20
|
+
const nodes = [];
|
|
21
|
+
|
|
22
|
+
const issueNode = getAsObject(input, "issueNode");
|
|
23
|
+
|
|
24
|
+
if (issueNode) nodes.push(issueNode);
|
|
25
|
+
|
|
26
|
+
marko_web_node_list_tag({
|
|
27
|
+
blockName: "node-list",
|
|
28
|
+
tag: "div",
|
|
29
|
+
justified: false,
|
|
30
|
+
innerJustified: true,
|
|
31
|
+
flushX: true,
|
|
32
|
+
flushY: true,
|
|
33
|
+
fullHeight: false,
|
|
34
|
+
collapsible: true,
|
|
35
|
+
modifiers: [
|
|
36
|
+
"latest-issue"
|
|
37
|
+
],
|
|
38
|
+
header: input.header,
|
|
39
|
+
footer: input.footer,
|
|
40
|
+
nodes: {
|
|
41
|
+
nodes: nodes,
|
|
42
|
+
slots: [
|
|
43
|
+
{
|
|
44
|
+
position: "at",
|
|
45
|
+
index: 0,
|
|
46
|
+
renderBody: function(out, { node: issue }) {
|
|
47
|
+
theme_magazine_latest_issue_node_tag({
|
|
48
|
+
imageWidth: 300,
|
|
49
|
+
node: issue
|
|
50
|
+
}, out, __component, "3");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}, out, __component, "0");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
marko_template._ = marko_renderer(render, {
|
|
59
|
+
e_: marko_componentType
|
|
60
|
+
}, marko_component);
|
|
61
|
+
|
|
62
|
+
marko_template.meta = {
|
|
63
|
+
id: "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/components/flows/magazine-latest-issue.marko",
|
|
64
|
+
component: "./magazine-latest-issue.marko",
|
|
65
|
+
tags: [
|
|
66
|
+
"../nodes/magazine-latest-issue.marko",
|
|
67
|
+
"@mindful-web/marko-web/components/node-list/index.marko"
|
|
68
|
+
]
|
|
69
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<theme-magazine-issue-archive-flow>": {
|
|
3
|
+
"template": "./magazine-issue-archive.marko",
|
|
4
|
+
"@nodes": "array",
|
|
5
|
+
"@flush": {
|
|
6
|
+
"type": "boolean",
|
|
7
|
+
"default-value": false
|
|
8
|
+
},
|
|
9
|
+
"@with-title": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"default-value": true
|
|
12
|
+
},
|
|
13
|
+
"@modifiers": "array"
|
|
14
|
+
},
|
|
15
|
+
"<theme-magazine-latest-issue-flow>": {
|
|
16
|
+
"template": "./magazine-latest-issue.marko",
|
|
17
|
+
"<header>": {},
|
|
18
|
+
"<footer>": {},
|
|
19
|
+
"@issue-node": "object"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"taglib-imports": [
|
|
3
|
+
"./blocks/marko.json",
|
|
4
|
+
"./flows/marko.json",
|
|
5
|
+
"./nodes/marko.json"
|
|
6
|
+
],
|
|
7
|
+
"<theme-magazine-publication-buttons>": {
|
|
8
|
+
"template": "./publication-buttons.marko"
|
|
9
|
+
},
|
|
10
|
+
"<theme-magazine-publication-links>": {
|
|
11
|
+
"template": "./publication-links.marko"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getAsObject } from "@mindful-web/object-path";
|
|
2
|
+
import { defaultValue } from "@mindful-web/marko-web/utils";
|
|
3
|
+
|
|
4
|
+
$ const issue = getAsObject(input, "node");
|
|
5
|
+
$ const publication = getAsObject(issue, "publication");
|
|
6
|
+
$ const coverImage = getAsObject(issue, "coverImage");
|
|
7
|
+
$ const alt = `${publication.name} ${issue.name}`;
|
|
8
|
+
|
|
9
|
+
<marko-web-node
|
|
10
|
+
image-position="top"
|
|
11
|
+
card=defaultValue(input.card, true)
|
|
12
|
+
flush=defaultValue(input.flush, false)
|
|
13
|
+
full-height=defaultValue(input.fullHeight, false)
|
|
14
|
+
>
|
|
15
|
+
<@image
|
|
16
|
+
src=coverImage.src
|
|
17
|
+
alt=(coverImage.alt || alt)
|
|
18
|
+
fluid=true
|
|
19
|
+
ar="3:4"
|
|
20
|
+
width=defaultValue(input.imageWidth, 400)
|
|
21
|
+
link={ href: issue.canonicalPath, title: alt }
|
|
22
|
+
options={ fit: "max" }
|
|
23
|
+
/>
|
|
24
|
+
<@body>
|
|
25
|
+
<@title tag="h5" show=defaultValue(input.withTitle, true)>
|
|
26
|
+
<marko-web-magazine-issue-name tag=null obj=issue link={ title: alt } />
|
|
27
|
+
</@title>
|
|
28
|
+
</@body>
|
|
29
|
+
</marko-web-node>
|