{% extends "main/layout.html" %} {% from 'global_macros.html' import data, preload_circle, select %} {% from 'main/macros.html' import GridViewApp, ListViewApp %} {% block page_vendor_css %} {% endblock page_vendor_css %} {% block page_lvl_css %} {{ process_css_sources(src="main/home.css")|safe }} {% if settings.background and settings.background != 'None' %} {% endif %} {% endblock page_lvl_css %} {% block content %}
search {% if current_user.is_authenticated %} {% if current_user.home_view_mode == "list" %} apps {% else %} list {% endif %} {% endif %}
{% if tags_form.tags.choices|count > 1 %}
{{ tags_form.tags(id='tags-select') }}
{% endif %}
{% if apps %} {# If tags are enabled, render the apps like this #} {% if tags_form.tags.choices|count > 1 %} {% if settings.home_view_mode == "list" or current_user.home_view_mode == "list" %}
{% for tag in tags_form.tags.choices %} {% if tag[0] != 'All tags' %}
{{ tag[0] }} {% for app in apps %} {% if app.tags and tag[0] in app.tags %} {{ ListViewApp(app) }} {% endif %} {% endfor %}
{% endif %} {% endfor %}
{% else %} {% for tag in tags_form.tags.choices %} {% if tag[0] != 'All tags' %}
{{ tag[0] }}
{% for app in apps %} {% if app.tags and tag[0] in app.tags %} {{ GridViewApp(app) }} {% endif %} {% endfor %}
{% endif %} {% endfor %} {% endif %} {% else %} {# otherwise, render the apps like this #} {% if settings.home_view_mode == "list" or current_user.home_view_mode == "list" %}
{% for app in apps %} {{ ListViewApp(app) }} {% endfor %}
{% else %} {% for app in apps %} {{ GridViewApp(app) }} {% endfor %} {% endif %} {% endif %} {% else %}
No apps yet, go to settings.
{% endif %}
{% endblock content %} {% block page_vendor_js %} {% endblock page_vendor_js %} {% block page_lvl_js %} {{ process_js_sources(src="main/home.js")|safe }} {% endblock page_lvl_js %}