Add mobile navigation
This commit is contained in:
parent
cb79277374
commit
641c61dd47
|
@ -1,2 +1,4 @@
|
|||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
globals:
|
||||
menuLinks: '@App\Repository\MenuLinkRepository'
|
||||
|
|
43
src/Repository/MenuLinkArrayRepository.php
Normal file
43
src/Repository/MenuLinkArrayRepository.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
final class MenuLinkArrayRepository implements MenuLinkRepository
|
||||
{
|
||||
public function findAll(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'name' => 'Conference',
|
||||
'children' => [
|
||||
['name' => 'Trainings'],
|
||||
['name' => 'Contribution Day'],
|
||||
['name' => 'About FLDC'],
|
||||
['name' => 'Speaker Info'],
|
||||
['name' => 'Contact'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => 'Sponsors',
|
||||
'children' => [
|
||||
['name' => 'All sponsors'],
|
||||
['name' => 'Become a sponsor'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => 'Community',
|
||||
'children' => [
|
||||
['name' => 'Code of Conduct'],
|
||||
['name' => 'Tourism'],
|
||||
['name' => 'Mailing List'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => 'FAQ',
|
||||
'children' => [],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
10
src/Repository/MenuLinkRepository.php
Normal file
10
src/Repository/MenuLinkRepository.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
interface MenuLinkRepository
|
||||
{
|
||||
public function findAll(): array;
|
||||
}
|
36
templates/includes/navbar.html.twig
Normal file
36
templates/includes/navbar.html.twig
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,7 @@
|
|||
{% extends 'html.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{% include 'includes/navbar.html.twig' %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue