forked from Martin-Gleiss/smartvisu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlib.html
68 lines (56 loc) · 1.84 KB
/
lib.html
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
* -----------------------------------------------------------------------------
* @package smartVISU
* @author Martin Gleiß
* @copyright 2012 - 2015
* @license GPL [http://www.gnu.de]
* -----------------------------------------------------------------------------
*/
/**
* the smartVISU-logo
*/
{% macro smartvisu(mode) %}
{% if mode == 'app' %}
<div class="app">
<div class="image">
<div class="smartvisu"><span class="smart">smart</span><br /><span class="visu">VISU</span></div>
</div>
</div>
{% else %}
<span class="smartvisu"><span class="smart">smart</span><span class="visu">VISU</span></span>
{% endif %}
{% endmacro %}
/**
* Check for new updates of smartVISU
*/
{% macro updatecheck( ) %}
<script type="text/javascript">
$('#index').on('pagecreate', function (event, ui) {
$.getJSON('lib/base/check_update.php?local={{ config_version }}', function (data) {
if (data.update) {
notify.update('smartVISU update available!', 'Your local version is: <b>' + data.local + '</b><br>' +
'New remote version is: <b>' + data.remote + '</b><br><br>' +
'Please visit <a target="_blank" href="http://smartvisu.de">smartVISU.de</a> to download the latest version!<br />');
}
})
.error(notify.json);
});
</script>
{% endmacro %}
/**
* Widget to place an app-symbol
* If you write an app yourself, place a @title, @icon, @color tag in your
* header. These tags are used to display the symbol
*
* @param the name of the app (located in pages/apps)
* @param title of the app
*/
{% macro app(name, title) %}
{% set app = docu('apps/'~name~'.html') %}
<div class="app">
<a href="index.php?page={{ name }}">
<div class="image" style="background-color: #{{ app.color }};"><img src="{{ app.icon }}"></div>
<div>{{ title|default(app.title|e) }}</div>
</a>
</div>
{% endmacro %}