Added font awesome and optimized menu

This commit is contained in:
Kevin Frantz 2018-09-06 11:26:10 +02:00
parent 8e031de88e
commit c3a008e6cf
2 changed files with 26 additions and 21 deletions

View File

@ -30,59 +30,63 @@ class UserMenuSubscriber implements EventSubscriberInterface
{ {
$menu = $event->getItem(); $menu = $event->getItem();
$menu->addChild( $menu->addChild(
'linking', 'start',
[ [
'route' => 'homepage', 'route' => 'homepage',
'attributes' => [
'icon' => 'fab fa-font-awesome-flag',
],
] ]
); );
$menu->addChild( $menu->addChild(
'texting', 'imprint',
[ [
'labelAttributes' => [ 'route'=>'imprint',
'class' => 'class3 class4', 'attributes' => [
'icon' => 'fas fa-address-card',
], ],
] ]
); );
$dropdown = $menu->addChild( $dropdown = $menu->addChild(
'Hello Me', 'user',
[ [
'attributes' => [ 'attributes' => [
'dropdown' => true, 'dropdown' => true,
'icon' => 'fas fa-user',
], ],
] ]
); );
$dropdown->addChild( $dropdown->addChild(
'Profile', 'login',
[ [
'route' => 'homepage', 'route' => 'user_login',
'attributes' => [ 'attributes' => [
'divider_append' => true, 'divider_append' => true,
'icon' => 'fas fa-sign-in-alt',
], ],
] ]
); );
$dropdown->addChild( $dropdown->addChild(
'text', 'logout',
[
'attributes' => [
'icon' => 'fa fa-user-circle',
],
'labelAttributes' => [
'class' => ['class1', 'class2'],
],
]
);
$dropdown->addChild(
'Logout',
[ [
'route' => 'user_logout', 'route' => 'user_logout',
'attributes' => [
'icon' => 'fas fa-sign-out-alt',
],
]
);
$dropdown->addChild(
'register',
[
'route' => 'user_register',
'attributes' => [ 'attributes' => [
'divider_prepend' => true, 'divider_prepend' => true,
'icon' => 'fa fa-sign-out', 'icon' => 'fas fa-file-signature',
], ],
] ]
); );

View File

@ -8,6 +8,7 @@
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<!-- mobile friendly --> <!-- mobile friendly -->
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
</head> </head>