@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,279 @@
|
|
|
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/templates/issue.marko",
|
|
6
|
+
marko_component = require("./issue.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_issueFragment = require("../graphql/fragments/magazine-issue-archive"),
|
|
9
|
+
issueFragment = module_issueFragment.default || module_issueFragment,
|
|
10
|
+
module_contentListFragment = require("../graphql/fragments/magazine-content-feed-block"),
|
|
11
|
+
contentListFragment = module_contentListFragment.default || module_contentListFragment,
|
|
12
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
13
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
14
|
+
get = module_objectPath_module.get,
|
|
15
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
16
|
+
marko_web_gtm_push_template = require("@mindful-web/marko-web-gtm/components/push.marko"),
|
|
17
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
18
|
+
marko_web_gtm_push_tag = marko_loadTag(marko_web_gtm_push_template),
|
|
19
|
+
marko_web_gtm_magazine_issue_context_template = require("@mindful-web/marko-web-gtm/components/context/magazine-issue.marko"),
|
|
20
|
+
marko_web_gtm_magazine_issue_context_tag = marko_loadTag(marko_web_gtm_magazine_issue_context_template),
|
|
21
|
+
marko_web_link_template = require("@mindful-web/marko-web/components/element/link.marko"),
|
|
22
|
+
marko_web_link_tag = marko_loadTag(marko_web_link_template),
|
|
23
|
+
marko_web_magazine_publication_name_template = require("@mindful-web/marko-web/components/element/magazine-publication/name.marko"),
|
|
24
|
+
marko_web_magazine_publication_name_tag = marko_loadTag(marko_web_magazine_publication_name_template),
|
|
25
|
+
theme_breadcrumbs_template = require("@mindful-web/marko-web-theme-monorail/components/breadcrumbs/index.marko"),
|
|
26
|
+
theme_breadcrumbs_tag = marko_loadTag(theme_breadcrumbs_template),
|
|
27
|
+
helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
|
|
28
|
+
marko_escapeXml = helpers_escape_xml.x,
|
|
29
|
+
theme_magazine_latest_issue_block_template = require("../components/blocks/magazine-latest-issue.marko"),
|
|
30
|
+
theme_magazine_latest_issue_block_tag = marko_loadTag(theme_magazine_latest_issue_block_template),
|
|
31
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
32
|
+
theme_pagination_controls_template = require("@mindful-web/marko-web-theme-monorail/components/pagination-controls.marko"),
|
|
33
|
+
theme_pagination_controls_tag = marko_loadTag(theme_pagination_controls_template),
|
|
34
|
+
theme_section_feed_block_template = require("@mindful-web/marko-web-theme-monorail/components/blocks/section-feed.marko"),
|
|
35
|
+
theme_section_feed_block_tag = marko_loadTag(theme_section_feed_block_template),
|
|
36
|
+
theme_magazine_issue_archive_flow_template = require("../components/flows/magazine-issue-archive.marko"),
|
|
37
|
+
theme_magazine_issue_archive_flow_tag = marko_loadTag(theme_magazine_issue_archive_flow_template),
|
|
38
|
+
marko_web_node_list_template = require("@mindful-web/marko-web/components/node-list/index.marko"),
|
|
39
|
+
marko_web_node_list_tag = marko_loadTag(marko_web_node_list_template),
|
|
40
|
+
marko_web_query_template = require("@mindful-web/marko-core/components/queries/index.marko"),
|
|
41
|
+
marko_web_query_tag = marko_loadTag(marko_web_query_template),
|
|
42
|
+
marko_web_page_wrapper_template = require("@mindful-web/marko-web/components/page/wrapper.marko"),
|
|
43
|
+
marko_web_page_wrapper_tag = marko_loadTag(marko_web_page_wrapper_template),
|
|
44
|
+
marko_web_resolve_page_template = require("@mindful-web/marko-web/components/resolve/page.marko"),
|
|
45
|
+
marko_web_resolve_page_tag = marko_loadTag(marko_web_resolve_page_template),
|
|
46
|
+
marko_web_magazine_issue_page_layout_template = require("@mindful-web/marko-web/components/page/layouts/magazine-issue.marko"),
|
|
47
|
+
marko_web_magazine_issue_page_layout_tag = marko_loadTag(marko_web_magazine_issue_page_layout_template);
|
|
48
|
+
|
|
49
|
+
function render(input, out, __component, component, state) {
|
|
50
|
+
var data = input;
|
|
51
|
+
|
|
52
|
+
const { site, pagination: p, i18n } = out.global;
|
|
53
|
+
|
|
54
|
+
const { id, pageNode } = data;
|
|
55
|
+
|
|
56
|
+
marko_web_magazine_issue_page_layout_tag({
|
|
57
|
+
id: id,
|
|
58
|
+
head: {
|
|
59
|
+
renderBody: function(out) {
|
|
60
|
+
marko_web_gtm_magazine_issue_context_tag({
|
|
61
|
+
id: id,
|
|
62
|
+
renderBody: function(out, { context }) {
|
|
63
|
+
marko_web_gtm_push_tag({
|
|
64
|
+
name: "dataLayer",
|
|
65
|
+
data: context
|
|
66
|
+
}, out, __component, "3");
|
|
67
|
+
}
|
|
68
|
+
}, out, __component, "2");
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
page: {
|
|
72
|
+
renderBody: function(out) {
|
|
73
|
+
marko_web_resolve_page_tag({
|
|
74
|
+
node: pageNode,
|
|
75
|
+
renderBody: function(out, { data: issue }) {
|
|
76
|
+
marko_web_page_wrapper_tag({
|
|
77
|
+
blockName: "page-wrapper",
|
|
78
|
+
tag: "div",
|
|
79
|
+
class: "mb-block",
|
|
80
|
+
sections: [
|
|
81
|
+
{
|
|
82
|
+
tag: "div",
|
|
83
|
+
renderBody: function(out) {
|
|
84
|
+
out.w("<div class=\"row\"><div class=\"col\">");
|
|
85
|
+
|
|
86
|
+
theme_breadcrumbs_tag({
|
|
87
|
+
modifiers: [
|
|
88
|
+
"website-section"
|
|
89
|
+
],
|
|
90
|
+
items: [
|
|
91
|
+
{
|
|
92
|
+
renderBody: function(out) {
|
|
93
|
+
marko_web_link_tag({
|
|
94
|
+
href: "/magazine",
|
|
95
|
+
renderBody: function(out) {
|
|
96
|
+
out.w("Magazine");
|
|
97
|
+
}
|
|
98
|
+
}, out, __component, "12");
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
renderBody: function(out) {
|
|
103
|
+
marko_web_magazine_publication_name_tag({
|
|
104
|
+
tag: null,
|
|
105
|
+
obj: issue.publication,
|
|
106
|
+
link: true
|
|
107
|
+
}, out, __component, "14");
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}, out, __component, "10");
|
|
112
|
+
|
|
113
|
+
out.w("<h1 class=\"page-wrapper__title\">" +
|
|
114
|
+
marko_escapeXml(issue.name) +
|
|
115
|
+
"</h1>");
|
|
116
|
+
|
|
117
|
+
if (issue.description) {
|
|
118
|
+
out.w("<p class=\"page-wrapper__deck\">" +
|
|
119
|
+
marko_escapeXml(issue.description) +
|
|
120
|
+
"</p>");
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
out.w("</div></div>");
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
tag: "div",
|
|
128
|
+
renderBody: function(out, { aliases }) {
|
|
129
|
+
out.w("<div class=\"row\"><div class=\"col-lg-4\" style=\"padding-top: 11px;\">");
|
|
130
|
+
|
|
131
|
+
theme_magazine_latest_issue_block_tag({
|
|
132
|
+
node: issue,
|
|
133
|
+
withTitle: false,
|
|
134
|
+
class: "sticky-top"
|
|
135
|
+
}, out, __component, "20");
|
|
136
|
+
|
|
137
|
+
out.w("</div><div class=\"col-lg-8\">");
|
|
138
|
+
|
|
139
|
+
const contentQueryName = "magazine-scheduled-content";
|
|
140
|
+
|
|
141
|
+
const contentQueryParams = { issueId: id, queryFragment: contentListFragment };
|
|
142
|
+
|
|
143
|
+
const perPage = 12;
|
|
144
|
+
|
|
145
|
+
theme_section_feed_block_tag({
|
|
146
|
+
queryName: contentQueryName,
|
|
147
|
+
queryParams: marko_assign({}, contentQueryParams, {
|
|
148
|
+
limit: perPage,
|
|
149
|
+
skip: p.skip({
|
|
150
|
+
perPage: perPage
|
|
151
|
+
})
|
|
152
|
+
}),
|
|
153
|
+
header: {
|
|
154
|
+
renderBody: function(out) {
|
|
155
|
+
out.w("In This Issue ");
|
|
156
|
+
|
|
157
|
+
if (p.page !== 1) {
|
|
158
|
+
out.w("(Page " +
|
|
159
|
+
marko_escapeXml(p.page) +
|
|
160
|
+
")");
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
after: {
|
|
165
|
+
renderBody: function(out) {
|
|
166
|
+
theme_section_feed_block_tag({
|
|
167
|
+
alias: "/magazine/" + issue.id,
|
|
168
|
+
countOnly: true,
|
|
169
|
+
queryName: contentQueryName,
|
|
170
|
+
queryParams: contentQueryParams,
|
|
171
|
+
renderBody: function(out, { totalCount }) {
|
|
172
|
+
theme_pagination_controls_tag({
|
|
173
|
+
perPage: perPage,
|
|
174
|
+
totalCount: totalCount,
|
|
175
|
+
path: "/magazine/" + issue.id
|
|
176
|
+
}, out, __component, "27");
|
|
177
|
+
}
|
|
178
|
+
}, out, __component, "26");
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}, out, __component, "22");
|
|
182
|
+
|
|
183
|
+
out.w("</div></div>");
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
tag: "div",
|
|
188
|
+
renderBody: function(out) {
|
|
189
|
+
marko_web_query_tag({
|
|
190
|
+
collapsible: true,
|
|
191
|
+
name: "magazine-active-issues",
|
|
192
|
+
params: {
|
|
193
|
+
publicationId: issue.publication.id,
|
|
194
|
+
excludeIssueIds: [
|
|
195
|
+
issue.id
|
|
196
|
+
],
|
|
197
|
+
queryFragment: issueFragment,
|
|
198
|
+
limit: 12,
|
|
199
|
+
requiresCoverImage: true
|
|
200
|
+
},
|
|
201
|
+
renderBody: function(out, { nodes }) {
|
|
202
|
+
marko_web_node_list_tag({
|
|
203
|
+
blockName: "node-list",
|
|
204
|
+
tag: "div",
|
|
205
|
+
justified: false,
|
|
206
|
+
innerJustified: true,
|
|
207
|
+
flushX: true,
|
|
208
|
+
flushY: false,
|
|
209
|
+
fullHeight: false,
|
|
210
|
+
collapsible: false,
|
|
211
|
+
modifiers: [
|
|
212
|
+
"issue-archives"
|
|
213
|
+
],
|
|
214
|
+
header: {
|
|
215
|
+
renderBody: function(out) {
|
|
216
|
+
out.w(marko_escapeXml(i18n("Past Issues")));
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
body: {
|
|
220
|
+
renderBody: function(out) {
|
|
221
|
+
theme_magazine_issue_archive_flow_tag({
|
|
222
|
+
flush: true,
|
|
223
|
+
withTitle: true,
|
|
224
|
+
nodes: nodes
|
|
225
|
+
}, out, __component, "33");
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
footer: {
|
|
229
|
+
renderBody: function(out) {
|
|
230
|
+
marko_web_magazine_publication_name_tag({
|
|
231
|
+
tag: null,
|
|
232
|
+
obj: issue.publication,
|
|
233
|
+
link: {
|
|
234
|
+
class: "btn btn-primary"
|
|
235
|
+
},
|
|
236
|
+
renderBody: function(out) {
|
|
237
|
+
out.w(marko_escapeXml(i18n("View All Past Issues")));
|
|
238
|
+
}
|
|
239
|
+
}, out, __component, "35");
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}, out, __component, "30");
|
|
243
|
+
}
|
|
244
|
+
}, out, __component, "29");
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
}, out, __component, "6");
|
|
249
|
+
}
|
|
250
|
+
}, out, __component, "5");
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}, out, __component, "0");
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
marko_template._ = marko_renderer(render, {
|
|
257
|
+
e_: marko_componentType
|
|
258
|
+
}, marko_component);
|
|
259
|
+
|
|
260
|
+
marko_template.meta = {
|
|
261
|
+
id: "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/templates/issue.marko",
|
|
262
|
+
component: "./issue.marko",
|
|
263
|
+
tags: [
|
|
264
|
+
"@mindful-web/marko-web-gtm/components/push.marko",
|
|
265
|
+
"@mindful-web/marko-web-gtm/components/context/magazine-issue.marko",
|
|
266
|
+
"@mindful-web/marko-web/components/element/link.marko",
|
|
267
|
+
"@mindful-web/marko-web/components/element/magazine-publication/name.marko",
|
|
268
|
+
"@mindful-web/marko-web-theme-monorail/components/breadcrumbs/index.marko",
|
|
269
|
+
"../components/blocks/magazine-latest-issue.marko",
|
|
270
|
+
"@mindful-web/marko-web-theme-monorail/components/pagination-controls.marko",
|
|
271
|
+
"@mindful-web/marko-web-theme-monorail/components/blocks/section-feed.marko",
|
|
272
|
+
"../components/flows/magazine-issue-archive.marko",
|
|
273
|
+
"@mindful-web/marko-web/components/node-list/index.marko",
|
|
274
|
+
"@mindful-web/marko-core/components/queries/index.marko",
|
|
275
|
+
"@mindful-web/marko-web/components/page/wrapper.marko",
|
|
276
|
+
"@mindful-web/marko-web/components/resolve/page.marko",
|
|
277
|
+
"@mindful-web/marko-web/components/page/layouts/magazine-issue.marko"
|
|
278
|
+
]
|
|
279
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import issueFragment from "../graphql/fragments/magazine-issue-archive";
|
|
2
|
+
|
|
3
|
+
$ const { pagination: p, req } = out.global;
|
|
4
|
+
$ const { id, pageNode } = data;
|
|
5
|
+
$ const perPage = 16;
|
|
6
|
+
|
|
7
|
+
<marko-web-magazine-publication-page-layout id=id>
|
|
8
|
+
<@head>
|
|
9
|
+
<marko-web-gtm-magazine-publication-context|{ context }| id=id>
|
|
10
|
+
<marko-web-gtm-push data=context />
|
|
11
|
+
</marko-web-gtm-magazine-publication-context>
|
|
12
|
+
</@head>
|
|
13
|
+
<@page>
|
|
14
|
+
<marko-web-page-wrapper>
|
|
15
|
+
<@section>
|
|
16
|
+
<div class="row">
|
|
17
|
+
<div class="col">
|
|
18
|
+
<theme-breadcrumbs modifiers=["website-section"]>
|
|
19
|
+
<@item><marko-web-link href="/magazine">Magazine</marko-web-link></@item>
|
|
20
|
+
</theme-breadcrumbs>
|
|
21
|
+
<marko-web-resolve-page|{ data: publication }| node=pageNode>
|
|
22
|
+
<h1 class="page-wrapper__title">
|
|
23
|
+
${publication.name} Issue Archive
|
|
24
|
+
<if(p.page > 1)>: Page ${p.page}</if>
|
|
25
|
+
</h1>
|
|
26
|
+
<if(publication.description)>
|
|
27
|
+
<p class="page-wrapper__deck">${publication.description}</p>
|
|
28
|
+
</if>
|
|
29
|
+
</marko-web-resolve-page>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</@section>
|
|
33
|
+
<@section>
|
|
34
|
+
<marko-web-resolve-page|{ data: publication }| node=pageNode>
|
|
35
|
+
$ const params = {
|
|
36
|
+
publicationId: id,
|
|
37
|
+
limit: perPage,
|
|
38
|
+
skip:p.skip({ perPage }),
|
|
39
|
+
queryFragment: issueFragment,
|
|
40
|
+
requiresCoverImage: true,
|
|
41
|
+
};
|
|
42
|
+
<marko-web-query|{ nodes }|
|
|
43
|
+
name="magazine-active-issues"
|
|
44
|
+
params=params
|
|
45
|
+
>
|
|
46
|
+
<theme-magazine-issue-archive-flow nodes=nodes flush=true />
|
|
47
|
+
</marko-web-query>
|
|
48
|
+
<div class="mb-block">
|
|
49
|
+
<theme-query-total-count|{ totalCount }| name="magazine-active-issues" params={publicationId: id}>
|
|
50
|
+
<theme-pagination-controls
|
|
51
|
+
per-page=perPage
|
|
52
|
+
total-count=totalCount
|
|
53
|
+
path=req.path
|
|
54
|
+
/>
|
|
55
|
+
</theme-query-total-count>
|
|
56
|
+
</div>
|
|
57
|
+
</marko-web-resolve-page>
|
|
58
|
+
</@section>
|
|
59
|
+
</marko-web-page-wrapper>
|
|
60
|
+
</@page>
|
|
61
|
+
</marko-web-magazine-publication-page-layout>
|
|
@@ -0,0 +1,189 @@
|
|
|
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/templates/publication.marko",
|
|
6
|
+
marko_component = require("./publication.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_issueFragment = require("../graphql/fragments/magazine-issue-archive"),
|
|
9
|
+
issueFragment = module_issueFragment.default || module_issueFragment,
|
|
10
|
+
marko_web_gtm_push_template = require("@mindful-web/marko-web-gtm/components/push.marko"),
|
|
11
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
12
|
+
marko_web_gtm_push_tag = marko_loadTag(marko_web_gtm_push_template),
|
|
13
|
+
marko_web_gtm_magazine_publication_context_template = require("@mindful-web/marko-web-gtm/components/context/magazine-publication.marko"),
|
|
14
|
+
marko_web_gtm_magazine_publication_context_tag = marko_loadTag(marko_web_gtm_magazine_publication_context_template),
|
|
15
|
+
marko_web_link_template = require("@mindful-web/marko-web/components/element/link.marko"),
|
|
16
|
+
marko_web_link_tag = marko_loadTag(marko_web_link_template),
|
|
17
|
+
theme_breadcrumbs_template = require("@mindful-web/marko-web-theme-monorail/components/breadcrumbs/index.marko"),
|
|
18
|
+
theme_breadcrumbs_tag = marko_loadTag(theme_breadcrumbs_template),
|
|
19
|
+
helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
|
|
20
|
+
marko_escapeXml = helpers_escape_xml.x,
|
|
21
|
+
marko_web_resolve_page_template = require("@mindful-web/marko-web/components/resolve/page.marko"),
|
|
22
|
+
marko_web_resolve_page_tag = marko_loadTag(marko_web_resolve_page_template),
|
|
23
|
+
theme_magazine_issue_archive_flow_template = require("../components/flows/magazine-issue-archive.marko"),
|
|
24
|
+
theme_magazine_issue_archive_flow_tag = marko_loadTag(theme_magazine_issue_archive_flow_template),
|
|
25
|
+
marko_web_query_template = require("@mindful-web/marko-core/components/queries/index.marko"),
|
|
26
|
+
marko_web_query_tag = marko_loadTag(marko_web_query_template),
|
|
27
|
+
theme_pagination_controls_template = require("@mindful-web/marko-web-theme-monorail/components/pagination-controls.marko"),
|
|
28
|
+
theme_pagination_controls_tag = marko_loadTag(theme_pagination_controls_template),
|
|
29
|
+
theme_query_total_count_template = require("@mindful-web/marko-web-theme-monorail/components/query-total-count.marko"),
|
|
30
|
+
theme_query_total_count_tag = marko_loadTag(theme_query_total_count_template),
|
|
31
|
+
marko_web_page_wrapper_template = require("@mindful-web/marko-web/components/page/wrapper.marko"),
|
|
32
|
+
marko_web_page_wrapper_tag = marko_loadTag(marko_web_page_wrapper_template),
|
|
33
|
+
marko_web_magazine_publication_page_layout_template = require("@mindful-web/marko-web/components/page/layouts/magazine-publication.marko"),
|
|
34
|
+
marko_web_magazine_publication_page_layout_tag = marko_loadTag(marko_web_magazine_publication_page_layout_template);
|
|
35
|
+
|
|
36
|
+
function render(input, out, __component, component, state) {
|
|
37
|
+
var data = input;
|
|
38
|
+
|
|
39
|
+
const { pagination: p, req } = out.global;
|
|
40
|
+
|
|
41
|
+
const { id, pageNode } = data;
|
|
42
|
+
|
|
43
|
+
const perPage = 16;
|
|
44
|
+
|
|
45
|
+
marko_web_magazine_publication_page_layout_tag({
|
|
46
|
+
id: id,
|
|
47
|
+
head: {
|
|
48
|
+
renderBody: function(out) {
|
|
49
|
+
marko_web_gtm_magazine_publication_context_tag({
|
|
50
|
+
id: id,
|
|
51
|
+
renderBody: function(out, { context }) {
|
|
52
|
+
marko_web_gtm_push_tag({
|
|
53
|
+
name: "dataLayer",
|
|
54
|
+
data: context
|
|
55
|
+
}, out, __component, "3");
|
|
56
|
+
}
|
|
57
|
+
}, out, __component, "2");
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
page: {
|
|
61
|
+
renderBody: function(out) {
|
|
62
|
+
marko_web_page_wrapper_tag({
|
|
63
|
+
blockName: "page-wrapper",
|
|
64
|
+
tag: "div",
|
|
65
|
+
sections: [
|
|
66
|
+
{
|
|
67
|
+
tag: "div",
|
|
68
|
+
renderBody: function(out) {
|
|
69
|
+
out.w("<div class=\"row\"><div class=\"col\">");
|
|
70
|
+
|
|
71
|
+
theme_breadcrumbs_tag({
|
|
72
|
+
modifiers: [
|
|
73
|
+
"website-section"
|
|
74
|
+
],
|
|
75
|
+
items: [
|
|
76
|
+
{
|
|
77
|
+
renderBody: function(out) {
|
|
78
|
+
marko_web_link_tag({
|
|
79
|
+
href: "/magazine",
|
|
80
|
+
renderBody: function(out) {
|
|
81
|
+
out.w("Magazine");
|
|
82
|
+
}
|
|
83
|
+
}, out, __component, "11");
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}, out, __component, "9");
|
|
88
|
+
|
|
89
|
+
marko_web_resolve_page_tag({
|
|
90
|
+
node: pageNode,
|
|
91
|
+
renderBody: function(out, { data: publication }) {
|
|
92
|
+
out.w("<h1 class=\"page-wrapper__title\">" +
|
|
93
|
+
marko_escapeXml(publication.name) +
|
|
94
|
+
" Issue Archive ");
|
|
95
|
+
|
|
96
|
+
if (p.page > 1) {
|
|
97
|
+
out.w(": Page " +
|
|
98
|
+
marko_escapeXml(p.page));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
out.w("</h1>");
|
|
102
|
+
|
|
103
|
+
if (publication.description) {
|
|
104
|
+
out.w("<p class=\"page-wrapper__deck\">" +
|
|
105
|
+
marko_escapeXml(publication.description) +
|
|
106
|
+
"</p>");
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}, out, __component, "12");
|
|
110
|
+
|
|
111
|
+
out.w("</div></div>");
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
tag: "div",
|
|
116
|
+
renderBody: function(out) {
|
|
117
|
+
marko_web_resolve_page_tag({
|
|
118
|
+
node: pageNode,
|
|
119
|
+
renderBody: function(out, { data: publication }) {
|
|
120
|
+
const params = {
|
|
121
|
+
publicationId: id,
|
|
122
|
+
limit: perPage,
|
|
123
|
+
skip:p.skip({ perPage }),
|
|
124
|
+
queryFragment: issueFragment,
|
|
125
|
+
requiresCoverImage: true,
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
marko_web_query_tag({
|
|
129
|
+
collapsible: true,
|
|
130
|
+
name: "magazine-active-issues",
|
|
131
|
+
params: params,
|
|
132
|
+
renderBody: function(out, { nodes }) {
|
|
133
|
+
theme_magazine_issue_archive_flow_tag({
|
|
134
|
+
flush: true,
|
|
135
|
+
withTitle: true,
|
|
136
|
+
nodes: nodes
|
|
137
|
+
}, out, __component, "18");
|
|
138
|
+
}
|
|
139
|
+
}, out, __component, "17");
|
|
140
|
+
|
|
141
|
+
out.w("<div class=\"mb-block\">");
|
|
142
|
+
|
|
143
|
+
theme_query_total_count_tag({
|
|
144
|
+
name: "magazine-active-issues",
|
|
145
|
+
params: {
|
|
146
|
+
publicationId: id
|
|
147
|
+
},
|
|
148
|
+
renderBody: function(out, { totalCount }) {
|
|
149
|
+
theme_pagination_controls_tag({
|
|
150
|
+
perPage: perPage,
|
|
151
|
+
totalCount: totalCount,
|
|
152
|
+
path: req.path
|
|
153
|
+
}, out, __component, "21");
|
|
154
|
+
}
|
|
155
|
+
}, out, __component, "20");
|
|
156
|
+
|
|
157
|
+
out.w("</div>");
|
|
158
|
+
}
|
|
159
|
+
}, out, __component, "16");
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}, out, __component, "5");
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}, out, __component, "0");
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
marko_template._ = marko_renderer(render, {
|
|
170
|
+
e_: marko_componentType
|
|
171
|
+
}, marko_component);
|
|
172
|
+
|
|
173
|
+
marko_template.meta = {
|
|
174
|
+
id: "/@mindful-web/marko-web-theme-monorail-magazine$1.0.0/templates/publication.marko",
|
|
175
|
+
component: "./publication.marko",
|
|
176
|
+
tags: [
|
|
177
|
+
"@mindful-web/marko-web-gtm/components/push.marko",
|
|
178
|
+
"@mindful-web/marko-web-gtm/components/context/magazine-publication.marko",
|
|
179
|
+
"@mindful-web/marko-web/components/element/link.marko",
|
|
180
|
+
"@mindful-web/marko-web-theme-monorail/components/breadcrumbs/index.marko",
|
|
181
|
+
"@mindful-web/marko-web/components/resolve/page.marko",
|
|
182
|
+
"../components/flows/magazine-issue-archive.marko",
|
|
183
|
+
"@mindful-web/marko-core/components/queries/index.marko",
|
|
184
|
+
"@mindful-web/marko-web-theme-monorail/components/pagination-controls.marko",
|
|
185
|
+
"@mindful-web/marko-web-theme-monorail/components/query-total-count.marko",
|
|
186
|
+
"@mindful-web/marko-web/components/page/wrapper.marko",
|
|
187
|
+
"@mindful-web/marko-web/components/page/layouts/magazine-publication.marko"
|
|
188
|
+
]
|
|
189
|
+
};
|