* third dummy navigation level added to support current menu display

* head logo moved lower
* footer logo size changed in mobile view
This commit is contained in:
Danyi Dávid 2018-05-06 18:18:40 +02:00
parent a9325deeef
commit 4a7afad2fb
3 changed files with 68 additions and 29 deletions

View File

@ -65,6 +65,31 @@ section.error {
grid-area: content;
}
footer {
font-family: 'PT Serif', serif;
color: #fffffd;
background-color: #003b70;
}
footer.main-footer {
grid-area: footer;
line-height: 70px;
}
footer .footer-lead {
display: inline-block;
width: 200px;
}
footer .sigma-logo {
vertical-align: -10px;
}
footer .ericsson-logo {
vertical-align: -4px;
margin-left: 50px;
}
/* mobile */
@media only screen and (max-width: 779px) {
.app-container {
@ -157,6 +182,21 @@ section.error {
width: 55px;
}
footer .footer-lead {
width: 140px;
}
footer .sigma-logo {
vertical-align: -6px;
width: 78px;
}
footer .ericsson-logo {
width: 82px;
margin-left: 10px;
vertical-align: -1px;
}
section.profile {
grid-template-columns: auto;
grid-template-rows: auto auto;
@ -469,39 +509,19 @@ header .title {
}
header .description {
max-width: 255px;
font-size: 12pt;
letter-spacing: 1.75pt;
}
header .description .granprize-logo {
float: right;
}
nav.main {
grid-area: nav;
}
footer.main-footer {
grid-area: footer;
line-height: 70px;
}
footer .footer-lead {
display: inline-block;
width: 200px;
}
footer .sigma-logo {
vertical-align: -10px;
}
footer .ericsson-logo {
vertical-align: -4px;
margin-left: 50px;
}
footer {
font-family: 'PT Serif', serif;
color: #fffffd;
background-color: #003b70;
}
nav ul {
list-style: none;
padding-left: 0;
@ -543,6 +563,7 @@ nav ul.menu_level_1 > li {
margin-bottom: 10px;
}
nav ul.menu_level_1 > li.current {
nav ul.menu_level_1 > li.current,
nav ul.menu_level_1 > li.current_ancestor {
border-left: 5px solid #003b70;
}

View File

@ -57,7 +57,9 @@ class NavigationExtension implements ExtensionInterface
$matcher = new Matcher([
new UriVoter($_SERVER['REQUEST_URI'])
]);
$renderer = new ListRenderer($matcher);
$renderer = new ListRenderer($matcher, [
'depth' => 2,
]);
return $renderer->render($this->menu);
}
@ -111,9 +113,24 @@ class NavigationExtension implements ExtensionInterface
}, $result));
foreach ($years as $year) {
$awardeesMenu->addChild($year, [
$yearItem = $awardeesMenu->addChild($year, [
'uri' => $this->getUriFromRouter('awardees-by-year', ['year' => $year])
]);
$this->populateYearSubmenuArticleDummy($yearItem, (int)$year);
}
}
private function populateYearSubmenuArticleDummy(ItemInterface $yearMenu, int $year)
{
/** @var Awardee[] $yearAwardees */
$yearAwardees = $this->entityManager->getRepository(Awardee::class)->findBy([
'year' => $year,
]);
foreach($yearAwardees as $awardee) {
$yearMenu->addChild($awardee->getName(), [
'uri' => $this->getUriFromRouter('awardee', ['slug' => $awardee->getSlug()])
]);
}
}
}

View File

@ -17,11 +17,12 @@
<div class="title">
<a href="<?= $this->serverurl('/') ?>">
Gran Prize
<img class="granprize-logo" src="<?= $this->serverurl('/img/logo/gran_prize_logo.png') ?>">
</a>
</div>
<div class="description">
<a href="<?= $this->serverurl('/') ?>">
<img class="granprize-logo" src="<?= $this->serverurl('/img/logo/gran_prize_logo.png') ?>">
Interdisciplinary<br>
Innovative<br>
Award