Skip to content

Commit 5c134cd

Browse files
committed
Minor adjustments
1 parent 349c773 commit 5c134cd

File tree

5 files changed

+80
-13
lines changed

5 files changed

+80
-13
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace App\Twig\Components\Badge;
13+
14+
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
15+
16+
#[AsTwigComponent(
17+
name: 'Badge:Github',
18+
template: 'components/Badge.html.twig',
19+
exposePublicProps: false,
20+
)]
21+
final class GithubBadge extends Badge
22+
{
23+
public string $username;
24+
25+
public string $label = 'Github';
26+
27+
public string $icon = 'github';
28+
29+
public function mount(string $username): void
30+
{
31+
$this->value = $username;
32+
$this->url = 'https://github.com/'.$username;
33+
}
34+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace App\Twig\Components\Badge;
13+
14+
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
15+
16+
#[AsTwigComponent(
17+
name: 'Badge:Package',
18+
template: 'components/Badge.html.twig',
19+
exposePublicProps: false,
20+
)]
21+
final class PackageBadge extends Badge
22+
{
23+
public string $label = 'UX';
24+
25+
public string $icon = 'lucide:box';
26+
27+
public function mount(string $package): void
28+
{
29+
$this->value = $package;
30+
}
31+
}

ux.symfony.com/templates/components/UploadFiles.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</div>
2323
<div class="form-group mb-3">
2424
<label for="multiple-files" class="form-label">Multiple files:</label>
25-
<input type="file" name="multiple[]" autocomplete="off" multiple="" id="multiple-files" class="form-control-file">
25+
<input type="file" class="form-control-file" name="multiple[]" autocomplete="off" multiple="" id="multiple-files" >
2626
<div class="form-text text-muted">Current files:
2727
{% if multipleUploadFilenames %}
2828
<ul>

ux.symfony.com/templates/cookbook/show.html.twig

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,13 @@
5050
</div>
5151
</div>
5252

53-
<div class="container container-xl x-4 pt-4 px-md-5 pt-md-5">
54-
<div class="content" style="max-width: 75ch;margin-inline: auto;font-size: 1.25rem;line-height: 1.75;font-weight: 300;">
55-
{{ cookbook.content|raw|markdown_to_html }}
56-
</div>
53+
<div class="content" style="max-width: 75ch;margin-inline: auto;font-size: 1.25rem;line-height: 1.75;font-weight: 300;">
54+
{{ cookbook.content|raw|markdown_to_html }}
5755
</div>
5856

59-
<div class="container container-xl x-4 pt-4 px-md-5 pt-md-5">
60-
<div class="cluster">
61-
<twig:Badge:Author author="{{ cookbook.author }}" />
62-
<twig:Badge:Date label="Published" date="{{ cookbook.publishedAt }}" />
63-
</div>
57+
<div class="cluster">
58+
<twig:Badge:Author author="{{ cookbook.author }}" />
59+
<twig:Badge:Date label="Published" date="{{ cookbook.publishedAt }}" />
6460
</div>
6561

6662
</article>

ux.symfony.com/templates/main/homepage.html.twig

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,21 @@
105105

106106
<p class="eyebrows" style="margin: 111px 0 0;">Packages</p>
107107
<div class="d-md-flex justify-content-md-between text-center align-items-center text-md-start">
108-
<h2 class="ubuntu pt-2 component-headlines">Install extra <em class="rainbow-emphasis">Packages</em></h2>
108+
<h2 class="ubuntu pt-2 component-headlines">Install UX <em class="rainbow-emphasis">Components</em></h2>
109+
110+
{# <a class="Button Button--dark" href="{{ url('app_packages') }}">#}
111+
{# Browse all Packages#}
112+
{# <twig:ux:icon name="arrow-right" style="transform: rotate(-45deg);"/>#}
113+
{# </a>#}
114+
109115
<a style="height: 100%;" class="btn btn-md btn-outline-primary mt-3 mt-md-0" href="{{ path('app_packages') }}">
110116
Browse all Packages
111117
<twig:ux:icon name="arrow-right" style="transform: rotate(-45deg);"/>
112118
</a>
113119
</div>
114120
<div class="row mt-3 mt-md-5">
115-
<div style="display: grid; gap: 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));">
116-
{% for package in packages %}
121+
<div style="display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));">
122+
{% for package in packages|slice(0, 12) %}
117123
<twig:Package:PackageBox package="{{ package }}" titleTag="h3" />
118124
{% endfor %}
119125
</div>

0 commit comments

Comments
 (0)