Upgrade to fontawesome 6

* Adapt fontawesome usage when needed
* Fix uv guide not importing css
* Remove utf8 usage for fontawesome
This commit is contained in:
2024-09-17 15:08:19 +02:00
committed by Bartuccio Antoine
parent 3d6c260e53
commit 271d57051e
27 changed files with 52 additions and 3937 deletions

View File

@ -18,9 +18,8 @@
{# Thile file is quite heavy (around 250kb), so declaring it in a block allows easy removal #}
<link rel="stylesheet" href="{{ static('webpack/jquery-index.css') }}">
{% endblock %}
<link rel="preload" as="style" href="{{ static('vendored/font-awesome/css/font-awesome.min.css') }}" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="{{ static('vendored/font-awesome/css/font-awesome.min.css') }}"></noscript>
<script defer href="{{ static('vendored/font-awesome/js/fontawesome.min.js') }}"></script>
<link rel="preload" as="style" href="{{ static('webpack/fontawesome-index.css') }}" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="{{ static('webpack/fontawesome-index.css') }}"></noscript>
<script src="{{ static('webpack/alpine-index.js') }}" defer></script>
<!-- Jquery declared here to be accessible in every django widgets -->
@ -114,7 +113,7 @@
</div>
<div class="notification">
<a href="#" onclick="display_notif()">
<i class="fa fa-bell-o"></i>
<i class="fa-regular fa-bell"></i>
{% set notification_count = user.notifications.filter(viewed=False).count() %}
{% if notification_count > 0 %}

View File

@ -40,11 +40,11 @@
{%- endmacro %}
{% macro fb_quick(news) -%}
<a rel="nofollow" target="#" href="https://www.facebook.com/sharer/sharer.php?u={{ news.get_full_url() }}" class="fb fa fa-facebook-square fa-2x"></a>
<a rel="nofollow" target="#" href="https://www.facebook.com/sharer/sharer.php?u={{ news.get_full_url() }}" class="fb fa-brands fa-facebook fa-2x"></a>
{%- endmacro %}
{% macro tweet_quick(news) -%}
<a rel="nofollow" target="#" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}" class="twitter fa fa-twitter-square fa-2x"></a>
<a rel="nofollow" target="#" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}" class="twitter fa-brands fa-twitter-square fa-2x"></a>
{%- endmacro %}
{% macro user_mini_profile(user) %}

View File

@ -225,7 +225,7 @@
{% for gift in gifts %}
<li>{{ gift }}
<a href="{{ url('core:user_gift_delete', user_id=profile.id, gift_id=gift.id) }}">
<i class="fa fa-trash"></i>
<i class="fa-solid fa-trash-can delete-action"></i>
</a>
</li>
{% endfor %}

View File

@ -32,7 +32,7 @@
<button
@click="godfathers_depth--"
:disabled="godfathers_depth <= {{ depth_min }}"
><i class="fa fa-minus fa-xs"></i></button>
><i class="fa fa-minus"></i></button>
<input
x-model="godfathers_depth"
x-ref="godfather_depth_input"
@ -59,7 +59,7 @@
@click="godchildren_depth--"
:disabled="godchildren_depth <= {{ depth_min }}"
><i
class="fa fa-minus fa-xs"
class="fa fa-minus"
></i></button>
<input
x-model="godchildren_depth"

View File

@ -118,7 +118,7 @@
{
name: "image",
action: EasyMDE.drawImage,
className: "fa fa-picture-o",
className: "fa-regular fa-image",
title: "{{ translations.image }}"
},
{

View File

@ -1,7 +1,7 @@
<span>
<input type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}>
<!-- NFC icon not available in fontawesome 4.7 -->
<button type="button" id="{{ widget.attrs.id }}_button"><i class="fa fa-tag"></i></button>
<button type="button" id="{{ widget.attrs.id }}_button"><i class="fa-brands fa-nfc-symbol"></i></button>
</span>
<script>
document.addEventListener("DOMContentLoaded", function(event) {