{% import "Magic/macros/meta.html" as meta with context %} {#: HEADER() ----------------------------------------------------------- #} {%- macro head(title="%s", favicon="favicon.ico", charset="utf-8", add_social_graph=true, add_google_analytics=true, fontawesome_version="4.4.0") -%} {{ title | replace("%s", __.__META__["title"]) | safe }} {{ meta.meta("description", __.__META__["description"]) }} {{ set_favicon(favicon) }} {% if add_social_graph == true %} {{ meta.social_graph() }} {% endif %} {{ css('magic-all.css') }} {{ js('jquery.js') }} {{ js('magic-all.js') }} {% if add_google_analytics == true %} {{ google_analytics() }} {% endif %} {{ fontawesome(fontawesome_version) }} {%- endmacro -%} {#: CSS ------------------------------------------------------------- #} {%- macro css(file) %} {%- assets file %} {% endassets -%} {% endmacro -%} {#: JS--------------------------------------------------------------- #} {%- macro js(file) %} {%- assets file %} {% endassets -%} {% endmacro -%} {#:: static_file(url) ::#} {#:: Include static assets ::#} {%- macro static_file(url) -%} {%- if not url.startswith('http') and not url.startswith('//') -%} {%- set url = url_for('static', filename=url) -%} {%- endif -%} {{ url | safe }} {%- endmacro -%} {#: GOOGLE_ANALYTICS() ------------------------------------------------------ #} {% macro google_analytics(code=None) %} {% if not code %} {% set code = __.APPLICATION_GOOGLE_ANALYTICS_ID %} {% endif %} {% if code %} {% endif %} {% endmacro %} {#: OEMBED ------------------------------------------------------------------ #} {# To #} {% macro oembed(url, title="") %} {{ title }} {% endmacro %} #------------------------------------------------------------------------------- {%- macro fontawesome(version="4.3.0") -%} {%- endmacro -%} {#: Favicon :#} {% macro set_favicon(path) %} {% endmacro %} {% macro bootswatch_theme(name) %} {{ css('Magic/bootswatch/%s.css' % name) }} {% endmacro %} {# IN EXPERIMENT #} {% macro oauth_providers(text="Signin with #provider", size="lg", btn_block=true) %} {% endmacro %} #-------------------------------------------------------------------------------