-
-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #2248 [Site] Add Stimulus Bundle missing page (smnandre)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Site] Add Stimulus Bundle missing page Add first (minimal) version of this page | . | . | | - | - | | ![Capture d’écran 2024-10-07 à 22 42 23](https://github.com/user-attachments/assets/2b32db55-abd9-4fe3-9cec-7c954a154d04) | ![Capture d’écran 2024-10-07 à 22 42 29](https://github.com/user-attachments/assets/f092e24c-3a74-4cc1-b2e7-acac06b49eeb) | Commits ------- 4f73505 [Site] Add Stimulus Bundle missing page
- Loading branch information
Showing
13 changed files
with
292 additions
and
26 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.FeatureBox { | ||
|
||
--bg-color: var(--bs-body-bg); | ||
[data-bs-theme="dark"] { | ||
--bg-color: #1b1e21; | ||
} | ||
|
||
background: var(--bg-color); | ||
border: 1px solid var(--bs-secondary-bg-subtle); | ||
border-radius: var(--border-radius); | ||
display: grid; | ||
padding: 1rem; | ||
place-content: center; | ||
gap: .75rem; | ||
} | ||
|
||
.FeatureBox_icon { | ||
height: 2.4rem; | ||
display: grid; | ||
place-content: center; | ||
svg { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
path, circle { | ||
fill: var(--bs-body-bg); | ||
fill-opacity: .1; | ||
stroke: currentColor; | ||
stroke-width: 1; | ||
transition: 400ms; | ||
} | ||
} | ||
.FeatureBox:hover { | ||
path, circle { | ||
fill-opacity: .15; | ||
stroke-width: 1.25; | ||
} | ||
} | ||
|
||
.FeatureBox_title { | ||
opacity: .85; | ||
font-weight: 400; | ||
font-size: 1rem; | ||
font-family: var(--font-family-text); | ||
color: var(--bs-body-color); | ||
text-decoration: none; | ||
line-height: 1; | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
ux_icons: | ||
default_icon_attributes: | ||
class: 'Icon' | ||
|
||
icon_sets: | ||
|
||
# FeatureBox icons | ||
feature: | ||
alias: 'lucide' | ||
# icon_attributes: |
35 changes: 35 additions & 0 deletions
35
ux.symfony.com/src/Controller/UxPackage/StimulusController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace App\Controller\UxPackage; | ||
|
||
use App\Service\UxPackageRepository; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\Routing\Attribute\Route; | ||
|
||
class StimulusController extends AbstractController | ||
{ | ||
public function __construct( | ||
private readonly UxPackageRepository $packageRepository, | ||
) { | ||
} | ||
|
||
#[Route('/stimulus', name: 'app_stimulus')] | ||
public function __invoke(): Response | ||
{ | ||
$package = $this->packageRepository->find('stimulus'); | ||
|
||
return $this->render('ux_packages/stimulus.html.twig', [ | ||
'package' => $package, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="FeatureBox"> | ||
<div class="FeatureBox_icon"> | ||
<twig:ux:icon name="feature:{{ icon }}" /> | ||
</div> | ||
<h3 class="FeatureBox_title">{{ title }}</h3> | ||
</div> |
26 changes: 15 additions & 11 deletions
26
ux.symfony.com/templates/components/Package/PackageHeader.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
<div class="PackageHeader mb-5" style="background: {{ package.gradient }}, {{ package.color }};"> | ||
<div class="PackageHeader mb-5 {{ not (command ?? true) ? 'pb-5' }}" style="background: {{ package.gradient }}, {{ package.color }}; --color-accent: {{ package.color }};" | ||
> | ||
<div class="container-fluid container-xxl px-4 pt-4 px-md-5 pt-md-5 position-relative"> | ||
|
||
<p class="eyebrows text-center font-white mt-5" style="opacity: 0.8;">{{ eyebrowText|raw }}</p> | ||
<p class="eyebrows text-center font-white mt-5" style="opacity: 0.85;">{{ eyebrowText|raw }}</p> | ||
|
||
<h1 class="text-center font-white">{% block title_header %}{% endblock %}</h1> | ||
<h1 class="text-center font-white">{% block title_header %}{{ title|default }}{% endblock %}</h1> | ||
|
||
<div class="d-flex justify-content-center"> | ||
<p class="text-center font-white mt-3 pb-3 hero-sub-text"> | ||
{% block sub_content %}{% endblock %} | ||
{% block sub_content %}{{ subtitle|default }}{% endblock %} | ||
</p> | ||
</div> | ||
|
||
<div class="d-flex justify-content-center "> | ||
<twig:TerminalCommand | ||
aria-label="Composer command to install {{ package.humanName }}" | ||
command="{{ package.composerRequireCommand }}" | ||
style="--color-accent: {{ package.color }}; transform: translateY(50%);" | ||
/> | ||
</div> | ||
{% if command is not defined or command %} | ||
<div class="d-flex justify-content-center"> | ||
<twig:TerminalCommand | ||
aria-label="Composer command to install {{ package.humanName }}" | ||
command="{{ package.composerRequireCommand }}" | ||
style="--color-accent: {{ package.color }}; transform: translateY(50%);" | ||
/> | ||
</div> | ||
{% endif %} | ||
|
||
</div> | ||
</div> |
Oops, something went wrong.