Skip to content

Commit 81252f7

Browse files
committed
use ux_package template for ux-icons page
1 parent 65e59d1 commit 81252f7

File tree

5 files changed

+54
-99
lines changed

5 files changed

+54
-99
lines changed

ux.symfony.com/src/Controller/Icons/IconsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function index(
4242
];
4343
$iconSets = array_map(fn ($iconSet) => $iconSetRepository->find($iconSet), $iconSets);
4444

45-
return $this->render('icons/index.html.twig', [
45+
return $this->render('ux_packages/icons.html.twig', [
4646
'package' => $packageRepository->find('icons'),
4747
'iconSets' => $iconSets,
4848
]);

ux.symfony.com/src/Service/UxPackageRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function findAll(?string $query = null): array
2525
'icons',
2626
'UX Icons',
2727
'app_icons',
28-
'#fff',
28+
'purple',
2929
'linear-gradient(to bottom right, cyan, purple)',
3030
'SVG icons made easy',
3131
'Render SVG icons seamlessly from your Twig templates.',

ux.symfony.com/templates/icons/_aside.html.twig

Lines changed: 0 additions & 24 deletions
This file was deleted.

ux.symfony.com/templates/icons/index.html.twig

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{% extends 'ux_packages/package.html.twig' %}
2+
3+
{% block javascripts %}
4+
{{ parent() }}
5+
<meta name="turbo-prefetch" content="false">
6+
{% endblock %}
7+
8+
{% block package_header %}
9+
{% component PackageHeader with {
10+
package: 'icons',
11+
eyebrowText: 'SVG icons made easy'
12+
} %}
13+
{% block title_header %}
14+
UX Icons
15+
{% endblock %}
16+
17+
{% block sub_content %}
18+
Render SVG icons seamlessly from your Twig templates.
19+
<br/>
20+
Find the <code>perfect icon</code> among <code>200,000 choices</code> from the most popular <code>icon sets</code>.
21+
{% endblock %}
22+
{% endcomponent %}
23+
{% endblock %}
24+
25+
{% block package_content %}
26+
<section class="container-fluid container-xxl px-4 px-md-5 py-3">
27+
<twig:Icon:IconSearch/>
28+
</section>
29+
30+
<section class="container-fluid container-xxl px-4 px-md-5 py-3">
31+
<p class="eyebrows" style="margin: 4rem 0 0;">Iconic Packages</p>
32+
<div class="d-md-flex justify-content-md-between text-center align-items-center text-md-start">
33+
<h2 class="ubuntu pt-2 component-headlines">Popular <em class="rainbow-emphasis">Icon Sets</em></h2>
34+
</div>
35+
<div class="mt-3 mt-md-5">
36+
<div style="display:grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2rem;">
37+
{% for icon_set in iconSets %}
38+
<twig:Icon:IconSetCard
39+
iconSet="{{ icon_set }}"
40+
index="{{ loop.index0 }}"
41+
/>
42+
{% endfor %}
43+
</div>
44+
</div>
45+
</section>
46+
47+
{% endblock %}
48+
49+
{% block body %}
50+
{{ parent() }}
51+
<twig:Icon:IconModal/>
52+
{% endblock %}

0 commit comments

Comments
 (0)