coralite-plugin-aggregation 0.6.0 → 0.7.1
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/README.md +76 -261
- package/lib/index.js +249 -326
- package/lib/templates/coralite-pagination.html +94 -73
- package/package.json +9 -18
- package/types/index.js +16 -49
- package/dist/blog/all/index.html +0 -75
- package/dist/blog/all/page/2.html +0 -75
- package/dist/blog/all/page/3.html +0 -75
- package/dist/blog/all/page/4.html +0 -75
- package/dist/blog/all/page/5.html +0 -75
- package/dist/blog/index.html +0 -75
- package/dist/blog/page/2.html +0 -75
- package/dist/blog/page/3.html +0 -75
- package/dist/blog/page/4.html +0 -75
- package/dist/blog/page/5.html +0 -75
- package/dist/blog/post-1.html +0 -71
- package/dist/blog/post-2.html +0 -71
- package/dist/blog/post-3.html +0 -71
- package/dist/blog/post-4.html +0 -71
- package/dist/blog/post-5.html +0 -71
- package/dist/index.html +0 -81
- package/dist/page/2.html +0 -81
- package/dist/page/3.html +0 -81
- package/dist/page/4.html +0 -81
- package/dist/products/product-1.html +0 -75
- package/dist/products/product-2.html +0 -72
- package/dist/products/product-3.html +0 -72
- package/dist/products/product-4.html +0 -72
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Blog posts</title>
|
|
7
|
-
<meta name="name" content="coralite">
|
|
8
|
-
<meta name="description" content="look mum, no database!">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<h1>Build database free websites</h1>
|
|
12
|
-
<hr>
|
|
13
|
-
|
|
14
|
-
<section id="pagination">
|
|
15
|
-
<h2>Paginated blog posts</h2>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<a href="/blog/post-1.html">
|
|
20
|
-
<h3>Great Barrier Reef</h3>
|
|
21
|
-
</a>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<span>Nemo</span>
|
|
25
|
-
<time datetime="2025-01-08T20:23:07.645Z" data-coralite-ref="coralite-author__time-0">
|
|
26
|
-
Wed, 8 Jan 25
|
|
27
|
-
</time>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<ul class="pagination"><li class="page-item disabled"><span class="page-link">Previous</span></li><li class="page-item active"><a class="page-link" aria-current="page" href="/blog/all/index.html">1</a></li><li class="page-item"><a class="page-link" href="/blog/all/page/2.html">2</a></li><li class="page-item"><a class="page-link" href="/blog/all/page/3.html">3</a></li><li class="page-item disabled"><span class="page-link">...</span></li><li class="page-item"><a class="page-link" href="/blog/all/page/5.html">5</a></li><li class="page-item"><a class="page-link" href="/blog/all/page/2.html">Next</a></li></ul>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</section>
|
|
35
|
-
<script type="module">(async () => {
|
|
36
|
-
const coraliteTemplateScriptHelpers = { "refs": function refs({ refs }) {
|
|
37
|
-
const elements = {};
|
|
38
|
-
return function(id) {
|
|
39
|
-
if (elements[id]) {
|
|
40
|
-
return elements[id];
|
|
41
|
-
}
|
|
42
|
-
const refId = refs[id];
|
|
43
|
-
if (!refId) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const element = document.querySelector('[data-coralite-ref="' + refId + '"]');
|
|
47
|
-
if (element) {
|
|
48
|
-
elements[id] = element;
|
|
49
|
-
}
|
|
50
|
-
return element;
|
|
51
|
-
};
|
|
52
|
-
} };
|
|
53
|
-
const getHelpers = (context) => {
|
|
54
|
-
const helpers = {};
|
|
55
|
-
for (const key in coraliteTemplateScriptHelpers) {
|
|
56
|
-
if (!Object.hasOwn(coraliteTemplateScriptHelpers, key)) continue;
|
|
57
|
-
helpers[key] = coraliteTemplateScriptHelpers[key](context);
|
|
58
|
-
}
|
|
59
|
-
return helpers;
|
|
60
|
-
};
|
|
61
|
-
const coraliteTemplateFunctions = {
|
|
62
|
-
"coralite-author": function script({ values }, { refs }) {
|
|
63
|
-
const timeElement = refs("time");
|
|
64
|
-
timeElement.setAttribute("data-was-here", values.datetime);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
;
|
|
68
|
-
(async () => {
|
|
69
|
-
const context = { "instanceId": "tests/fixtures/pages/blog/all/page/5.html0coralite-posts0coralite-post0coralite-author", "templateId": "coralite-author", "refs": { "time": "coralite-author__time-0" }, "values": { "datetime": "2025-01-08T20:23:07.645Z" }, "document": {} };
|
|
70
|
-
const helpers = getHelpers(context);
|
|
71
|
-
await coraliteTemplateFunctions["coralite-author"](context, helpers);
|
|
72
|
-
})();
|
|
73
|
-
})();
|
|
74
|
-
</script></body>
|
|
75
|
-
</html>
|
package/dist/blog/index.html
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Blog posts</title>
|
|
7
|
-
<meta name="name" content="coralite">
|
|
8
|
-
<meta name="description" content="look mum, no database!">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<h1>Build database free websites</h1>
|
|
12
|
-
<hr>
|
|
13
|
-
|
|
14
|
-
<section id="pagination">
|
|
15
|
-
<h2>Paginated blog posts</h2>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<a href="/blog/post-1.html">
|
|
20
|
-
<h3>Great Barrier Reef</h3>
|
|
21
|
-
</a>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<span>Nemo</span>
|
|
25
|
-
<time datetime="2025-01-08T20:23:07.645Z" data-coralite-ref="coralite-author__time-0">
|
|
26
|
-
Wed, 8 Jan 25
|
|
27
|
-
</time>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<ul class="pagination"><li class="page-item disabled"><span class="page-link">Previous</span></li><li class="page-item active"><a class="page-link" aria-current="page" href="/blog/index.html">1</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">2</a></li><li class="page-item"><a class="page-link" href="/blog/page/3.html">3</a></li><li class="page-item disabled"><span class="page-link">...</span></li><li class="page-item"><a class="page-link" href="/blog/page/5.html">5</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">Next</a></li></ul>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</section>
|
|
35
|
-
<script type="module">(async () => {
|
|
36
|
-
const coraliteTemplateScriptHelpers = { "refs": function refs({ refs }) {
|
|
37
|
-
const elements = {};
|
|
38
|
-
return function(id) {
|
|
39
|
-
if (elements[id]) {
|
|
40
|
-
return elements[id];
|
|
41
|
-
}
|
|
42
|
-
const refId = refs[id];
|
|
43
|
-
if (!refId) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const element = document.querySelector('[data-coralite-ref="' + refId + '"]');
|
|
47
|
-
if (element) {
|
|
48
|
-
elements[id] = element;
|
|
49
|
-
}
|
|
50
|
-
return element;
|
|
51
|
-
};
|
|
52
|
-
} };
|
|
53
|
-
const getHelpers = (context) => {
|
|
54
|
-
const helpers = {};
|
|
55
|
-
for (const key in coraliteTemplateScriptHelpers) {
|
|
56
|
-
if (!Object.hasOwn(coraliteTemplateScriptHelpers, key)) continue;
|
|
57
|
-
helpers[key] = coraliteTemplateScriptHelpers[key](context);
|
|
58
|
-
}
|
|
59
|
-
return helpers;
|
|
60
|
-
};
|
|
61
|
-
const coraliteTemplateFunctions = {
|
|
62
|
-
"coralite-author": function script({ values }, { refs }) {
|
|
63
|
-
const timeElement = refs("time");
|
|
64
|
-
timeElement.setAttribute("data-was-here", values.datetime);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
;
|
|
68
|
-
(async () => {
|
|
69
|
-
const context = { "instanceId": "tests/fixtures/pages/blog/index.html0coralite-posts0coralite-post0coralite-author", "templateId": "coralite-author", "refs": { "time": "coralite-author__time-0" }, "values": { "datetime": "2025-01-08T20:23:07.645Z" }, "document": {} };
|
|
70
|
-
const helpers = getHelpers(context);
|
|
71
|
-
await coraliteTemplateFunctions["coralite-author"](context, helpers);
|
|
72
|
-
})();
|
|
73
|
-
})();
|
|
74
|
-
</script></body>
|
|
75
|
-
</html>
|
package/dist/blog/page/2.html
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Blog posts</title>
|
|
7
|
-
<meta name="name" content="coralite">
|
|
8
|
-
<meta name="description" content="look mum, no database!">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<h1>Build database free websites</h1>
|
|
12
|
-
<hr>
|
|
13
|
-
|
|
14
|
-
<section id="pagination">
|
|
15
|
-
<h2>Paginated blog posts</h2>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<a href="/blog/post-1.html">
|
|
20
|
-
<h3>Great Barrier Reef</h3>
|
|
21
|
-
</a>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<span>Nemo</span>
|
|
25
|
-
<time datetime="2025-01-08T20:23:07.645Z" data-coralite-ref="coralite-author__time-0">
|
|
26
|
-
Wed, 8 Jan 25
|
|
27
|
-
</time>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<ul class="pagination"><li class="page-item disabled"><span class="page-link">Previous</span></li><li class="page-item active"><a class="page-link" aria-current="page" href="/blog/index.html">1</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">2</a></li><li class="page-item"><a class="page-link" href="/blog/page/3.html">3</a></li><li class="page-item disabled"><span class="page-link">...</span></li><li class="page-item"><a class="page-link" href="/blog/page/5.html">5</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">Next</a></li></ul>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</section>
|
|
35
|
-
<script type="module">(async () => {
|
|
36
|
-
const coraliteTemplateScriptHelpers = { "refs": function refs({ refs }) {
|
|
37
|
-
const elements = {};
|
|
38
|
-
return function(id) {
|
|
39
|
-
if (elements[id]) {
|
|
40
|
-
return elements[id];
|
|
41
|
-
}
|
|
42
|
-
const refId = refs[id];
|
|
43
|
-
if (!refId) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const element = document.querySelector('[data-coralite-ref="' + refId + '"]');
|
|
47
|
-
if (element) {
|
|
48
|
-
elements[id] = element;
|
|
49
|
-
}
|
|
50
|
-
return element;
|
|
51
|
-
};
|
|
52
|
-
} };
|
|
53
|
-
const getHelpers = (context) => {
|
|
54
|
-
const helpers = {};
|
|
55
|
-
for (const key in coraliteTemplateScriptHelpers) {
|
|
56
|
-
if (!Object.hasOwn(coraliteTemplateScriptHelpers, key)) continue;
|
|
57
|
-
helpers[key] = coraliteTemplateScriptHelpers[key](context);
|
|
58
|
-
}
|
|
59
|
-
return helpers;
|
|
60
|
-
};
|
|
61
|
-
const coraliteTemplateFunctions = {
|
|
62
|
-
"coralite-author": function script({ values }, { refs }) {
|
|
63
|
-
const timeElement = refs("time");
|
|
64
|
-
timeElement.setAttribute("data-was-here", values.datetime);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
;
|
|
68
|
-
(async () => {
|
|
69
|
-
const context = { "instanceId": "tests/fixtures/pages/blog/page/2.html0coralite-posts0coralite-post0coralite-author", "templateId": "coralite-author", "refs": { "time": "coralite-author__time-0" }, "values": { "datetime": "2025-01-08T20:23:07.645Z" }, "document": {} };
|
|
70
|
-
const helpers = getHelpers(context);
|
|
71
|
-
await coraliteTemplateFunctions["coralite-author"](context, helpers);
|
|
72
|
-
})();
|
|
73
|
-
})();
|
|
74
|
-
</script></body>
|
|
75
|
-
</html>
|
package/dist/blog/page/3.html
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Blog posts</title>
|
|
7
|
-
<meta name="name" content="coralite">
|
|
8
|
-
<meta name="description" content="look mum, no database!">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<h1>Build database free websites</h1>
|
|
12
|
-
<hr>
|
|
13
|
-
|
|
14
|
-
<section id="pagination">
|
|
15
|
-
<h2>Paginated blog posts</h2>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<a href="/blog/post-1.html">
|
|
20
|
-
<h3>Great Barrier Reef</h3>
|
|
21
|
-
</a>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<span>Nemo</span>
|
|
25
|
-
<time datetime="2025-01-08T20:23:07.645Z" data-coralite-ref="coralite-author__time-0">
|
|
26
|
-
Wed, 8 Jan 25
|
|
27
|
-
</time>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<ul class="pagination"><li class="page-item disabled"><span class="page-link">Previous</span></li><li class="page-item active"><a class="page-link" aria-current="page" href="/blog/index.html">1</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">2</a></li><li class="page-item"><a class="page-link" href="/blog/page/3.html">3</a></li><li class="page-item disabled"><span class="page-link">...</span></li><li class="page-item"><a class="page-link" href="/blog/page/5.html">5</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">Next</a></li></ul>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</section>
|
|
35
|
-
<script type="module">(async () => {
|
|
36
|
-
const coraliteTemplateScriptHelpers = { "refs": function refs({ refs }) {
|
|
37
|
-
const elements = {};
|
|
38
|
-
return function(id) {
|
|
39
|
-
if (elements[id]) {
|
|
40
|
-
return elements[id];
|
|
41
|
-
}
|
|
42
|
-
const refId = refs[id];
|
|
43
|
-
if (!refId) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const element = document.querySelector('[data-coralite-ref="' + refId + '"]');
|
|
47
|
-
if (element) {
|
|
48
|
-
elements[id] = element;
|
|
49
|
-
}
|
|
50
|
-
return element;
|
|
51
|
-
};
|
|
52
|
-
} };
|
|
53
|
-
const getHelpers = (context) => {
|
|
54
|
-
const helpers = {};
|
|
55
|
-
for (const key in coraliteTemplateScriptHelpers) {
|
|
56
|
-
if (!Object.hasOwn(coraliteTemplateScriptHelpers, key)) continue;
|
|
57
|
-
helpers[key] = coraliteTemplateScriptHelpers[key](context);
|
|
58
|
-
}
|
|
59
|
-
return helpers;
|
|
60
|
-
};
|
|
61
|
-
const coraliteTemplateFunctions = {
|
|
62
|
-
"coralite-author": function script({ values }, { refs }) {
|
|
63
|
-
const timeElement = refs("time");
|
|
64
|
-
timeElement.setAttribute("data-was-here", values.datetime);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
;
|
|
68
|
-
(async () => {
|
|
69
|
-
const context = { "instanceId": "tests/fixtures/pages/blog/page/3.html0coralite-posts0coralite-post0coralite-author", "templateId": "coralite-author", "refs": { "time": "coralite-author__time-0" }, "values": { "datetime": "2025-01-08T20:23:07.645Z" }, "document": {} };
|
|
70
|
-
const helpers = getHelpers(context);
|
|
71
|
-
await coraliteTemplateFunctions["coralite-author"](context, helpers);
|
|
72
|
-
})();
|
|
73
|
-
})();
|
|
74
|
-
</script></body>
|
|
75
|
-
</html>
|
package/dist/blog/page/4.html
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Blog posts</title>
|
|
7
|
-
<meta name="name" content="coralite">
|
|
8
|
-
<meta name="description" content="look mum, no database!">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<h1>Build database free websites</h1>
|
|
12
|
-
<hr>
|
|
13
|
-
|
|
14
|
-
<section id="pagination">
|
|
15
|
-
<h2>Paginated blog posts</h2>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<a href="/blog/post-1.html">
|
|
20
|
-
<h3>Great Barrier Reef</h3>
|
|
21
|
-
</a>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<span>Nemo</span>
|
|
25
|
-
<time datetime="2025-01-08T20:23:07.645Z" data-coralite-ref="coralite-author__time-0">
|
|
26
|
-
Wed, 8 Jan 25
|
|
27
|
-
</time>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<ul class="pagination"><li class="page-item disabled"><span class="page-link">Previous</span></li><li class="page-item active"><a class="page-link" aria-current="page" href="/blog/index.html">1</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">2</a></li><li class="page-item"><a class="page-link" href="/blog/page/3.html">3</a></li><li class="page-item disabled"><span class="page-link">...</span></li><li class="page-item"><a class="page-link" href="/blog/page/5.html">5</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">Next</a></li></ul>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</section>
|
|
35
|
-
<script type="module">(async () => {
|
|
36
|
-
const coraliteTemplateScriptHelpers = { "refs": function refs({ refs }) {
|
|
37
|
-
const elements = {};
|
|
38
|
-
return function(id) {
|
|
39
|
-
if (elements[id]) {
|
|
40
|
-
return elements[id];
|
|
41
|
-
}
|
|
42
|
-
const refId = refs[id];
|
|
43
|
-
if (!refId) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const element = document.querySelector('[data-coralite-ref="' + refId + '"]');
|
|
47
|
-
if (element) {
|
|
48
|
-
elements[id] = element;
|
|
49
|
-
}
|
|
50
|
-
return element;
|
|
51
|
-
};
|
|
52
|
-
} };
|
|
53
|
-
const getHelpers = (context) => {
|
|
54
|
-
const helpers = {};
|
|
55
|
-
for (const key in coraliteTemplateScriptHelpers) {
|
|
56
|
-
if (!Object.hasOwn(coraliteTemplateScriptHelpers, key)) continue;
|
|
57
|
-
helpers[key] = coraliteTemplateScriptHelpers[key](context);
|
|
58
|
-
}
|
|
59
|
-
return helpers;
|
|
60
|
-
};
|
|
61
|
-
const coraliteTemplateFunctions = {
|
|
62
|
-
"coralite-author": function script({ values }, { refs }) {
|
|
63
|
-
const timeElement = refs("time");
|
|
64
|
-
timeElement.setAttribute("data-was-here", values.datetime);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
;
|
|
68
|
-
(async () => {
|
|
69
|
-
const context = { "instanceId": "tests/fixtures/pages/blog/page/4.html0coralite-posts0coralite-post0coralite-author", "templateId": "coralite-author", "refs": { "time": "coralite-author__time-0" }, "values": { "datetime": "2025-01-08T20:23:07.645Z" }, "document": {} };
|
|
70
|
-
const helpers = getHelpers(context);
|
|
71
|
-
await coraliteTemplateFunctions["coralite-author"](context, helpers);
|
|
72
|
-
})();
|
|
73
|
-
})();
|
|
74
|
-
</script></body>
|
|
75
|
-
</html>
|
package/dist/blog/page/5.html
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Blog posts</title>
|
|
7
|
-
<meta name="name" content="coralite">
|
|
8
|
-
<meta name="description" content="look mum, no database!">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<h1>Build database free websites</h1>
|
|
12
|
-
<hr>
|
|
13
|
-
|
|
14
|
-
<section id="pagination">
|
|
15
|
-
<h2>Paginated blog posts</h2>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<a href="/blog/post-1.html">
|
|
20
|
-
<h3>Great Barrier Reef</h3>
|
|
21
|
-
</a>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<span>Nemo</span>
|
|
25
|
-
<time datetime="2025-01-08T20:23:07.645Z" data-coralite-ref="coralite-author__time-0">
|
|
26
|
-
Wed, 8 Jan 25
|
|
27
|
-
</time>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<ul class="pagination"><li class="page-item disabled"><span class="page-link">Previous</span></li><li class="page-item active"><a class="page-link" aria-current="page" href="/blog/index.html">1</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">2</a></li><li class="page-item"><a class="page-link" href="/blog/page/3.html">3</a></li><li class="page-item disabled"><span class="page-link">...</span></li><li class="page-item"><a class="page-link" href="/blog/page/5.html">5</a></li><li class="page-item"><a class="page-link" href="/blog/page/2.html">Next</a></li></ul>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</section>
|
|
35
|
-
<script type="module">(async () => {
|
|
36
|
-
const coraliteTemplateScriptHelpers = { "refs": function refs({ refs }) {
|
|
37
|
-
const elements = {};
|
|
38
|
-
return function(id) {
|
|
39
|
-
if (elements[id]) {
|
|
40
|
-
return elements[id];
|
|
41
|
-
}
|
|
42
|
-
const refId = refs[id];
|
|
43
|
-
if (!refId) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const element = document.querySelector('[data-coralite-ref="' + refId + '"]');
|
|
47
|
-
if (element) {
|
|
48
|
-
elements[id] = element;
|
|
49
|
-
}
|
|
50
|
-
return element;
|
|
51
|
-
};
|
|
52
|
-
} };
|
|
53
|
-
const getHelpers = (context) => {
|
|
54
|
-
const helpers = {};
|
|
55
|
-
for (const key in coraliteTemplateScriptHelpers) {
|
|
56
|
-
if (!Object.hasOwn(coraliteTemplateScriptHelpers, key)) continue;
|
|
57
|
-
helpers[key] = coraliteTemplateScriptHelpers[key](context);
|
|
58
|
-
}
|
|
59
|
-
return helpers;
|
|
60
|
-
};
|
|
61
|
-
const coraliteTemplateFunctions = {
|
|
62
|
-
"coralite-author": function script({ values }, { refs }) {
|
|
63
|
-
const timeElement = refs("time");
|
|
64
|
-
timeElement.setAttribute("data-was-here", values.datetime);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
;
|
|
68
|
-
(async () => {
|
|
69
|
-
const context = { "instanceId": "tests/fixtures/pages/blog/page/5.html0coralite-posts0coralite-post0coralite-author", "templateId": "coralite-author", "refs": { "time": "coralite-author__time-0" }, "values": { "datetime": "2025-01-08T20:23:07.645Z" }, "document": {} };
|
|
70
|
-
const helpers = getHelpers(context);
|
|
71
|
-
await coraliteTemplateFunctions["coralite-author"](context, helpers);
|
|
72
|
-
})();
|
|
73
|
-
})();
|
|
74
|
-
</script></body>
|
|
75
|
-
</html>
|
package/dist/blog/post-1.html
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Document</title>
|
|
7
|
-
<meta name="title" content="Great Barrier Reef">
|
|
8
|
-
<meta name="author" content="Nemo">
|
|
9
|
-
<meta name="image" content="image.png">
|
|
10
|
-
<meta name="image_alt" content="Photo of a cat">
|
|
11
|
-
<meta name="description" content="The Great Barrier Reef—largest, comprising over 2,900 individual reefs and 900 islands stretching for over 2,600 kilometers">
|
|
12
|
-
<meta name="published_time" content="2025-01-08T20:23:07.645Z">
|
|
13
|
-
<meta name="country" content="au" data-dev="true">
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
|
|
17
|
-
<header>
|
|
18
|
-
This is the mighty header
|
|
19
|
-
<span data-dev="true">Dev mode enabled</span>
|
|
20
|
-
|
|
21
|
-
<h1>Great Barrier Reef</h1>
|
|
22
|
-
|
|
23
|
-
</header>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<span>Nemo</span>
|
|
27
|
-
<time datetime="2025-01-08T20:23:07.645Z" data-coralite-ref="coralite-author__time-1">
|
|
28
|
-
Wed, 8 Jan 25
|
|
29
|
-
</time>
|
|
30
|
-
|
|
31
|
-
<script type="module">(async () => {
|
|
32
|
-
const coraliteTemplateScriptHelpers = { "refs": function refs({ refs }) {
|
|
33
|
-
const elements = {};
|
|
34
|
-
return function(id) {
|
|
35
|
-
if (elements[id]) {
|
|
36
|
-
return elements[id];
|
|
37
|
-
}
|
|
38
|
-
const refId = refs[id];
|
|
39
|
-
if (!refId) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
const element = document.querySelector('[data-coralite-ref="' + refId + '"]');
|
|
43
|
-
if (element) {
|
|
44
|
-
elements[id] = element;
|
|
45
|
-
}
|
|
46
|
-
return element;
|
|
47
|
-
};
|
|
48
|
-
} };
|
|
49
|
-
const getHelpers = (context) => {
|
|
50
|
-
const helpers = {};
|
|
51
|
-
for (const key in coraliteTemplateScriptHelpers) {
|
|
52
|
-
if (!Object.hasOwn(coraliteTemplateScriptHelpers, key)) continue;
|
|
53
|
-
helpers[key] = coraliteTemplateScriptHelpers[key](context);
|
|
54
|
-
}
|
|
55
|
-
return helpers;
|
|
56
|
-
};
|
|
57
|
-
const coraliteTemplateFunctions = {
|
|
58
|
-
"coralite-author": function script({ values }, { refs }) {
|
|
59
|
-
const timeElement = refs("time");
|
|
60
|
-
timeElement.setAttribute("data-was-here", values.datetime);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
;
|
|
64
|
-
(async () => {
|
|
65
|
-
const context = { "instanceId": "tests/fixtures/pages/blog/post-1.html1coralite-author", "templateId": "coralite-author", "refs": { "time": "coralite-author__time-1" }, "values": { "datetime": "2025-01-08T20:23:07.645Z" }, "document": {} };
|
|
66
|
-
const helpers = getHelpers(context);
|
|
67
|
-
await coraliteTemplateFunctions["coralite-author"](context, helpers);
|
|
68
|
-
})();
|
|
69
|
-
})();
|
|
70
|
-
</script></body>
|
|
71
|
-
</html>
|
package/dist/blog/post-2.html
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Document</title>
|
|
7
|
-
<meta name="title" content="Mesoamerican Barrier Reef System">
|
|
8
|
-
<meta name="author" content="Nemo">
|
|
9
|
-
<meta name="image" content="image.png">
|
|
10
|
-
<meta name="image_alt" content="Photo of a dog">
|
|
11
|
-
<meta name="description" content="The Mesoamerican Barrier Reef System—second largest, stretching 1,000 kilometers">
|
|
12
|
-
<meta name="published_time" content="2025-01-09T20:23:07.645Z">
|
|
13
|
-
<meta name="country" content="mx" data-dev="true">
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
|
|
17
|
-
<header>
|
|
18
|
-
This is the mighty header
|
|
19
|
-
<span data-dev="true">Dev mode enabled</span>
|
|
20
|
-
|
|
21
|
-
<h1>Mesoamerican Barrier Reef System</h1>
|
|
22
|
-
|
|
23
|
-
</header>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<span>Nemo</span>
|
|
27
|
-
<time datetime="2025-01-08T20:23:07.645Z" data-coralite-ref="coralite-author__time-1">
|
|
28
|
-
Wed, 8 Jan 25
|
|
29
|
-
</time>
|
|
30
|
-
|
|
31
|
-
<script type="module">(async () => {
|
|
32
|
-
const coraliteTemplateScriptHelpers = { "refs": function refs({ refs }) {
|
|
33
|
-
const elements = {};
|
|
34
|
-
return function(id) {
|
|
35
|
-
if (elements[id]) {
|
|
36
|
-
return elements[id];
|
|
37
|
-
}
|
|
38
|
-
const refId = refs[id];
|
|
39
|
-
if (!refId) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
const element = document.querySelector('[data-coralite-ref="' + refId + '"]');
|
|
43
|
-
if (element) {
|
|
44
|
-
elements[id] = element;
|
|
45
|
-
}
|
|
46
|
-
return element;
|
|
47
|
-
};
|
|
48
|
-
} };
|
|
49
|
-
const getHelpers = (context) => {
|
|
50
|
-
const helpers = {};
|
|
51
|
-
for (const key in coraliteTemplateScriptHelpers) {
|
|
52
|
-
if (!Object.hasOwn(coraliteTemplateScriptHelpers, key)) continue;
|
|
53
|
-
helpers[key] = coraliteTemplateScriptHelpers[key](context);
|
|
54
|
-
}
|
|
55
|
-
return helpers;
|
|
56
|
-
};
|
|
57
|
-
const coraliteTemplateFunctions = {
|
|
58
|
-
"coralite-author": function script({ values }, { refs }) {
|
|
59
|
-
const timeElement = refs("time");
|
|
60
|
-
timeElement.setAttribute("data-was-here", values.datetime);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
;
|
|
64
|
-
(async () => {
|
|
65
|
-
const context = { "instanceId": "tests/fixtures/pages/blog/post-2.html1coralite-author", "templateId": "coralite-author", "refs": { "time": "coralite-author__time-1" }, "values": { "datetime": "2025-01-08T20:23:07.645Z" }, "document": {} };
|
|
66
|
-
const helpers = getHelpers(context);
|
|
67
|
-
await coraliteTemplateFunctions["coralite-author"](context, helpers);
|
|
68
|
-
})();
|
|
69
|
-
})();
|
|
70
|
-
</script></body>
|
|
71
|
-
</html>
|
package/dist/blog/post-3.html
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Document</title>
|
|
7
|
-
<meta name="title" content="New Caledonia Barrier Reef">
|
|
8
|
-
<meta name="author" content="Nemo">
|
|
9
|
-
<meta name="image" content="image.png">
|
|
10
|
-
<meta name="image_alt" content="Photo of a dog">
|
|
11
|
-
<meta name="description" content="The New Caledonia Barrier Reef—second longest double barrier reef, covering 1,500 kilometers">
|
|
12
|
-
<meta name="published_time" content="2025-01-09T20:23:07.645Z">
|
|
13
|
-
<meta name="country" content="fr" data-dev="true">
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
|
|
17
|
-
<header>
|
|
18
|
-
This is the mighty header
|
|
19
|
-
<span data-dev="true">Dev mode enabled</span>
|
|
20
|
-
|
|
21
|
-
<h1>New Caledonia Barrier Reef</h1>
|
|
22
|
-
|
|
23
|
-
</header>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<span>Nemo</span>
|
|
27
|
-
<time datetime="2025-01-08T20:23:07.645Z" data-coralite-ref="coralite-author__time-1">
|
|
28
|
-
Wed, 8 Jan 25
|
|
29
|
-
</time>
|
|
30
|
-
|
|
31
|
-
<script type="module">(async () => {
|
|
32
|
-
const coraliteTemplateScriptHelpers = { "refs": function refs({ refs }) {
|
|
33
|
-
const elements = {};
|
|
34
|
-
return function(id) {
|
|
35
|
-
if (elements[id]) {
|
|
36
|
-
return elements[id];
|
|
37
|
-
}
|
|
38
|
-
const refId = refs[id];
|
|
39
|
-
if (!refId) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
const element = document.querySelector('[data-coralite-ref="' + refId + '"]');
|
|
43
|
-
if (element) {
|
|
44
|
-
elements[id] = element;
|
|
45
|
-
}
|
|
46
|
-
return element;
|
|
47
|
-
};
|
|
48
|
-
} };
|
|
49
|
-
const getHelpers = (context) => {
|
|
50
|
-
const helpers = {};
|
|
51
|
-
for (const key in coraliteTemplateScriptHelpers) {
|
|
52
|
-
if (!Object.hasOwn(coraliteTemplateScriptHelpers, key)) continue;
|
|
53
|
-
helpers[key] = coraliteTemplateScriptHelpers[key](context);
|
|
54
|
-
}
|
|
55
|
-
return helpers;
|
|
56
|
-
};
|
|
57
|
-
const coraliteTemplateFunctions = {
|
|
58
|
-
"coralite-author": function script({ values }, { refs }) {
|
|
59
|
-
const timeElement = refs("time");
|
|
60
|
-
timeElement.setAttribute("data-was-here", values.datetime);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
;
|
|
64
|
-
(async () => {
|
|
65
|
-
const context = { "instanceId": "tests/fixtures/pages/blog/post-3.html1coralite-author", "templateId": "coralite-author", "refs": { "time": "coralite-author__time-1" }, "values": { "datetime": "2025-01-08T20:23:07.645Z" }, "document": {} };
|
|
66
|
-
const helpers = getHelpers(context);
|
|
67
|
-
await coraliteTemplateFunctions["coralite-author"](context, helpers);
|
|
68
|
-
})();
|
|
69
|
-
})();
|
|
70
|
-
</script></body>
|
|
71
|
-
</html>
|