Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Site] Use ux_package template for ux-icons page #2337

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ux.symfony.com/src/Controller/Icons/IconsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function index(
];
$iconSets = array_map(fn ($iconSet) => $iconSetRepository->find($iconSet), $iconSets);

return $this->render('icons/index.html.twig', [
return $this->render('ux_packages/icons.html.twig', [
'package' => $packageRepository->find('icons'),
'iconSets' => $iconSets,
]);
Expand Down
2 changes: 1 addition & 1 deletion ux.symfony.com/src/Service/UxPackageRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function findAll(?string $query = null): array
'icons',
'UX Icons',
'app_icons',
'#fff',
'purple',
'linear-gradient(to bottom right, cyan, purple)',
'SVG icons made easy',
'Render SVG icons seamlessly from your Twig templates.',
Expand Down
24 changes: 0 additions & 24 deletions ux.symfony.com/templates/icons/_aside.html.twig

This file was deleted.

73 changes: 0 additions & 73 deletions ux.symfony.com/templates/icons/index.html.twig

This file was deleted.

52 changes: 52 additions & 0 deletions ux.symfony.com/templates/ux_packages/icons.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{% extends 'ux_packages/package.html.twig' %}

{% block javascripts %}
{{ parent() }}
<meta name="turbo-prefetch" content="false">
{% endblock %}

{% block package_header %}
{% component PackageHeader with {
package: 'icons',
eyebrowText: 'SVG icons made easy'
} %}
{% block title_header %}
UX Icons
{% endblock %}

{% block sub_content %}
Render SVG icons seamlessly from your Twig templates.
<br/>
Find the <code>perfect icon</code> among <code>200,000 choices</code> from the most popular <code>icon sets</code>.
{% endblock %}
{% endcomponent %}
{% endblock %}

{% block package_content %}
<section class="container-fluid container-xxl px-4 px-md-5 py-3">
<twig:Icon:IconSearch/>
</section>

<section class="container-fluid container-xxl px-4 px-md-5 py-3">
<p class="eyebrows" style="margin: 4rem 0 0;">Iconic Packages</p>
<div class="d-md-flex justify-content-md-between text-center align-items-center text-md-start">
<h2 class="ubuntu pt-2 component-headlines">Popular <em class="rainbow-emphasis">Icon Sets</em></h2>
</div>
<div class="mt-3 mt-md-5">
<div style="display:grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2rem;">
{% for icon_set in iconSets %}
<twig:Icon:IconSetCard
iconSet="{{ icon_set }}"
index="{{ loop.index0 }}"
/>
{% endfor %}
</div>
</div>
</section>

{% endblock %}

{% block body %}
{{ parent() }}
<twig:Icon:IconModal/>
{% endblock %}