Skip to content
Snippets Groups Projects
Commit 2455da83 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Upgrade to fontawesome 6

Use official fontawesome django app for static file handling
Switch to fork/new version of django-bootstrap (for icon field and rendering shortcuts)
Add migration to bump icon field of dashboard buttons to new version
Update templates to load new app and use new tags
parent 347a93f4
Branches
No related tags found
1 merge request!158Upgrades (bootstrap, fontawesome, django, js dependencies) and static file compression
Pipeline #129428 passed
......@@ -2,7 +2,7 @@
{% load i18n %}
{% load django_bootstrap5 %}
{% load fontawesome_5 %}
{% load fontawesome_6 %}
{% load static %}
{% load tz %}
......@@ -48,15 +48,15 @@
{% bootstrap_form form %}
{% endblock %}
<button type="submit" class="save btn btn-primary float-end">
{% fa5_icon "check" 'fas' %} {% trans "Submit" %}
{% fa6_icon "check" 'fas' %} {% trans "Submit" %}
</button>
<button type="reset" class="btn btn-danger">
{% fa5_icon "undo-alt" 'fas' %} {% trans "Reset Form" %}
{% fa6_icon "undo-alt" 'fas' %} {% trans "Reset Form" %}
</button>
<a href="{% url 'submit:submission_overview' event_slug=event.slug %}" class="btn btn-secondary">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %}
{% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a>
</form>
{% endblock %}
......
from django import template
from fontawesome_5.templatetags.fontawesome_5 import fa5_icon
from fontawesome_6.templatetags.fontawesome_6 import fa6_icon
register = template.Library()
......@@ -7,8 +7,8 @@ register = template.Library()
@register.filter
def bool_symbol(bool_val):
if bool_val:
return fa5_icon("check", "fas")
return fa5_icon("times", "fas")
return fa6_icon("check", "fas")
return fa6_icon("times", "fas")
@register.inclusion_tag("AKSubmission/tracks_list.html")
......
Django==3.2.16
django-bootstrap5==22.2
django-fontawesome-5==1.0.18
fontawesomefree==6.2.1 # Makes static files (css, fonts) available locally
django-fontawesome-6==1.0.0.0 # Provides an icon field for models and forms as well as handy shortcuts to render icons
django-split-settings==1.2.0
django-timezone-field==4.1.2
djangorestframework==3.14.0
......
{% extends "admin/base_site.html" %}
{% load django_bootstrap5 %}
{% load fontawesome_5 %}
{% load fontawesome_6 %}
{% load static %}
{% block stylesheet %}{% static "common/css/admin-bootstrap.css" %}{% endblock %}
......@@ -16,7 +16,7 @@
<!-- Load bootstrap, jquery and fontawesome-->
{% bootstrap_javascript %}
<script src="{% static 'common/vendor/jquery/jquery-3.3.1.min.js' %}"></script>
{% fontawesome_5_static %}
{% fontawesome_6_static %}
<style>
a.btn {
......
{% load static %}
{% load i18n %}
{% load django_bootstrap5 %}
{% load fontawesome_5 %}
{% load fontawesome_6 %}
{% load tags_AKModel %}
<!DOCTYPE html>
......@@ -16,7 +16,7 @@
{% bootstrap_css %}
{% bootstrap_javascript %}
<script src="{% static 'common/vendor/jquery/jquery-3.3.1.min.js' %}"></script>
{% fontawesome_5_static %}
{% fontawesome_6_static %}
<link rel="stylesheet" href="{% static 'common/css/custom.css' %}">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment