Skip to content

Commit

Permalink
Free all the icons (#313)
Browse files Browse the repository at this point in the history
* Remove all instance of duotone

No duotone icon is free, so replace all of them with the solid variant
that *is* free.

* Replace regular icons with solid

Also replace a few icons for a free alternative

* Update the local guide to mention free font awesome
  • Loading branch information
geekingfrog authored Jun 9, 2024
1 parent 5264167 commit 902fbad
Show file tree
Hide file tree
Showing 60 changed files with 109 additions and 121 deletions.
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ config :teiserver, Teiserver,
site_title: "BAR",
site_suffix: "",
site_description: "",
site_icon: "fa-duotone fa-robot",
site_icon: "fa-solid fa-robot",
credit: "Teifion Jordan"

# Default configs
Expand Down
2 changes: 1 addition & 1 deletion documents/guides/local_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ iex -S mix phx.server
If all goes to plan you should be able to access your site locally at [http://localhost:4000/](http://localhost:4000/).

### Libraries you need to get yourself
The site makes liberal use of [FontAwesome](https://fontawesome.com/) so if you are using the site you'll need to download it and do the following
The site makes liberal use of [FontAwesome](https://fontawesome.com/) so if you are using the site you'll need to download the free version and do the following
```bash
fontawesome/css/all.css -> priv/static/css/fontawesome.css
fontawesome/webfonts -> priv/static/webfonts
Expand Down
4 changes: 2 additions & 2 deletions lib/teiserver.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ defmodule Teiserver do
alias Teiserver.Data.Types, as: T
alias Teiserver.Helpers.CacheHelper

# def icon(), do: "fa-duotone fa-robot"
# def icon(), do: "fa-solid fa-robot"
@spec icon :: String.t()
def icon(), do: "fa-duotone fa-server"
def icon(), do: "fa-solid fa-server"

@spec icon(:friend | :friend_request | :ignore | :relationship) :: String.t()
def icon(:relationship), do: "fa-solid fa-users"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule Teiserver.Account do
alias Teiserver.Account.UserLib

@spec icon :: String.t()
def icon, do: "fa-duotone fa-user-alt"
def icon, do: "fa-solid fa-user-alt"

@spec list_users() :: [User]
defdelegate list_users(), to: UserLib
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/exports/player_count_export.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defmodule Teiserver.Account.PlayerCountExport do
alias Teiserver.Helper.TimexHelper

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-users"
def icon(), do: "fa-solid fa-users"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/exports/retention_rate_export.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Teiserver.Account.RetentionRateExport do
@activity_types ~w(total player)

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-campground"
def icon(), do: "fa-solid fa-campground"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/libs/accolade_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Teiserver.Account.AccoladeLib do

# Functions
@spec icon :: String.t()
def icon, do: "fa-regular fa-award"
def icon, do: "fa-solid fa-award"

@spec colours :: atom
def colours, do: :info
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/libs/code_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Teiserver.Account.CodeLib do
def colours(), do: :info

@spec icon :: String.t()
def icon(), do: "fa-regular fa-octagon"
def icon(), do: "fa-regular fa-diamond"

@doc """
Returns a list of the code types we can manually use (e.g. not password_reset)
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/libs/rating_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule Teiserver.Account.RatingLib do

# Functions
@spec icon :: String.t()
def icon, do: "fa-regular fa-screen-users"
def icon, do: "fa-solid fa-chart-column"

@spec colours :: atom
def colours, do: :info
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/libs/relationship_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Teiserver.Account.RelationshipLib do
def colour(), do: :success

@spec icon :: String.t()
def icon(), do: "fa-users"
def icon(), do: "fa-solid fa-users"

@spec icon_follow :: String.t()
def icon_follow(), do: "fa-eyes"
Expand Down
40 changes: 20 additions & 20 deletions lib/teiserver/account/libs/role_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -42,93 +42,93 @@ defmodule Teiserver.Account.RoleLib do
%{
name: "Verified",
colour: "#66AA66",
icon: "fa-duotone fa-check",
icon: "fa-solid fa-check",
contains: ~w()
},

# Community team
%{
name: "Community team",
colour: "#66AA66",
icon: "fa-duotone fa-thought-bubble",
icon: "fa-solid fa-thought-bubble",
contains: ~w(),
badge: true
},
%{
name: "Mentor",
colour: "#66AA66",
icon: "fa-duotone fa-thought-bubble",
icon: "fa-solid fa-thought-bubble",
contains: ["Community team"],
badge: true
},
%{
name: "Academy manager",
colour: "#66AA66",
icon: "fa-duotone fa-thought-bubble",
icon: "fa-solid fa-thought-bubble",
contains: ["Community team"],
badge: true
},
%{
name: "Promo team",
colour: "#66AA66",
icon: "fa-duotone fa-thought-bubble",
icon: "fa-solid fa-thought-bubble",
contains: ["Community team"],
badge: true
},

# Privileged
%{name: "VIP", colour: "#AA8833", icon: "fa-duotone fa-sparkles", contains: ["BAR+"]},
%{name: "VIP", colour: "#AA8833", icon: "fa-solid fa-sparkles", contains: ["BAR+"]},
%{name: "Streamer", colour: "#660066", icon: "fa-brands fa-twitch", contains: ~w()},
%{name: "Tournament", colour: "#0000AA", icon: "fa-duotone fa-trophy", contains: ~w()},
%{name: "Tournament", colour: "#0000AA", icon: "fa-solid fa-trophy", contains: ~w()},
%{
name: "Caster",
colour: "#660066",
icon: "fa-duotone fa-microphone-lines",
icon: "fa-solid fa-microphone-lines",
contains: ~w(Streamer Tournament),
badge: true
},
%{name: "Donor", colour: "#0066AA", icon: "fa-duotone fa-euro", contains: ~w(), badge: true},
%{name: "Donor", colour: "#0066AA", icon: "fa-solid fa-euro", contains: ~w(), badge: true},

# Contributor/Staff
%{
name: "Contributor",
colour: "#66AA66",
icon: "fa-duotone fa-code-commit",
icon: "fa-solid fa-code-commit",
contains: ["Trusted", "BAR+"],
badge: true
},
%{name: "Engine", colour: "#007700", icon: "fa-duotone fa-engine", contains: ~w(Contributor)},
%{name: "Mapping", colour: "#007700", icon: "fa-duotone fa-map", contains: ~w(Contributor)},
%{name: "Engine", colour: "#007700", icon: "fa-solid fa-engine", contains: ~w(Contributor)},
%{name: "Mapping", colour: "#007700", icon: "fa-solid fa-map", contains: ~w(Contributor)},
%{
name: "Gameplay",
colour: "#AA0000",
icon: "fa-duotone fa-pen-ruler",
icon: "fa-solid fa-pen-ruler",
contains: ~w(Contributor),
badge: true
},
%{
name: "Infrastructure",
colour: "#007700",
icon: "fa-duotone fa-server",
icon: "fa-solid fa-server",
contains: ~w(Contributor)
},
%{
name: "Data export",
colour: "#007700",
icon: "fa-duotone fa-download",
icon: "fa-solid fa-download",
contains: ~w(Contributor)
},
%{
name: "Tester",
colour: "#00AAAA",
icon: "fa-duotone fa-vial",
icon: "fa-solid fa-vial",
contains: ~w(Contributor),
badge: true
},
%{
name: "Core",
colour: "#007700",
icon: "fa-duotone fa-code-branch",
icon: "fa-solid fa-code-branch",
contains: ~w(Contributor),
badge: true
},
Expand All @@ -137,19 +137,19 @@ defmodule Teiserver.Account.RoleLib do
%{
name: "Overwatch",
colour: "#AA7733",
icon: "fa-duotone fa-clipboard-list-check",
icon: "fa-solid fa-clipboard-list-check",
contains: ["BAR+"]
},
%{
name: "Reviewer",
colour: "#AA7700",
icon: "fa-duotone fa-user-magnifying-glass",
icon: "fa-solid fa-user-magnifying-glass",
contains: ~w(Overwatch)
},
%{
name: "Moderator",
colour: "#FFAA00",
icon: "fa-duotone fa-gavel",
icon: "fa-solid fa-gavel",
contains: ~w(Reviewer),
badge: true
},
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/active_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Teiserver.Account.ActiveReport do
alias Teiserver.{Logging}

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-satellite-dish"
def icon(), do: "fa-solid fa-satellite-dish"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/ban_evasion_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Teiserver.Account.BanEvasionReport do
require Logger

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-user-ninja"
def icon(), do: "fa-solid fa-user-ninja"

@spec permissions() :: String.t()
def permissions(), do: "Moderator"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/growth_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule Teiserver.Account.GrowthReport do
def name(), do: "Growth"

@spec icon() :: String.t()
def icon(), do: "fa-seedling"
def icon(), do: "fa-solid fa-seedling"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/new_smurf_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Teiserver.Account.NewSmurfReport do
require Logger

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-face-angry-horns"
def icon(), do: "fa-solid fa-face-angry"

@spec permissions() :: String.t()
def permissions(), do: "Moderator"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/new_user_funnel_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Teiserver.Account.NewUserFunnelReport do
alias Teiserver.{Account, Telemetry, Battle}

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-filter"
def icon(), do: "fa-solid fa-filter"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/open_skill_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Teiserver.Account.OpenSkillReport do
import Teiserver.Helper.NumberHelper, only: [int_parse: 1]

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-chart-line"
def icon(), do: "fa-solid fa-chart-line"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/population_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Teiserver.Account.PopulationReport do
alias Teiserver.Repo

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-people-group"
def icon(), do: "fa-solid fa-people-group"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/relationship_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Teiserver.Account.RelationshipReport do
alias Teiserver.Account.RelationshipLib

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-arrow-down-up-across-line"
def icon(), do: "fa-solid fa-arrow-down-up-across-line"

@spec permissions() :: String.t()
def permissions(), do: "Reviewer"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/retention_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Teiserver.Account.RetentionReport do
alias Teiserver.{Account, Logging}

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-campground"
def icon(), do: "fa-solid fa-campground"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/review_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Teiserver.Account.ReviewReport do
alias Teiserver.{Logging}

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-champagne-glasses"
def icon(), do: "fa-solid fa-champagne-glasses"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/time_compare_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Teiserver.Account.TimeCompareReport do
import Teiserver.Helper.StringHelper, only: [get_hash_id: 1]

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-code-compare"
def icon(), do: "fa-solid fa-code-compare"

@spec permissions() :: String.t()
def permissions(), do: "Moderator"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/time_spent_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Teiserver.Account.TimeSpentReport do
import Teiserver.Helper.StringHelper, only: [get_hash_id: 1]

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-watch"
def icon(), do: "fa-solid fa-stopwatch"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/user_age_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Teiserver.Account.UserAgeReport do
alias Teiserver.Repo

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-chevrons-up"
def icon(), do: "fa-solid fa-chevron-up"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/account/reports/verified_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Teiserver.Account.VerifiedReport do
alias Teiserver.Account

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-check"
def icon(), do: "fa-solid fa-check"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/battle/libs/match_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Teiserver.Battle.MatchLib do
require Logger

@spec icon :: String.t()
def icon, do: "fa-regular fa-swords"
def icon, do: "fa-solid fa-explosion"

@spec colours :: atom
def colours, do: :success2
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/communication/libs/text_callback_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Teiserver.Communication.TextCallbackLib do

# Functions
@spec icon :: String.t()
def icon, do: "fa-regular fa-webhook"
def icon, do: "fa-regular fa-voicemail"

@spec colours :: atom
def colours, do: :success2
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/game/exports/match_datatable_export.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule Teiserver.Game.MatchDataTableExport do
alias Teiserver.Helper.TimexHelper

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-table"
def icon(), do: "fa-solid fa-table"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/game/exports/match_ratings_export.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Teiserver.Game.MatchRatingsExport do
@game_chunk_size 100

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-swords"
def icon(), do: "fa-solid fa-explosion"

@spec permissions() :: String.t()
def permissions(), do: "Admin"
Expand Down
2 changes: 1 addition & 1 deletion lib/teiserver/game/exports/player_ratings_export.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule Teiserver.Game.PlayerRatingsExport do
require Logger

@spec icon() :: String.t()
def icon(), do: "fa-regular fa-user-shield"
def icon(), do: "fa-solid fa-user-shield"

@spec permissions() :: String.t()
def permissions(), do: "teiserver.admin"
Expand Down
Loading

0 comments on commit 902fbad

Please sign in to comment.