/** * ----------------------------------------------------------------------------- * @package smartVISU * @author Martin Gleiß * @copyright 2012 * @license GPL [http://www.gnu.de] * ----------------------------------------------------------------------------- */ /** * Element: Positioning a Object/Widget * * @param {id=} unique id for this widget * @param {text=}title of the element (optional) * @param {percent} icon position from left side * @param {percent}icon position from top side * @param {text} a content * @param width (optional) * @param height (optional) * @param {value=1} hide on mobile displays (optional value 1) */ {% macro e (id, info, left, top, content, width, height, hide) %}
{{ content }}
{% endmacro %} /** * Background picture * * @param {id} unique id for this widget * @param {image} picture * */ {% macro background (id, picture) %} Background {% endmacro %} /** * Pagelink * * @param {id} unique id for this widget * @param {text=} popup-info of the button (optional) * @param {percent} icon position from left side * @param {percent} icon position from top side * @param {url} the pagelink (for example: index.php?page=room_xyz -> without .html!) * @param {text=} text printed on the button (optional) * @param {image=} an icon or a inline pic: 'arrow-l', 'arrow-r', 'arrow-u', 'arrow-d', 'delete', 'plus', 'minus', 'check', 'gear', 'refresh', 'forward', 'back', 'grid', 'star', 'alert', 'info', 'home', 'search' (optional) * @param {type=mini} icon type 'micro', 'mini', 'midi' (optional, default: mini) * @param {value=0} hide on mobile displays (optional value 1) */ {% macro pagelink (id, info, left, top, pagelink, txt, pic, type, hide) %} {{ txt|e }} {% elseif pic|slice(-4, 4) != '.svg' and not txt %} data-icon="{{ pic }}" data-iconpos="notext"> {% elseif pic|slice(-4, 4) != '.svg' and txt %} data-icon="{{ pic }}" data-iconpos="top">{{ txt|e }} {% elseif type == 'midi' and txt %}> {{ pic|split('/')|last|split('.')[0:-1]|join('.') }}
{{ txt|e }}
{% else %} data-iconpos="center"> {{ pic|split('/')|last|split('.')[0:-1]|join('.') }} {% endif %}
{% endmacro %} /** * Camera * * @param {id=} unique id for this widget * @param {text=} title of the camera (optional) * @param {percent} icon position from left side * @param {percent} icon position from top side * @param {url} stream url * @param {value} video width * @param {value} video height * @param {type=micro} type: 'micro', 'mini', 'midi' (optional, default: mini) * @param {value=0} hide on mobile displays (optional value 1) */ {% macro camera (id, txt, left, top, stream, width, height, type, hide) %} {% import "basic.html" as basic %} {% set uid = uid(page, id) %} camera
Schließen {% if txt %}
{{ txt }}
{% endif %}
{% endmacro %} /** * url: Popup to a external page * * @param {id} unique id for this widget * @param {text=} popup-info of the button (optional) * @param {percent} icon position from left side * @param {percent} icon position from top side * @param {url} the url to open in a popup (for example: http://www.google.de) * @param {text=} text printed on the button (optional) * @param {image=} a icon or a inline pic: 'arrow-l', 'arrow-r', 'arrow-u', 'arrow-d', 'delete', 'plus', 'minus', 'check', 'gear', 'refresh', 'forward', 'back', 'grid', 'star', 'alert', 'info', 'home', 'search' (optional) * @param {value} width of the popup * @param {value} height of the popup * @param {type=mini} type: 'micro', 'mini', 'midi' (optional, default: mini) * @param {value=0} hide on mobile displays (optional value 1) */ {% macro url (id, info, left, top, url, txt, pic, width, height, type, hide) %} {% set uid = uid(page, id) %} {{ txt|e }} {% elseif pic|slice(-4, 4) != '.svg' and not txt %} data-icon="{{ pic }}" data-iconpos="notext"> {% elseif pic|slice(-4, 4) != '.svg' and txt %} data-icon="{{ pic }}" data-iconpos="top">{{ txt|e }} {% elseif type == 'midi' and txt %}> {{ pic|split('/')|last|split('.')[0:-1]|join('.') }}
{{ txt|e }}
{% else %} data-iconpos="center"> {{ pic|split('/')|last|split('.')[0:-1]|join('.') }} {% endif %}
Schließen {% if info %}
{{ info }}
{% endif %}
{% endmacro %}