{% extends "layouts/panel.html" %} {% load i18n %} {% load ravix_ui static %} {% block title %}{% trans "Themes" %}{% endblock %} {% block page_title %}{% trans "Themes" %}{% endblock %} {% block content %}

{% trans "Site themes" %}

{% trans "The active theme determines the look of the public site; changing the theme does not change any post, page or media." %}

{% icon "brush" 18 %} {% trans "Customize appearance" %}
{% for slug in shadowed %}

{% blocktrans trimmed %}The theme “{{ slug }}” exists in two folders. The copy that was uploaded from the panel is not used because an earlier folder (for example one shipped with the project) has the same ID. Ask the server administrator to delete the unused copy.{% endblocktrans %}

{% endfor %} {% if upload_error %} {% endif %} {% if installed %}

{% blocktrans trimmed with installed=installed %}Validation succeeded; theme “{{ installed }}” was installed but is not active yet.{% endblocktrans %}

{% if installed_static_pending %}

{% trans "Static files status: this theme’s CSS/JS/image files have not been published yet, and until then theme pages look incomplete. The server administrator must run the command" %} manage.py collectstatic --noinput {% trans "once (installing from the panel does not run it). Then activate the theme. Details:" %} docs/themes.md.

{% else %}

{% trans "Static files status: this theme has no static files or they are already published." %}

{% endif %}
{% endif %} {% if can_install %}

{% trans "Upload theme (ZIP)" %}

{% if web_install %}
{% csrf_token %}

{% blocktrans trimmed with zip_mb=limits.zip_mb extracted_mb=limits.extracted_mb files=limits.files %}Maximum file size: {{ zip_mb }} MB · total extracted size: {{ extracted_mb }} MB · at most {{ files }} files. Structure: a folder named after the theme identifier (for example{% endblocktrans %} my-theme/theme.json{% trans ") containing" %} templates/ {% trans "and" %} static/{% trans ". SVG, py and php files are not accepted. The theme is not activated automatically after installation, and an existing theme (including “default”) is never overwritten." %}

{% else %}

{% trans "Installing themes from the panel is off on this server. The server administrator must deliberately set" %} RAVIX_THEME_WEB_INSTALL=true {% trans "and make the folder" %} RAVIX_THEME_INSTALL_DIR {% trans "writable for the service. Guide:" %} docs/themes.md.

{% endif %}
{% endif %} {% if active_missing %} {% endif %} {% if draft_theme and draft_theme != cfg.active_theme %}

{% blocktrans trimmed with draft_theme=draft_theme %}Theme “{{ draft_theme }}” is selected in the draft and has not been published yet.{% endblocktrans %}

{% endif %}
{% for item in themes %}{% with t=item.info %}
{% if t.screenshot %}{% blocktrans with name=t.display_name|tr %}Preview of theme {{ name }}{% endblocktrans %}{% else %}{% endif %}

{{ t.display_name|tr }} {% if item.is_active %}{% trans "Active" %}{% endif %} {% if not t.valid %}{% trans "Invalid" %}{% endif %}

{{ t.slug }}{% if t.version %} {% trans "· version" %} {{ t.version }}{% endif %}{% if t.author %} · {{ t.author }}{% endif %}

{% if t.display_description %}

{{ t.display_description|tr }}

{% endif %} {% if not t.valid %}
    {% for e in t.errors|slice:":5" %}
  • {{ e }}
  • {% endfor %}
{% else %} {% if item.static_pending %}

{% trans "The static files of this theme have not been published yet (the server administrator needs to run" %} collectstatic {% trans ")." %}

{% endif %}
{% if not item.is_active %}
{% csrf_token %}
{% csrf_token %}
{% elif t.slug != default_slug %}
{% csrf_token %}
{% else %}{% trans "The default theme is always available." %}{% endif %}
{% endif %}
{% endwith %}{% empty %}
{% trans "No theme was found." %}
{% endfor %}
{% endblock %}