@shift72/core-template 0.4.4 → 0.6.0-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. package/.nvmrc +1 -0
  2. package/CHANGELOG.md +68 -16
  3. package/kibble.json +108 -29
  4. package/package.json +21 -9
  5. package/scripts/core-template-version.js +30 -0
  6. package/scripts/language-file-to-csv/language-file-to-csv.js +2 -2
  7. package/scripts/language-file-validator.js +1 -1
  8. package/scripts/translate.mjs +51 -0
  9. package/site/ar_LB.all.json +1316 -595
  10. package/site/ca_ES.all.json +491 -417
  11. package/site/da_DK.all.json +360 -220
  12. package/site/de_DE.all.json +1173 -459
  13. package/site/el_EL.all.json +1166 -459
  14. package/site/en_AU.all.json +1213 -467
  15. package/site/es_ES.all.json +1159 -452
  16. package/site/es_MX.all.json +1213 -478
  17. package/site/et_ET.all.json +1317 -0
  18. package/site/fi_FI.all.json +1167 -460
  19. package/site/fr_FR.all.json +1159 -454
  20. package/site/hr_HR.all.json +1223 -464
  21. package/site/hu_HU.all.json +1315 -599
  22. package/site/it_IT.all.json +1166 -458
  23. package/site/ja_JP.all.json +1168 -460
  24. package/site/lt_LT.all.json +1166 -454
  25. package/site/nl_BE.all.json +1166 -456
  26. package/site/no_NO.all.json +1306 -596
  27. package/site/pl_PL.all.json +1144 -447
  28. package/site/plans.html.jet +17 -17
  29. package/site/pt_BR.all.json +487 -430
  30. package/site/pt_PT.all.json +1306 -602
  31. package/site/ru_RU.all.json +1142 -449
  32. package/site/sr_SR.all.json +1308 -0
  33. package/site/static/fonts/fa-s72.woff +0 -0
  34. package/site/static/js/main.js +1 -0
  35. package/site/static/scripts/main.js.map +1 -1
  36. package/site/styles/_availability-tags.scss +63 -31
  37. package/site/styles/_awards.scss +8 -2
  38. package/site/styles/_buttons.scss +36 -1
  39. package/site/styles/_carousel.scss +29 -24
  40. package/site/styles/_forms.scss +85 -13
  41. package/site/styles/_icons.scss +180 -9
  42. package/site/styles/_legacy.scss +0 -7
  43. package/site/styles/_meta-detail.scss +67 -42
  44. package/site/styles/_meta-item-tagline.scss +1 -1
  45. package/site/styles/_nav.scss +11 -10
  46. package/site/styles/_pages.scss +0 -2
  47. package/site/styles/_plans.scss +15 -17
  48. package/site/styles/_poster.scss +3 -9
  49. package/site/styles/_search.scss +1 -1
  50. package/site/styles/_share-modal.scss +86 -0
  51. package/site/styles/_shift72.scss +10 -3
  52. package/site/styles/_shopping.scss +1 -2
  53. package/site/styles/_skip-link.scss +19 -0
  54. package/site/styles/_tooltips.scss +7 -0
  55. package/site/styles/_variables.scss +18 -13
  56. package/site/styles/_wishlist.scss +21 -13
  57. package/site/styles/main.scss +4 -2
  58. package/site/subscriptions.html.jet +11 -0
  59. package/site/templates/application/application.jet +11 -14
  60. package/site/templates/application/google.jet +27 -16
  61. package/site/templates/application/nav/user_logged_in.jet +7 -2
  62. package/site/templates/collection/carousel_item.jet +5 -3
  63. package/site/templates/common/awards/carousel.jet +7 -1
  64. package/site/templates/common/awards/item.jet +2 -2
  65. package/site/templates/common/social-media-buttons.jet +1 -37
  66. package/site/templates/common/sponsor-image.jet +18 -0
  67. package/site/templates/film/item.jet +98 -85
  68. package/site/templates/page/curated.jet +1 -1
  69. package/site/templates/page/page-content.jet +1 -23
  70. package/site/templates/page/page-header.jet +25 -6
  71. package/site/templates/tv/detail.jet +30 -21
  72. package/site/tr_TR.all.json +1306 -602
  73. package/site/uk_UA.all.json +582 -451
  74. package/site/zh_TW.all.json +492 -419
  75. package/site/ee_EE.all.json +0 -602
  76. package/site/se_SE.all.json +0 -601
  77. package/site/static/fonts/FontAwesome.otf +0 -0
  78. package/site/static/fonts/fontawesome-webfont.eot +0 -0
  79. package/site/static/fonts/fontawesome-webfont.svg +0 -565
  80. package/site/static/fonts/fontawesome-webfont.ttf +0 -0
  81. package/site/static/fonts/fontawesome-webfont.woff +0 -0
  82. package/site/static/fonts/fontawesome-webfont.woff2 +0 -0
  83. package/site/styles/_social-media-buttons.scss +0 -159
@@ -7,6 +7,7 @@
7
7
  {{import "../common/list.jet"}}
8
8
  {{import "../common/social-media-buttons.jet"}}
9
9
  {{import "../common/awards/item.jet"}}
10
+ {{import "../common/sponsor-image.jet"}}
10
11
 
11
12
  {{block head()}}
12
13
  {{yield seo() film}}
@@ -18,22 +19,24 @@
18
19
  {{end}}
19
20
 
20
21
  {{block body()}}
22
+
21
23
  <main id="main" class="page page-film meta-detail meta-detail-film">
22
24
  <div class="meta-detail-bg">
23
25
  <div class="right-gradient"></div>
24
- <s72-image src="{{film.Images.Background}}" alt="" class="meta-detail-bg-img"></s72-image>
26
+ <s72-image src="{{film.ImageMap["Background"]}}" alt="" class="meta-detail-bg-img"></s72-image>
25
27
  </div>
26
28
  <div class="container">
27
29
  <div class="meta-detail-main">
28
- {{if config("default_image_type") == "portrait"}}
30
+ <div class="poster-wrapper">
31
+ {{if config("default_image_type") == "portrait"}}
32
+ {{yield sponsor() film}}
29
33
  <div class="poster poster-portrait">
30
34
  <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>
34
-
35
+ <s72-image src="{{film.ImageMap["Classification"]}}" alt="" class="classification-image">
36
+ <s72-image src="{{film.ImageMap["Portrait"]}}" alt="{{film.Title}}" class="poster poster-image poster-image-portrait"></s72-image>
35
37
  </div>
36
- {{end}}
38
+ {{end}}
39
+ </div>
37
40
  <div class="meta-detail-content">
38
41
  <h1>{{ film.Title }}</h1>
39
42
  <div class="meta-detail-tagline-and-classification">
@@ -43,6 +46,7 @@
43
46
  </div>
44
47
 
45
48
  <!-- {{film.CustomFields|json}} -->
49
+ <s72-availability-label data-slug="{{film.Slug}}"></s72-availability-label>
46
50
 
47
51
  <div class="meta-detail-buttons">
48
52
  <s72-play-button data-slug="{{film.Slug}}" data-title="{{film.Title}}"></s72-play-button>
@@ -60,87 +64,97 @@
60
64
  <s72-availability-status data-slug="{{film.Slug}}"></s72-availability-status>
61
65
  <br>
62
66
  {{end}}
63
- <s72-availability-label data-slug="{{film.Slug}}"></s72-availability-label>
64
67
 
65
68
  {{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}}
69
+ <div class="element-switcher-wrapper">
70
+ <s72-element-switcher>
71
+ {{if isEnabled("element_switcher_enabled")}}
72
+ <div class="meta-detail-switcher-tagline">
73
+ <p>{{film.Tagline}}</p>
74
+ </div>
76
75
  {{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>
85
- </div>
86
- {{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]}}
76
+ <div class="{{ isEnabled("element_switcher_enabled") ? "s72-hide" : "" }}"> {* hide class prevents FOUC *}
77
+ <div class="meta-detail-synopsis">{{film.Overview | raw}}</div>
78
+ <div class="meta-detail-info">
79
+ {{if len(film.Cast) > 0 }}
80
+ <div class="meta-detail-cast">
81
+ <h2>{{i18n("meta_detail_cast_title")}}</h2>
82
+ <p>
83
+ {{range index, member := film.Cast}}
84
+ {{ path := "/search.html?q=" + member.Name }}
85
+ <a href="{{ routeToPath(path) }}">{{member.Name}}</a>{{if index < len(film.Cast) - 1}}, {{end}}
86
+ {{end}}
87
+ </p>
88
+ </div>
107
89
  {{end}}
108
- {{end}}
109
- {{end}}
110
- {{end}}
111
- {{if subtitles}}
112
- <div class="meta-detail-subtitle">
113
- <h2>{{i18n("meta_detail_subtitles")}}</h2>
114
- <p>{{subtitles}}</p>
115
- </div>
116
- {{end}}
117
- {{if captions}}
118
- <div class="meta-detail-subtitle">
119
- <h2>{{i18n("meta_detail_captions")}}</h2>
120
- <p>{{captions}}</p>
90
+ {{range index, member := film.Crew}}
91
+ <div class="meta-detail-crew">
92
+ <h2>{{member.Job}}</h2>
93
+ {{ path := "/search.html?q=" + member.Name }}
94
+ <a href="{{ routeToPath(path) }}">{{member.Name}}</a>
95
+ </div>
96
+ {{end}}
97
+ {{if len(film.Languages) > 0 }}
98
+ <div class="meta-detail-language">
99
+ <h2>{{i18n("meta_detail_languages", len(film.Languages))}}</h2>
100
+ <p>{{ film.Languages }}</p>
101
+ </div>
102
+ {{end}}
103
+ {{allSubtitles := film.GetSubtitles()}}
104
+ {{if len(allSubtitles) > 0 }}
105
+ {{subtitles := ""}}
106
+ {{captions := ""}}
107
+ {{if len(film.SubtitleTracks) == 0}}
108
+ {{subtitles = allSubtitles}}
109
+ {{else}}
110
+ {{range subTrack := film.SubtitleTracks}}
111
+ {{if len(subTrack) >= 3}}
112
+ {{if subTrack[2] == "caption"}}
113
+ {{captions = captions ? captions + ", " + subTrack[1] : subTrack[1]}}
114
+ {{else}}
115
+ {{subtitles = subtitles ? subtitles + ", " + subTrack[1] : subTrack[1]}}
116
+ {{end}}
117
+ {{end}}
118
+ {{end}}
119
+ {{end}}
120
+ {{if subtitles}}
121
+ <div class="meta-detail-subtitle">
122
+ <h2>{{i18n("meta_detail_subtitles")}}</h2>
123
+ <p>{{subtitles}}</p>
124
+ </div>
125
+ {{end}}
126
+ {{if captions}}
127
+ <div class="meta-detail-subtitle">
128
+ <h2>{{i18n("meta_detail_captions")}}</h2>
129
+ <p>{{captions}}</p>
130
+ </div>
131
+ {{end}}
132
+ {{end}}
133
+ {{if len(film.Countries) > 0 }}
134
+ <div class="meta-detail-country">
135
+ <h2>{{i18n("meta_detail_countries", len(film.Countries))}}</h2>
136
+ <p>{{ film.Countries }}</p>
137
+ </div>
138
+ {{end}}
139
+ {{if len(film.Studio) > 0 }}
140
+ <div class="meta-detail-studio">
141
+ <h2>{{i18n("meta_detail_studios", len(film.Studio))}}</h2>
142
+ {*{ FORMAT STUDIOS }*}
143
+ {{ studios := "" }}
144
+ {{ range studio := film.Studio }}
145
+ {{ studios = studios + studio + ", "}}
146
+ {{ end }}
147
+ {{ if len(studios) > 0 }}
148
+ {{ studios = studios[0:len(studios) - 2] }}
149
+ {{ end }}
150
+ <p>{{ studios }}</p>
151
+ </div>
152
+ {{end}}
153
+ </div>
121
154
  </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>
142
- </div>
143
- {{end}}
155
+ </s72-element-switcher>
156
+ {{yield sponsor() film}}
157
+ </div>
144
158
  {{if len(film.Bonuses) > 0 && !film.CustomFields.GetBool("hide_bonus_content", false)}}
145
159
  <section class="meta-detail-bonus-content" aria-label="{{i18n("meta_detail_bonus_title")}}">
146
160
  <h2>{{i18n("meta_detail_bonus_title")}}</h2>
@@ -152,8 +166,7 @@
152
166
  {{end}}
153
167
  {{end}}
154
168
  </section>
155
- </div>
156
- {{end}}
169
+ {{end}}
157
170
  </div>
158
171
  </div>
159
172
  </div>
@@ -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}}
@@ -34,6 +34,7 @@
34
34
  <div class="meta-detail-tagline">
35
35
  {{yield metaItemTagline() tvseason}}
36
36
  </div>
37
+ <s72-availability-label data-slug="{{tvseason.Slug}}"></s72-availability-label>
37
38
  <div class="meta-detail-buttons">
38
39
  <s72-play-button data-slug="{{tvseason.Slug}}" data-title="{{tvseason.Title}}"></s72-play-button>
39
40
  <s72-pricing-buttons data-slug="{{tvseason.Slug}}" data-title="{{tvseason.Title}}"></s72-pricing-buttons>
@@ -45,27 +46,37 @@
45
46
  {{yield socialMediaButtons(path=currentUrlPath)}}
46
47
  </div>
47
48
  </div>
48
- <s72-availability-label data-slug="{{tvseason.Slug}}"></s72-availability-label>
49
- <div class="meta-detail-synopsis">{{tvseason.Overview | raw}}</div>
50
- <div class="meta-detail-cast">
51
- {{if len(tvseason.Cast) > 0 }}
52
- <h2>{{i18n("meta_detail_cast_title")}}</h2>
53
- {{end}}
54
- <p>
55
- {{range index, member := tvseason.Cast}}
56
- {{ path := "/search.html?q=" + member.Name }}
57
- <a href="{{ routeToPath(path) }}">{{member.Name}}</a>{{if index < len(tvseason.Cast) - 1}}, {{end}}
49
+ <div class="element-switcher-wrapper">
50
+ <s72-element-switcher>
51
+ {{if isEnabled("element_switcher_enabled")}}
52
+ <div class="meta-detail-switcher-tagline">
53
+ <p>{{tvseason.Tagline}}</p>
54
+ </div>
58
55
  {{end}}
59
- </p>
60
- </div>
61
- <div class="meta-detail-crew d-flex">
62
- {{range index, member := tvseason.Crew}}
63
- <div class="crew-member">
64
- <h2>{{member.Job}}</h2>
65
- {{ path := "/search.html?q=" + member.Name }}
66
- <a href="{{ routeToPath(path) }}"">{{member.Name}}</a>
56
+ <div class="{{ isEnabled("element_switcher_enabled") ? "s72-hide" : "" }}"> {* hide class prevents FOUC *}
57
+ <div class="meta-detail-synopsis">{{tvseason.Overview | raw}}</div>
58
+ <div class="meta-detail-info">
59
+ {{if len(tvseason.Cast) > 0 }}
60
+ <div class="meta-detail-cast">
61
+ <h2>{{i18n("meta_detail_cast_title")}}</h2>
62
+ <p>
63
+ {{range index, member := tvseason.Cast}}
64
+ {{ path := "/search.html?q=" + member.Name }}
65
+ <a href="{{ routeToPath(path) }}">{{member.Name}}</a>{{if index < len(tvseason.Cast) - 1}}, {{end}}
66
+ {{end}}
67
+ </p>
68
+ </div>
69
+ {{end}}
70
+ {{range index, member := tvseason.Crew}}
71
+ <div class="meta-detail-crew">
72
+ <h2>{{member.Job}}</h2>
73
+ {{ path := "/search.html?q=" + member.Name }}
74
+ <a href="{{ routeToPath(path) }}"">{{member.Name}}</a>
75
+ </div>
76
+ {{end}}
77
+ </div>
67
78
  </div>
68
- {{end}}
79
+ </s72-element-switcher>
69
80
  </div>
70
81
 
71
82
  {{if len(tvseason.Episodes) > 0}}
@@ -95,8 +106,6 @@
95
106
  {{end}}
96
107
  </div>
97
108
  </div>
98
- </div>
99
- </div>
100
109
  </div>
101
110
  {{if len(tvseason.Recommendations) > 0 }}
102
111
  <section class="page-collection recommendations-collection" aria-label="{{i18n("meta_detail_recommendations_title")}}">