Skip to content

Commit

Permalink
Use 'fas' instead of 'fa' for Font Awesome (#3509)
Browse files Browse the repository at this point in the history
Also: Fix unreviewed (lightbulb) icon alignment
  • Loading branch information
flodolo authored Jan 6, 2025
1 parent 6bab0c9 commit 5efb934
Show file tree
Hide file tree
Showing 97 changed files with 278 additions and 271 deletions.
2 changes: 1 addition & 1 deletion pontoon/administration/templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="container">
<menu class="controls">
<div class="search-wrapper big clearfix">
<div class="icon fa fa-search"></div>
<div class="icon fas fa-search"></div>
<input class="table-filter" type="search" autocomplete="off" autofocus placeholder="Filter projects">
</div>
<a class="add button small" href="{{ url('pontoon.admin.project.new') }}">Add new project</a>
Expand Down
2 changes: 1 addition & 1 deletion pontoon/base/static/css/check-box.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
color: var(--white-1);
}

.fa {
.fas {
margin-left: 23px;
margin-right: 0;
}
Expand Down
6 changes: 3 additions & 3 deletions pontoon/base/static/css/download_selector.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
padding-top: 0;
}

.download-selector .selector .fa {
.download-selector .selector .fas {
float: right;
background: var(--button-background-2);
border-radius: 3px;
Expand All @@ -20,11 +20,11 @@
text-align: center;
}

.download-selector .selector .fa:hover {
.download-selector .selector .fas:hover {
background: var(--button-background-hover-2);
}

.download-selector.opened .selector .fa {
.download-selector.opened .selector .fas {
background: var(--button-background-hover-2);
border-radius: 2px 2px 0 0;
}
Expand Down
9 changes: 5 additions & 4 deletions pontoon/base/static/css/heading_info.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ ul {
color: var(--status-translated);
}

#heading .legend li .status.fa {
#heading .legend li .status.fas {
left: 0;
top: 4px;
}
Expand Down Expand Up @@ -176,17 +176,18 @@ ul {
padding-bottom: 21px;
}

#heading .non-plottable .unreviewed .status.fa {
#heading .non-plottable .unreviewed .status.fas {
left: auto;
position: relative;
top: -1px;
left: -0.5px;
}

#heading .non-plottable .unreviewed .status.fa:before {
#heading .non-plottable .unreviewed .status.fas:before {
color: var(--icon-background-2);
font-size: 18px;
}

#heading .non-plottable .unreviewed.pending .status.fa:before {
#heading .non-plottable .unreviewed.pending .status.fas:before {
color: var(--status-unreviewed);
}
26 changes: 13 additions & 13 deletions pontoon/base/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@
font-size: 0.9em;
}

.status.fa {
.status.fas {
font-size: 16px;
left: 20px;
position: absolute;
top: 3px;
}

.status.fa:before {
.status.fas:before {
color: var(--status-missing);
content: '';
}

.translated .status.fa:before {
.translated .status.fas:before {
color: var(--status-translated);
}

.pretranslated .status.fa:before {
.pretranslated .status.fas:before {
color: var(--status-pretranslated);
}

.warnings .status.fa:before {
.warnings .status.fas:before {
color: var(--status-warning);
}

.errors .status.fa:before {
.errors .status.fas:before {
color: var(--status-error);
}

.unreviewed .status.fa:before {
.unreviewed .status.fas:before {
color: var(--status-unreviewed);
content: '';
}
Expand Down Expand Up @@ -81,7 +81,7 @@ button {
outline: none;
}

/* Reset values for Persian (fa) to avoid colision with Font Awesome */
/* Reset values for Persian (fa) to avoid collision with Font Awesome */
.language.fa {
font-family: inherit;
font-weight: inherit;
Expand Down Expand Up @@ -950,7 +950,7 @@ header .right .select .menu {
line-height: 22px;
}

#profile .menu li i.fa,
#profile .menu li i.fas,
#profile .menu li i.fab {
margin: 0 8px 0 -2px;
}
Expand Down Expand Up @@ -1077,7 +1077,7 @@ nav .links li {
color: var(--white-1);
}

.submenu.tabs .links a .fa {
.submenu.tabs .links a .fas {
margin-right: 4px;
}

Expand Down Expand Up @@ -1150,17 +1150,17 @@ body > form,
user-select: none;
}

.check-box .fa {
.check-box .fas {
margin-right: 6px;
}

.check-box .fa:before {
.check-box .fas:before {
color: var(--toggle-color-1);
content: '';
font-weight: normal;
}

.check-box.enabled .fa:before {
.check-box.enabled .fas:before {
color: var(--status-translated);
content: '';
font-weight: bold;
Expand Down
6 changes: 3 additions & 3 deletions pontoon/base/static/css/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ table.table.project-list.hidden {
.table .unreviewed-status span {
position: absolute;
font-size: 18px;
margin: -15px 0 0 -5px;
margin: -15px 0 0 -4.5px;
}

.table .progress {
Expand Down Expand Up @@ -152,7 +152,7 @@ table.table.project-list.hidden {
padding-left: 15px;
}

.table td.priority .fa {
.table td.priority .fas {
margin-left: -1px;
font-size: 12px;
}
Expand Down Expand Up @@ -276,7 +276,7 @@ table.table.project-list.hidden {
color: var(--icon-background-1);
font-size: 18px;
position: absolute;
right: 0;
right: 0.5px;
top: -9px;
}

Expand Down
2 changes: 1 addition & 1 deletion pontoon/base/static/js/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $('body')

$element.after(
'<aside class="tooltip">' +
'<span class="quote fa fa-2x fa-quote-right"></span>' +
'<span class="quote fas fa-quote-right fa-2x"></span>' +
'<p class="translation">' +
translation +
'</p>' +
Expand Down
20 changes: 10 additions & 10 deletions pontoon/base/templates/django/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@
{% if user.is_authenticated %}
<img class="rounded" src="{{ request.user.gravatar_url_small }}" width="44" height="44">
{% else %}
<div class="menu-icon fa fa-bars"></div>
<div class="menu-icon fas fa-bars"></div>
{% endif %}
</div>
<div class="menu">
<ul>
{% if user.is_authenticated %}
<li><a href="{% url 'pontoon.contributors.contributor.username' username=user %}"><i class="fa fa-user fa-fw"></i>My Profile</a></li>
<li><a href="{% url 'pontoon.contributors.settings' %}"><i class="fa fa-cog fa-fw"></i>Change Settings</a></li>
<li><a href="{% url 'pontoon.contributors.contributor.username' username=user %}"><i class="fas fa-user fa-fw"></i>My Profile</a></li>
<li><a href="{% url 'pontoon.contributors.settings' %}"><i class="fas fa-cog fa-fw"></i>Change Settings</a></li>
<li class="horizontal-separator"></li>
{% endif %}

<li><a href="{% url 'pontoon.terms' %}" rel="noopener noreferrer" target="_blank"><i class="fa fa-gavel fa-fw"></i>Terms of Use</a></li>
<li><a href="{% url 'pontoon.terms' %}" rel="noopener noreferrer" target="_blank"><i class="fas fa-gavel fa-fw"></i>Terms of Use</a></li>
<li><a href="https://github.com/mozilla/pontoon/" rel="noopener noreferrer" target="_blank"><i class="fab fa-github fa-fw"></i>Hack it on GitHub</a></li>
<li><a href="https://discourse.mozilla.org/c/pontoon" rel="noopener noreferrer" target="_blank"><i class="fa fa-comment-dots fa-fw"></i>Give Feedback</a></li>
<li><a href="https://mozilla-l10n.github.io/localizer-documentation/tools/pontoon/" rel="noopener noreferrer" target="_blank"><i class="fa fa-life-ring fa-fw"></i>Help</a></li>
<li><a href="https://discourse.mozilla.org/c/pontoon" rel="noopener noreferrer" target="_blank"><i class="fas fa-comment-dots fa-fw"></i>Give Feedback</a></li>
<li><a href="https://mozilla-l10n.github.io/localizer-documentation/tools/pontoon/" rel="noopener noreferrer" target="_blank"><i class="fas fa-life-ring fa-fw"></i>Help</a></li>

<li class="horizontal-separator"></li>

Expand All @@ -88,18 +88,18 @@

{% if settings.AUTHENTICATION_METHOD == 'django' %}
{% if user.is_authenticated %}
<li id="standalone-sign-out"><a href="{% url 'standalone_logout' %}" title="{{ user.email|nospam }}"><i class="fa fa-sign-out-alt fa-fw"></i>Sign out</a></li>
<li id="standalone-sign-out"><a href="{% url 'standalone_logout' %}" title="{{ user.email|nospam }}"><i class="fas fa-sign-out-alt fa-fw"></i>Sign out</a></li>
{% else %}
<li id="standalone-signin"><a href="{% url 'standalone_login' %}?next={{ request.get_full_path|urlencode }}"><i class="fa fa-sign-in-alt fa-fw"></i>Sign in</a></li>
<li id="standalone-signin"><a href="{% url 'standalone_login' %}?next={{ request.get_full_path|urlencode }}"><i class="fas fa-sign-in-alt fa-fw"></i>Sign in</a></li>
{% endif %}
{% else %}
{% if user.is_authenticated %}
<li id="sign-out"><a href="{% url 'account_logout' %}" title="{{ user.email|nospam }}">{{ SignOut.csrf_form }}<i class="fa fa-sign-out-alt fa-fw"></i>Sign out</a></li>
<li id="sign-out"><a href="{% url 'account_logout' %}" title="{{ user.email|nospam }}">{{ SignOut.csrf_form }}<i class="fas fa-sign-out-alt fa-fw"></i>Sign out</a></li>
{% else %}
<li id="sign-in">
<form action="{{ provider_login_url }}?next={{ request.get_full_path|urlencode }}" method="post">
{% csrf_token %}
<i class="fa fa-sign-in-alt fa-fw"></i>
<i class="fas fa-sign-in-alt fa-fw"></i>
<button type="submit">Sign in</button>
</form>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h2 id="subtitle">An error occurred while attempting to sign in.</h2>
<div id="action">
<form action="{{ provider_login_url }}?next={{ request.get_full_path|urlencode }}" method="post">
{% csrf_token %}
<i class="fa fa-sign-in-alt fa-fw"></i>
<i class="fas fa-sign-in-alt fa-fw"></i>
<button type="submit">Try again</button>
</form>
</div>
Expand Down
16 changes: 8 additions & 8 deletions pontoon/base/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,29 @@
<li class="horizontal-separator"></li>
{% endif %}

<li><a href="{{ url('pontoon.terms') }}" rel="noopener noreferrer" target="_blank"><i class="fa fa-gavel fa-fw"></i>Terms of Use</a></li>
<li><a href="{{ url('pontoon.terms') }}" rel="noopener noreferrer" target="_blank"><i class="fas fa-gavel fa-fw"></i>Terms of Use</a></li>
<li><a href="https://github.com/mozilla/pontoon/" rel="noopener noreferrer" target="_blank"><i class="fab fa-github fa-fw"></i>Hack it on GitHub</a></li>
<li><a href="https://discourse.mozilla.org/c/pontoon" rel="noopener noreferrer" target="_blank"><i class="fa fa-comment-dots fa-fw"></i>Give Feedback</a></li>
<li><a href="https://mozilla-l10n.github.io/localizer-documentation/tools/pontoon/" rel="noopener noreferrer" target="_blank"><i class="fa fa-life-ring fa-fw"></i>Help</a></li>
<li><a href="https://discourse.mozilla.org/c/pontoon" rel="noopener noreferrer" target="_blank"><i class="fas fa-comment-dots fa-fw"></i>Give Feedback</a></li>
<li><a href="https://mozilla-l10n.github.io/localizer-documentation/tools/pontoon/" rel="noopener noreferrer" target="_blank"><i class="fas fa-life-ring fa-fw"></i>Help</a></li>

{% if user.is_authenticated %}
<li class="horizontal-separator"></li>
{% endif %}

{% if perms.base.can_manage_project %}
<li><a href="{{ url('pontoon.admin') }}"><i class="fa fa-wrench fa-fw"></i>Admin</a></li>
<li><a href="{{ url('pontoon.admin') }}"><i class="fas fa-wrench fa-fw"></i>Admin</a></li>
{% if project %}
<li><a href="{{ url('pontoon.admin.project', project.slug) }}"><i class="fa fa-wrench fa-fw"></i>Admin &middot; Current Project</a></li>
<li><a href="{{ url('pontoon.admin.project', project.slug) }}"><i class="fas fa-wrench fa-fw"></i>Admin &middot; Current Project</a></li>
{% endif %}
{% endif %}

{% if user.is_authenticated %}
<li><a href="{{ url('pontoon.contributors.settings') }}"><i class="fa fa-cog fa-fw"></i>Settings</a></li>
<li><a href="{{ url('pontoon.contributors.settings') }}"><i class="fas fa-cog fa-fw"></i>Settings</a></li>

{% if settings.AUTHENTICATION_METHOD == 'django' %}
<li id="standalone-sign-out"><a href="{{ url('standalone_logout') }}" title="{{ user.email|nospam }}"><i class="fa fa-sign-out-alt fa-fw"></i>Sign out</a></li>
<li id="standalone-sign-out"><a href="{{ url('standalone_logout') }}" title="{{ user.email|nospam }}"><i class="fas fa-sign-out-alt fa-fw"></i>Sign out</a></li>
{% else %}
<li id="sign-out"><a href="{{ url('account_logout') }}" title="{{ user.email|nospam }}">{{ SignOut.csrf_form() }}<i class="fa fa-sign-out-alt fa-fw"></i>Sign out</a></li>
<li id="sign-out"><a href="{{ url('account_logout') }}" title="{{ user.email|nospam }}">{{ SignOut.csrf_form() }}<i class="fas fa-sign-out-alt fa-fw"></i>Sign out</a></li>
{% endif %}

{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion pontoon/base/templates/no_projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="inner">
<div id="box">
<a href={{ url('pontoon.admin.project.new') }}>
<div class="fa fa-box-open"></div>
<div class="fas fa-box-open"></div>
</a>
<p>There are no projects to localize yet.</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion pontoon/base/templates/widgets/checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="check-box {{ class }}{% if is_enabled %} enabled{% endif %}" data-attribute="{{ attribute }}"{% if title %} title="{{title}}"{% endif %}>
<div class="check-box-wrapper">
<span class="label">{{ label }}</span>
<i class="fa fa-fw"></i>
<i class="fas fa-fw"></i>
</div>
{% if help %}
<p class="help">{{ help|safe }}</p>
Expand Down
6 changes: 3 additions & 3 deletions pontoon/base/templates/widgets/heading_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<li class="{{ class }}">
{% if link %}<a href="{{ link }}">{% endif %}
{% if class != 'all' %}
<span class="fa status"></span>
<span class="fas status"></span>
{% endif %}
{{ title }}
<span class="value" data-value="{{ value }}">{{ value|intcomma }}</span>
Expand Down Expand Up @@ -123,7 +123,7 @@
{% if link %}<a href="{{ link + '?status=unreviewed' }}">{% endif %}
<p class="title">Unreviewed</p>
<p class="value">
<span class="fa status"></span>
<span class="fas status"></span>
<span class="text">{{ obj.unreviewed_strings|intcomma }}</span>
</p>
{% if link %}</a>{% endif %}
Expand All @@ -134,7 +134,7 @@
{% macro download_selector(locale, project) %}
<div class="download-selector select">
<div class="button selector">
<i class="fa fa-cloud-download-alt"></i>
<i class="fas fa-cloud-download-alt"></i>
</div>
<div class="menu">
<ul>
Expand Down
4 changes: 2 additions & 2 deletions pontoon/base/templates/widgets/item_selector_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

<div class="menu permanent">
<div class="search-wrapper clearfix">
<div class="icon fa fa-search"></div>
<div class="icon fas fa-search"></div>
<input id="{{ id }}" type="search" autocomplete="off">
</div>
<ul class="{% if sortable %}sortable{% endif %}">
{% for item in items %}
<li class="clearfix" data-id="{{ item.id }}">
<span class="arrow fa"></span>
<span class="arrow fas"></span>
<span class="item">{{ item.name }}</span>
</li>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion pontoon/base/templates/widgets/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% macro item(label, url, is_active, count=0, class=None, icon=None) %}
<li {% if is_active %}class="active"{% endif %}>
<a href="{{ url }}"{% if class %} class="button"{% endif %}>
{% if icon %}<i class="fa fa-{{ icon }}"></i>{% endif %}
{% if icon %}<i class="fas fa-{{ icon }}"></i>{% endif %}
{{ label }}
{% if count > 0 %}<span class="count">{{ count }}</span>{% endif %}
</a>
Expand Down
2 changes: 1 addition & 1 deletion pontoon/base/templates/widgets/priority.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% macro priority(priority) %}
{% for n in range(5) %}
<span class="fa fa-star{% if priority and loop.index <= priority %}{{ ' active' }}{% endif %}"></span>
<span class="fas fa-star{% if priority and loop.index <= priority %}{{ ' active' }}{% endif %}"></span>
{% endfor %}
{% endmacro %}
2 changes: 1 addition & 1 deletion pontoon/base/templates/widgets/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% if user.is_authenticated %}
<img class="rounded" src="{{ user.gravatar_url(88) }}" width="44" height="44">
{% else %}
<div class="menu-icon fa fa-bars"></div>
<div class="menu-icon fas fa-bars"></div>
{% endif %}
</div>
{% endmacro %}
Expand Down
2 changes: 1 addition & 1 deletion pontoon/base/templates/widgets/progress_chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<span class="errors" style="width:{{ chart.errors_share }}%;"></span>
<span class="missing" style="width:{{ 100 - chart.approved_share - chart.pretranslated_share - chart.warnings_share - chart.errors_share }}%;"></span>
</span>
<span class="unreviewed-status fa fa-lightbulb{% if chart.unreviewed_strings > 0 %} pending{% endif %}"></span>
<span class="unreviewed-status fas fa-lightbulb{% if chart.unreviewed_strings > 0 %} pending{% endif %}"></span>
</div>
<div class="legend">
<ul>
Expand Down
Loading

0 comments on commit 5efb934

Please sign in to comment.