{% extends 'partials/base.html.twig' %} {% if admin.route %} {% set installing = admin.route starts with 'install' %} {% if installing %} {% set title = "PLUGIN_ADMIN.THEMES"|t %} {% else %} {% set installed = true %} {# Try installed packages first, then remote #} {% set package = admin.themes(true)[admin.route] %} {% if (not package) %} {% set package = admin.themes(false)[admin.route] %} {% set installed = false %} {% endif %} {% set theme = package.toArray() %} {% set state = config.get('system.pages.theme') == theme.slug ? 'active' : 'inactive' %} {% set title = "PLUGIN_ADMIN.THEME"|t ~ ": " ~ theme.name %} {% endif %} {% else %} {% set title = "PLUGIN_ADMIN.THEMES"|t %} {% endif %} {% if admin.route or installing %} {% block stylesheets %} {% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %} {{ parent() }} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %} {% endif %} {% block titlebar %} {% if not admin.route or installing %}