@shift72/core-template 0.4.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/CHANGELOG.md +37 -16
  2. package/kibble.json +108 -29
  3. package/package.json +21 -8
  4. package/scripts/core-template-version.js +30 -0
  5. package/scripts/language-file-to-csv/language-file-to-csv.js +2 -2
  6. package/scripts/language-file-validator.js +1 -1
  7. package/scripts/translate.mjs +43 -0
  8. package/site/ar_LB.all.json +1262 -595
  9. package/site/ca_ES.all.json +437 -417
  10. package/site/da_DK.all.json +307 -221
  11. package/site/de_DE.all.json +1119 -459
  12. package/site/ee_EE.all.json +1261 -600
  13. package/site/el_EL.all.json +1112 -459
  14. package/site/en_AU.all.json +1159 -467
  15. package/site/es_ES.all.json +1105 -452
  16. package/site/es_MX.all.json +1160 -479
  17. package/site/fi_FI.all.json +1113 -460
  18. package/site/fr_FR.all.json +1105 -454
  19. package/site/hr_HR.all.json +1169 -464
  20. package/site/hu_HU.all.json +1261 -599
  21. package/site/it_IT.all.json +1112 -458
  22. package/site/ja_JP.all.json +1114 -460
  23. package/site/lt_LT.all.json +1112 -454
  24. package/site/nl_BE.all.json +1112 -456
  25. package/site/no_NO.all.json +1252 -596
  26. package/site/pl_PL.all.json +1090 -447
  27. package/site/pt_BR.all.json +432 -429
  28. package/site/pt_PT.all.json +1252 -602
  29. package/site/ru_RU.all.json +1088 -449
  30. package/site/sr_SR.all.json +1254 -0
  31. package/site/styles/_awards.scss +5 -0
  32. package/site/styles/_buttons.scss +23 -0
  33. package/site/styles/_carousel.scss +9 -1
  34. package/site/styles/_forms.scss +78 -11
  35. package/site/styles/_meta-detail.scss +2 -2
  36. package/site/styles/_meta-item-tagline.scss +1 -1
  37. package/site/styles/_nav.scss +6 -6
  38. package/site/styles/_pages.scss +0 -2
  39. package/site/styles/_plans.scss +5 -0
  40. package/site/styles/_search.scss +1 -1
  41. package/site/styles/_shift72.scss +3 -3
  42. package/site/styles/_shopping.scss +1 -1
  43. package/site/styles/_skip-link.scss +19 -0
  44. package/site/styles/_variables.scss +10 -6
  45. package/site/styles/_wishlist.scss +19 -11
  46. package/site/styles/main.scss +1 -0
  47. package/site/templates/application/application.jet +11 -14
  48. package/site/templates/application/google.jet +26 -10
  49. package/site/templates/common/awards/carousel.jet +7 -1
  50. package/site/templates/common/awards/item.jet +2 -2
  51. package/site/templates/film/item.jet +83 -76
  52. package/site/templates/page/curated.jet +1 -1
  53. package/site/templates/page/page-content.jet +1 -23
  54. package/site/templates/page/page-header.jet +25 -6
  55. package/site/tr_TR.all.json +1252 -602
  56. package/site/uk_UA.all.json +528 -451
  57. package/site/zh_TW.all.json +438 -419
  58. package/site/se_SE.all.json +0 -601
@@ -21,16 +21,15 @@
21
21
  <main id="main" class="page page-film meta-detail meta-detail-film">
22
22
  <div class="meta-detail-bg">
23
23
  <div class="right-gradient"></div>
24
- <s72-image src="{{film.Images.Background}}" alt="" class="meta-detail-bg-img"></s72-image>
24
+ <s72-image src="{{film.ImageMap["Background"]}}" alt="" class="meta-detail-bg-img"></s72-image>
25
25
  </div>
26
26
  <div class="container">
27
27
  <div class="meta-detail-main">
28
28
  {{if config("default_image_type") == "portrait"}}
29
29
  <div class="poster poster-portrait">
30
30
  <s72-availability-status data-slug="{{film.Slug}}"></s72-availability-status>
31
- <s72-image src="{{film.Images.Classification}}" alt="" class="classification-image">
32
-
33
- <s72-image src="{{film.Images.Portrait}}" alt="{{film.Title}}" class="poster poster-image poster-image-portrait"></s72-image>
31
+ <s72-image src="{{film.ImageMap["Classification"]}}" alt="" class="classification-image">
32
+ <s72-image src="{{film.ImageMap["Portrait"]}}" alt="{{film.Title}}" class="poster poster-image poster-image-portrait"></s72-image>
34
33
 
35
34
  </div>
36
35
  {{end}}
@@ -63,84 +62,92 @@
63
62
  <s72-availability-label data-slug="{{film.Slug}}"></s72-availability-label>
64
63
 
65
64
  {{yield awardNominations() film}}
66
-
67
- <div class="meta-detail-synopsis">{{film.Overview | raw}}</div>
68
- <div class="meta-detail-cast">
69
- {{if len(film.Cast) > 0 }}
70
- <h2>{{i18n("meta_detail_cast_title")}}</h2>
71
- {{end}}
72
- <p>
73
- {{range index, member := film.Cast}}
74
- {{ path := "/search.html?q=" + member.Name }}
75
- <a href="{{ routeToPath(path) }}">{{member.Name}}</a>{{if index < len(film.Cast) - 1}}, {{end}}
76
- {{end}}
77
- </p>
78
- </div>
79
- <div class="meta-detail-crew d-flex">
80
- {{range index, member := film.Crew}}
81
- <div class="crew-member">
82
- <h2>{{member.Job}}</h2>
83
- {{ path := "/search.html?q=" + member.Name }}
84
- <a href="{{ routeToPath(path) }}">{{member.Name}}</a>
65
+ <s72-element-switcher>
66
+ {{if isEnabled("element_switcher_enabled")}}
67
+ <div class="meta-detail-switcher-tagline">
68
+ <p>{{film.Tagline}}</p>
85
69
  </div>
86
70
  {{end}}
87
- </div>
88
- {{if len(film.Languages) > 0 }}
89
- <div class="meta-detail-language">
90
- <h2>{{i18n("meta_detail_languages", len(film.Languages))}}</h2>
91
- <p>{{ film.Languages }}</p>
92
- </div>
93
- {{end}}
94
- {{allSubtitles := film.GetSubtitles()}}
95
- {{if len(allSubtitles) > 0 }}
96
- {{subtitles := ""}}
97
- {{captions := ""}}
98
- {{if len(film.SubtitleTracks) == 0}}
99
- {{subtitles = allSubtitles}}
100
- {{else}}
101
- {{range subTrack := film.SubtitleTracks}}
102
- {{if len(subTrack) >= 3}}
103
- {{if subTrack[2] == "caption"}}
104
- {{captions = captions ? captions + ", " + subTrack[1] : subTrack[1]}}
105
- {{else}}
106
- {{subtitles = subtitles ? subtitles + ", " + subTrack[1] : subTrack[1]}}
107
- {{end}}
108
- {{end}}
71
+ <div class="{{ isEnabled("element_switcher_enabled") ? "s72-hide" : "" }}"> {* hide class prevents FOUC *}
72
+ <div class="meta-detail-synopsis">{{film.Overview | raw}}</div>
73
+ <div class="meta-detail-cast">
74
+ {{if len(film.Cast) > 0 }}
75
+ <h2>{{i18n("meta_detail_cast_title")}}</h2>
109
76
  {{end}}
110
- {{end}}
111
- {{if subtitles}}
112
- <div class="meta-detail-subtitle">
113
- <h2>{{i18n("meta_detail_subtitles")}}</h2>
114
- <p>{{subtitles}}</p>
77
+ <p>
78
+ {{range index, member := film.Cast}}
79
+ {{ path := "/search.html?q=" + member.Name }}
80
+ <a href="{{ routeToPath(path) }}">{{member.Name}}</a>{{if index < len(film.Cast) - 1}}, {{end}}
81
+ {{end}}
82
+ </p>
115
83
  </div>
116
- {{end}}
117
- {{if captions}}
118
- <div class="meta-detail-subtitle">
119
- <h2>{{i18n("meta_detail_captions")}}</h2>
120
- <p>{{captions}}</p>
84
+ <div class="meta-detail-crew d-flex">
85
+ {{range index, member := film.Crew}}
86
+ <div class="crew-member">
87
+ <h2>{{member.Job}}</h2>
88
+ {{ path := "/search.html?q=" + member.Name }}
89
+ <a href="{{ routeToPath(path) }}">{{member.Name}}</a>
90
+ </div>
91
+ {{end}}
121
92
  </div>
122
- {{end}}
123
- {{end}}
124
- {{if len(film.Countries) > 0 }}
125
- <div class="meta-detail-country">
126
- <h2>{{i18n("meta_detail_countries", len(film.Countries))}}</h2>
127
- <p>{{ film.Countries }}</p>
128
- </div>
129
- {{end}}
130
- {{if len(film.Studio) > 0 }}
131
- <div class="meta-detail-studio">
132
- <h2>{{i18n("meta_detail_studios", len(film.Studio))}}</h2>
133
- {*{ FORMAT STUDIOS }*}
134
- {{ studios := "" }}
135
- {{ range studio := film.Studio }}
136
- {{ studios = studios + studio + ", "}}
137
- {{ end }}
138
- {{ if len(studios) > 0 }}
139
- {{ studios = studios[0:len(studios) - 2] }}
140
- {{ end }}
141
- <p>{{ studios }}</p>
93
+ {{if len(film.Languages) > 0 }}
94
+ <div class="meta-detail-language">
95
+ <h2>{{i18n("meta_detail_languages", len(film.Languages))}}</h2>
96
+ <p>{{ film.Languages }}</p>
97
+ </div>
98
+ {{end}}
99
+ {{allSubtitles := film.GetSubtitles()}}
100
+ {{if len(allSubtitles) > 0 }}
101
+ {{subtitles := ""}}
102
+ {{captions := ""}}
103
+ {{if len(film.SubtitleTracks) == 0}}
104
+ {{subtitles = allSubtitles}}
105
+ {{else}}
106
+ {{range subTrack := film.SubtitleTracks}}
107
+ {{if len(subTrack) >= 3}}
108
+ {{if subTrack[2] == "caption"}}
109
+ {{captions = captions ? captions + ", " + subTrack[1] : subTrack[1]}}
110
+ {{else}}
111
+ {{subtitles = subtitles ? subtitles + ", " + subTrack[1] : subTrack[1]}}
112
+ {{end}}
113
+ {{end}}
114
+ {{end}}
115
+ {{end}}
116
+ {{if subtitles}}
117
+ <div class="meta-detail-subtitle">
118
+ <h2>{{i18n("meta_detail_subtitles")}}</h2>
119
+ <p>{{subtitles}}</p>
120
+ </div>
121
+ {{end}}
122
+ {{if captions}}
123
+ <div class="meta-detail-subtitle">
124
+ <h2>{{i18n("meta_detail_captions")}}</h2>
125
+ <p>{{captions}}</p>
126
+ </div>
127
+ {{end}}
128
+ {{end}}
129
+ {{if len(film.Countries) > 0 }}
130
+ <div class="meta-detail-country">
131
+ <h2>{{i18n("meta_detail_countries", len(film.Countries))}}</h2>
132
+ <p>{{ film.Countries }}</p>
133
+ </div>
134
+ {{end}}
135
+ {{if len(film.Studio) > 0 }}
136
+ <div class="meta-detail-studio">
137
+ <h2>{{i18n("meta_detail_studios", len(film.Studio))}}</h2>
138
+ {*{ FORMAT STUDIOS }*}
139
+ {{ studios := "" }}
140
+ {{ range studio := film.Studio }}
141
+ {{ studios = studios + studio + ", "}}
142
+ {{ end }}
143
+ {{ if len(studios) > 0 }}
144
+ {{ studios = studios[0:len(studios) - 2] }}
145
+ {{ end }}
146
+ <p>{{ studios }}</p>
147
+ </div>
148
+ {{end}}
142
149
  </div>
143
- {{end}}
150
+ </s72-element-switcher>
144
151
  {{if len(film.Bonuses) > 0 && !film.CustomFields.GetBool("hide_bonus_content", false)}}
145
152
  <section class="meta-detail-bonus-content" aria-label="{{i18n("meta_detail_bonus_title")}}">
146
153
  <h2>{{i18n("meta_detail_bonus_title")}}</h2>
@@ -20,7 +20,7 @@
20
20
 
21
21
  {{yield pageHeader(title=page.Title, plan=plan)}}
22
22
 
23
- {{yield pageContent(text=page.Content, plan=plan)}}
23
+ {{yield pageContent(text=page.Content)}}
24
24
 
25
25
  <div class="page-collections">
26
26
  <h2 class="sr-only">{{i18n("wcag_collections_h2")}}</h2>
@@ -1,29 +1,7 @@
1
- {{block pageContent(text="", plan=0)}}
1
+ {{block pageContent(text="")}}
2
2
  {{if len(text) > 0}}
3
3
  <div class="page-content">
4
4
  {{text | raw}}
5
-
6
- {{if plan != 0 }}
7
- <div class="plan-buttons">
8
- {{ if plan.PlanType == "free" }}
9
- {{ if plan.HasExpiryDate() }}
10
- <s72-before datetime="{{ plan.ExpiryDate.UnixMilli() }}">
11
- <s72-user-anon>
12
- <a class="btn btn-block s72-btn-purchase signup-link" href="{{routeToPath("/signup.html")}}">{{ i18n("plan_free_link_text") }}</a>
13
- </s72-user-anon>
14
- </s72-before>
15
- {{ else }}
16
- <s72-user-anon>
17
- <a class="btn btn-block s72-btn-purchase signup-link" href="{{routeToPath("/signup.html")}}">{{ i18n("plan_free_link_text") }}</a>
18
- </s72-user-anon>
19
- {{ end }}
20
- {{ else }}
21
- <s72-pricing-buttons data-slug="{{plan.Slug}}" data-title="{{plan.Name}}" data-ownership-label-prefix={{ i18n("plan_showcase_page_ownership_button_") }} data-hide-price="true" />
22
- {{ end }}
23
- </div>
24
- {{end}}
25
5
  </div>
26
-
27
-
28
6
  {{end}}
29
7
  {{end}}
@@ -1,13 +1,13 @@
1
1
  {{block pageHeader(title="", plan=0)}}
2
2
  {{if len(title) > 0}}
3
- <div class="page-header">
3
+ <div class="page-header pb-0">
4
4
  {{if plan != 0}}
5
5
  <s72-plan-label data-slug="{{plan.Slug}}" data-title="{{plan.Name}}"></s72-plan-label>
6
6
  {{end}}
7
7
  <h1>{{title}}</h1>
8
- {{if plan != 0 && plan.HasExpiryDate() }}
9
- {{ if plan.HasExpiryDate() }}
10
- <p class="alert p-0 border-0 my-1">
8
+ {{if plan != 0}}
9
+ {{if plan.HasExpiryDate()}}
10
+ <p class="alert p-0 border-0 mt-1rem mb-0">
11
11
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-exclamation-circle mr-p5" viewBox="0 0 16 16"> <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/> <path d="M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/> </svg>
12
12
  <small>
13
13
  <s72-before datetime="{{ plan.ExpiryDate.UnixMilli() }}">
@@ -19,8 +19,27 @@
19
19
  </s72-after>
20
20
  </small>
21
21
  </p>
22
- {{ end }}
22
+ {{end}}
23
+
24
+ <div class="plan-buttons mt-1rem mb-0">
25
+ {{ if plan.PlanType == "free" }}
26
+ {{ if plan.HasExpiryDate() }}
27
+ <s72-before datetime="{{ plan.ExpiryDate.UnixMilli() }}">
28
+ <s72-user-anon>
29
+ <a class="btn btn-block s72-btn-purchase signup-link" href="{{routeToPath("/signup.html")}}">{{ i18n("plan_free_link_text") }}</a>
30
+ </s72-user-anon>
31
+ </s72-before>
32
+ {{ else }}
33
+ <s72-user-anon>
34
+ <a class="btn btn-block s72-btn-purchase signup-link" href="{{routeToPath("/signup.html")}}">{{ i18n("plan_free_link_text") }}</a>
35
+ </s72-user-anon>
36
+ {{ end }}
37
+ {{ else }}
38
+ <s72-pricing-buttons data-slug="{{plan.Slug}}" data-title="{{plan.Name}}" />
39
+ {{ end }}
40
+ </div>
23
41
  {{end}}
42
+
24
43
  </div>
25
44
  {{end}}
26
- {{end}}
45
+ {{end}}