@shift72/core-template 1.9.12 → 1.9.13

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased](https://github.com/shift72/core-template/compare/1.9.11...HEAD)
3
+ ## [Unreleased](https://github.com/shift72/core-template/compare/1.9.13...HEAD)
4
4
 
5
5
  ### Added
6
6
 
@@ -8,6 +8,14 @@
8
8
 
9
9
  ### Fixed
10
10
 
11
+ ## [1.9.13](https://github.com/shift72/core-template/compare/1.9.12...1.9.13)
12
+
13
+ ### Changed
14
+
15
+ - Hid can-be-watched button for logged out users
16
+
17
+ ### Fixed
18
+
11
19
  ## [1.9.12](https://github.com/shift72/core-template/compare/1.9.11...1.9.12)
12
20
 
13
21
  ### Changed
package/kibble.json CHANGED
@@ -194,5 +194,5 @@
194
194
  "pageSize": 0
195
195
  }
196
196
  ],
197
- "coreTemplateVersion": "1.9.12"
197
+ "coreTemplateVersion": "1.9.13"
198
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shift72/core-template",
3
- "version": "1.9.12",
3
+ "version": "1.9.13",
4
4
  "description": "Shift72 core template",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -84,10 +84,12 @@
84
84
  <s72-pricing-buttons data-slug="{{item.Slug}}" class="pricing-buttons-fit" title="{{item.Title}}"></s72-pricing-buttons>
85
85
  {{end}}
86
86
 
87
- {{if len(canBeWatchedLink) > 0}}
88
- <can-be-watched-button data-slug="{{item.InnerItem.Slug}}" data-url="{{canBeWatchedLink}}" data-label="{{canBeWatchedText | i18n}}"></can-be-watched-button>
89
- {{end}}
90
-
87
+ {{if len(canBeWatchedLink) > 0}}
88
+ <s72-user-known>
89
+ <can-be-watched-button data-slug="{{item.InnerItem.Slug}}" data-url="{{canBeWatchedLink}}" data-label="{{canBeWatchedText | i18n}}"></can-be-watched-button>
90
+ </s72-user-known>
91
+ {{end}}
92
+
91
93
  {{if len(externalPurchaseButtonLink) > 0}}
92
94
  <external-purchase-button data-slug="{{item.InnerItem.Slug}}" data-url="{{externalPurchaseButtonLink}}" data-label="{{externalPurchaseButtonText | i18n}}"></external-purchase-button>
93
95
  {{end}}
@@ -1,87 +0,0 @@
1
- <html>
2
- <head>
3
- <script src="https://staging-letterboxd.shift72.com/checkout/s72.checkout.js" defer></script>
4
- <script>
5
- window.Shift72CheckoutOptions = {
6
- baseUrl: 'https://staging-letterboxd.shift72.com',
7
- options: {
8
- links: {
9
- library: 'https://staging-letterboxd.shift72.com/library.html',
10
- termsAndConditions: 'https://staging-letterboxd.shift72.com/page/terms-and-conditions/',
11
- deviceCompatibility: 'https://staging-letterboxd.shift72.com/page/help/',
12
- help: 'https://staging-letterboxd.shift72.com/page/help/',
13
- signIn: 'https://staging-letterboxd.shift72.com/signin.html',
14
- signUp: 'https://staging-letterboxd.shift72.com/signup.html',
15
- }
16
- }
17
- };
18
- </script>
19
-
20
- <script>
21
- document.addEventListener('DOMContentLoaded', () => {
22
- const handleFilmClick = async (event) => {
23
- const { slug } = event.target.dataset;
24
-
25
- if (!slug) {
26
- throw new Error('No slug found.')
27
- }
28
-
29
- if (!(window.s72 && window.s72.checkout)) {
30
- throw new Error('Shift72 Checkout: not available on this site!');
31
- }
32
-
33
- // This will call the Checkout loader to initiate the checkout process for a particular film
34
- await window.s72.checkout.openModal({slug});
35
- }
36
-
37
- document.querySelectorAll('button[data-slug]').forEach((button) => {
38
- button.addEventListener('click', handleFilmClick);
39
- });
40
- });
41
- </script>
42
- <style>
43
- body {
44
- background-color: #202123;
45
- margin: 0;
46
- }
47
-
48
- .grid {
49
- display: flex;
50
- flex-wrap: wrap;
51
- gap: 16px;
52
- justify-content: center;
53
- padding: 64px;
54
- min-height: 100%;
55
- box-sizing: border-box;
56
- }
57
-
58
- .grid button {
59
- width: 141px;
60
- height: 211px;
61
- flex: 0 0 auto;
62
- border: none;
63
- font-weight: 500;
64
- }
65
-
66
- .grid button:hover {
67
- cursor: pointer;
68
- filter: brightness(75%);
69
- }
70
-
71
- .grid button:nth-child(6n+1) { background-color: #f78a8a; }
72
- .grid button:nth-child(6n+2) { background-color: #fbc28b; }
73
- .grid button:nth-child(6n+3) { background-color: #fdfd86; }
74
- .grid button:nth-child(6n+4) { background-color: #b9fbc0; }
75
- .grid button:nth-child(6n+5) { background-color: #76d7ea; }
76
- .grid button:nth-child(6n) { background-color: #85a3e0; }
77
- </style>
78
- </head>
79
- <body>
80
- <div class="grid">
81
- <button data-slug="/film/3289">Ant-Man</button>
82
- <button data-slug="/film/3288">Dungeons & Dragons: Honour Among Thieves</button>
83
- <button data-slug="/film/3257">Example film</button>
84
- <button data-slug="/film/3294">Shrek</button>
85
- </div>
86
- </body>
87
- </html>
@@ -1,95 +0,0 @@
1
- <html>
2
- <head>
3
- <script src="http://localhost:4072/s72.checkout.js" defer></script>
4
- <script>
5
- window.Shift72CheckoutOptions = {
6
- baseUrl: window.location.origin,
7
- checkoutDevServerUrl: 'http://localhost:4072',
8
- options: {
9
- links: {
10
- library: `${window.location.origin}/library.html`,
11
- termsAndConditions: `${window.location.origin}/page/terms-and-conditions/`,
12
- deviceCompatibility: `${window.location.origin}/page/help/`,
13
- help: `${window.location.origin}/page/help/`,
14
- signIn: `${window.location.origin}/signin.html`,
15
- signUp: `${window.location.origin}/signup.html`,
16
- }
17
- }
18
- };
19
-
20
- document.addEventListener('DOMContentLoaded', () => {
21
- const handleFilmClick = async (event) => {
22
- const { slug } = event.target.dataset;
23
-
24
- if (!slug) {
25
- throw new Error('No slug found.')
26
- }
27
-
28
- if (!(window.s72 && window.s72.checkout)) {
29
- throw new Error('Shift72 Checkout: not available on this site!');
30
- }
31
-
32
- await window.s72.checkout.openModal({slug});
33
- }
34
-
35
- document.querySelectorAll('button[data-slug]').forEach((button) => {
36
- button.addEventListener('click', handleFilmClick);
37
- });
38
- });
39
- </script>
40
- <style>
41
- body {
42
- background-color: #202123;
43
- }
44
-
45
- .grid {
46
- display: flex;
47
- flex-wrap: wrap;
48
- gap: 16px;
49
- justify-content: center;
50
- margin-top: 64px;
51
- }
52
-
53
- .grid button {
54
- width: 141px;
55
- height: 211px;
56
- flex: 0 0 auto;
57
- border: none;
58
- font-weight: 500;
59
- }
60
-
61
- .grid button:hover {
62
- cursor: pointer;
63
- filter: brightness(75%);
64
- }
65
-
66
- .grid button:nth-child(6n+1) { background-color: #f78a8a; }
67
- .grid button:nth-child(6n+2) { background-color: #fbc28b; }
68
- .grid button:nth-child(6n+3) { background-color: #fdfd86; }
69
- .grid button:nth-child(6n+4) { background-color: #b9fbc0; }
70
- .grid button:nth-child(6n+5) { background-color: #76d7ea; }
71
- .grid button:nth-child(6n) { background-color: #85a3e0; }
72
- </style>
73
- </head>
74
- <body>
75
- <div class="grid">
76
- <button data-slug="/film/2585">Spring</button>
77
- <button data-slug="/film/3158">Rent SD only</button>
78
- <button data-slug="/film/3152">Buy HD only</button>
79
- <button data-slug="/film/3154">Buy + Rent - SD & HD</button>
80
- <button data-slug="/film/3155">Buy + Rent - SD only</button>
81
- <button data-slug="/film/3161">Free</button>
82
- <button data-slug="/film/3153">less than 0.50</button>
83
- <button data-slug="/film/3153">less than 0.50</button>
84
- <button data-slug="/bundles/113">Bundle rent + buy</button>
85
- <button data-slug="/film/3241">Sold out</button>
86
- <button data-slug="/tv/26/season/1">TV Season</button>
87
- <button data-slug="/film/3416">In presale</button>
88
- <button data-slug="/film/3417">Geoblocked in NZ</button>
89
- <button data-slug="/film/3418">Geoblocked in Australia</button>
90
- <button data-slug="/film/3419">Item limit reached</button>
91
- <button data-slug="/film/3420">No longer available</button>
92
- <button data-slug="/film/3421">License schedule expired</button>
93
- </div>
94
- </body>
95
- </html>