-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathreference.js
38 lines (34 loc) · 1.09 KB
/
reference.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Analytics
*
* SPDX-FileCopyrightText: 2019-2022 Marcel Scherello
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/** global: OC */
'use strict';
document.addEventListener('DOMContentLoaded', function () {
OCA.Analytics.Reference.init();
})
if (!OCA.Analytics) {
/**
* @namespace
*/
OCA.Analytics = {};
}
/**
* @namespace OCA.Analytics.Reference
*/
OCA.Analytics.Reference = {
init: function () {
_registerWidget('analytics', async (el, {richObjectType, richObject, accessible}) => {
el.innerHTML = '<a href="' + richObject.url + '" target="_blank" style="display: flex;">'
+ '<img src="' + richObject.image + '" style="width: 20%; padding: 20px; opacity:.5;">'
+ '<div style="width: 75%; padding:10px;">'
+ '<div style="font-weight: 600;">' + richObject.name + '</div>'
+ '<br>'
+ '<div>' + richObject.subheader + '</div>'
//+ '<div style="color: var(--color-text-maxcontrast);">' + richObject.url + '</div>'
+ '</div></a>';
});
},
}