diff --git a/config/routes.php b/config/routes.php
index 4a3374a..65b6ea8 100644
--- a/config/routes.php
+++ b/config/routes.php
@@ -43,8 +43,8 @@ return function (Application $app, MiddlewareFactory $factory, ContainerInterfac
'the-prize.article'
);
- $app->get('/judges', App\Handler\JudgesHandler::class, 'judges');
- $app->get('/awardees', App\Handler\AwardeeRedirectHandler::class, 'awardees');
- $app->get('/awardees/{year:\d+}', App\Handler\AwardeeHandler::class, 'awardees-by-year');
+// $app->get('/judges', App\Handler\JudgesHandler::class, 'judges');
+ $app->get('/awards', App\Handler\AwardeeRedirectHandler::class, 'awardees');
+ $app->get('/awards/{year:\d+}', App\Handler\AwardeeHandler::class, 'awardees-by-year');
$app->get('/awardee/{slug}', App\Handler\ProfileHandler::class, 'awardee');
};
diff --git a/public/downloads/granprize_entry_2018.pdf b/public/downloads/granprize_entry_2018.pdf
new file mode 100644
index 0000000..b037edc
Binary files /dev/null and b/public/downloads/granprize_entry_2018.pdf differ
diff --git a/public/downloads/granprize_kiiras_2018.pdf b/public/downloads/granprize_kiiras_2018.pdf
new file mode 100644
index 0000000..c941825
Binary files /dev/null and b/public/downloads/granprize_kiiras_2018.pdf differ
diff --git a/public/img/home_1.png b/public/img/home_1.png
index 078f295..a1668fa 100644
Binary files a/public/img/home_1.png and b/public/img/home_1.png differ
diff --git a/public/img/icon/download.png b/public/img/icon/download.png
new file mode 100644
index 0000000..70e6c06
Binary files /dev/null and b/public/img/icon/download.png differ
diff --git a/public/img/icon/downloadx2.png b/public/img/icon/downloadx2.png
new file mode 100644
index 0000000..f5b4e3b
Binary files /dev/null and b/public/img/icon/downloadx2.png differ
diff --git a/public/img/logo/ericsson_logo.png b/public/img/logo/ericsson_logo.png
index 1ccf0ef..b255a56 100644
Binary files a/public/img/logo/ericsson_logo.png and b/public/img/logo/ericsson_logo.png differ
diff --git a/public/img/logo/sigma_logo.png b/public/img/logo/sigma_logo.png
index 186e9f4..d485fc4 100644
Binary files a/public/img/logo/sigma_logo.png and b/public/img/logo/sigma_logo.png differ
diff --git a/public/styles/main.css b/public/styles/main.css
index dcedb92..40c151e 100644
--- a/public/styles/main.css
+++ b/public/styles/main.css
@@ -2,12 +2,11 @@ html,
body {
height: 100%;
color: #003b70;
- --header-size: 22pt;
}
h1 {
font-family: 'PT Serif', serif;
- font-size: var(--header-size);
+ font-size: 22pt;
}
a:link,
@@ -49,6 +48,7 @@ section.home {
display: grid;
grid-column-gap: 20px;
grid-row-gap: 20px;
+ align-self: start;
}
section.article {
@@ -80,14 +80,15 @@ footer.main-footer {
footer .footer-lead {
display: inline-block;
width: 200px;
+ font-weight: 700;
}
footer .sigma-logo {
- vertical-align: -10px;
+ vertical-align: middle;
}
footer .ericsson-logo {
- vertical-align: -4px;
+ vertical-align: middle;
margin-left: 50px;
}
@@ -110,7 +111,8 @@ footer .ericsson-logo {
grid-template-areas:
"bigimg bigimg"
"article article"
- "smallimg1 smallimg2";
+ "smallimg1 smallimg2"
+ "download download";
}
section.home > img {
@@ -190,14 +192,12 @@ footer .ericsson-logo {
}
footer .sigma-logo {
- vertical-align: -6px;
width: 78px;
}
footer .ericsson-logo {
width: 82px;
margin-left: 10px;
- vertical-align: -1px;
}
section.profile {
@@ -236,7 +236,8 @@ footer .ericsson-logo {
grid-template-areas:
"bigimg bigimg"
"smallimg1 smallimg2"
- "article article";
+ "article article"
+ "download download";
}
section.article {
@@ -282,7 +283,7 @@ footer .ericsson-logo {
}
section.awardee {
- grid-template-columns: 180px 380px;
+ grid-template-columns: 180px 360px;
}
section.awardees > .awardee > img.profile,
@@ -293,7 +294,7 @@ footer .ericsson-logo {
}
section.profile {
- grid-template-columns: 580px;
+ grid-template-columns: 560px;
grid-template-rows: auto auto;
grid-template-areas:
"profile"
@@ -317,12 +318,13 @@ footer .ericsson-logo {
}
section.home {
- grid-template-columns: 560px 280px;
+ /*grid-template-columns: 580px 280px;*/
+ grid-template-columns: 430px 130px 280px;
grid-template-rows: 175px 175px auto;
grid-template-areas:
- "bigimg smallimg1"
- "bigimg smallimg2"
- "article article";
+ "bigimg bigimg smallimg1"
+ "bigimg bigimg smallimg2"
+ "article download download";
}
section.article {
@@ -355,7 +357,7 @@ footer .ericsson-logo {
}
section.awardee {
- grid-template-columns: 180px 380px;
+ grid-template-columns: 180px 360px;
}
section.awardees > .awardee > img.profile,
@@ -366,7 +368,7 @@ footer .ericsson-logo {
}
section.profile {
- grid-template-columns: 580px 380px;
+ grid-template-columns: 560px 380px;
grid-template-rows: auto;
grid-template-areas:
"profile sidebar"
@@ -398,6 +400,23 @@ section.home > article {
grid-area: article;
}
+section.home > section.download {
+ grid-area: download;
+}
+
+section.download a.download {
+ display: block;
+ margin-bottom: 3px;
+ overflow: hidden;
+}
+
+section.download a.download > img{
+ float: left;
+ width: 31px;
+ height: 30px;
+ margin-right: 5px;
+}
+
/* the prize (article) */
section.article > article {
grid-area: article;
@@ -416,6 +435,12 @@ section.judges {
grid-area: content;
}
+section.judges > h1 {
+ clear: both;
+ padding-top: 40px;
+ margin-bottom: 20px;
+}
+
section.judge > img.profile {
float: left;
width: 80px;
@@ -450,6 +475,8 @@ section.profile {
display: grid;
grid-column-gap: 20px;
grid-row-gap: 20px;
+ border-left: 1px solid #003b70;
+ padding-left: 20px;
}
section.profile > aside.sidebar > img {
@@ -479,7 +506,7 @@ section.awardee {
.awardee .year {
grid-area: year;
- font-family: 'Raleway', sans-serif;
+ font-family: 'PT Serif', serif;
font-size: 32pt;
align-self: end;
}
@@ -496,6 +523,13 @@ section.awardee {
grid-area: content;
}
+a.awardee > .description {
+ border-left: 1px solid #003b70;
+ padding-left: 10px;
+ font-family: 'Raleway', sans-serif;
+ font-style: italic;
+}
+
/* common parts */
header.main {
@@ -539,7 +573,7 @@ nav > ul > li {
padding-left: 5px;
font-weight: 700;
font-size: 16pt;
- line-height: 18pt;
+ line-height: 24pt;
}
nav > ul > li.current {
diff --git a/src/App/Handler/AwardeeHandler.php b/src/App/Handler/AwardeeHandler.php
index 625585a..197ebc5 100644
--- a/src/App/Handler/AwardeeHandler.php
+++ b/src/App/Handler/AwardeeHandler.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace App\Handler;
use App\Service\AwardeeManager;
+use App\Service\JudgeManager;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
@@ -24,32 +25,39 @@ class AwardeeHandler implements RequestHandlerInterface
/** @var UrlHelper */
private $urlHelper;
+ /** @var JudgeManager */
+ private $judgeManager;
+
public function __construct(
TemplateRendererInterface $template,
AwardeeManager $awardeeManager,
- UrlHelper $urlHelper
+ UrlHelper $urlHelper,
+ JudgeManager $judgeManager
)
{
$this->template = $template;
$this->awardeeManager = $awardeeManager;
$this->urlHelper = $urlHelper;
+ $this->judgeManager = $judgeManager;
}
public function handle(ServerRequestInterface $request): ResponseInterface
{
$year = $request->getAttribute('year');
- $awardees = $this->awardeeManager->getJudgesByYear((int)$year);
+ $awardees = $this->awardeeManager->getAwardeesByYear((int)$year);
+ $judges = $this->judgeManager->getJudgesByYear((int)$year);
- if (count($awardees) === 1) {
- $url = $this->urlHelper->generate('awardee', [
- 'slug' => $awardees[0]->getSlug(),
- ]);
- return new RedirectResponse($url);
- }
+// if (count($awardees) === 1) {
+// $url = $this->urlHelper->generate('awardee', [
+// 'slug' => $awardees[0]->getSlug(),
+// ]);
+// return new RedirectResponse($url);
+// }
return new HtmlResponse($this->template->render("app::awardees", [
'year' => $year,
'awardees' => $awardees,
+ 'judges' => $judges,
]));
}
}
diff --git a/src/App/Handler/AwardeeHandlerFactory.php b/src/App/Handler/AwardeeHandlerFactory.php
index 9fba4c2..d32d960 100644
--- a/src/App/Handler/AwardeeHandlerFactory.php
+++ b/src/App/Handler/AwardeeHandlerFactory.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace App\Handler;
use App\Service\AwardeeManager;
+use App\Service\JudgeManager;
use Psr\Container\ContainerInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Zend\Expressive\Helper\UrlHelper;
@@ -17,6 +18,7 @@ class AwardeeHandlerFactory
$template = $container->get(TemplateRendererInterface::class);
$awardeeManager = $container->get(AwardeeManager::class);
$urlHelper = $container->get(UrlHelper::class);
- return new AwardeeHandler($template, $awardeeManager, $urlHelper);
+ $judgeManager = $container->get(JudgeManager::class);
+ return new AwardeeHandler($template, $awardeeManager, $urlHelper, $judgeManager);
}
}
diff --git a/src/App/Plates/NavigationExtension.php b/src/App/Plates/NavigationExtension.php
index 7cd3b31..5adbbdc 100644
--- a/src/App/Plates/NavigationExtension.php
+++ b/src/App/Plates/NavigationExtension.php
@@ -84,11 +84,11 @@ class NavigationExtension implements ExtensionInterface
'uri' => $this->getUriFromRouter('the-prize.article', ['article' => 'gran-prize-award-events'])
]);
- $this->menu->addChild(strtoupper("Judges"), [
- 'uri' => $this->getUriFromRouter('judges')
- ]);
+// $this->menu->addChild(strtoupper("Judges"), [
+// 'uri' => $this->getUriFromRouter('judges')
+// ]);
- $awardeesMenu = $this->menu->addChild(strtoupper("Awardees"), [
+ $awardeesMenu = $this->menu->addChild(strtoupper("Awards"), [
'uri' => $this->getUriFromRouter('awardees')
]);
$this->populateAwardeesSubmenu($awardeesMenu);
diff --git a/src/App/Service/AwardeeManager.php b/src/App/Service/AwardeeManager.php
index 734780e..aa93729 100644
--- a/src/App/Service/AwardeeManager.php
+++ b/src/App/Service/AwardeeManager.php
@@ -21,7 +21,7 @@ class AwardeeManager
* @param int $year
* @return Awardee[]
*/
- public function getJudgesByYear(int $year): ?array
+ public function getAwardeesByYear(int $year): ?array
{
return $this->entityManager->getRepository(Awardee::class)->findBy([
'year' => $year,
@@ -32,7 +32,7 @@ class AwardeeManager
* @param string $slug
* @return Awardee|null
*/
- public function getJudgeFromSlug(string $slug): ?Awardee
+ public function getAwardeeFromSlug(string $slug): ?Awardee
{
/** @var Awardee $awardee */
$awardee = $this->entityManager->getRepository(Awardee::class)->findOneBy([
diff --git a/src/App/Service/JudgeManager.php b/src/App/Service/JudgeManager.php
index 41e538c..716f957 100644
--- a/src/App/Service/JudgeManager.php
+++ b/src/App/Service/JudgeManager.php
@@ -118,4 +118,14 @@ class JudgeManager
]
];
}
-}
\ No newline at end of file
+
+ /**
+ * @param int $year
+ * @return array
+ * @todo implement real filter by year
+ */
+ public function getJudgesByYear(int $year)
+ {
+ return $this->getJudges();
+ }
+}
diff --git a/templates/app/awardees.phtml b/templates/app/awardees.phtml
index f98dc67..f05e906 100644
--- a/templates/app/awardees.phtml
+++ b/templates/app/awardees.phtml
@@ -8,4 +8,6 @@
= $this->batch($awardee->getText(), 'excerpt|mdtohtml') ?>
+ insert('app::judges.inc', ['judges' => $judges, 'year' => $year]) ?>
+
diff --git a/templates/app/home-page.phtml b/templates/app/home-page.phtml
index ecd6043..112f52a 100644
--- a/templates/app/home-page.phtml
+++ b/templates/app/home-page.phtml
@@ -5,6 +5,19 @@
The Gran Prize
- is an annual prize awarded for outstandingly innovative solutions in response to the most pressing issues of our planet, in the field of environmental protection, sustainable development, design, medicine, health preservation and development and education.
+ is an annual prize awarded for outstandingly innovative solutions in response to the most pressing issues of
+ our planet, in the field of environmental protection, sustainable development, design, medicine, health
+ preservation and development and education.
+
diff --git a/templates/app/judges.inc.phtml b/templates/app/judges.inc.phtml
new file mode 100644
index 0000000..0ba2c36
--- /dev/null
+++ b/templates/app/judges.inc.phtml
@@ -0,0 +1,10 @@
+
+ =$year?> judges
+
+
+
+ = $judge['name']?>
+ = $judge['desc']?>
+
+
+
diff --git a/templates/layout/default.phtml b/templates/layout/default.phtml
index 1493e26..9e4f204 100644
--- a/templates/layout/default.phtml
+++ b/templates/layout/default.phtml
@@ -17,16 +17,13 @@
= $this->navigation() ?>