FreedomBox/plinth/templates/app-header.html
Sunil Mohan Adapa ac3754fa2f
theme: Move icons to app folders
- This improves modularity. Each app brings its own icons in its directory
instead of a centralized directory.

Tests:

- Install an app and notice that the installation notification has the icon.

- Visit an app's page in Apps and System (cockpit) section and ensure that the
app's icon is being shown.

- Visit the Apps and System section and notice that apps' icons are being shown.

- Visit the home page and notice that shortcuts' icons are being shown.

- Visit the URL /plinth/api/0/shortcuts and notice that the URLs for icons are
accessible and lead to proper icon files.

- Build developer documentation and notice that Tutorial -> View and Reference >
Menu pages show the expected updates.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-07 13:11:27 -04:00

63 lines
1.8 KiB
HTML

{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% load static %}
<header class="app-header {% if not app_info.icon_filename %} app-header-single-column {% endif %}">
{% if app_info.icon_filename %}
{% if app_info.app_id %}
<img src="{% static app_info.app_id %}/icons/{{ app_info.icon_filename }}.svg" alt="{{ app_info.name }}"/>
{% else %}
<img src="{% static 'theme/icons/' %}{{ app_info.icon_filename }}.svg" alt="{{ app_info.name }}"/>
{% endif %}
{% endif %}
<section class="app-description" >
<section class='app-titles'>
{% block pagetitle %}
<div>
{% if setup %}
<h2>{% trans "Installation" %}: {{ app_info.name }}</h2>
{% else %}
<h2>{{ app_info.name }}</h2>
{% endif %}
{% if app_info.short_description %}
<h3>{{ app_info.short_description }}</h3>
{% endif %}
</div>
{% endblock %}
{% if app_enable_disable_form %}
<form class="form form-app-enable-disable" method="post">
{% csrf_token %}
{{ app_enable_disable_form }}
<button name="app_enable_disable_button" type="submit"
class="btn toggle-button {{ is_enabled|yesno:'toggle-button--toggled,' }}">
</button>
</form>
{% endif %}
</section>
{% block description %}
{% for paragraph in app_info.description %}
<p>{{ paragraph|safe }}</p>
{% endfor %}
{% endblock %}
{% if app_info.manual_page %}
<p class="manual-page">
<a href="{% url 'help:manual-page' lang='-' page=app_info.manual_page %}">
{% trans 'Learn more...' %}
</a>
</p>
{% endif %}
</section>
</header>