@livelike/custom-kit 1.0.1 → 1.0.3
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/dist/livelike.js +95 -101
- package/dist/livelike.umd.cjs +39 -58
- package/dist/utils/svgs.d.ts +0 -1
- package/package.json +1 -1
- package/readme.md +19 -5
package/dist/utils/svgs.d.ts
CHANGED
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -45,6 +45,8 @@ document.body.appendChild(poll);
|
|
|
45
45
|
LiveLike:
|
|
46
46
|
|
|
47
47
|
- **Header title:** the widget's question.
|
|
48
|
+
- **Header logo:** the Goal sponsor logo, or the Save sponsor logo when
|
|
49
|
+
`sponsor_type` is `save_sponsor`.
|
|
48
50
|
- **Hero image:** the widget's sponsor logo.
|
|
49
51
|
- **Option name and photo:** each option's description and image.
|
|
50
52
|
- **Voting close time:** the widget's `interactive_until`.
|
|
@@ -60,6 +62,9 @@ LiveLike:
|
|
|
60
62
|
- **×** closes it, and the button reads "Vote successful".
|
|
61
63
|
- **Vote again** reopens the options. Submitting again changes the existing
|
|
62
64
|
vote rather than adding a second one.
|
|
65
|
+
- A second button, labelled `secondary_poll_title`, opens
|
|
66
|
+
`secondary_poll_url` in a new tab. It sits below **Vote again** and only
|
|
67
|
+
appears when both are set.
|
|
63
68
|
- **Watch highlights** opens `highlights_url` in a new tab.
|
|
64
69
|
4. **Voting closed:** the banner reads "Voting closed", the hero is replaced by
|
|
65
70
|
a "Voting closed: the whistle has blown!" banner, options are dimmed, and
|
|
@@ -68,8 +73,9 @@ LiveLike:
|
|
|
68
73
|
In any state:
|
|
69
74
|
|
|
70
75
|
- Percentages appear on every option once `polling_result_time` passes.
|
|
71
|
-
-
|
|
72
|
-
|
|
76
|
+
- When both `info_title` and `info_text` are set, an **ⓘ** icon in the header
|
|
77
|
+
opens an info popup with them. It closes with **×** or by clicking outside
|
|
78
|
+
it.
|
|
73
79
|
|
|
74
80
|
## Widget attributes
|
|
75
81
|
|
|
@@ -88,8 +94,12 @@ Widget attributes are `{ key, value }` pairs set on the widget in LiveLike
|
|
|
88
94
|
| `polling_starts_time` | ISO date-time | When voting opens. | Voting is open immediately. |
|
|
89
95
|
| `polling_result_time` | ISO date-time | When vote percentages appear. Independent of the open/close times. | Percentages are never shown. |
|
|
90
96
|
| `highlights_url` | URL | "Watch highlights" link in the "Voting submitted!" popup. | Link is hidden. |
|
|
91
|
-
| `info_title` | Text | Title of the info popup. |
|
|
92
|
-
| `info_text` | Text | Body of the info popup. |
|
|
97
|
+
| `info_title` | Text | Title of the info popup. Needs `info_text` too. | No info icon or popup. |
|
|
98
|
+
| `info_text` | Text | Body of the info popup. Needs `info_title` too. | No info icon or popup. |
|
|
99
|
+
| `secondary_poll_title` | Text | Label of a second button below "Vote again" in the "Voting submitted!" popup. Needs `secondary_poll_url` too. | Button is hidden. |
|
|
100
|
+
| `secondary_poll_url` | URL | Page the second button opens in a new tab. Needs `secondary_poll_title` too. | Button is hidden. |
|
|
101
|
+
| `sponsor_type` | `save_sponsor` | Shows the Save sponsor logo in the header. Any other value is ignored. | Goal sponsor logo. |
|
|
102
|
+
| `options_theme` | `light` | Shows the options list on a white background with dark text; a selected option turns black with white text. Any other value is ignored. | Dark options list. |
|
|
93
103
|
|
|
94
104
|
A widget left open on screen updates itself at each of these times, so viewers
|
|
95
105
|
don't need to reload. When percentages are revealed, it fetches fresh vote
|
|
@@ -105,7 +115,11 @@ counts.
|
|
|
105
115
|
{ "key": "polling_result_time", "value": "2026-10-14T06:00:00Z" },
|
|
106
116
|
{ "key": "highlights_url", "value": "https://www.mlssoccer.com/video" },
|
|
107
117
|
{ "key": "info_title", "value": "Player of the Match" },
|
|
108
|
-
{ "key": "info_text", "value": "Vote for your standout player. You can change your vote until voting closes." }
|
|
118
|
+
{ "key": "info_text", "value": "Vote for your standout player. You can change your vote until voting closes." },
|
|
119
|
+
{ "key": "secondary_poll_title", "value": "Vote for Save of the Year" },
|
|
120
|
+
{ "key": "secondary_poll_url", "value": "https://www.mlssoccer.com/vote" },
|
|
121
|
+
{ "key": "sponsor_type", "value": "save_sponsor" },
|
|
122
|
+
{ "key": "options_theme", "value": "light" }
|
|
109
123
|
]
|
|
110
124
|
```
|
|
111
125
|
|