nodebb-plugin-onekite-calendar 1.0.8 → 1.0.9
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/lib/widgets.js +6 -7
- package/package.json +1 -1
- package/plugin.json +1 -1
package/lib/widgets.js
CHANGED
|
@@ -194,13 +194,12 @@ widgets.renderTwoWeeksWidget = async function (data) {
|
|
|
194
194
|
const start = ev.start ? new Date(ev.start) : null;
|
|
195
195
|
const end = ev.end ? new Date(ev.end) : null;
|
|
196
196
|
const pad2 = (n) => String(n).padStart(2, '0');
|
|
197
|
-
const fmt = (d) => d ?
|
|
198
|
-
const range = (start && end) ?
|
|
199
|
-
const html =
|
|
200
|
-
<div style="font-weight:600; margin-bottom:2px;"
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
`;
|
|
197
|
+
const fmt = (d) => d ? (pad2(d.getDate()) + '/' + pad2(d.getMonth() + 1) + '/' + String(d.getFullYear()).slice(-2)) : '';
|
|
198
|
+
const range = (start && end) ? ('Du ' + fmt(start) + ' au ' + fmt(end)) : '';
|
|
199
|
+
const html = '' +
|
|
200
|
+
'<div style="font-weight:600; margin-bottom:2px;">' + escapeHtml(title) + '</div>' +
|
|
201
|
+
(range ? ('<div style="opacity:.85">' + escapeHtml(range) + '</div>') : '') +
|
|
202
|
+
(status ? ('<div style="opacity:.75; margin-top:2px; font-size:.85em;">' + escapeHtml(status) + '</div>') : '');
|
|
204
203
|
|
|
205
204
|
// Hover (desktop)
|
|
206
205
|
info.el.addEventListener('mouseenter', (e) => {
|
package/package.json
CHANGED
package/plugin.json
CHANGED