Show a static list of all components
This commit is contained in:
parent
93380252f1
commit
206c9539d6
|
@ -13,7 +13,19 @@ final class HomeController extends AbstractController
|
|||
#[Route(path: '/', name: 'home')]
|
||||
public function __invoke(): Response
|
||||
{
|
||||
// TODO: show a list of all components.
|
||||
return $this->render('home.html.twig');
|
||||
// TODO: make this list dynamic.
|
||||
$components = [
|
||||
['Logo', 'logo'],
|
||||
['Page header', 'page-header'],
|
||||
['Footer link', 'footer-link'],
|
||||
['Footer', 'footer'],
|
||||
];
|
||||
|
||||
return $this->render(
|
||||
view: 'home.html.twig',
|
||||
parameters: [
|
||||
'components' => $components,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
Home
|
||||
<ul>
|
||||
{% for component in components %}
|
||||
<li>
|
||||
<a href="{{ component.1 }}">
|
||||
{{ component.0 }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue