Browse Source

Replace wagtailfontawesome with custom SVG icons (#485)

Vince Salvino 2 years ago
parent
commit
87e4f9084f
39 changed files with 185 additions and 59 deletions
  1. 15 0
      LICENSE
  2. 12 0
      README.md
  3. 1 1
      coderedcms/blocks/__init__.py
  4. 7 7
      coderedcms/blocks/content_blocks.py
  5. 6 6
      coderedcms/blocks/html_blocks.py
  6. 3 3
      coderedcms/blocks/layout_blocks.py
  7. 12 12
      coderedcms/blocks/stream_form_blocks.py
  8. 24 0
      coderedcms/migrations/0026_auto_20220513_1627.py
  9. 5 5
      coderedcms/models/wagtailsettings_models.py
  10. 0 1
      coderedcms/project_template/basic/project_name/settings/base.py
  11. 2 2
      coderedcms/project_template/basic/website/migrations/0001_initial.py
  12. 0 1
      coderedcms/project_template/sass/project_name/settings/base.py
  13. 2 2
      coderedcms/project_template/sass/website/migrations/0001_initial.py
  14. 0 16
      coderedcms/static/coderedcms/css/codered-admin.css
  15. 3 0
      coderedcms/templates/coderedcms/icons/cr-align-left.svg
  16. 3 0
      coderedcms/templates/coderedcms/icons/cr-check-square-o.svg
  17. 3 0
      coderedcms/templates/coderedcms/icons/cr-columns.svg
  18. 3 0
      coderedcms/templates/coderedcms/icons/cr-desktop.svg
  19. 3 0
      coderedcms/templates/coderedcms/icons/cr-font.svg
  20. 3 0
      coderedcms/templates/coderedcms/icons/cr-google.svg
  21. 3 0
      coderedcms/templates/coderedcms/icons/cr-hand-pointer-o.svg
  22. 3 0
      coderedcms/templates/coderedcms/icons/cr-hashtag.svg
  23. 3 0
      coderedcms/templates/coderedcms/icons/cr-header.svg
  24. 3 0
      coderedcms/templates/coderedcms/icons/cr-list-alt.svg
  25. 3 0
      coderedcms/templates/coderedcms/icons/cr-map.svg
  26. 3 0
      coderedcms/templates/coderedcms/icons/cr-newspaper-o.svg
  27. 3 0
      coderedcms/templates/coderedcms/icons/cr-puzzle-piece.svg
  28. 3 0
      coderedcms/templates/coderedcms/icons/cr-recycle.svg
  29. 3 0
      coderedcms/templates/coderedcms/icons/cr-stop.svg
  30. 3 0
      coderedcms/templates/coderedcms/icons/cr-th-large.svg
  31. 3 0
      coderedcms/templates/coderedcms/icons/cr-universal-access.svg
  32. 3 0
      coderedcms/templates/coderedcms/icons/cr-usd.svg
  33. 3 0
      coderedcms/templates/coderedcms/icons/cr-window-maximize.svg
  34. 3 0
      coderedcms/templates/coderedcms/icons/cr-window-minimize.svg
  35. 0 1
      coderedcms/tests/settings.py
  36. 31 0
      coderedcms/wagtail_hooks.py
  37. 5 0
      docs/releases/v0.23.0.rst
  38. 0 1
      setup.py
  39. 0 1
      tutorial/mysite/mysite/settings/base.py

+ 15 - 0
LICENSE

@@ -25,3 +25,18 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+
+*******************************************************************************
+
+Icon files in "coderedcms/templates/coderedcms/icons/":
+
+1. Were sourced from the Fork Awesome project at
+   https://github.com/ForkAwesome/Fork-Awesome.
+
+2. Are licensed under the Creative Commons Attribution 3.0 Unported license,
+   a copy of which is available at https://creativecommons.org/licenses/by/3.0/
+
+3. Have been modified from the original sources.

+ 12 - 0
README.md

@@ -80,6 +80,18 @@ If you're interested in building, developing, or contributing to Wagtail CRX,
 check out the [Contributing Guide](https://docs.coderedcorp.com/wagtail-crx/stable/contributing/index.html).
 
 
+## Attribution
+
+Icon files in `coderedcms/templates/coderedcms/icons/`:
+
+* Were sourced from the Fork Awesome project at
+  https://github.com/ForkAwesome/Fork-Awesome.
+* Are licensed under the Creative Commons Attribution 3.0 Unported
+  license, a copy of which is available at
+  https://creativecommons.org/licenses/by/3.0/
+* Have been modified from the original sources.
+
+
 ## Contact
 
 We would love to hear your questions, comments, and feedback. Open an issue on Github, message us on [#coderedcms in the Wagtail slack](https://wagtailcms.slack.com/messages/CEU45SBRR).

+ 1 - 1
coderedcms/blocks/__init__.py

@@ -67,7 +67,7 @@ from .base_blocks import (  # noqa
 # Collections of blocks commonly used together.
 
 HTML_STREAMBLOCKS = [
-    ('text', RichTextBlock(icon='fa-file-text-o')),
+    ('text', RichTextBlock(icon='cr-font')),
     ('button', ButtonBlock()),
     ('image', ImageBlock()),
     ('image_link', ImageLinkBlock()),

+ 7 - 7
coderedcms/blocks/content_blocks.py

@@ -44,7 +44,7 @@ class CardBlock(BaseBlock):
 
     class Meta:
         template = 'coderedcms/blocks/card_foot.html'
-        icon = 'fa-list-alt'
+        icon = 'cr-list-alt'
         label = _('Card')
 
 
@@ -91,7 +91,7 @@ class ModalBlock(ButtonMixin, BaseLayoutBlock):
     )
     footer = blocks.StreamBlock(
         [
-            ('text', blocks.CharBlock(icon='fa-file-text-o', max_length=255, label=_('Simple Text'))),  # noqa
+            ('text', blocks.CharBlock(icon='cr-font', max_length=255, label=_('Simple Text'))),  # noqa
             ('button', ButtonBlock()),
         ],
         required=False,
@@ -100,7 +100,7 @@ class ModalBlock(ButtonMixin, BaseLayoutBlock):
 
     class Meta:
         template = 'coderedcms/blocks/modal_block.html'
-        icon = 'fa-window-maximize'
+        icon = 'cr-window-maximize'
         label = _('Modal')
 
 
@@ -228,7 +228,7 @@ class PriceListItemBlock(BaseBlock):
 
     class Meta:
         template = 'coderedcms/blocks/pricelistitem_block.html'
-        icon = 'fa-usd'
+        icon = 'cr-usd'
         label = _('Price List Item')
 
 
@@ -250,7 +250,7 @@ class PriceListBlock(BaseBlock):
 
     class Meta:
         template = 'coderedcms/blocks/pricelist_block.html'
-        icon = 'fa-usd'
+        icon = 'cr-usd'
         label = _('Price List')
 
 
@@ -268,7 +268,7 @@ class ContentWallBlock(BaseBlock):
     )
 
     class Meta:
-        icon = 'fa-stop'
+        icon = 'cr-stop'
         label = _('Content Wall')
         template = 'coderedcms/blocks/content_wall_block.html'
 
@@ -280,6 +280,6 @@ class ReusableContentBlock(BaseBlock):
     content = SnippetChooserBlock('coderedcms.ReusableContent')
 
     class Meta:
-        icon = 'fa-recycle'
+        icon = 'cr-recycle'
         label = _('Reusable Content')
         template = 'coderedcms/blocks/reusable_content_block.html'

+ 6 - 6
coderedcms/blocks/html_blocks.py

@@ -33,7 +33,7 @@ class ButtonBlock(ButtonMixin, BaseLinkBlock):
     """
     class Meta:
         template = 'coderedcms/blocks/button_block.html'
-        icon = 'fa-hand-pointer-o'
+        icon = 'cr-hand-pointer-o'
         label = _('Button Link')
         value_class = LinkStructValue
 
@@ -92,7 +92,7 @@ class EmbedGoogleMapBlock(BaseBlock):
 
     class Meta:
         template = 'coderedcms/blocks/google_map.html'
-        icon = 'fa-map'
+        icon = 'cr-map'
         label = _('Google Map')
 
 
@@ -123,7 +123,7 @@ class H1Block(BaseBlock):
 
     class Meta:
         template = 'coderedcms/blocks/h1_block.html'
-        icon = 'fa-header'
+        icon = 'cr-header'
         label = _('Heading 1')
 
 
@@ -138,7 +138,7 @@ class H2Block(BaseBlock):
 
     class Meta:
         template = 'coderedcms/blocks/h2_block.html'
-        icon = 'fa-header'
+        icon = 'cr-header'
         label = _('Heading 2')
 
 
@@ -153,7 +153,7 @@ class H3Block(BaseBlock):
 
     class Meta:
         template = 'coderedcms/blocks/h3_block.html'
-        icon = 'fa-header'
+        icon = 'cr-header'
         label = _('Heading 3')
 
 
@@ -162,7 +162,7 @@ class TableBlock(BaseBlock):
 
     class Meta:
         template = 'coderedcms/blocks/table_block.html'
-        icon = 'fa-table'
+        icon = 'table'
         label = 'Table'
 
 

+ 3 - 3
coderedcms/blocks/layout_blocks.py

@@ -45,7 +45,7 @@ class GridBlock(BaseLayoutBlock):
 
     class Meta:
         template = 'coderedcms/blocks/grid_block.html'
-        icon = 'fa-columns'
+        icon = 'cr-columns'
         label = _('Responsive Grid Row')
 
     def __init__(self, local_blocks=None, **kwargs):
@@ -67,7 +67,7 @@ class CardGridBlock(BaseLayoutBlock):
 
     class Meta:
         template = 'coderedcms/blocks/cardgrid_deck.html'
-        icon = 'fa-th-large'
+        icon = 'cr-th-large'
         label = _('Card Grid')
 
 
@@ -108,5 +108,5 @@ class HeroBlock(BaseLayoutBlock):
 
     class Meta:
         template = 'coderedcms/blocks/hero_block.html'
-        icon = 'fa-newspaper-o'
+        icon = 'cr-newspaper-o'
         label = 'Hero Unit'

+ 12 - 12
coderedcms/blocks/stream_form_blocks.py

@@ -43,49 +43,49 @@ class CoderedStreamFormFieldBlock(form_blocks.OptionalFormFieldBlock, FormBlockM
 class CoderedStreamFormCharFieldBlock(form_blocks.CharFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Text or Email input")
-        icon = "fa-window-minimize"
+        icon = "cr-window-minimize"
 
 
 class CoderedStreamFormTextFieldBlock(form_blocks.TextFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Multi-line text")
-        icon = "fa-align-left"
+        icon = "cr-align-left"
 
 
 class CoderedStreamFormNumberFieldBlock(form_blocks.NumberFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Numbers only")
-        icon = "fa-hashtag"
+        icon = "cr-hashtag"
 
 
 class CoderedStreamFormCheckboxFieldBlock(form_blocks.CheckboxFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Single Checkbox")
-        icon = "fa-check-square-o"
+        icon = "cr-check-square-o"
 
 
 class CoderedStreamFormRadioButtonsFieldBlock(form_blocks.RadioButtonsFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Radios")
-        icon = "fa-list-ul"
+        icon = "list-ul"
 
 
 class CoderedStreamFormDropdownFieldBlock(form_blocks.DropdownFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Dropdown")
-        icon = "fa-list-alt"
+        icon = "cr-list-alt"
 
 
 class CoderedStreamFormCheckboxesFieldBlock(form_blocks.CheckboxesFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Checkboxes")
-        icon = "fa-list-ul"
+        icon = "list-ul"
 
 
 class CoderedStreamFormDateFieldBlock(form_blocks.DateFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Date")
-        icon = "fa-calendar"
+        icon = "date"
 
     field_class = CoderedDateField
     widget = CoderedDateInput
@@ -94,7 +94,7 @@ class CoderedStreamFormDateFieldBlock(form_blocks.DateFieldBlock, FormBlockMixin
 class CoderedStreamFormTimeFieldBlock(form_blocks.TimeFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Time")
-        icon = "fa-clock-o"
+        icon = "time"
 
     field_class = CoderedTimeField
     widget = CoderedTimeInput
@@ -103,7 +103,7 @@ class CoderedStreamFormTimeFieldBlock(form_blocks.TimeFieldBlock, FormBlockMixin
 class CoderedStreamFormDateTimeFieldBlock(form_blocks.DateTimeFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Date and Time")
-        icon = "fa-calendar"
+        icon = "date"
 
     field_class = CoderedDateTimeField
     widget = CoderedDateTimeInput
@@ -112,13 +112,13 @@ class CoderedStreamFormDateTimeFieldBlock(form_blocks.DateTimeFieldBlock, FormBl
 class CoderedStreamFormImageFieldBlock(form_blocks.ImageFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Image Upload")
-        icon = "fa-picture-o"
+        icon = "image"
 
 
 class CoderedStreamFormFileFieldBlock(form_blocks.FileFieldBlock, FormBlockMixin):
     class Meta:
         label = _("Secure File Upload")
-        icon = "fa-upload"
+        icon = "upload"
 
     field_class = SecureFileField
 

File diff suppressed because it is too large
+ 24 - 0
coderedcms/migrations/0026_auto_20220513_1627.py


+ 5 - 5
coderedcms/models/wagtailsettings_models.py

@@ -15,7 +15,7 @@ from coderedcms.fields import MonospaceField
 from coderedcms.settings import cr_settings
 
 
-@register_setting(icon='fa-desktop')
+@register_setting(icon='cr-desktop')
 class LayoutSettings(BaseSetting):
     """
     Branding, navbar, and theme settings.
@@ -129,7 +129,7 @@ class LayoutSettings(BaseSetting):
     ]
 
 
-@register_setting(icon='fa-google')
+@register_setting(icon='cr-google')
 class AnalyticsSettings(BaseSetting):
     """
     Tracking and Google Analytics.
@@ -208,7 +208,7 @@ class AnalyticsSettings(BaseSetting):
     ]
 
 
-@register_setting(icon='fa-universal-access')
+@register_setting(icon='cr-universal-access')
 class ADASettings(BaseSetting):
     """
     Accessibility related options.
@@ -280,7 +280,7 @@ class GeneralSettings(BaseSetting):
         verbose_name = _('General')
 
 
-@register_setting(icon='fa-puzzle-piece')
+@register_setting(icon='cr-puzzle-piece')
 class GoogleApiSettings(BaseSetting):
     """
     Settings for Google API services.
@@ -296,7 +296,7 @@ class GoogleApiSettings(BaseSetting):
     )
 
 
-@register_setting(icon='fa-puzzle-piece')
+@register_setting(icon='cr-puzzle-piece')
 class MailchimpApiSettings(BaseSetting):
     """
     Settings for Mailchimp API services.

+ 0 - 1
coderedcms/project_template/basic/project_name/settings/base.py

@@ -33,7 +33,6 @@ INSTALLED_APPS = [
     'bootstrap4',
     'modelcluster',
     'taggit',
-    'wagtailfontawesome',
     'wagtailcache',
     'wagtailimportexport',
     'wagtailseo',

File diff suppressed because it is too large
+ 2 - 2
coderedcms/project_template/basic/website/migrations/0001_initial.py


+ 0 - 1
coderedcms/project_template/sass/project_name/settings/base.py

@@ -32,7 +32,6 @@ INSTALLED_APPS = [
     'bootstrap4',
     'modelcluster',
     'taggit',
-    'wagtailfontawesome',
     'wagtailcache',
     'wagtailimportexport',
     'wagtailseo',

File diff suppressed because it is too large
+ 2 - 2
coderedcms/project_template/sass/website/migrations/0001_initial.py


+ 0 - 16
coderedcms/static/coderedcms/css/codered-admin.css

@@ -147,22 +147,6 @@ input[type='checkbox'], input[type='radio'] {
     margin-right: auto;
 }
 
-.tab-nav li.seo a::before,
-.tab-nav li.integrations a::before {
-    -webkit-font-smoothing: antialiased;
-    -moz-osx-font-smoothing: grayscale;
-    font-family: "FontAwesome";
-    vertical-align: middle;
-    text-transform: none;
-    content: "\f201";
-    margin-right: .5em;
-    font-weight: 400;
-}
-
-.tab-nav li.integrations a::before {
-    content: "\f12e";
-}
-
 /* Show the site's custom logo in the wagtail admin */
 
 .codered-logo-custom {

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-align-left.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-align-left" viewBox="0 0 2000 1536">
+    <path d="M1792 1344v128c0 35-29 64-64 64H64c-35 0-64-29-64-64v-128c0-35 29-64 64-64h1664c35 0 64 29 64 64zm-384-384v128c0 35-29 64-64 64H64c-35 0-64-29-64-64V960c0-35 29-64 64-64h1280c35 0 64 29 64 64zm256-384v128c0 35-29 64-64 64H64c-35 0-64-29-64-64V576c0-35 29-64 64-64h1536c35 0 64 29 64 64zm-384-384v128c0 35-29 64-64 64H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h1152c35 0 64 29 64 64z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-check-square-o.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-check-square-o" viewBox="0 0 2000 1536">
+    <path d="M1408 930v318c0 159-129 288-288 288H288c-159 0-288-129-288-288V416c0-159 129-288 288-288h832c40 0 80 8 117 25 9 4 16 13 18 23 2 11-1 21-9 29l-49 49c-6 6-15 10-23 10-3 0-6-1-9-2-15-4-30-6-45-6H288c-88 0-160 72-160 160v832c0 88 72 160 160 160h832c88 0 160-72 160-160V994c0-8 3-16 9-22l64-64c7-7 15-10 23-10 4 0 8 1 12 3 12 5 20 16 20 29zm231-489l-814 814c-32 32-82 32-114 0L281 825c-32-32-32-82 0-114l110-110c32-32 82-32 114 0l263 263 647-647c32-32 82-32 114 0l110 110c32 32 32 82 0 114z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-columns.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-columns" viewBox="0 0 2000 1536">
+    <path d="M160 1536h608V384H128v1120c0 17 15 32 32 32zm1376-32V384H896v1152h608c17 0 32-15 32-32zm128-1216v1216c0 88-72 160-160 160H160c-88 0-160-72-160-160V288c0-88 72-160 160-160h1344c88 0 160 72 160 160z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-desktop.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-desktop" viewBox="0 0 2000 1536">
+    <path d="M1792 992V160c0-17-15-32-32-32H160c-17 0-32 15-32 32v832c0 17 15 32 32 32h1600c17 0 32-15 32-32zm128-832v1088c0 88-72 160-160 160h-544c0 85 64 157 64 192s-29 64-64 64H704c-35 0-64-29-64-64 0-37 64-105 64-192H160c-88 0-160-72-160-160V160C0 72 72 0 160 0h1600c88 0 160 72 160 160z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-font.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-font" viewBox="0 0 2000 1536">
+    <path d="M725 559l-170 450c99 1 198 4 297 4 19 0 38-1 57-2-52-152-113-307-184-452zM0 1664l2-79c94-29 196-9 238-117l237-616 280-724h128c4 7 8 14 11 21l205 480c75 177 144 356 220 532 45 104 80 211 130 313 7 16 21 46 35 57 33 26 125 32 172 50 3 19 6 38 6 57 0 9-1 17-1 26-127 0-254-16-381-16-131 0-262 11-393 15 0-26 1-52 4-78l131-28c27-6 80-13 80-50 0-36-129-333-145-374l-450-2c-26 58-127 320-127 358 0 77 147 80 204 88 1 19 1 38 1 58 0 9-1 18-2 27-116 0-233-20-349-20-14 0-34 6-48 8-63 11-125 14-188 14z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-google.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-google" viewBox="0 0 2000 1536">
+    <path d="M768 786h725c7 39 12 77 12 128 0 438-294 750-737 750-425 0-768-343-768-768s343-768 768-768c207 0 381 76 515 201l-209 201c-57-55-157-119-306-119-262 0-476 217-476 485s214 485 476 485c304 0 418-218 436-331H768V786z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-hand-pointer-o.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-hand-pointer-o" viewBox="0 0 2000 1536">
+    <path d="M640 128c-71 0-128 57-128 128v896L361 950c-25-33-65-54-107-54-70 0-126 59-126 128 0 28 9 55 26 77l384 512c24 32 62 51 102 51h718c29 0 55-20 62-48l92-368c16-64 24-129 24-194V837c0-53-41-101-96-101-53 0-96 43-96 96h-32v-61c0-63-48-115-112-115-62 0-112 50-112 112v64h-32v-90c0-72-55-134-128-134-71 0-128 57-128 128v96h-32V262c0-72-55-134-128-134zm0-128c143 0 256 120 256 262v220c11-1 21-2 32-2 65 0 126 25 173 69 31-14 65-21 99-21 72 0 139 32 184 87 19-5 37-7 56-7 126 0 224 105 224 229v217c0 75-9 151-28 225l-92 368c-21 85-98 145-186 145H640c-80 0-157-39-205-102L51 1178c-33-44-51-99-51-154 0-140 114-256 254-256 46 0 91 12 130 35V256C384 115 499 0 640 0zm128 1408v-384h-32v384h32zm256 0v-384h-32v384h32zm256 0v-384h-32v384h32z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-hashtag.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-hashtag" viewBox="0 0 2000 1536">
+    <path d="M991 1024l64-256H801l-64 256h254zm768-504l-56 224c-4 14-16 24-31 24h-327l-64 256h311c10 0 19 5 25 12 6 8 9 18 6 28l-56 224c-3 14-16 24-31 24h-327l-81 328c-4 14-17 24-31 24H873c-10 0-20-5-26-12-6-8-8-18-6-28l78-312H665l-81 328c-4 14-17 24-31 24H328c-9 0-19-5-25-12-6-8-8-18-6-28l78-312H64c-10 0-19-5-25-12-6-8-8-18-6-28l56-224c4-14 16-24 31-24h327l64-256H200c-10 0-19-5-25-12-6-8-9-18-6-28l56-224c3-14 16-24 31-24h327l81-328c4-14 17-24 32-24h224c9 0 19 5 25 12 6 8 8 18 6 28l-78 312h254l81-328c4-14 17-24 32-24h224c9 0 19 5 25 12 6 8 8 18 6 28l-78 312h311c10 0 19 5 25 12 6 8 8 18 6 28z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-header.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-header" viewBox="0 0 2000 1536">
+    <path d="M1682 1664c-88 0-177-7-266-7-88 0-176 7-264 7-34 0-50-37-50-66 0-89 100-51 152-85 33-21 33-105 33-140l-1-391c0-11 0-21-1-31-16-5-34-4-50-4H560c-17 0-35-1-51 4-1 10-1 20-1 31l-1 371c0 38 0 142 37 164 52 32 170-13 170 77 0 30-14 70-49 70-93 0-186-7-278-7-85 0-170 7-255 7-33 0-48-38-48-66 0-87 92-51 141-85 32-22 33-108 33-143l-1-57V500c0-48 7-202-38-229-50-31-157 17-157-73 0-29 13-70 48-70 92 0 185 7 277 7 84 0 169-7 253-7 36 0 50 40 50 70 0 86-99 44-148 75-35 21-35 124-35 160l1 320c0 11 0 21 1 32 13 3 26 3 39 3h699c12 0 25 0 38-3 1-11 1-21 1-32l1-320c0-37 0-139-35-160-50-30-150 10-150-75 0-30 14-70 50-70 88 0 176 7 264 7 86 0 172-7 258-7 36 0 50 40 50 70 0 87-103 43-153 74-34 22-35 125-35 161l1 943c0 33 2 120 34 140 51 32 159-9 159 78 0 29-13 70-48 70z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-list-alt.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-list-alt" viewBox="0 0 2000 1536">
+    <path d="M384 1184v64c0 17-15 32-32 32h-64c-17 0-32-15-32-32v-64c0-17 15-32 32-32h64c17 0 32 15 32 32zm0-256v64c0 17-15 32-32 32h-64c-17 0-32-15-32-32v-64c0-17 15-32 32-32h64c17 0 32 15 32 32zm0-256v64c0 17-15 32-32 32h-64c-17 0-32-15-32-32v-64c0-17 15-32 32-32h64c17 0 32 15 32 32zm1152 512v64c0 17-15 32-32 32H544c-17 0-32-15-32-32v-64c0-17 15-32 32-32h960c17 0 32 15 32 32zm0-256v64c0 17-15 32-32 32H544c-17 0-32-15-32-32v-64c0-17 15-32 32-32h960c17 0 32 15 32 32zm0-256v64c0 17-15 32-32 32H544c-17 0-32-15-32-32v-64c0-17 15-32 32-32h960c17 0 32 15 32 32zm128 704V544c0-17-15-32-32-32H160c-17 0-32 15-32 32v832c0 17 15 32 32 32h1472c17 0 32-15 32-32zm128-1088v1088c0 88-72 160-160 160H160c-88 0-160-72-160-160V288c0-88 72-160 160-160h1472c88 0 160 72 160 160z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-map.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-map" viewBox="0 0 2000 1536">
+    <path d="M512 0c17 0 32 15 32 32v1472c0 12-7 23-17 28L47 1788c-5 3-10 4-15 4-17 0-32-15-32-32V288c0-12 7-23 17-28L497 4c5-3 10-4 15-4zm1248 0c17 0 32 15 32 32v1472c0 12-7 23-17 28l-480 256c-5 3-10 4-15 4-17 0-32-15-32-32V288c0-12 7-23 17-28L1745 4c5-3 10-4 15-4zM640 0c5 0 10 1 14 3l512 256c11 6 18 17 18 29v1472c0 17-15 32-32 32-5 0-10-1-14-3l-512-256c-11-6-18-17-18-29V32c0-17 15-32 32-32z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-newspaper-o.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-newspaper-o" viewBox="0 0 2000 1536">
+    <path d="M1024 512H640v384h384V512zm128 640v128H512v-128h640zm0-768v640H512V384h640zm640 768v128h-512v-128h512zm0-256v128h-512V896h512zm0-256v128h-512V640h512zm0-256v128h-512V384h512zM256 1344V384H128v960c0 35 29 64 64 64s64-29 64-64zm1664 0V256H384v1088c0 22-4 44-11 64h1483c35 0 64-29 64-64zm128-1216v1216c0 106-86 192-192 192H192c-106 0-192-86-192-192V256h256V128h1792z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-puzzle-piece.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-puzzle-piece" viewBox="0 0 2000 1536">
+    <path d="M1664 1098c0 103-59 189-168 189-122 0-154-111-264-111-80 0-110 50-110 124 0 78 32 153 31 230v5c-11 0-22 0-33 1-103 10-207 30-311 30-71 0-145-28-145-110 0-110 111-142 111-264 0-109-86-168-189-168-105 0-202 58-202 173 0 127 97 182 97 251 0 35-22 66-46 89-31 29-75 35-117 35-82 0-164-11-245-24-18-3-37-5-55-8l-13-2c-2-1-5-1-5-2V512c4 3 63 10 73 12 81 13 163 24 245 24 42 0 86-6 117-35 24-23 46-54 46-89 0-69-97-124-97-251C384 58 481 0 587 0c102 0 188 59 188 168 0 122-111 154-111 264 0 82 74 110 145 110 115 0 229-26 343-32v2c-3 4-10 63-12 73-13 81-24 163-24 245 0 42 6 86 35 117 23 24 54 46 89 46 69 0 124-97 251-97 115 0 173 97 173 202z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-recycle.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-recycle" viewBox="0 0 2000 1536">
+    <path d="M836 1169l-15 368-2 22-420-29c-52-4-95-53-114-97-40-93 12-203 42-292 0 0 77 12 509 28zM449 583l180 379-147-92c-225 257-246 448-246 448L46 961c-39-58-4-121-4-121s35-63 114-188L16 566zm1231 517l-188 359c-26 65-98 71-98 71s-71 7-219 12l8 164-230-367 211-362 7 173c339 41 509-50 509-50zM895 176s-47 62-265 435L313 424l-19-12L519 56c28-44 91-60 140-55 100 9 172 106 236 175zm655 307l212 363c27 45 11 108-15 150-54 84-174 104-264 129 0 0-34-71-265-436l313-195zm-143-226l142-83-220 373-419-20 151-86C941 122 782 12 782 12l405 1c70-6 108 54 108 54s39 61 112 190z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-stop.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-stop" viewBox="0 0 2000 1536">
+    <path d="M1536 192v1408c0 35-29 64-64 64H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h1408c35 0 64 29 64 64z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-th-large.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-th-large" viewBox="0 0 2000 1536">
+    <path d="M768 1024v384c0 70-58 128-128 128H128c-70 0-128-58-128-128v-384c0-70 58-128 128-128h512c70 0 128 58 128 128zm0-768v384c0 70-58 128-128 128H128C58 768 0 710 0 640V256c0-70 58-128 128-128h512c70 0 128 58 128 128zm896 768v384c0 70-58 128-128 128h-512c-70 0-128-58-128-128v-384c0-70 58-128 128-128h512c70 0 128 58 128 128zm0-768v384c0 70-58 128-128 128h-512c-70 0-128-58-128-128V256c0-70 58-128 128-128h512c70 0 128 58 128 128z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-universal-access.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-universal-access" viewBox="0 0 2000 1536">
+    <path d="M1374 657c-8-34-42-55-77-47-143 34-273 62-401 62s-258-28-401-62c-35-8-69 13-77 47-8 35 13 69 47 77 106 25 205 47 303 58-4 338-41 432-83 540l-9 21c-13 33 4 70 37 83 7 3 15 4 23 4 26 0 50-15 60-41l8-20c28-72 54-139 71-259h42c17 120 43 187 71 259l8 20c10 26 34 41 60 41 8 0 16-1 23-4 33-13 50-50 37-83l-9-21c-42-108-79-202-83-540 98-11 197-33 303-58 34-8 55-42 47-77zm-350-145c0-71-57-128-128-128s-128 57-128 128 57 128 128 128 128-57 128-128zm576 384c0 389-315 704-704 704s-704-315-704-704 315-704 704-704 704 315 704 704zM896 128c-423 0-768 345-768 768s345 768 768 768 768-345 768-768-345-768-768-768zm896 768c0 495-401 896-896 896S0 1391 0 896 401 0 896 0s896 401 896 896z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-usd.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-usd" viewBox="0 0 2000 1536">
+    <path d="M978 1185c0 204-146 365-358 400v175c0 18-14 32-32 32H453c-17 0-32-14-32-32v-175c-234-33-362-173-367-179-10-12-11-29-2-41l103-135c5-7 14-11 23-12s18 2 24 9c2 1 142 135 319 135 98 0 204-52 204-165 0-96-118-143-253-197C292 929 68 839 68 588c0-184 144-336 353-376V32c0-18 15-32 32-32h135c18 0 32 14 32 32v176c203 23 311 133 315 137 10 11 12 26 5 38l-81 146c-5 9-13 15-23 16-10 2-19-1-27-7-1-1-122-108-272-108-127 0-215 63-215 154 0 106 122 153 264 208 184 71 392 152 392 393z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-window-maximize.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-window-maximize" viewBox="0 0 2000 1536">
+    <path d="M256 1408h1280V640H256v768zM1792 288v1216c0 88-72 160-160 160H160c-88 0-160-72-160-160V288c0-88 72-160 160-160h1472c88 0 160 72 160 160z"/>
+</symbol>

+ 3 - 0
coderedcms/templates/coderedcms/icons/cr-window-minimize.svg

@@ -0,0 +1,3 @@
+<symbol id="icon-cr-window-minimize" viewBox="0 0 2000 1536">
+    <path d="M1792 1312v192c0 88-72 160-160 160H160c-88 0-160-72-160-160v-192c0-88 72-160 160-160h1472c88 0 160 72 160 160z"/>
+</symbol>

+ 0 - 1
coderedcms/tests/settings.py

@@ -34,7 +34,6 @@ INSTALLED_APPS = [
     'bootstrap4',
     'modelcluster',
     'taggit',
-    'wagtailfontawesome',
     'wagtailcache',
     'wagtailimportexport',
     'wagtailseo',

+ 31 - 0
coderedcms/wagtail_hooks.py

@@ -41,6 +41,37 @@ def collapsible_js():
     )
 
 
+@hooks.register("register_icons")
+def register_icons(icons):
+    """
+    Add custom SVG icons to the Wagtail admin.
+    """
+    # These SVG files should be in the django templates folder, and follow exact
+    # specifications to work with Wagtail:
+    # https://github.com/wagtail/wagtail/pull/6028
+    icons.append("coderedcms/icons/cr-align-left.svg")
+    icons.append("coderedcms/icons/cr-check-square-o.svg")
+    icons.append("coderedcms/icons/cr-columns.svg")
+    icons.append("coderedcms/icons/cr-desktop.svg")
+    icons.append("coderedcms/icons/cr-font.svg")
+    icons.append("coderedcms/icons/cr-google.svg")
+    icons.append("coderedcms/icons/cr-hand-pointer-o.svg")
+    icons.append("coderedcms/icons/cr-hashtag.svg")
+    icons.append("coderedcms/icons/cr-header.svg")
+    icons.append("coderedcms/icons/cr-list-alt.svg")
+    icons.append("coderedcms/icons/cr-map.svg")
+    icons.append("coderedcms/icons/cr-newspaper-o.svg")
+    icons.append("coderedcms/icons/cr-puzzle-piece.svg")
+    icons.append("coderedcms/icons/cr-recycle.svg")
+    icons.append("coderedcms/icons/cr-stop.svg")
+    icons.append("coderedcms/icons/cr-th-large.svg")
+    icons.append("coderedcms/icons/cr-universal-access.svg")
+    icons.append("coderedcms/icons/cr-usd.svg")
+    icons.append("coderedcms/icons/cr-window-maximize.svg")
+    icons.append("coderedcms/icons/cr-window-minimize.svg")
+    return icons
+
+
 def clear_wagtailcache(*args, **kwargs):
     clear_cache()
 

+ 5 - 0
docs/releases/v0.23.0.rst

@@ -30,6 +30,11 @@ Upgrade considerations
 
 * Other upgrade considerations for `Wagtail 2.16 <https://docs.wagtail.org/en/stable/releases/2.16.html#upgrade-considerations>`_.
 
+* Font Awesome (``wagtailfontawesome``) has been removed as a dependency. You
+  should remove this from your ``INSTALLED_APPS`` and/or ``requirements.txt``
+  file (unless you are using it elsewhere in your code).
+
+
 Supported software
 ------------------
 

+ 0 - 1
setup.py

@@ -50,7 +50,6 @@ setup(
         'geocoder==1.38.*',
         'icalendar==4.0.*',
         'wagtail==2.16.*',
-        'wagtailfontawesome>=1.2.*',
         'wagtail-cache==1.*',
         'wagtail-import-export>=0.2,<0.3',
         'wagtail-seo==1.*',

+ 0 - 1
tutorial/mysite/mysite/settings/base.py

@@ -33,7 +33,6 @@ INSTALLED_APPS = [
     'bootstrap4',
     'modelcluster',
     'taggit',
-    'wagtailfontawesome',
     'wagtailcache',
     'wagtailimportexport',
     'wagtailseo',

Some files were not shown because too many files changed in this diff