@shift72/core-template 1.9.31 → 1.9.32
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/CHANGELOG.md +9 -1
- package/kibble.json +20 -3
- package/package.json +2 -2
- package/site/en_AU.all.json +10 -1
- package/site/styles/_forms.scss +1 -1
- package/site/styles/_legacy.scss +1 -1
- package/site/styles/_meta-detail.scss +4 -4
- package/site/styles/_meta-sub-item.scss +0 -1
- package/site/styles/_pages.scss +2 -0
- package/site/styles/_posts.scss +142 -0
- package/site/styles/_variables.scss +8 -1
- package/site/styles/main.scss +1 -0
- package/site/templates/page/post/posts-feed.jet +66 -0
- package/site/templates/page/post/shared.jet +34 -0
- package/site/templates/page/post.jet +29 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [Unreleased](https://github.com/shift72/core-template/compare/1.9.
|
|
3
|
+
## [Unreleased](https://github.com/shift72/core-template/compare/1.9.32...HEAD)
|
|
4
|
+
|
|
5
|
+
## [1.9.32](https://github.com/shift72/core-template/compare/1.9.31...1.9.32)
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Blog posts and feed. A /posts/ route has been added to kibble.json for the feed,
|
|
10
|
+
but it shouldn't affect sites that don't actively use the posts feature and link
|
|
11
|
+
to it from the nav.
|
|
4
12
|
|
|
5
13
|
## [1.9.31](https://github.com/shift72/core-template/compare/1.9.29...1.9.31)
|
|
6
14
|
|
package/kibble.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core-template",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.32",
|
|
4
4
|
"siteUrl": "https://tvoddemo.shift72.com",
|
|
5
|
-
"builderVersion": "0.17.
|
|
5
|
+
"builderVersion": "0.17.10",
|
|
6
6
|
"defaultLanguage": "en",
|
|
7
7
|
"languages": {
|
|
8
8
|
"ar": {
|
|
@@ -173,6 +173,23 @@
|
|
|
173
173
|
"datasource": "PageIndex",
|
|
174
174
|
"pageSize": 0
|
|
175
175
|
},
|
|
176
|
+
{
|
|
177
|
+
"name": "postIndex",
|
|
178
|
+
"firstPageUrlPath": "/posts/",
|
|
179
|
+
"urlPath": "/posts/:index/",
|
|
180
|
+
"templatePath": "templates/page/post/posts-feed.jet",
|
|
181
|
+
"datasource": "PageIndex",
|
|
182
|
+
"options": {
|
|
183
|
+
"pageTypes": [
|
|
184
|
+
"post"
|
|
185
|
+
],
|
|
186
|
+
"sortBy": [
|
|
187
|
+
"published_date:desc",
|
|
188
|
+
"title:asc"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"pageSize": 5
|
|
192
|
+
},
|
|
176
193
|
{
|
|
177
194
|
"name": "bundleItem",
|
|
178
195
|
"urlPath": "/bundle/:slug/",
|
|
@@ -199,5 +216,5 @@
|
|
|
199
216
|
"pageSize": 0
|
|
200
217
|
}
|
|
201
218
|
],
|
|
202
|
-
"coreTemplateVersion": "1.9.
|
|
219
|
+
"coreTemplateVersion": "1.9.32"
|
|
203
220
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shift72/core-template",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.32",
|
|
4
4
|
"description": "Shift72 core template",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"postcss-cli": "^11.0.1",
|
|
54
54
|
"rollup": "^2.23.0",
|
|
55
55
|
"rollup-plugin-terser": "^6.1.0",
|
|
56
|
-
"s72-kibble": "^0.17.
|
|
56
|
+
"s72-kibble": "^0.17.10",
|
|
57
57
|
"sass": "^1.36.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
package/site/en_AU.all.json
CHANGED
|
@@ -1745,5 +1745,14 @@
|
|
|
1745
1745
|
},
|
|
1746
1746
|
"wcag_aria_label_social_bluesky": {
|
|
1747
1747
|
"other": "Visit us on Bluesky"
|
|
1748
|
+
},
|
|
1749
|
+
"posts_pagination_next": {
|
|
1750
|
+
"other": "Older posts"
|
|
1751
|
+
},
|
|
1752
|
+
"posts_pagination_prev": {
|
|
1753
|
+
"other": "Newer posts"
|
|
1754
|
+
},
|
|
1755
|
+
"post_preview_show_more": {
|
|
1756
|
+
"other": "Read more"
|
|
1748
1757
|
}
|
|
1749
|
-
}
|
|
1758
|
+
}
|
package/site/styles/_forms.scss
CHANGED
package/site/styles/_legacy.scss
CHANGED
|
@@ -169,10 +169,6 @@
|
|
|
169
169
|
margin-right: 20px;
|
|
170
170
|
width: 110px;
|
|
171
171
|
|
|
172
|
-
&.poster-image {
|
|
173
|
-
margin-bottom: 0px;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
172
|
@include media-breakpoint-up(xs) {
|
|
177
173
|
width: 155px;
|
|
178
174
|
}
|
|
@@ -181,6 +177,10 @@
|
|
|
181
177
|
width: 208px;
|
|
182
178
|
}
|
|
183
179
|
|
|
180
|
+
&.poster-image {
|
|
181
|
+
margin-bottom: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
184
|
.live {
|
|
185
185
|
display: none;
|
|
186
186
|
}
|
package/site/styles/_pages.scss
CHANGED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
.post-page,
|
|
2
|
+
.posts-feed-page {
|
|
3
|
+
margin-top: 2rem;
|
|
4
|
+
margin-left: auto;
|
|
5
|
+
margin-right: auto;
|
|
6
|
+
padding-left: 0;
|
|
7
|
+
padding-right: 0;
|
|
8
|
+
width: var(--page-reading-column-width);
|
|
9
|
+
max-width: calc(min(95vw, 1100px));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.post-title {
|
|
13
|
+
@include heading-2-style();
|
|
14
|
+
margin-bottom: 0.5rem;
|
|
15
|
+
line-height: 1.3;
|
|
16
|
+
|
|
17
|
+
> a {
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
text-decoration: underline;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.post-meta {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
opacity: 0.7;
|
|
30
|
+
font-size: var(--body-2-style-font-size);
|
|
31
|
+
margin-bottom: 1rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.post-published-date::first-letter {
|
|
35
|
+
text-transform: capitalize; // icky hack for dates like "yesterday 10:32am" maybe the s72-time component needs a 'format' prop so we can force short dates?
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.post-header-image {
|
|
39
|
+
margin-bottom: 1rem;
|
|
40
|
+
|
|
41
|
+
s72-image {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
aspect-ratio: 1200 / 422;
|
|
45
|
+
|
|
46
|
+
border-radius: 0.5rem;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
|
|
49
|
+
transition: background-color 0.25s ease;
|
|
50
|
+
background-color: var(--poster-skeleton-background-color);
|
|
51
|
+
|
|
52
|
+
/* stylelint-disable selector-no-qualifying-type */
|
|
53
|
+
// a bit of a pedantic rule, wrong in this case. <s72-image> applies the
|
|
54
|
+
// modifier classes to the wrapper element as well as the <img>, but setting
|
|
55
|
+
// a background color for the skeleton needs to happen on the wrapper
|
|
56
|
+
// because you can't colour an <img>
|
|
57
|
+
&.s72-image--loaded {
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
aspect-ratio: unset;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
img {
|
|
63
|
+
transition: opacity 0.25s ease;
|
|
64
|
+
opacity: 0;
|
|
65
|
+
|
|
66
|
+
&.s72-image--loaded {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/* stylelint-enable selector-no-qualifying-type */
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.post-body {
|
|
75
|
+
&,
|
|
76
|
+
p {
|
|
77
|
+
word-wrap: break-word;
|
|
78
|
+
font-weight: var(--post-body-font-weight);
|
|
79
|
+
line-height: var(--post-body-line-height);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
strong {
|
|
83
|
+
font-weight: bolder;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
a {
|
|
87
|
+
@include a;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.post-page {
|
|
92
|
+
comment-section {
|
|
93
|
+
padding: 0;
|
|
94
|
+
margin-top: 3rem;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.posts-feed-page {
|
|
99
|
+
.post-preview + .post-preview {
|
|
100
|
+
margin-top: var(--posts-feed-spacing);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.post-preview-show-more {
|
|
104
|
+
text-align: center;
|
|
105
|
+
opacity: 0.8;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Overflow behaviour: js in the template applies a .post-preview--overflowed class
|
|
109
|
+
.post-preview {
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
|
|
112
|
+
.post-body {
|
|
113
|
+
max-height: var(--post-preview-height);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.post-preview-show-more {
|
|
117
|
+
display: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&.post-preview--overflowed {
|
|
121
|
+
.post-preview-show-more {
|
|
122
|
+
display: block;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.post-body {
|
|
126
|
+
mask-image: linear-gradient(180deg, #000 72%, transparent);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.posts-pagination {
|
|
132
|
+
display: flex;
|
|
133
|
+
justify-content: space-between;
|
|
134
|
+
margin-top: 4rem;
|
|
135
|
+
padding-top: 2rem;
|
|
136
|
+
border-top: 1px solid #fff5;
|
|
137
|
+
|
|
138
|
+
.posts-pagination-next {
|
|
139
|
+
margin-left: auto;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -140,6 +140,14 @@
|
|
|
140
140
|
--page-detail-padding-hz: 20px;
|
|
141
141
|
--page-detail-padding-hz-lg: 50px;
|
|
142
142
|
|
|
143
|
+
--page-reading-column-width: 69ch;
|
|
144
|
+
|
|
145
|
+
--posts-feed-spacing: 6rem;
|
|
146
|
+
--post-preview-height: 300px;
|
|
147
|
+
|
|
148
|
+
--post-body-font-weight: 400;
|
|
149
|
+
--post-body-line-height: 1.55;
|
|
150
|
+
|
|
143
151
|
--heading-1-style-letter-spacing: normal;
|
|
144
152
|
--heading-2-style-letter-spacing: normal;
|
|
145
153
|
--heading-3-style-letter-spacing: normal;
|
|
@@ -187,7 +195,6 @@
|
|
|
187
195
|
--playback-progress-bar-color: var(--secondary);
|
|
188
196
|
--playback-progress-bar-bg-color: rgba(var(--body-bg-rgb), 0.5);
|
|
189
197
|
|
|
190
|
-
|
|
191
198
|
// Detail player
|
|
192
199
|
--page-detail-player-padding-top: 140px;
|
|
193
200
|
--page-detail-player-padding-top-lg: 200px;
|
package/site/styles/main.scss
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{{extends "templates/application/application.jet"}}
|
|
2
|
+
|
|
3
|
+
{{import "templates/page/post/shared.jet"}}
|
|
4
|
+
{{import "templates/common/background-image.jet"}}
|
|
5
|
+
|
|
6
|
+
{{block body()}}
|
|
7
|
+
<main id="main" class="page posts-feed-page">
|
|
8
|
+
{{range page := pages}}
|
|
9
|
+
{{yield postPreview(post=page)}}
|
|
10
|
+
{{end}}
|
|
11
|
+
|
|
12
|
+
<div class="posts-pagination">
|
|
13
|
+
{{ if len(pagination.PreviousURL) > 0 }}
|
|
14
|
+
<a class="posts-pagination-prev" href="{{pagination.PreviousURL}}">{{i18n("posts_pagination_prev")}}</a>
|
|
15
|
+
{{end}}
|
|
16
|
+
{{ if len(pagination.NextURL) > 0 }}
|
|
17
|
+
<a class="posts-pagination-next" href="{{pagination.NextURL}}">{{i18n("posts_pagination_next")}}</a>
|
|
18
|
+
{{end}}
|
|
19
|
+
</main>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
(function () {
|
|
23
|
+
function detectClamping() {
|
|
24
|
+
var previews = document.querySelectorAll('.post-preview');
|
|
25
|
+
|
|
26
|
+
previews.forEach(function (el) {
|
|
27
|
+
el.classList.remove('post-preview--overflowed');
|
|
28
|
+
|
|
29
|
+
var scroll = el.scrollHeight;
|
|
30
|
+
var client = el.clientHeight;
|
|
31
|
+
|
|
32
|
+
if (scroll > client + 1) {
|
|
33
|
+
el.classList.add('post-preview--overflowed');
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
detectClamping();
|
|
39
|
+
if (document.readyState === 'loading') {
|
|
40
|
+
document.addEventListener('DOMContentLoaded', detectClamping);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
window.addEventListener('load', detectClamping);
|
|
44
|
+
|
|
45
|
+
var resizeTimeout;
|
|
46
|
+
window.addEventListener('resize', function () {
|
|
47
|
+
clearTimeout(resizeTimeout);
|
|
48
|
+
resizeTimeout = setTimeout(detectClamping, 150);
|
|
49
|
+
});
|
|
50
|
+
})();
|
|
51
|
+
</script>
|
|
52
|
+
{{end}}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
{{block postPreview(post)}}
|
|
56
|
+
<div class="post-preview">
|
|
57
|
+
{{yield postTitle(post=post, href=routeTo(post, "pageItem"))}}
|
|
58
|
+
{{yield postMeta(post=post)}}
|
|
59
|
+
{{yield postHeaderImage(post=post)}}
|
|
60
|
+
{{yield postBody(text=post.Content)}}
|
|
61
|
+
<a class="post-preview-show-more" href='{{routeTo(post, "pageItem")}}'>{{i18n("post_preview_show_more")}}</a>
|
|
62
|
+
</div>
|
|
63
|
+
{{end}}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
{{block appBadges()}}{{end}}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{{block postTitle(post, href="")}}
|
|
2
|
+
<h3 class="post-title">
|
|
3
|
+
{{if len(href) > 0}}
|
|
4
|
+
<a href="{{href}}">{{post.Title}}</a>
|
|
5
|
+
{{else}}
|
|
6
|
+
{{post.Title}}
|
|
7
|
+
{{end}}
|
|
8
|
+
</h3>
|
|
9
|
+
{{end}}
|
|
10
|
+
|
|
11
|
+
{{block postMeta(post)}}
|
|
12
|
+
<div class="post-meta">
|
|
13
|
+
{{if !post.PublishedDate.IsZero()}}
|
|
14
|
+
<div class="post-published-date">
|
|
15
|
+
<s72-time datetime="{{post.PublishedDate.UnixMilli()}}" mode="date"></s72-time>
|
|
16
|
+
{* nbsp helps prevent layout shift due to s72-time relish component loading delay *}
|
|
17
|
+
</div>
|
|
18
|
+
{{end}}
|
|
19
|
+
</div>
|
|
20
|
+
{{end}}
|
|
21
|
+
|
|
22
|
+
{{block postHeaderImage(post)}}
|
|
23
|
+
{{if len(post.Images.Header) > 0}}
|
|
24
|
+
<div class="post-header-image">
|
|
25
|
+
<s72-image src="{{post.Images.Header}}"></s72-image>
|
|
26
|
+
</div>
|
|
27
|
+
{{end}}
|
|
28
|
+
{{end}}
|
|
29
|
+
|
|
30
|
+
{{block postBody(text="")}}
|
|
31
|
+
<div class="post-body">
|
|
32
|
+
{{text | raw}}
|
|
33
|
+
</div>
|
|
34
|
+
{{end}}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{{extends "templates/application/application.jet"}}
|
|
2
|
+
|
|
3
|
+
{{import "templates/page/post/shared.jet"}}
|
|
4
|
+
{{import "templates/common/background-image.jet"}}
|
|
5
|
+
|
|
6
|
+
{{block head()}}
|
|
7
|
+
{{yield seo() page}}
|
|
8
|
+
{{end}}
|
|
9
|
+
|
|
10
|
+
{{block body()}}
|
|
11
|
+
<main id="main" class="page post-page">
|
|
12
|
+
{{yield backgroundImage(containerClass="page-bg", gradientClass="right-gradient", imageClass="page-bg-img", imageSrc=page.Images.Background)}}
|
|
13
|
+
|
|
14
|
+
<div class="post">
|
|
15
|
+
{{yield postTitle(post=page)}}
|
|
16
|
+
{{yield postMeta(post=page)}}
|
|
17
|
+
{{yield postHeaderImage(post=page)}}
|
|
18
|
+
{{yield postBody(text=page.Content)}}
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
{{if isEnabled("commenting")}}
|
|
22
|
+
<comment-section slug="{{page.Slug}}"></comment-section>
|
|
23
|
+
{{end}}
|
|
24
|
+
</main>
|
|
25
|
+
{{end}}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
{{block appBadges()}}{{end}}
|