Skip to content

Commit 986f239

Browse files
committed
Use Symfony UX Icons
1 parent eba4f92 commit 986f239

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+103
-73
lines changed

assets/app.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// start the Stimulus application
22
import './bootstrap.js';
33
import './styles/app.scss';
4-
import '@fortawesome/fontawesome-free/css/all.css';
5-
import '@fortawesome/fontawesome-free/css/v4-shims.css';
64
import 'highlight.js/styles/github-dark-dimmed.css';
75
import 'lato-font/css/lato-font.css';
86

assets/icons/tabler/arrow-left.svg

+1

assets/icons/tabler/arrow-right.svg

+1

assets/icons/tabler/ban.svg

+1

assets/icons/tabler/brand-x.svg

+1
+1

assets/icons/tabler/code.svg

+1

assets/icons/tabler/device-floppy.svg

+1

assets/icons/tabler/eye.svg

+1

assets/icons/tabler/home.svg

+1

assets/icons/tabler/id-badge-2.svg

+1

assets/icons/tabler/key.svg

+1

assets/icons/tabler/list.svg

+1

assets/icons/tabler/lock.svg

+1

assets/icons/tabler/login.svg

+1

assets/icons/tabler/logout.svg

+1

assets/icons/tabler/message.svg

+1

assets/icons/tabler/messages.svg

+1

assets/icons/tabler/pencil.svg

+1

assets/icons/tabler/rss.svg

+1

assets/icons/tabler/search.svg

+1

assets/icons/tabler/send.svg

+1

assets/icons/tabler/settings.svg

+1

assets/icons/tabler/tag.svg

+1

assets/icons/tabler/tags.svg

+1

assets/icons/tabler/trash.svg

+1

assets/icons/tabler/user.svg

+1

assets/icons/tabler/users-group.svg

+1

assets/icons/tabler/world.svg

+1

assets/styles/app.scss

+2-4
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ footer {
268268
padding-bottom: 2em
269269
}
270270

271-
footer p {
271+
footer p, footer a {
272272
color: var(--gray-700);
273273
font-size: 13px;
274274
margin-bottom: 0.25em
@@ -278,9 +278,7 @@ footer #footer-resources {
278278
text-align: right
279279
}
280280

281-
footer #footer-resources i {
282-
color: var(--gray-700);
283-
font-size: 28.5px;
281+
footer #footer-resources svg {
284282
margin-left: 0.5em
285283
}
286284

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"symfony/string": "^7",
4343
"symfony/translation": "^7",
4444
"symfony/twig-bundle": "^7",
45+
"symfony/ux-icons": "^2.20",
4546
"symfony/ux-live-component": "^2.6",
4647
"symfony/validator": "^7",
4748
"symfony/yaml": "^7",

config/bundles.php

+1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@
1717
Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true],
1818
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
1919
Symfonycasts\SassBundle\SymfonycastsSassBundle::class => ['all' => true],
20+
Symfony\UX\Icons\UXIconsBundle::class => ['all' => true],
2021
];

config/packages/ux_icons.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ux_icons:
2+
default_icon_attributes:
3+
width: 1.2em
4+
height: 1.2em
5+
style: 'position: relative; top: -2px;'
6+
7+
aliases:
8+
'tabler:save-changes': 'tabler:device-floppy'

importmap.php

-8
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,10 @@
7171
'version' => '11.9.0',
7272
'type' => 'css',
7373
],
74-
'@fortawesome/fontawesome-free/css/all.css' => [
75-
'version' => '6.5.1',
76-
'type' => 'css',
77-
],
7874
'lato-font/css/lato-font.css' => [
7975
'version' => '3.0.0',
8076
'type' => 'css',
8177
],
82-
'@fortawesome/fontawesome-free/css/v4-shims.css' => [
83-
'version' => '6.5.1',
84-
'type' => 'css',
85-
],
8678
'popper.js' => [
8779
'version' => '1.16.1',
8880
],

templates/admin/blog/_delete_form.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<form action="{{ url('admin_post_delete', {id: post.id}) }}" method="post" data-confirmation="true" id="delete-form">
33
<input type="hidden" name="token" value="{{ csrf_token('delete') }}" />
44
<button type="submit" class="btn btn-block btn-danger">
5-
<i class="fa fa-trash" aria-hidden="true"></i>
5+
<twig:ux:icon name="tabler:trash"/>
66
{{ 'action.delete_post'|trans }}
77
</button>
88
</form>

templates/admin/blog/_form.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
{{ form_widget(form) }}
1616

1717
<button type="submit" class="{{ button_css|default("btn btn-primary") }}">
18-
<i class="fa fa-save" aria-hidden="true"></i> {{ button_label|default('label.create_post'|trans) }}
18+
<twig:ux:icon name="tabler:save-changes"/> {{ button_label|default('label.create_post'|trans) }}
1919
</button>
2020

2121
{% if include_back_to_home_link|default(false) %}
2222
<a href="{{ path('admin_post_index') }}" class="btn btn-link">
23-
<i class="fa fa-list-alt" aria-hidden="true"></i> {{ 'action.back_to_list'|trans }}
23+
<twig:ux:icon name="tabler:list"/> {{ 'action.back_to_list'|trans }}
2424
</a>
2525
{% endif %}
2626
{{ form_end(form) }}

templates/admin/blog/edit.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{% block sidebar %}
1616
<div class="section">
1717
<a href="{{ path('admin_post_show', {id: post.id}) }}" class="btn btn-lg btn-block btn-success">
18-
<i class="fa fa-eye" aria-hidden="true"></i> {{ 'action.show_post'|trans }}
18+
<twig:ux:icon name="tabler:eye"/> {{ 'action.show_post'|trans }}
1919
</a>
2020
</div>
2121

templates/admin/blog/index.html.twig

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<thead>
1010
<tr>
1111
<th scope="col">{{ 'label.title'|trans }}</th>
12-
<th scope="col"><i class="fa fa-calendar" aria-hidden="true"></i> {{ 'label.published_at'|trans }}</th>
13-
<th scope="col" class="text-center"><i class="fa fa-cogs" aria-hidden="true"></i> {{ 'label.actions'|trans }}</th>
12+
<th scope="col"><twig:ux:icon name="tabler:calendar-month"/> {{ 'label.published_at'|trans }}</th>
13+
<th scope="col" class="text-center"><twig:ux:icon name="tabler:settings"/> {{ 'label.actions'|trans }}</th>
1414
</tr>
1515
</thead>
1616
<tbody>
@@ -24,11 +24,11 @@
2424
<td class="text-right">
2525
<div class="item-actions">
2626
<a href="{{ path('admin_post_show', {id: post.id}) }}" class="btn btn-sm btn-secondary">
27-
<i class="fa fa-eye" aria-hidden="true"></i> {{ 'action.show'|trans }}
27+
<twig:ux:icon name="tabler:eye"/> {{ 'action.show'|trans }}
2828
</a>
2929

3030
<a href="{{ path('admin_post_edit', {id: post.id}) }}" class="btn btn-sm btn-primary">
31-
<i class="fa fa-edit" aria-hidden="true"></i> {{ 'action.edit'|trans }}
31+
<twig:ux:icon name="tabler:pencil"/> {{ 'action.edit'|trans }}
3232
</a>
3333
</div>
3434
</td>
@@ -45,7 +45,7 @@
4545
{% block sidebar %}
4646
<div class="section actions">
4747
<a href="{{ path('admin_post_new') }}" class="btn btn-lg btn-block btn-success">
48-
<i class="fa fa-plus" aria-hidden="true"></i> {{ 'action.create_post'|trans }}
48+
<twig:ux:icon name="tabler:pencil"/> {{ 'action.create_post'|trans }}
4949
</a>
5050
</div>
5151

templates/admin/blog/new.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
{{ form_row(form.tags) }}
1414

1515
<button type="submit" class="btn btn-primary">
16-
<i class="fa fa-save" aria-hidden="true"></i> {{ 'label.create_post'|trans }}
16+
<twig:ux:icon name="tabler:save-changes"/> {{ 'label.create_post'|trans }}
1717
</button>
1818
{{ form_widget(form.saveAndCreateNew, {label: 'label.save_and_create_new', attr: {class: 'btn btn-primary'}}) }}
1919
<a href="{{ path('admin_post_index') }}" class="btn btn-link">
20-
<i class="fa fa-list-alt" aria-hidden="true"></i> {{ 'action.back_to_list'|trans }}
20+
<twig:ux:icon name="tabler:list"/> {{ 'action.back_to_list'|trans }}
2121
</a>
2222
{{ form_end(form) }}
2323
{% endblock %}

templates/admin/blog/show.html.twig

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<h1>{{ post.title }}</h1>
77

88
<p class="post-metadata">
9-
<span class="metadata"><i class="fa fa-calendar"></i> {{ post.publishedAt|format_datetime('long', 'medium', '', 'UTC') }}</span>
10-
<span class="metadata"><i class="fa fa-user"></i> {{ post.author.fullName }}</span>
9+
<span class="metadata"><twig:ux:icon name="tabler:calendar-month"/> {{ post.publishedAt|format_datetime('long', 'medium', '', 'UTC') }}</span>
10+
<span class="metadata"><twig:ux:icon name="tabler:user"/> {{ post.author.fullName }}</span>
1111
</p>
1212

1313
<div class="jumbotron">
@@ -22,7 +22,7 @@
2222
{% block sidebar %}
2323
<div class="section">
2424
<a href="{{ path('admin_post_edit', {id: post.id}) }}" class="btn btn-lg btn-block btn-success">
25-
<i class="fa fa-edit" aria-hidden="true"></i> {{ 'action.edit_contents'|trans }}
25+
<twig:ux:icon name="tabler:pencil"/> {{ 'action.edit_contents'|trans }}
2626
</a>
2727
</div>
2828

templates/admin/layout.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
{% block header_navigation_links %}
1616
<li class="nav-item{{ _route in ['admin_index', 'admin_post_index'] ? ' active' : '' }}">
1717
<a class="nav-link" href="{{ path('admin_post_index') }}">
18-
<i class="fa fa-list-alt" aria-hidden="true"></i> {{ 'menu.post_list'|trans }}
18+
<twig:ux:icon name="tabler:list"/> {{ 'menu.post_list'|trans }}
1919
</a>
2020
</li>
2121
<li class="nav-item">
2222
<a class="nav-link" href="{{ path('blog_index') }}">
23-
<i class="fa fa-home" aria-hidden="true"></i> {{ 'menu.back_to_blog'|trans }}
23+
<twig:ux:icon name="tabler:home"/> {{ 'menu.back_to_blog'|trans }}
2424
</a>
2525
</li>
2626
{% endblock %}

0 commit comments

Comments
 (0)