Skip to content

Commit

Permalink
Upgrade FontAwesome to v6 (#1694)
Browse files Browse the repository at this point in the history
  • Loading branch information
istride authored May 10, 2024
1 parent 9d3a894 commit beb3ffa
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 819 deletions.
8 changes: 6 additions & 2 deletions home/static/css/fontawesome/css/fontawesome.min.css

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions home/static/css/fontawesome/css/regular.min.css

This file was deleted.

6 changes: 6 additions & 0 deletions home/static/css/fontawesome/css/solid.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*!
* Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2024 Fonticons, Inc.
*/
:host,:root{--fa-style-family-classic:"Font Awesome 6 Free";--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}.fa-solid,.fas{font-weight:900}
Binary file not shown.
801 changes: 0 additions & 801 deletions home/static/css/fontawesome/webfonts/fa-regular-400.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 13 additions & 11 deletions home/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,19 @@ def global_admin_css():
)

@hooks.register("insert_global_admin_css")
def import_fontawesome_stylesheet():
return "\n".join([
format_html(
'<link rel="stylesheet" href="{}">',
static("css/fontawesome/css/fontawesome.min.css"),
),
format_html(
'<link rel="stylesheet" href="{}">',
static("css/fontawesome/css/regular.min.css"),
),
])
def import_fontawesome_stylesheets():
return "\n".join(
[
format_html(
'<link rel="stylesheet" href="{}">',
static("css/fontawesome/css/fontawesome.min.css"),
),
format_html(
'<link rel="stylesheet" href="{}">',
static("css/fontawesome/css/solid.min.css"),
),
]
)


@hooks.register('insert_global_admin_js', order=100)
Expand Down
8 changes: 8 additions & 0 deletions iogt/static/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function customizeUI() {
'The descriptive text displayed underneath a headline in search engine results, and automatically loaded ' +
'as a description into shares on social media eg Facebook Posts or shared links in WhatsApp.'
);

configureEasyMDE();
}

function validateFileUpload(fileInput, file_size_threshold) {
Expand Down Expand Up @@ -70,4 +72,10 @@ function validateFreeBasicsFileUpload(fileInput, file_size_threshold) {
return true;
}

function configureEasyMDE() {
window.wagtailMarkdown = window.wagtailMarkdown || {};
window.wagtailMarkdown.options = window.wagtailMarkdown.options || {};
window.wagtailMarkdown.options.spellChecker = false;
}

$(document).ready(customizeUI);

0 comments on commit beb3ffa

Please sign in to comment.