mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-05-16 23:42:49 +00:00
Font Awesome 4 adds 106kB of dependencies on each page and require to query multiple assets. It also sometimes causes icons to appear after page loading. Font Awesome 4 is deprecated and replaced by version 5 which is not packaged in every GNU/Linux distributions. This commit replaces icons with inline SVG which does not require external assets, does not require an additionnal dependency and is widely supported by modern browsers. It makes the page loading faster and enables us to no longer require fonts-font-awesome Debian package.
51 lines
1.7 KiB
HTML
51 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
{% comment %}
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
{% endcomment %}
|
|
{% load render_table from django_tables2 %}
|
|
{% load i18n %}
|
|
|
|
{% block content %}
|
|
{% if started_activities %}
|
|
<div class="card bg-secondary text-white mb-3">
|
|
<h3 class="card-header text-center">
|
|
{% trans "Current activity" %}
|
|
</h3>
|
|
<div class="card-body text-dark">
|
|
{% for activity in started_activities %}
|
|
{% include "activity/includes/activity_info.html" %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="card bg-light mb-3">
|
|
<h3 class="card-header text-center">
|
|
{% trans "Upcoming activities" %}
|
|
</h3>
|
|
{% if upcoming.data %}
|
|
{% render_table upcoming %}
|
|
{% else %}
|
|
<div class="card-body">
|
|
<div class="alert alert-warning">
|
|
{% trans "There is no planned activity." %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="card-footer">
|
|
<a class="btn btn-sm btn-success" href="{% url 'activity:activity_create' %}" data-turbolinks="false">
|
|
<svg class="bi bi-calendar-plus" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
|
<path d="M4 .5a.5.5 0 0 0-1 0V1H2a2 2 0 0 0-2 2v1h16V3a2 2 0 0 0-2-2h-1V.5a.5.5 0 0 0-1 0V1H4V.5zM16 14V5H0v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2zM8.5 8.5V10H10a.5.5 0 0 1 0 1H8.5v1.5a.5.5 0 0 1-1 0V11H6a.5.5 0 0 1 0-1h1.5V8.5a.5.5 0 0 1 1 0z"/>
|
|
</svg>
|
|
{% trans 'New activity' %}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card bg-light mb-3">
|
|
<h3 class="card-header text-center">
|
|
{% trans "All activities" %}
|
|
</h3>
|
|
{% render_table table %}
|
|
</div>
|
|
{% endblock %} |