@shift72/core-template 0.4.3 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +47 -14
- package/kibble.json +108 -29
- package/package.json +21 -8
- package/scripts/core-template-version.js +30 -0
- package/scripts/language-file-to-csv/language-file-to-csv.js +2 -2
- package/scripts/language-file-validator.js +1 -1
- package/scripts/translate.mjs +43 -0
- package/site/ar_LB.all.json +1262 -595
- package/site/ca_ES.all.json +437 -417
- package/site/da_DK.all.json +307 -221
- package/site/de_DE.all.json +1119 -459
- package/site/ee_EE.all.json +1261 -600
- package/site/el_EL.all.json +1112 -459
- package/site/en_AU.all.json +1158 -466
- package/site/es_ES.all.json +1105 -452
- package/site/es_MX.all.json +1160 -479
- package/site/fi_FI.all.json +1113 -460
- package/site/fr_FR.all.json +1105 -454
- package/site/hr_HR.all.json +1169 -464
- package/site/hu_HU.all.json +1261 -599
- package/site/it_IT.all.json +1112 -458
- package/site/ja_JP.all.json +1114 -460
- package/site/lt_LT.all.json +1112 -454
- package/site/nl_BE.all.json +1112 -456
- package/site/no_NO.all.json +1252 -596
- package/site/pl_PL.all.json +1090 -447
- package/site/pt_BR.all.json +432 -429
- package/site/pt_PT.all.json +1252 -602
- package/site/ru_RU.all.json +1088 -449
- package/site/sr_SR.all.json +1254 -0
- package/site/styles/_awards.scss +5 -0
- package/site/styles/_buttons.scss +27 -4
- package/site/styles/_carousel.scss +9 -1
- package/site/styles/_forms.scss +78 -11
- package/site/styles/_meta-detail.scss +2 -2
- package/site/styles/_meta-item-tagline.scss +1 -1
- package/site/styles/_nav.scss +6 -6
- package/site/styles/_pages.scss +0 -2
- package/site/styles/_plans.scss +5 -0
- package/site/styles/_search.scss +1 -1
- package/site/styles/_shift72.scss +3 -3
- package/site/styles/_shopping.scss +1 -1
- package/site/styles/_skip-link.scss +19 -0
- package/site/styles/_variables.scss +10 -6
- package/site/styles/_wishlist.scss +19 -11
- package/site/styles/main.scss +1 -0
- package/site/templates/application/application.jet +11 -14
- package/site/templates/application/google.jet +26 -10
- package/site/templates/common/awards/carousel.jet +7 -1
- package/site/templates/common/awards/item.jet +2 -2
- package/site/templates/film/item.jet +83 -76
- package/site/templates/page/curated.jet +1 -1
- package/site/templates/page/page-content.jet +1 -23
- package/site/templates/page/page-header.jet +25 -6
- package/site/tr_TR.all.json +1252 -602
- package/site/uk_UA.all.json +528 -451
- package/site/zh_TW.all.json +438 -419
- package/site/se_SE.all.json +0 -601
package/CHANGELOG.md
CHANGED
@@ -1,30 +1,63 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [Unreleased](https://github.com/shift72/core-template/compare/0.
|
3
|
+
## [Unreleased](https://github.com/shift72/core-template/compare/0.5.1...HEAD)
|
4
|
+
|
5
|
+
## [0.5.1](https://github.com/shift72/core-template/compare/0.5.0...0.5.1)
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
- Upgrade to kibble `0.16.7`.
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
- Sentence casing for `en_AU` translation about passes.
|
12
|
+
|
13
|
+
## [0.5.0](https://github.com/shift72/core-template/compare/0.4.4...0.5.0)
|
14
|
+
### Changed
|
15
|
+
- Upgrade to kibble `0.16.6`.
|
16
|
+
- Moved references from `film.Images` to `film.ImageMap`.
|
17
|
+
- Removed minimum page height from content pages.
|
18
|
+
- Moved skip link above cookie consent banner
|
19
|
+
|
20
|
+
### Added
|
21
|
+
- Start the site with an admin build: `npm start --admin`.
|
22
|
+
- Added Core template version to `<head>` and `kibble.json`.
|
23
|
+
- Added styling for floating donate button to use button sass variables.
|
24
|
+
- A bunch of missing language keys across language files.
|
25
|
+
- Automated translation command
|
26
|
+
|
27
|
+
### Fixed
|
28
|
+
- Can now override the cookie consent styling.
|
29
|
+
- Can now send analytics data to both GA4 and UA Legacy google analytics (GA4 previously not supported)
|
30
|
+
|
31
|
+
## [0.4.4](https://github.com/shift72/core-template/compare/0.4.3...0.4.4)
|
32
|
+
### Fixed
|
33
|
+
- Fixed obsolete `$primary` var for trailer button.
|
34
|
+
|
35
|
+
### Added
|
36
|
+
- Awards categories.
|
4
37
|
|
5
38
|
## [0.4.3](https://github.com/shift72/core-template/compare/0.4.2...0.4.3)
|
6
39
|
|
7
40
|
### Added
|
8
|
-
- Awards categories
|
9
|
-
- Floating donate button
|
41
|
+
- Awards categories.
|
42
|
+
- Floating donate button.
|
10
43
|
- External custom CSS link in head.
|
11
44
|
- Scripts for downloading/uploading custom CSS files for use with local development.
|
12
45
|
|
13
46
|
### Changed
|
14
|
-
- Replaced various
|
15
|
-
- Added workarounds for
|
16
|
-
- Kibble 0.16.4
|
17
|
-
- Split CC and Subtitles
|
18
|
-
- Moved engagement icons
|
47
|
+
- Replaced various Sass variables with CSS variables.
|
48
|
+
- Added workarounds for Sass and Bootstrap functions that don't understand CSS variables.
|
49
|
+
- Kibble `0.16.4`.
|
50
|
+
- Split CC and Subtitles.
|
51
|
+
- Moved engagement icons.
|
19
52
|
|
20
53
|
## [0.4.2](https://github.com/shift72/core-template/compare/0.4.1...0.4.2)
|
21
54
|
|
22
55
|
### Added
|
23
|
-
- Lang files updated with entries for purchasing one-off passes
|
24
|
-
- Sponsor banner
|
56
|
+
- Lang files updated with entries for purchasing one-off passes.
|
57
|
+
- Sponsor banner.
|
25
58
|
|
26
|
-
###
|
27
|
-
- Typo in English
|
59
|
+
### Fixed
|
60
|
+
- Typo in English language file.
|
28
61
|
|
29
62
|
## [0.4.1](https://github.com/shift72/core-template/compare/0.4.0...0.4.1)
|
30
63
|
|
@@ -45,11 +78,11 @@ No changes from RC0.
|
|
45
78
|
|
46
79
|
### Changed
|
47
80
|
- Moved separator line from footer jet into app badge jet.
|
48
|
-
- Kibble upgraded to
|
81
|
+
- Kibble upgraded to `0.15.22`.
|
49
82
|
- Application templates moved to `/site/templates/application/`.
|
50
83
|
- Links (`<a>` tags) without a `class` attribute have `text-decoration: underline`.
|
51
84
|
|
52
|
-
|
85
|
+
### Fixed
|
53
86
|
- Curated pages with a collection no longer has a `min-height` that was forcing a gap before the collection.
|
54
87
|
|
55
88
|
## [0.3.8](https://github.com/shift72/core-template/compare/0.3.7...0.3.8)
|
package/kibble.json
CHANGED
@@ -2,35 +2,113 @@
|
|
2
2
|
"name": "core-template",
|
3
3
|
"version": "0.0.1",
|
4
4
|
"siteUrl": "https://abccinemas.screenplus.co",
|
5
|
-
"builderVersion": "0.16.
|
5
|
+
"builderVersion": "0.16.6",
|
6
6
|
"defaultLanguage": "en",
|
7
7
|
"languages": {
|
8
|
-
"ar": {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
"
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
"
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
"
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
"
|
33
|
-
|
8
|
+
"ar": {
|
9
|
+
"code": "ar_LB",
|
10
|
+
"name": "عربى"
|
11
|
+
},
|
12
|
+
"ca": {
|
13
|
+
"code": "ca_ES",
|
14
|
+
"name": "Català"
|
15
|
+
},
|
16
|
+
"da": {
|
17
|
+
"code": "da_DK",
|
18
|
+
"name": "Dansk"
|
19
|
+
},
|
20
|
+
"de": {
|
21
|
+
"code": "de_DE",
|
22
|
+
"name": "Deutsch"
|
23
|
+
},
|
24
|
+
"ee": {
|
25
|
+
"code": "ee_EE",
|
26
|
+
"name": "Eestlane"
|
27
|
+
},
|
28
|
+
"el": {
|
29
|
+
"code": "el_EL",
|
30
|
+
"name": "Ελληνικά"
|
31
|
+
},
|
32
|
+
"en": {
|
33
|
+
"code": "en_AU",
|
34
|
+
"name": "English"
|
35
|
+
},
|
36
|
+
"es": {
|
37
|
+
"code": "es_ES",
|
38
|
+
"name": "Español"
|
39
|
+
},
|
40
|
+
"es-mx": {
|
41
|
+
"code": "es_MX",
|
42
|
+
"name": "Español"
|
43
|
+
},
|
44
|
+
"fi": {
|
45
|
+
"code": "fi_FI",
|
46
|
+
"name": "Suomi"
|
47
|
+
},
|
48
|
+
"fr": {
|
49
|
+
"code": "fr_FR",
|
50
|
+
"name": "Français"
|
51
|
+
},
|
52
|
+
"hr": {
|
53
|
+
"code": "hr_HR",
|
54
|
+
"name": "Hrvatski"
|
55
|
+
},
|
56
|
+
"hu": {
|
57
|
+
"code": "hu_HU",
|
58
|
+
"name": "Magyar"
|
59
|
+
},
|
60
|
+
"it": {
|
61
|
+
"code": "it_IT",
|
62
|
+
"name": "Italiano"
|
63
|
+
},
|
64
|
+
"ja": {
|
65
|
+
"code": "ja_JP",
|
66
|
+
"name": "日本語"
|
67
|
+
},
|
68
|
+
"lt": {
|
69
|
+
"code": "lt_LT",
|
70
|
+
"name": "Lietuvių Kalba"
|
71
|
+
},
|
72
|
+
"nl": {
|
73
|
+
"code": "nl_BE",
|
74
|
+
"name": "Nederlands"
|
75
|
+
},
|
76
|
+
"no": {
|
77
|
+
"code": "no_NO",
|
78
|
+
"name": "Norsk"
|
79
|
+
},
|
80
|
+
"pl": {
|
81
|
+
"code": "pl_PL",
|
82
|
+
"name": "Polski"
|
83
|
+
},
|
84
|
+
"pt": {
|
85
|
+
"code": "pt_PT",
|
86
|
+
"name": "Português"
|
87
|
+
},
|
88
|
+
"pt-br": {
|
89
|
+
"code": "pt_BR",
|
90
|
+
"name": "Português do Brasil"
|
91
|
+
},
|
92
|
+
"ru": {
|
93
|
+
"code": "ru_RU",
|
94
|
+
"name": "Pусский"
|
95
|
+
},
|
96
|
+
"sr": {
|
97
|
+
"code": "sr_SR",
|
98
|
+
"name": "Српски"
|
99
|
+
},
|
100
|
+
"tr": {
|
101
|
+
"code": "tr_TR",
|
102
|
+
"name": "Türk"
|
103
|
+
},
|
104
|
+
"uk": {
|
105
|
+
"code": "uk_UA",
|
106
|
+
"name": "Український"
|
107
|
+
},
|
108
|
+
"zh-tw": {
|
109
|
+
"code": "zh_TW",
|
110
|
+
"name": "中文"
|
111
|
+
}
|
34
112
|
},
|
35
113
|
"siteRootPath": "site",
|
36
114
|
"liveReload": {
|
@@ -106,5 +184,6 @@
|
|
106
184
|
"datasource": "Collection",
|
107
185
|
"pageSize": 0
|
108
186
|
}
|
109
|
-
]
|
110
|
-
|
187
|
+
],
|
188
|
+
"coreTemplateVersion": "0.5.1"
|
189
|
+
}
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@shift72/core-template",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.5.1",
|
4
4
|
"description": "Shift72 core template",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
7
|
-
"start": "
|
8
|
-
"init": "
|
7
|
+
"start": "run-s -l init && run-p -l css:watch js:watch kibble:start",
|
8
|
+
"init": "run-p -l css css:local:get js",
|
9
9
|
"css": "sass ./site/styles/main.scss ./site/static/styles/main.css --load-path=node_modules",
|
10
10
|
"css:lint": "prettier 'site/styles/*.scss' --write && stylelint ./site/styles/*.scss --fix",
|
11
11
|
"css:watch": "npm run css -- --watch",
|
@@ -13,15 +13,21 @@
|
|
13
13
|
"css:local:get": "node scripts/css-local-get.js",
|
14
14
|
"css:local:put": "node scripts/css-local-put.js",
|
15
15
|
"js": "rollup -c",
|
16
|
-
"js:lint": "prettier '{scripts,site/static/js}/**/!(modernizr-custom)
|
16
|
+
"js:lint": "prettier '{scripts,site/static/js}/**/!(modernizr-custom).*js' --write && eslint ./site/static/js/*.*js ./scripts --fix",
|
17
17
|
"js:watch": "rollup -c -w",
|
18
18
|
"js:build": "rollup -c",
|
19
19
|
"kibble": "kibble render",
|
20
|
+
"kibble:start": "mkdir -p .kibble && test -n \"$npm_config_admin\" && npm run kibble:watch -- --admin || npm run kibble:watch",
|
20
21
|
"kibble:watch": "kibble render --watch --port 8081",
|
21
22
|
"kibble:build": "kibble publish",
|
22
|
-
"build": "
|
23
|
+
"build": "run-s -l css js:build css:build kibble:build",
|
23
24
|
"language:csv": "node scripts/language-file-to-csv/language-file-to-csv.js site/en_AU.all.json",
|
24
|
-
"language:validate": "node scripts/language-file-validator.js"
|
25
|
+
"language:validate": "node scripts/language-file-validator.js",
|
26
|
+
"version": "node scripts/core-template-version.js",
|
27
|
+
"prestart": "npm run version",
|
28
|
+
"prebuild": "npm run version",
|
29
|
+
"prepare": "npm run version",
|
30
|
+
"translate": "node scripts/translate.mjs"
|
25
31
|
},
|
26
32
|
"repository": {
|
27
33
|
"type": "git",
|
@@ -47,7 +53,7 @@
|
|
47
53
|
"postcss-cli": "^9.0.1",
|
48
54
|
"rollup": "^2.23.0",
|
49
55
|
"rollup-plugin-terser": "^6.1.0",
|
50
|
-
"s72-kibble": "^0.16.
|
56
|
+
"s72-kibble": "^0.16.7",
|
51
57
|
"sass": "^1.36.0"
|
52
58
|
},
|
53
59
|
"devDependencies": {
|
@@ -63,9 +69,16 @@
|
|
63
69
|
"stylelint-config-prettier": "^8.0.2",
|
64
70
|
"stylelint-config-sass-guidelines": "^8.0.0",
|
65
71
|
"stylelint-prettier": "^1.2.0",
|
66
|
-
"stylelint-scss": "^3.19.0"
|
72
|
+
"stylelint-scss": "^3.19.0",
|
73
|
+
"glob": "^7.2.0",
|
74
|
+
"node-fetch": "^3.2.3"
|
67
75
|
},
|
68
76
|
"eslintConfig": {
|
77
|
+
"settings": {
|
78
|
+
"jest": {
|
79
|
+
"version": 26
|
80
|
+
}
|
81
|
+
},
|
69
82
|
"env": {
|
70
83
|
"browser": true,
|
71
84
|
"es6": true
|
@@ -0,0 +1,30 @@
|
|
1
|
+
const fs = require('fs');
|
2
|
+
|
3
|
+
let version, kibbleJSON;
|
4
|
+
|
5
|
+
try {
|
6
|
+
version = JSON.parse(fs.readFileSync('package.json'))['version'];
|
7
|
+
} catch(e) {
|
8
|
+
exitWithError(`Failed to parse package.json: ${e}`);
|
9
|
+
}
|
10
|
+
|
11
|
+
try {
|
12
|
+
kibbleJSON = JSON.parse(fs.readFileSync('kibble.json'));
|
13
|
+
} catch(e) {
|
14
|
+
exitWithError(`Failed to parse kibble.json: ${e}`);
|
15
|
+
}
|
16
|
+
|
17
|
+
kibbleJSON['coreTemplateVersion'] = version;
|
18
|
+
|
19
|
+
try {
|
20
|
+
fs.writeFileSync('kibble.json', JSON.stringify(kibbleJSON, null, 2));
|
21
|
+
} catch(e) {
|
22
|
+
exitWithError(`Failed to write kibble.json: ${e}`);
|
23
|
+
}
|
24
|
+
|
25
|
+
console.log(`Core-Template Version ${version} written to kibble.json`);
|
26
|
+
|
27
|
+
function exitWithError(message) {
|
28
|
+
console.error(message);
|
29
|
+
process.exit();
|
30
|
+
}
|
@@ -7,7 +7,7 @@ if (!fs.existsSync(outputDir)) {
|
|
7
7
|
|
8
8
|
if (process.argv.length < 3) {
|
9
9
|
console.error('ERROR - Language file path argument missing!');
|
10
|
-
|
10
|
+
process.exit();
|
11
11
|
}
|
12
12
|
|
13
13
|
let languageFilePath = process.argv[2];
|
@@ -15,7 +15,7 @@ let validLanguageFilePath = /site\/[a-z]{2}_[A-Z]{2}.all.json/;
|
|
15
15
|
|
16
16
|
if (!languageFilePath.match(validLanguageFilePath)) {
|
17
17
|
console.error(`ERROR - Language file path argument '${languageFilePath}' invalid!`);
|
18
|
-
|
18
|
+
process.exit();
|
19
19
|
}
|
20
20
|
|
21
21
|
let rawdata = fs.readFileSync(languageFilePath);
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import fetch from 'node-fetch';
|
2
|
+
import glob from 'glob';
|
3
|
+
import * as fs from 'fs';
|
4
|
+
const key = process.argv[2];
|
5
|
+
const value = process.argv[3];
|
6
|
+
const nestedKey = process.argv[4];
|
7
|
+
|
8
|
+
if (!key || !value) {
|
9
|
+
console.log('Should be \'npm run translate key value\'');
|
10
|
+
process.exit(1);
|
11
|
+
}
|
12
|
+
glob('./site/*.json', {}, (err, files) => {
|
13
|
+
files.forEach(pathName => {
|
14
|
+
const file_content = fs.readFileSync(pathName);
|
15
|
+
const content = JSON.parse(file_content);
|
16
|
+
let languageCode = pathName.slice(7, 9);
|
17
|
+
if (languageCode == 'ee') languageCode = 'et';
|
18
|
+
fetch(
|
19
|
+
`https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${languageCode}&dt=t&q=${encodeURI(
|
20
|
+
value
|
21
|
+
)}`
|
22
|
+
)
|
23
|
+
.then(res => {
|
24
|
+
const contentType = res.headers.get('content-type');
|
25
|
+
if (contentType && contentType.indexOf('application/json') !== -1) {
|
26
|
+
return res.json();
|
27
|
+
}
|
28
|
+
console.log(`translation failed for ${languageCode}`);
|
29
|
+
})
|
30
|
+
.then(translated => {
|
31
|
+
if (translated) {
|
32
|
+
const translatedValue = translated[0][0][0];
|
33
|
+
|
34
|
+
if (!content[key]) {
|
35
|
+
content[key] = {};
|
36
|
+
}
|
37
|
+
|
38
|
+
content[key][nestedKey ? nestedKey : 'other'] = translatedValue;
|
39
|
+
fs.writeFileSync(pathName, JSON.stringify(content, null, 2));
|
40
|
+
}
|
41
|
+
});
|
42
|
+
});
|
43
|
+
});
|