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

24 lines
673 B
HTML

{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load static %}
<div class="card">
<a href="{{ item.url }}" class="nav-link">
<div class="card-title">{{ item.name }}</div>
<div class="card-icon">
{% if 'fa-' in item.icon %}
<span class="fa {{ item.icon }}"></span>
{% else %}
{% if item.app_id %}
<img src="{% static item.app_id %}/icons/{{ item.icon }}.svg"/>
{% else %}
<img src="{% static 'theme/icons/' %}{{ item.icon }}.svg"/>
{% endif %}
{% endif %}
</div>
<div class="card-description">{{ item.short_description|default:'' }}</div>
</a>
</div>