/** * ----------------------------------------------------------------------------- * @package smartVISU * @author Martin Gleiß * @copyright 2012 - 2015 * @license GPL [http://www.gnu.de] * ----------------------------------------------------------------------------- */ /** * the smartVISU-logo */ {% macro smartvisu(mode) %} {% if mode == 'app' %}
smart
VISU
{% else %} smartVISU {% endif %} {% endmacro %} /** * Check for new updates of smartVISU */ {% macro updatecheck( ) %} {% if config_updatecheck %} {% else %} {% endif %} {% 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') %}
{{ app.name }}
{{ title|default(app.title|e) }}
{% endmacro %} /** * Widget to show websocket connection * */ {% macro connection( ) %} {% import "@widgets/basic.html" as basic %} io connection:   {% endmacro %} /** * Button to send a timestamp to an item (for countdown docu page) * * @param {id} unique id for the widget. Mandatory in order to identify the button in a page with more than one button * @param {item(num)} the item * * @Author: Wolfram v. Hülsen */ {% macro timestamp (id, item) %} Click to start {% endmacro %} /** * Extend a single block to full screen width * * @param {id=} unique id for the widget. * * @Author: bonze (plot resize and icon management by Wolfram v. Hülsen) */ {% macro supersize ( id ) %} {% set uid = uid(page, id) %} {% import _self as lib %} {{ lib.svgimg ('', 'control_centr_arrow_up_right.svg', 'supersize icon0 sizesmall') }} {{ lib.svgimg ('', 'jquery_minus.svg', 'supersize icon0 sizebig', 'display:none;') }} {% endmacro %} /** * Embed an svg icon into html DOM in order to make it styleable. icon must be available in ./icons/ws or ./dropins/icons/ws. Otherwise use <img src=... with icon path and name * * @param {text=} optional id for the icon * @param {text} icon name e.g. 'myicon' or 'myicon.svg' * @param {text=} CSS classes for the icon (optional, default='') * @param {text=} styling options in CSS notation (optional, default='') * * @Author: Wolfram v. Hülsen */ {% macro svgimg ( id, pic, iconclass, styleoptions ) %} {% set iconF = 'icons/ws/' %} {% if isfile(iconF ~ pic) or isfile('dropins/' ~ iconF ~ pic) %} {% set pic = '@icons/' ~ pic %} {% elseif isfile(iconF ~ pic ~ '.svg') or isfile('dropins/' ~ iconF ~ pic ~ '.svg') %} {% set pic = '@icons/' ~ pic ~ '.svg' %} {% elseif isfile(iconF ~ 'jquery_' ~ pic ~ '.svg') or isfile('dropins/' ~ iconF ~ 'jquery_' ~ pic ~ '.svg') %} /**- jQuery ui-icon classes -*/ {% set pic = '@icons/' ~ 'jquery_' ~ pic ~ '.svg' %} {% endif -%}