Skip to content

Commit 70f682f

Browse files
Removed Fontawesome (#184)
Fontawesome was only used in the Diversification screen and all the icons could be replaced by Bootstrap Icons. That change removes one dependency, making the app lighter and providing a better unified look Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 23ddb31 commit 70f682f

File tree

12 files changed

+27
-212
lines changed

12 files changed

+27
-212
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
* Installers: Added OS name to the installer filenames
1919
* Improved Update Download dialog. Now shows the percentage and downloaded size
20+
* Changed icons used in the Diversification section. Now all the application uses the same set of icons.
2021

2122
### Deprecated
2223

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ See [Wiki - Developing Stonks Overwatch](./docs/Developing-Stonks-Overwatch)
8080

8181
## TODOs
8282

83-
* [ ] Migrate FontAwesome to use a [Kit](https://docs.fontawesome.com/web/use-with/python-django)
8483
* [ ] Add information about the sectors. Maybe a tooltip in the places where sectors are used.
8584
* [ ] Tables should allow choosing the number of rows to show.
8685
* [ ] Portfolio Tables would be migrated to "http://bootstrap-table.com/"

THIRD_PARTY_LICENSES.txt

Lines changed: 0 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -636,176 +636,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
636636
SOFTWARE.
637637

638638

639-
fontawesomefree
640-
6.6.0
641-
https://fontawesome.com/license/free
642-
Fonticons, Inc. (https://fontawesome.com)
643-
644-
--------------------------------------------------------------------------------
645-
646-
Font Awesome Free License
647-
648-
Font Awesome Free is free, open source, and GPL friendly. You can use it for
649-
commercial projects, open source projects, or really almost whatever you want.
650-
Full Font Awesome Free license: https://fontawesome.com/license/free.
651-
652-
--------------------------------------------------------------------------------
653-
654-
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
655-
656-
The Font Awesome Free download is licensed under a Creative Commons
657-
Attribution 4.0 International License and applies to all icons packaged
658-
as SVG and JS file types.
659-
660-
--------------------------------------------------------------------------------
661-
662-
# Fonts: SIL OFL 1.1 License
663-
664-
In the Font Awesome Free download, the SIL OFL license applies to all icons
665-
packaged as web and desktop font files.
666-
667-
Copyright (c) 2024 Fonticons, Inc. (https://fontawesome.com)
668-
with Reserved Font Name: "Font Awesome".
669-
670-
This Font Software is licensed under the SIL Open Font License, Version 1.1.
671-
This license is copied below, and is also available with a FAQ at:
672-
http://scripts.sil.org/OFL
673-
674-
SIL OPEN FONT LICENSE
675-
Version 1.1 - 26 February 2007
676-
677-
PREAMBLE
678-
The goals of the Open Font License (OFL) are to stimulate worldwide
679-
development of collaborative font projects, to support the font creation
680-
efforts of academic and linguistic communities, and to provide a free and
681-
open framework in which fonts may be shared and improved in partnership
682-
with others.
683-
684-
The OFL allows the licensed fonts to be used, studied, modified and
685-
redistributed freely as long as they are not sold by themselves. The
686-
fonts, including any derivative works, can be bundled, embedded,
687-
redistributed and/or sold with any software provided that any reserved
688-
names are not used by derivative works. The fonts and derivatives,
689-
however, cannot be released under any other type of license. The
690-
requirement for fonts to remain under this license does not apply
691-
to any document created using the fonts or their derivatives.
692-
693-
DEFINITIONS
694-
"Font Software" refers to the set of files released by the Copyright
695-
Holder(s) under this license and clearly marked as such. This may
696-
include source files, build scripts and documentation.
697-
698-
"Reserved Font Name" refers to any names specified as such after the
699-
copyright statement(s).
700-
701-
"Original Version" refers to the collection of Font Software components as
702-
distributed by the Copyright Holder(s).
703-
704-
"Modified Version" refers to any derivative made by adding to, deleting,
705-
or substituting — in part or in whole — any of the components of the
706-
Original Version, by changing formats or by porting the Font Software to a
707-
new environment.
708-
709-
"Author" refers to any designer, engineer, programmer, technical
710-
writer or other person who contributed to the Font Software.
711-
712-
PERMISSION & CONDITIONS
713-
Permission is hereby granted, free of charge, to any person obtaining
714-
a copy of the Font Software, to use, study, copy, merge, embed, modify,
715-
redistribute, and sell modified and unmodified copies of the Font
716-
Software, subject to the following conditions:
717-
718-
1) Neither the Font Software nor any of its individual components,
719-
in Original or Modified Versions, may be sold by itself.
720-
721-
2) Original or Modified Versions of the Font Software may be bundled,
722-
redistributed and/or sold with any software, provided that each copy
723-
contains the above copyright notice and this license. These can be
724-
included either as stand-alone text files, human-readable headers or
725-
in the appropriate machine-readable metadata fields within text or
726-
binary files as long as those fields can be easily viewed by the user.
727-
728-
3) No Modified Version of the Font Software may use the Reserved Font
729-
Name(s) unless explicit written permission is granted by the corresponding
730-
Copyright Holder. This restriction only applies to the primary font name as
731-
presented to the users.
732-
733-
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
734-
Software shall not be used to promote, endorse or advertise any
735-
Modified Version, except to acknowledge the contribution(s) of the
736-
Copyright Holder(s) and the Author(s) or with their explicit written
737-
permission.
738-
739-
5) The Font Software, modified or unmodified, in part or in whole,
740-
must be distributed entirely under this license, and must not be
741-
distributed under any other license. The requirement for fonts to
742-
remain under this license does not apply to any document created
743-
using the Font Software.
744-
745-
TERMINATION
746-
This license becomes null and void if any of the above conditions are
747-
not met.
748-
749-
DISCLAIMER
750-
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
751-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
752-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
753-
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
754-
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
755-
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
756-
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
757-
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
758-
OTHER DEALINGS IN THE FONT SOFTWARE.
759-
760-
--------------------------------------------------------------------------------
761-
762-
# Code: MIT License (https://opensource.org/licenses/MIT)
763-
764-
In the Font Awesome Free download, the MIT license applies to all non-font and
765-
non-icon files.
766-
767-
Copyright 2024 Fonticons, Inc.
768-
769-
Permission is hereby granted, free of charge, to any person obtaining a copy of
770-
this software and associated documentation files (the "Software"), to deal in the
771-
Software without restriction, including without limitation the rights to use, copy,
772-
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
773-
and to permit persons to whom the Software is furnished to do so, subject to the
774-
following conditions:
775-
776-
The above copyright notice and this permission notice shall be included in all
777-
copies or substantial portions of the Software.
778-
779-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
780-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
781-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
782-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
783-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
784-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
785-
786-
--------------------------------------------------------------------------------
787-
788-
# Attribution
789-
790-
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
791-
Awesome Free files already contain embedded comments with sufficient
792-
attribution, so you shouldn't need to do anything additional when using these
793-
files normally.
794-
795-
We've kept attribution comments terse, so we ask that you do not actively work
796-
to remove them from files, especially code. They're a great way for folks to
797-
learn about Font Awesome.
798-
799-
--------------------------------------------------------------------------------
800-
801-
# Brand Icons
802-
803-
All brand icons are trademarks of their respective owners. The use of these
804-
trademarks does not indicate endorsement of the trademark holder by Font
805-
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
806-
to represent the company, product, or service to which they refer.**
807-
808-
809639
fonttools
810640
4.59.1
811641
MIT

docs/User-Interface.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ The user interface of **Stonks Overwatch** is build with the next technologies:
55
- [Bootstrap](https://getbootstrap.com) for the CSS framework
66
- [Bootstrap Table](https://bootstrap-table.com/) for the tables
77
- [Bootstrap Icons](https://icons.getbootstrap.com/) for the icons
8-
- [Font Awesome](https://fontawesome.com/) for additional icons
98
- [Charts.js](https://www.chartjs.org/) for the charts
109
- [Toga](https://toga.readthedocs.io/en/stable/) for the native application
1110

poetry.lock

Lines changed: 1 addition & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ dependencies = [
2222
"yfinance >= 0.2.65",
2323
"iso10383 >=2025.2.10",
2424
"requests >=2.32.4",
25-
"fontawesomefree >= 6.6.0",
2625
"ibind[oauth] >=0.1.19",
2726
"cryptography >=45.0.6",
2827
"packaging >=25.0",
@@ -266,7 +265,7 @@ known_first_party = ["stonks_overwatch"]
266265
[tool.deptry.per_rule_ignores]
267266
# django-extensions are not actively used in the codebase, but it can be useful
268267
# django-node-assets is used to simplify the management of NPM dependencies
269-
DEP002 = ["django-extensions", "django-node-assets", "fontawesomefree"]
268+
DEP002 = ["django-extensions", "django-node-assets"]
270269

271270
[tool.bandit]
272271
exclude_dirs = ["build", ".venv"]

src/stonks_overwatch/settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
"stonks_overwatch.app_config.StonksOverwatchConfig",
6969
"django_extensions",
7070
"django_node_assets",
71-
"fontawesomefree",
7271
]
7372

7473
MIDDLEWARE = [

src/stonks_overwatch/templates/components/distribution_with_list.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@
99
<div class="diversification-weight">
1010
<div class="d-flex align-items-center">
1111
{% if item.product_type %}
12+
<div class="ratio ratio-1x1 d-inline-flex align-items-center justify-content-center
13+
bg-white border border-primary rounded-circle" style="width: 2.5rem; height: 2.5rem;">
1214
{% if item.product_type == 'sector' %}
13-
<i class="fas fa-{{ item.symbol }} bg-white rounded-circle border border-primary p-2"></i>
15+
<i class="bi bi-{{ item.symbol }} fs-4" style="display: flex; align-items: center; justify-content: center;"></i>
1416
{% elif item.product_type == 'cash' %}
15-
<i class="fas fa-{{ item.symbol }} bg-white rounded-circle border border-primary p-2"></i>
17+
<i class="bi bi-{{ item.symbol }} fs-4" style="display: flex; align-items: center; justify-content: center;"></i>
1618
{% else %}
17-
<img class="rounded-circle bg-white border border-primary" src="{% url 'asset_logo' product_type=item.product_type|lower symbol=item.symbol|lower %}" width="30" height="30" alt="{{ item.symbol }} logo" onerror="this.style.display='none'">
19+
<img src="{% url 'asset_logo' product_type=item.product_type|lower symbol=item.symbol|lower %}" width="30" height="30" alt="{{ item.symbol }} logo" onerror="this.style.display='none'">
1820
{% endif %}
21+
</div>
1922
{% endif %}
2023
</div>
2124
<div class="p-2 me-auto">{{ item.name }}</div>

src/stonks_overwatch/templates/diversification.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
{% load static %}
44
{% block content %}
55

6-
<!-- Font Awesome JS -->
7-
<script src="{% static 'fontawesomefree/js/solid.js' %}"></script>
8-
<script src="{% static 'fontawesomefree/js/fontawesome.js' %}"></script>
9-
106
<div class="container-fluid row-gap-5">
117
{% include 'components/distribution_with_list.html' with chart_id="type-chart" items=productTypes.table %}
128
{% if positions and positions.table %}

src/stonks_overwatch/templates/login.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ <h3 class="text-center mb-4">Login - DEGIRO</h3>
5151
{% for message in messages %}
5252
<div class="alert {% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}alert-danger{% elif message.level == DEFAULT_MESSAGE_LEVELS.WARNING %}alert-warning{% elif message.level == DEFAULT_MESSAGE_LEVELS.SUCCESS %}alert-success{% else %}alert-info{% endif %} d-flex align-items-start py-2 mb-2" role="alert" style="word-break: break-word;">
5353
{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}
54-
<i class="bi-exclamation-triangle-fill me-2 mt-1"></i>
54+
<i class="bi bi-exclamation-triangle-fill me-2 mt-1"></i>
5555
{% elif message.level == DEFAULT_MESSAGE_LEVELS.WARNING %}
56-
<i class="bi-exclamation-circle-fill me-2 mt-1"></i>
56+
<i class="bi bi-exclamation-circle-fill me-2 mt-1"></i>
5757
{% elif message.level == DEFAULT_MESSAGE_LEVELS.SUCCESS %}
58-
<i class="bi-check-circle-fill me-2 mt-1"></i>
58+
<i class="bi bi-check-circle-fill me-2 mt-1"></i>
5959
{% else %}
60-
<i class="bi-info-circle-fill me-2 mt-1"></i>
60+
<i class="bi bi-info-circle-fill me-2 mt-1"></i>
6161
{% endif %}
6262
<div class="flex-grow-1">{{ message|safe }}</div>
6363
</div>
@@ -74,7 +74,7 @@ <h3 class="text-center mb-4">Login - DEGIRO</h3>
7474
<button type="submit" class="btn btn-primary btn-block w-100">Confirm</button>
7575
{% elif show_in_app_auth %}
7676
<div class="d-flex align-items-center py-3 mb-4">
77-
<i class="bi-phone me-3" style="font-size: 2rem; color: #0d6efd;"></i>
77+
<i class="bi bi-phone me-3" style="font-size: 2rem; color: #0d6efd;"></i>
7878
<div class="flex-grow-1">
7979
<p class="mb-0">To verify your login attempt, open the DEGIRO app and tap 'Yes' to approve it.</p>
8080
</div>
@@ -118,7 +118,7 @@ <h3 class="text-center mb-4">Login - DEGIRO</h3>
118118
<div class="input-group">
119119
<input type="password" class="form-control" id="password" name="password"
120120
placeholder="Enter password" required>
121-
<i class="bi-eye-slash-fill" id="togglePassword"></i>
121+
<i class="bi bi-eye-slash-fill" id="togglePassword"></i>
122122
</div>
123123
</div>
124124
<div class="form-group mb-3">

0 commit comments

Comments
 (0)