* mostly complete
9
cli-config.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
$container = require 'config/container.php';
|
||||
|
||||
return new \Symfony\Component\Console\Helper\HelperSet([
|
||||
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper(
|
||||
$container->get('doctrine.entity_manager.orm_default')
|
||||
),
|
||||
]);
|
||||
@ -39,7 +39,11 @@
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1",
|
||||
"dasprid/container-interop-doctrine": "^1.1",
|
||||
"gedmo/doctrine-extensions": "^2.4",
|
||||
"knplabs/knp-menu": "^2.3",
|
||||
"league/commonmark": "^0.17.5",
|
||||
"los/loslog": "^3.1",
|
||||
"roave/security-advisories": "dev-master",
|
||||
"zendframework/zend-component-installer": "^2.1.1",
|
||||
"zendframework/zend-config-aggregator": "^1.0",
|
||||
|
||||
1390
composer.lock
generated
76
config/autoload/doctrine.global.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'dependencies' => [
|
||||
'aliases' => [
|
||||
Doctrine\ORM\EntityManager::class => 'doctrine.entity_manager.orm_default',
|
||||
],
|
||||
'factories' => [
|
||||
'doctrine.entity_manager.orm_default' => ContainerInteropDoctrine\EntityManagerFactory::class,
|
||||
],
|
||||
],
|
||||
'doctrine' => [
|
||||
'driver' => [
|
||||
'orm_default' => [
|
||||
'class' => Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain::class,
|
||||
'drivers' => [
|
||||
'App\Entity' => 'app_entity',
|
||||
],
|
||||
],
|
||||
'app_entity' => [
|
||||
'class' => Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
|
||||
'cache' => 'array',
|
||||
'paths' => __DIR__ . '/../../src/App/Entity',
|
||||
],
|
||||
],
|
||||
'configuration' => [
|
||||
'orm_default' => [
|
||||
// 'datetime_functions' => [
|
||||
// 'date' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'time' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'timestamp' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'convert_tz' => Oro\ORM\Query\AST\Functions\DateTime\ConvertTz::class,
|
||||
// ],
|
||||
'numeric_functions' => [
|
||||
// 'timestampdiff' => Oro\ORM\Query\AST\Functions\Numeric\TimestampDiff::class,
|
||||
// 'dayofyear' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'dayofmonth' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'dayofweek' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'week' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'day' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'hour' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'minute' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'month' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'quarter' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'second' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'year' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'sign' => Oro\ORM\Query\AST\Functions\Numeric\Sign::class,
|
||||
// 'pow' => Oro\ORM\Query\AST\Functions\Numeric\Pow::class,
|
||||
],
|
||||
// 'string_functions' => [
|
||||
// 'md5' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'group_concat' => Oro\ORM\Query\AST\Functions\String\GroupConcat::class,
|
||||
// 'cast' => Oro\ORM\Query\AST\Functions\Cast::class,
|
||||
// 'concat_ws' => Oro\ORM\Query\AST\Functions\String\ConcatWs::class
|
||||
// ]
|
||||
// 'filters' => [
|
||||
// 'soft-deleteable' => Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::class,
|
||||
// ],
|
||||
],
|
||||
],
|
||||
'event_manager' => [
|
||||
'orm_default' => [
|
||||
'subscribers' => [
|
||||
// Gedmo\Timestampable\TimestampableListener::class,
|
||||
// 'Gedmo\Tree\TreeListener',
|
||||
// 'Gedmo\SoftDeleteable\SoftDeleteableListener',
|
||||
// 'Gedmo\Translatable\TranslatableListener',
|
||||
// 'Gedmo\Blameable\BlameableListener',
|
||||
// 'Gedmo\Loggable\LoggableListener',
|
||||
// Gedmo\Sortable\SortableListener::class,
|
||||
Gedmo\Sluggable\SluggableListener::class,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
14
config/autoload/doctrine.local.dist.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'doctrine' => [
|
||||
'connection' => [
|
||||
'orm_default' => [
|
||||
'params' => [
|
||||
'url' => 'mysqli://user:passwd@host/database',
|
||||
'charset' => 'UTF8',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
28
config/autoload/loslog.global.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Zend\Stratigility\Middleware\ErrorHandler;
|
||||
|
||||
return [
|
||||
'dependencies' => [
|
||||
'factories' => [
|
||||
LosMiddleware\LosLog\LosLog::class => LosMiddleware\LosLog\LosLogFactory::class,
|
||||
LosMiddleware\LosLog\HttpLog::class => LosMiddleware\LosLog\HttpLogFactory::class,
|
||||
Psr\Log\LoggerInterface::class => LosMiddleware\LosLog\LoggerFactory::class,
|
||||
],
|
||||
'delegators' => [
|
||||
ErrorHandler::class => [
|
||||
LosMiddleware\LosLog\ErrorHandlerListenerDelegatorFactory::class,
|
||||
],
|
||||
],
|
||||
],
|
||||
'loslog' => [
|
||||
'log_dir' => 'data/logs',
|
||||
'error_logger_file' => 'error.log',
|
||||
'exception_logger_file' => 'exception.log',
|
||||
'static_logger_file' => 'static.log',
|
||||
'http_logger_file' => 'http.log',
|
||||
'log_request' => false,
|
||||
'log_response' => false,
|
||||
'full' => false,
|
||||
],
|
||||
];
|
||||
@ -6,6 +6,7 @@ return [
|
||||
'plates' => [
|
||||
'extensions' => [
|
||||
App\Plates\NavigationExtension::class,
|
||||
App\Plates\StringExtension::class,
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
@ -13,6 +13,7 @@ $cacheConfig = [
|
||||
];
|
||||
|
||||
$aggregator = new ConfigAggregator([
|
||||
\Zend\Log\ConfigProvider::class,
|
||||
\Zend\Expressive\Router\FastRouteRouter\ConfigProvider::class,
|
||||
\Zend\HttpHandlerRunner\ConfigProvider::class,
|
||||
\Zend\Expressive\Plates\ConfigProvider::class,
|
||||
|
||||
@ -36,13 +36,15 @@ return function (Application $app, MiddlewareFactory $factory, ContainerInterfac
|
||||
$app->get('/', App\Handler\HomePageHandler::class, 'home');
|
||||
$app->get('/api/ping', App\Handler\PingHandler::class, 'api.ping');
|
||||
|
||||
$app->get('/the-prize', App\Handler\HomePageHandler::class, 'the-prize');
|
||||
$app->get('/the-prize/background-and-purpose', App\Handler\HomePageHandler::class, 'the-prize.bg');
|
||||
$app->get('/the-prize/description-and-values', App\Handler\HomePageHandler::class, 'the-prize.desc');
|
||||
$app->get('/the-prize/aspect-for-selection', App\Handler\HomePageHandler::class, 'the-prize.aspect');
|
||||
$app->get('/the-prize/gran-prize-award-events', App\Handler\HomePageHandler::class, 'the-prize.events');
|
||||
$app->get('/the-prize', App\Handler\PrizeRedirectHandler::class, 'the-prize');
|
||||
$app->get(
|
||||
'/the-prize/{article:background-and-purpose|description-and-values|aspect-for-selection|gran-prize-award-events}',
|
||||
App\Handler\ArticleHandler::class,
|
||||
'the-prize.article'
|
||||
);
|
||||
|
||||
$app->get('/judges', App\Handler\HomePageHandler::class, 'judges');
|
||||
$app->get('/awardees', App\Handler\HomePageHandler::class, 'awardees');
|
||||
$app->get('/awardees/{year:\d+}', App\Handler\HomePageHandler::class, 'awardees-by-year');
|
||||
$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('/awardee/{slug}', App\Handler\ProfileHandler::class, 'awardee');
|
||||
};
|
||||
|
||||
2
data/.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
*
|
||||
!cache
|
||||
!cache/.gitkeep
|
||||
!logs
|
||||
!logs/.gitignore
|
||||
!.gitignore
|
||||
|
||||
1
data/logs/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.log
|
||||
BIN
public/img/aspects_for_selection.png
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
public/img/awardees/2013-bertalan-mesko-atadas.jpg
Normal file
|
After Width: | Height: | Size: 189 KiB |
BIN
public/img/awardees/2013-bertalan-mesko.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
public/img/awardees/2014-marton-andras-juhasz-atadas.jpg
Normal file
|
After Width: | Height: | Size: 192 KiB |
BIN
public/img/awardees/2014-marton-andras-juhasz.jpg
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
public/img/awardees/2015-professor-noszticzius-zoltan-atadas.jpg
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
public/img/awardees/2015-professor-noszticzius-zoltan.jpg
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
public/img/awardees/2016-dr-istvan-kezsmarki-atadas.jpg
Normal file
|
After Width: | Height: | Size: 174 KiB |
BIN
public/img/awardees/2016-dr-istvan-kezsmarki.jpg
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
public/img/awardees/2016-dr-tamas-haidegger-atadas.jpg
Normal file
|
After Width: | Height: | Size: 176 KiB |
BIN
public/img/awardees/2016-dr-tamas-haidegger.jpg
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
public/img/awardees/2017-dr-andras-guttman-atadas.jpg
Normal file
|
After Width: | Height: | Size: 194 KiB |
BIN
public/img/awardees/2017-dr-andras-guttman.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
public/img/background_and_purpose.jpg
Normal file
|
After Width: | Height: | Size: 429 KiB |
BIN
public/img/description_and_value.jpg
Normal file
|
After Width: | Height: | Size: 210 KiB |
BIN
public/img/gran_prize_award_and_events.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
public/img/gran_prize_award_and_events_prefered.jpg
Normal file
|
After Width: | Height: | Size: 389 KiB |
BIN
public/img/home_1.png
Normal file
|
After Width: | Height: | Size: 394 KiB |
BIN
public/img/home_2.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
public/img/home_3.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
public/img/judges/agnes_soos.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
public/img/judges/balazs_nagy_lantos.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/img/judges/bertalan_mesko.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
public/img/judges/edit_nemeth.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/judges/erno_keszei.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/judges/gabor_kopek.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
public/img/judges/gabor_nemeth.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
public/img/judges/gabor_szabo.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/judges/gyorgy_nagy.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/judges/gyula_patko.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/img/judges/ildiko_csejtei.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/img/judges/istvan_salgo.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
public/img/judges/janos_durr.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/img/judges/janos_takacs.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/judges/jozsef_fulop.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
public/img/judges/jozsef_peter_martin.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/img/judges/luszcz_viktor.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
public/img/judges/maria_judit_molnar.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
public/img/judges/marton_juhasz.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/judges/melinda_kamasz.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/img/judges/miklos_antalovits.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/judges/miklos_bendzsel.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/img/judges/peter_szauer.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/img/judges/richard_bogdan.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/judges/rita_istivan.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/judges/roland_jakab.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
public/img/judges/szabolcs_farkas.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
public/img/judges/zoltan_bruckner.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/logo/ericsson_logo.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
public/img/logo/gran_prize_logo.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
public/img/logo/sigma_logo.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
@ -5,34 +5,6 @@ body {
|
||||
--header-size: 22pt;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
margin: auto;
|
||||
display: grid;
|
||||
grid-column-gap: 20px;
|
||||
grid-row-gap: 0;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.content-container {
|
||||
grid-area: content;
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
grid-template-rows: 200px auto;
|
||||
grid-template-areas:
|
||||
"title"
|
||||
"main";
|
||||
}
|
||||
|
||||
.content-container > article,
|
||||
.content-block > section {
|
||||
border-left: 1px solid #003b70;
|
||||
padding: 0 10px 0 10px;
|
||||
}
|
||||
|
||||
.content-block {
|
||||
grid-area: content;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: 'PT Serif', serif;
|
||||
font-size: var(--header-size);
|
||||
@ -57,12 +29,135 @@ section {
|
||||
font-size: 16pt;
|
||||
}
|
||||
|
||||
/* app main grid container */
|
||||
.app-container {
|
||||
margin: auto;
|
||||
display: grid;
|
||||
grid-column-gap: 20px;
|
||||
grid-row-gap: 0;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
section.home {
|
||||
padding-left: 20px;
|
||||
border-left: 1px solid #003b70;
|
||||
grid-area: content;
|
||||
display: grid;
|
||||
grid-column-gap: 20px;
|
||||
grid-row-gap: 20px;
|
||||
}
|
||||
|
||||
section.article {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
border-left: 1px solid #003b70;
|
||||
grid-area: content;
|
||||
display: grid;
|
||||
grid-column-gap: 20px;
|
||||
grid-row-gap: 20px;
|
||||
}
|
||||
|
||||
/* mobile */
|
||||
@media only screen and (max-width: 779px) {
|
||||
.app-container {
|
||||
grid-template-columns: auto;
|
||||
grid-template-rows: 170px auto auto auto 70px;
|
||||
grid-template-areas: "header" "nav" "content" "sidebar" "footer";
|
||||
grid-template-rows: 170px 150px auto 70px;
|
||||
grid-template-areas:
|
||||
"header"
|
||||
"nav"
|
||||
"content"
|
||||
"footer";
|
||||
}
|
||||
|
||||
section.home {
|
||||
grid-template-columns: auto auto;
|
||||
grid-template-rows: 370px 175px auto 175px;
|
||||
grid-template-areas:
|
||||
"bigimg bigimg"
|
||||
"article article"
|
||||
"smallimg1 smallimg2";
|
||||
}
|
||||
|
||||
section.article {
|
||||
grid-template-columns: auto;
|
||||
grid-template-rows: auto auto;
|
||||
grid-template-areas:
|
||||
"article"
|
||||
"sidebar";
|
||||
}
|
||||
|
||||
section.article > .sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
img.embedded-image {
|
||||
max-width: 30%;
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
section.judge {
|
||||
width: calc(100% - 40px);
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
a.awardee {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
grid-template-columns: 180px auto;
|
||||
}
|
||||
|
||||
section.awardee {
|
||||
grid-template-columns: 180px auto;
|
||||
}
|
||||
|
||||
a.awardee {
|
||||
width: auto;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
header,
|
||||
footer,
|
||||
nav {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
section.profile {
|
||||
grid-template-columns: auto;
|
||||
grid-template-rows: auto auto;
|
||||
grid-template-areas:
|
||||
"profile"
|
||||
"sidebar";
|
||||
}
|
||||
|
||||
section.awardee {
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
nav > ul {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
nav > ul > li {
|
||||
display: inline-block;
|
||||
width: 30%
|
||||
}
|
||||
|
||||
nav ul.menu_level_1 {
|
||||
left: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
nav ul.menu_level_1 > li {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
max-width: 20%;
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,38 +165,271 @@ section {
|
||||
@media only screen and (min-width: 780px) and (max-width: 1179px) {
|
||||
.app-container {
|
||||
grid-template-columns: auto 180px 580px auto;
|
||||
grid-template-rows: 170px auto auto 70px;
|
||||
grid-template-rows: 170px auto 70px;
|
||||
grid-template-areas:
|
||||
". header header ."
|
||||
". nav content ."
|
||||
". nav sidebar ."
|
||||
"footer footer footer footer";
|
||||
}
|
||||
|
||||
section.home {
|
||||
grid-template-columns: 280px 280px;
|
||||
grid-template-rows: 370px 175px auto;
|
||||
grid-template-areas:
|
||||
"bigimg bigimg"
|
||||
"smallimg1 smallimg2"
|
||||
"article article";
|
||||
}
|
||||
|
||||
section.article {
|
||||
grid-template-columns: 580px 380px;
|
||||
grid-template-rows: auto;
|
||||
grid-template-areas:
|
||||
"article"
|
||||
"sidebar";
|
||||
}
|
||||
|
||||
section.article > .sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
margin: auto;
|
||||
width: 780px;
|
||||
}
|
||||
|
||||
img.embedded-image {
|
||||
max-width: 580px;
|
||||
}
|
||||
|
||||
section.judge {
|
||||
width: 440px;
|
||||
margin-right: 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
a.awardee {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
margin-left: 20px;
|
||||
grid-template-columns: 180px 270px;
|
||||
}
|
||||
|
||||
section.awardee {
|
||||
grid-template-columns: 180px 380px;
|
||||
}
|
||||
|
||||
a.awardee {
|
||||
width: 470px;
|
||||
}
|
||||
|
||||
section.profile {
|
||||
grid-template-columns: 580px;
|
||||
grid-template-rows: auto auto;
|
||||
grid-template-areas:
|
||||
"profile"
|
||||
"sidebar";
|
||||
}
|
||||
|
||||
nav ul.menu_level_1 > li {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* monitor */
|
||||
@media only screen and (min-width: 1180px) {
|
||||
.app-container {
|
||||
grid-template-columns: auto 180px 580px 380px auto;
|
||||
grid-template-columns: auto 180px 980px auto;
|
||||
grid-template-rows: 170px auto 70px;
|
||||
grid-template-areas:
|
||||
". header header header ."
|
||||
". nav content sidebar ."
|
||||
"footer footer footer footer footer";
|
||||
". header header ."
|
||||
". nav content ."
|
||||
"footer footer footer footer";
|
||||
}
|
||||
|
||||
section.home {
|
||||
grid-template-columns: 560px 280px;
|
||||
grid-template-rows: 175px 175px auto;
|
||||
grid-template-areas:
|
||||
"bigimg smallimg1"
|
||||
"bigimg smallimg2"
|
||||
"article article";
|
||||
}
|
||||
|
||||
section.article {
|
||||
grid-template-columns: 580px 380px;
|
||||
grid-template-rows: auto;
|
||||
grid-template-areas:
|
||||
"article sidebar";
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
margin: auto;
|
||||
width: 1180px;
|
||||
}
|
||||
|
||||
img.embedded-image {
|
||||
display: none;
|
||||
}
|
||||
|
||||
section.judge {
|
||||
width: 440px;
|
||||
margin-right: 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
a.awardee {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
grid-template-columns: 180px 270px;
|
||||
}
|
||||
|
||||
section.awardee {
|
||||
grid-template-columns: 180px 380px;
|
||||
}
|
||||
|
||||
a.awardee {
|
||||
width: 470px;
|
||||
}
|
||||
|
||||
section.profile {
|
||||
grid-template-columns: 580px 380px;
|
||||
grid-template-rows: auto;
|
||||
grid-template-areas:
|
||||
"profile sidebar"
|
||||
}
|
||||
|
||||
section.profile > aside.sidebar > img {
|
||||
margin-top: 340px;
|
||||
}
|
||||
|
||||
nav ul.menu_level_1 > li {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
header.main-header {
|
||||
/* home page */
|
||||
section.home > img.bimg {
|
||||
grid-area: bigimg;
|
||||
}
|
||||
|
||||
section.home > img.simg1 {
|
||||
grid-area: smallimg1;
|
||||
}
|
||||
|
||||
section.home > img.simg2 {
|
||||
grid-area: smallimg2;
|
||||
}
|
||||
|
||||
section.home > article {
|
||||
grid-area: article;
|
||||
}
|
||||
|
||||
/* the prize (article) */
|
||||
section.article > article {
|
||||
grid-area: article;
|
||||
}
|
||||
|
||||
section.article > .sidebar {
|
||||
grid-area: sidebar;
|
||||
}
|
||||
|
||||
section.article > .sidebar > img {
|
||||
max-width: 380px;
|
||||
}
|
||||
|
||||
/* judges */
|
||||
section.judges {
|
||||
grid-area: content;
|
||||
}
|
||||
|
||||
section.judge > img.profile {
|
||||
float: left;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 40px;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
section.judge > .title {
|
||||
font-size: 18pt;
|
||||
}
|
||||
|
||||
section.judge > .description {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
/* awardees */
|
||||
section.awardees {
|
||||
grid-area: content;
|
||||
}
|
||||
|
||||
section.awardees > .awardee > img.profile,
|
||||
section.profile> .awardee > img.profile {
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
border-radius: 90px;
|
||||
}
|
||||
|
||||
/* awardee (profile) */
|
||||
section.profile {
|
||||
grid-area: content;
|
||||
display: grid;
|
||||
grid-column-gap: 20px;
|
||||
grid-row-gap: 20px;
|
||||
}
|
||||
|
||||
section.profile > article {
|
||||
border-left: 1px solid #003b70;
|
||||
padding: 0 10px 0 10px;
|
||||
}
|
||||
|
||||
section.profile > aside.sidebar > img {
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
section.profile > aside.sidebar > .image-label {
|
||||
margin: 20px;
|
||||
font-size: 20pt;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.awardee,
|
||||
section.awardee {
|
||||
display: grid;
|
||||
grid-column-gap: 20px;
|
||||
grid-template-rows: 80px 100px auto;
|
||||
grid-template-areas:
|
||||
"image year"
|
||||
"image name"
|
||||
"content content";
|
||||
}
|
||||
|
||||
.awardee .year {
|
||||
grid-area: year;
|
||||
font-size: 32pt;
|
||||
align-self: end;
|
||||
}
|
||||
|
||||
.awardee .name {
|
||||
grid-area: name;
|
||||
font-size: 34pt;
|
||||
line-height: 32pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.awardee > .description {
|
||||
grid-area: content;
|
||||
}
|
||||
|
||||
/* common parts */
|
||||
|
||||
header.main {
|
||||
grid-area: header;
|
||||
}
|
||||
|
||||
@ -115,28 +443,27 @@ header .description {
|
||||
letter-spacing: 1.75pt;
|
||||
}
|
||||
|
||||
header .logo {
|
||||
|
||||
}
|
||||
|
||||
nav.main-nav {
|
||||
nav.main {
|
||||
grid-area: nav;
|
||||
}
|
||||
|
||||
section.profile-title {
|
||||
grid-area: title;
|
||||
}
|
||||
|
||||
article.profile {
|
||||
grid-area: main;
|
||||
}
|
||||
|
||||
aside.profile-image {
|
||||
grid-area: sidebar;
|
||||
}
|
||||
|
||||
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 {
|
||||
@ -182,7 +509,6 @@ nav ul.menu_level_1 {
|
||||
nav ul.menu_level_1 > li {
|
||||
font-size: 14pt;
|
||||
line-height: 18pt;
|
||||
display: block;
|
||||
padding-left: 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@ -34,11 +34,22 @@ class ConfigProvider
|
||||
return [
|
||||
'invokables' => [
|
||||
Handler\PingHandler::class => Handler\PingHandler::class,
|
||||
|
||||
Service\JudgeManager::class => Service\JudgeManager::class,
|
||||
],
|
||||
'factories' => [
|
||||
Handler\HomePageHandler::class => Handler\HomePageHandlerFactory::class,
|
||||
Handler\ArticleHandler::class => Handler\ArticleHandlerFactory::class,
|
||||
Handler\AwardeeHandler::class => Handler\AwardeeHandlerFactory::class,
|
||||
Handler\JudgesHandler::class => Handler\JudgesHandlerFactory::class,
|
||||
Handler\ProfileHandler::class => Handler\ProfileHandlerFactory::class,
|
||||
|
||||
Handler\AwardeeRedirectHandler::class => Handler\AwardeeRedirectHandlerFactory::class,
|
||||
Handler\PrizeRedirectHandler::class => Handler\PrizeRedirectHandlerFactory::class,
|
||||
|
||||
Plates\StringExtension::class => Plates\StringExtensionFactory::class,
|
||||
Plates\NavigationExtension::class => Plates\NavigationExtensionFactory::class,
|
||||
Service\AwardeeManager::class => Service\AwardeeManagerFactory::class,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
177
src/App/Entity/Awardee.php
Normal file
@ -0,0 +1,177 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
use JsonSerializable;
|
||||
|
||||
/**
|
||||
* @ORM\Table(name="awardees")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class Awardee
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
* @var int
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="year", type="integer")
|
||||
* @var int
|
||||
*/
|
||||
private $year;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="name", type="string", length=200, nullable=false)
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="description", type="text", nullable=false)
|
||||
* @var string
|
||||
*/
|
||||
private $text;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="image_label", type="string", length=255, unique=true)
|
||||
* @var string
|
||||
*/
|
||||
private $imageLabel;
|
||||
|
||||
/**
|
||||
* @Gedmo\Slug(fields={"year", "name"})
|
||||
* @ORM\Column(length=128, unique=true)
|
||||
* @var string
|
||||
*/
|
||||
private $slug;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return Awardee
|
||||
*/
|
||||
public function setId(int $id): Awardee
|
||||
{
|
||||
$this->id = $id;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getYear(): int
|
||||
{
|
||||
return $this->year;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $year
|
||||
* @return Awardee
|
||||
*/
|
||||
public function setYear(int $year): Awardee
|
||||
{
|
||||
$this->year = $year;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return Awardee
|
||||
*/
|
||||
public function setName(string $name): Awardee
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getText(): string
|
||||
{
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $text
|
||||
* @return Awardee
|
||||
*/
|
||||
public function setText(string $text): Awardee
|
||||
{
|
||||
$this->text = $text;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getImageLabel(): string
|
||||
{
|
||||
return $this->imageLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $imageLabel
|
||||
* @return Awardee
|
||||
*/
|
||||
public function setImageLabel(string $imageLabel): Awardee
|
||||
{
|
||||
$this->imageLabel = $imageLabel;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSlug(): string
|
||||
{
|
||||
return $this->slug;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $slug
|
||||
* @return Awardee
|
||||
*/
|
||||
public function setSlug(string $slug): Awardee
|
||||
{
|
||||
$this->slug = $slug;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
'year' => $this->getYear(),
|
||||
'name' => $this->getYear(),
|
||||
'text' => $this->getText(),
|
||||
'imageLabel' => $this->getImageLabel(),
|
||||
'slug' => $this->getSlug(),
|
||||
];
|
||||
}
|
||||
}
|
||||
27
src/App/Handler/ArticleHandler.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Diactoros\Response\HtmlResponse;
|
||||
use Zend\Expressive\Template\TemplateRendererInterface;
|
||||
|
||||
class ArticleHandler implements RequestHandlerInterface
|
||||
{
|
||||
/** @var TemplateRendererInterface */
|
||||
private $template;
|
||||
|
||||
public function __construct(TemplateRendererInterface $template) {
|
||||
$this->template = $template;
|
||||
}
|
||||
|
||||
public function handle(ServerRequestInterface $request) : ResponseInterface
|
||||
{
|
||||
$articleTemplate = $request->getAttribute('article');
|
||||
return new HtmlResponse($this->template->render("app::{$articleTemplate}"));
|
||||
}
|
||||
}
|
||||
19
src/App/Handler/ArticleHandlerFactory.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Expressive\Router\RouterInterface;
|
||||
use Zend\Expressive\Template\TemplateRendererInterface;
|
||||
|
||||
class ArticleHandlerFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container) : RequestHandlerInterface
|
||||
{
|
||||
$template = $container->get(TemplateRendererInterface::class);
|
||||
return new ArticleHandler($template);
|
||||
}
|
||||
}
|
||||
39
src/App/Handler/AwardeeHandler.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use App\Service\AwardeeManager;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Diactoros\Response\HtmlResponse;
|
||||
use Zend\Expressive\Template\TemplateRendererInterface;
|
||||
|
||||
class AwardeeHandler implements RequestHandlerInterface
|
||||
{
|
||||
/** @var TemplateRendererInterface */
|
||||
private $template;
|
||||
|
||||
/** @var AwardeeManager */
|
||||
private $awardeeManager;
|
||||
|
||||
public function __construct(
|
||||
TemplateRendererInterface $template,
|
||||
AwardeeManager $awardeeManager
|
||||
) {
|
||||
$this->template = $template;
|
||||
$this->awardeeManager = $awardeeManager;
|
||||
}
|
||||
|
||||
public function handle(ServerRequestInterface $request) : ResponseInterface
|
||||
{
|
||||
$year = $request->getAttribute('year');
|
||||
$awardees = $this->awardeeManager->getJudgesByYear((int)$year);
|
||||
return new HtmlResponse($this->template->render("app::awardees", [
|
||||
'year' => $year,
|
||||
'awardees' => $awardees,
|
||||
]));
|
||||
}
|
||||
}
|
||||
20
src/App/Handler/AwardeeHandlerFactory.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use App\Service\AwardeeManager;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Expressive\Template\TemplateRendererInterface;
|
||||
|
||||
class AwardeeHandlerFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container): RequestHandlerInterface
|
||||
{
|
||||
$template = $container->get(TemplateRendererInterface::class);
|
||||
$awardeeManager = $container->get(AwardeeManager::class);
|
||||
return new AwardeeHandler($template, $awardeeManager);
|
||||
}
|
||||
}
|
||||
49
src/App/Handler/AwardeeRedirectHandler.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use App\Entity\Awardee;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Diactoros\Response\RedirectResponse;
|
||||
use Zend\Expressive\Helper\UrlHelper;
|
||||
|
||||
class AwardeeRedirectHandler implements RequestHandlerInterface
|
||||
{
|
||||
/** @var UrlHelper */
|
||||
private $urlHelper;
|
||||
|
||||
/** @var EntityManager */
|
||||
private $entityManager;
|
||||
|
||||
public function __construct(
|
||||
UrlHelper $urlHelper,
|
||||
EntityManager $entityManager
|
||||
) {
|
||||
$this->urlHelper = $urlHelper;
|
||||
$this->entityManager = $entityManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ServerRequestInterface $request
|
||||
* @return ResponseInterface
|
||||
* @throws \Doctrine\ORM\NonUniqueResultException
|
||||
*/
|
||||
public function handle(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
$qb = $this->entityManager->createQueryBuilder();
|
||||
$maxYear = $qb->select('max(a.year)')
|
||||
->from(Awardee::class, 'a')
|
||||
->getQuery()
|
||||
->getSingleScalarResult();
|
||||
|
||||
$url = $this->urlHelper->generate('awardees-by-year', [
|
||||
'year' => $maxYear,
|
||||
]);
|
||||
return new RedirectResponse($url);
|
||||
}
|
||||
}
|
||||
20
src/App/Handler/AwardeeRedirectHandlerFactory.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Expressive\Helper\UrlHelper;
|
||||
|
||||
class AwardeeRedirectHandlerFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container) : RequestHandlerInterface
|
||||
{
|
||||
$urlHelper = $container->get(UrlHelper::class);
|
||||
$entityManager = $container->get(EntityManager::class);
|
||||
return new AwardeeRedirectHandler($urlHelper, $entityManager);
|
||||
}
|
||||
}
|
||||
35
src/App/Handler/JudgesHandler.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use App\Service\JudgeManager;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Diactoros\Response\HtmlResponse;
|
||||
use Zend\Expressive\Template\TemplateRendererInterface;
|
||||
|
||||
class JudgesHandler implements RequestHandlerInterface
|
||||
{
|
||||
/** @var TemplateRendererInterface */
|
||||
private $template;
|
||||
|
||||
/** @var JudgeManager */
|
||||
private $judgeManager;
|
||||
|
||||
public function __construct(
|
||||
TemplateRendererInterface $template,
|
||||
JudgeManager $judgeManager
|
||||
) {
|
||||
$this->template = $template;
|
||||
$this->judgeManager = $judgeManager;
|
||||
}
|
||||
|
||||
public function handle(ServerRequestInterface $request) : ResponseInterface
|
||||
{
|
||||
$data['judges'] = $this->judgeManager->getJudges();
|
||||
return new HtmlResponse($this->template->render("app::judges", $data));
|
||||
}
|
||||
}
|
||||
20
src/App/Handler/JudgesHandlerFactory.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use App\Service\JudgeManager;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Expressive\Template\TemplateRendererInterface;
|
||||
|
||||
class JudgesHandlerFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container) : RequestHandlerInterface
|
||||
{
|
||||
$template = $container->get(TemplateRendererInterface::class);
|
||||
$judgeManager = $container->get(JudgeManager::class);
|
||||
return new JudgesHandler($template, $judgeManager);
|
||||
}
|
||||
}
|
||||
30
src/App/Handler/PrizeRedirectHandler.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Diactoros\Response\RedirectResponse;
|
||||
use Zend\Expressive\Helper\UrlHelper;
|
||||
|
||||
class PrizeRedirectHandler implements RequestHandlerInterface
|
||||
{
|
||||
/** @var UrlHelper */
|
||||
private $urlHelper;
|
||||
|
||||
public function __construct(UrlHelper $urlHelper)
|
||||
{
|
||||
$this->urlHelper = $urlHelper;
|
||||
}
|
||||
|
||||
public function handle(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
$url = $this->urlHelper->generate('the-prize.article', [
|
||||
'article' => 'background-and-purpose',
|
||||
]);
|
||||
return new RedirectResponse($url);
|
||||
}
|
||||
}
|
||||
18
src/App/Handler/PrizeRedirectHandlerFactory.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Expressive\Helper\UrlHelper;
|
||||
|
||||
class PrizeRedirectHandlerFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container) : RequestHandlerInterface
|
||||
{
|
||||
$urlHelper = $container->get(UrlHelper::class);
|
||||
return new PrizeRedirectHandler($urlHelper);
|
||||
}
|
||||
}
|
||||
41
src/App/Handler/ProfileHandler.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use App\Entity\Awardee;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Diactoros\Response\HtmlResponse;
|
||||
use Zend\Expressive\Template\TemplateRendererInterface;
|
||||
|
||||
class ProfileHandler implements RequestHandlerInterface
|
||||
{
|
||||
/** @var TemplateRendererInterface */
|
||||
private $template;
|
||||
|
||||
/** @var EntityManager */
|
||||
private $entityManager;
|
||||
|
||||
public function __construct(
|
||||
TemplateRendererInterface $template,
|
||||
EntityManager $entityManager
|
||||
) {
|
||||
$this->template = $template;
|
||||
$this->entityManager = $entityManager;
|
||||
}
|
||||
|
||||
public function handle(ServerRequestInterface $request) : ResponseInterface
|
||||
{
|
||||
$slug = $request->getAttribute('slug');
|
||||
$awardee = $this->entityManager->getRepository(Awardee::class)->findOneBy([
|
||||
'slug' => $slug,
|
||||
]);
|
||||
return new HtmlResponse($this->template->render("app::profile", [
|
||||
'awardee' => $awardee,
|
||||
]));
|
||||
}
|
||||
}
|
||||
20
src/App/Handler/ProfileHandlerFactory.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Handler;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Zend\Expressive\Template\TemplateRendererInterface;
|
||||
|
||||
class ProfileHandlerFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container) : RequestHandlerInterface
|
||||
{
|
||||
$template = $container->get(TemplateRendererInterface::class);
|
||||
$entityManager = $container->get(EntityManager::class);
|
||||
return new ProfileHandler($template, $entityManager);
|
||||
}
|
||||
}
|
||||
@ -4,10 +4,11 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Plates;
|
||||
|
||||
use App\Entity\Awardee;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Knp\Menu\ItemInterface;
|
||||
use Knp\Menu\Matcher\Matcher;
|
||||
use Knp\Menu\Matcher\Voter\UriVoter;
|
||||
use Knp\Menu\Matcher\Voter\VoterInterface;
|
||||
use Knp\Menu\MenuFactory;
|
||||
use Knp\Menu\MenuItem;
|
||||
use Knp\Menu\Renderer\ListRenderer;
|
||||
@ -20,12 +21,19 @@ class NavigationExtension implements ExtensionInterface
|
||||
/** @var RouterInterface */
|
||||
private $router;
|
||||
|
||||
/** @var EntityManager */
|
||||
private $entityManager;
|
||||
|
||||
/** @var MenuItem */
|
||||
private $menu;
|
||||
|
||||
public function __construct(RouterInterface $router)
|
||||
public function __construct(
|
||||
RouterInterface $router,
|
||||
EntityManager $entityManager
|
||||
)
|
||||
{
|
||||
$this->router = $router;
|
||||
$this->entityManager = $entityManager;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,16 +70,16 @@ class NavigationExtension implements ExtensionInterface
|
||||
'uri' => $this->getUriFromRouter('the-prize')
|
||||
]);
|
||||
$prizeMenu->addChild("Background and Purpose", [
|
||||
'uri' => $this->getUriFromRouter('the-prize.bg')
|
||||
'uri' => $this->getUriFromRouter('the-prize.article', ['article' => 'background-and-purpose'])
|
||||
]);
|
||||
$prizeMenu->addChild("Description and Values", [
|
||||
'uri' => $this->getUriFromRouter('the-prize.desc')
|
||||
'uri' => $this->getUriFromRouter('the-prize.article', ['article' => 'description-and-values'])
|
||||
]);
|
||||
$prizeMenu->addChild("Aspect for Selection", [
|
||||
'uri' => $this->getUriFromRouter('the-prize.aspect')
|
||||
'uri' => $this->getUriFromRouter('the-prize.article', ['article' => 'aspect-for-selection'])
|
||||
]);
|
||||
$prizeMenu->addChild("Gran Prize Award and Events", [
|
||||
'uri' => $this->getUriFromRouter('the-prize.events')
|
||||
'uri' => $this->getUriFromRouter('the-prize.article', ['article' => 'gran-prize-award-events'])
|
||||
]);
|
||||
|
||||
$this->menu->addChild(strtoupper("Judges"), [
|
||||
@ -91,11 +99,20 @@ class NavigationExtension implements ExtensionInterface
|
||||
|
||||
private function populateAwardeesSubmenu(ItemInterface $awardeesMenu)
|
||||
{
|
||||
$year = (int)date("Y");
|
||||
$qb = $this->entityManager->createQueryBuilder();
|
||||
$result = $qb->select('a.year')
|
||||
->from(Awardee::class, 'a')
|
||||
->orderBy('a.year', 'DESC')
|
||||
->getQuery()
|
||||
->getScalarResult();
|
||||
|
||||
for ($i = $year; $i > 2012; $i--) {
|
||||
$awardeesMenu->addChild($i, [
|
||||
'uri' => $this->getUriFromRouter('awardees-by-year', ['year' => $i])
|
||||
$years = array_unique(array_map(function ($item) {
|
||||
return $item['year'];
|
||||
}, $result));
|
||||
|
||||
foreach ($years as $year) {
|
||||
$awardeesMenu->addChild($year, [
|
||||
'uri' => $this->getUriFromRouter('awardees-by-year', ['year' => $year])
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Plates;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Zend\Expressive\Plates\Exception\MissingHelperException;
|
||||
use Zend\Expressive\Router\RouterInterface;
|
||||
@ -21,6 +22,7 @@ class NavigationExtensionFactory
|
||||
}
|
||||
|
||||
$router = $container->get(RouterInterface::class);
|
||||
return new NavigationExtension($router);
|
||||
$entityManager = $container->get(EntityManager::class);
|
||||
return new NavigationExtension($router, $entityManager);
|
||||
}
|
||||
}
|
||||
|
||||
51
src/App/Plates/StringExtension.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Plates;
|
||||
|
||||
use League\CommonMark\CommonMarkConverter;
|
||||
use League\Plates\Engine;
|
||||
use League\Plates\Extension\ExtensionInterface;
|
||||
|
||||
class StringExtension implements ExtensionInterface
|
||||
{
|
||||
/** @var CommonMarkConverter */
|
||||
private $converter;
|
||||
|
||||
public function __construct(CommonMarkConverter $converter)
|
||||
{
|
||||
$this->converter = $converter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register functions with the Plates engine.
|
||||
*
|
||||
* Registers:
|
||||
*
|
||||
* - mdtohtml(string $markdown) : string
|
||||
* - excerpt(string $text, int $length) : string
|
||||
*
|
||||
* @param Engine $engine
|
||||
*/
|
||||
public function register(Engine $engine): void
|
||||
{
|
||||
$engine->registerFunction('mdtohtml', [$this, 'markdownToHtml']);
|
||||
$engine->registerFunction('excerpt', [$this, 'excerpt']);
|
||||
}
|
||||
|
||||
public function markdownToHtml(string $markdown): string
|
||||
{
|
||||
return $this->converter->convertToHtml($markdown);
|
||||
}
|
||||
|
||||
|
||||
public function excerpt(string $text, int $length = 190): string
|
||||
{
|
||||
$length = abs((int)$length);
|
||||
if (strlen($text) > $length) {
|
||||
$text = preg_replace("/^(.{1,$length})(\s.*|$)/s", '\\1...', $text);
|
||||
}
|
||||
return($text);
|
||||
}
|
||||
}
|
||||
17
src/App/Plates/StringExtensionFactory.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Plates;
|
||||
|
||||
use League\CommonMark\CommonMarkConverter;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
class StringExtensionFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container) : StringExtension
|
||||
{
|
||||
$converter = new CommonMarkConverter();
|
||||
return new StringExtension($converter);
|
||||
}
|
||||
}
|
||||
43
src/App/Service/AwardeeManager.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use App\Entity\Awardee;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
|
||||
class AwardeeManager
|
||||
{
|
||||
/** @var EntityManager */
|
||||
private $entityManager;
|
||||
|
||||
public function __construct(EntityManager $entityManager)
|
||||
{
|
||||
$this->entityManager = $entityManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $year
|
||||
* @return Awardee[]
|
||||
*/
|
||||
public function getJudgesByYear(int $year): ?array
|
||||
{
|
||||
return $this->entityManager->getRepository(Awardee::class)->findBy([
|
||||
'year' => $year,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $slug
|
||||
* @return Awardee|null
|
||||
*/
|
||||
public function getJudgeFromSlug(string $slug): ?Awardee
|
||||
{
|
||||
/** @var Awardee $awardee */
|
||||
$awardee = $this->entityManager->getRepository(Awardee::class)->findOneBy([
|
||||
'slug' => $slug,
|
||||
]);
|
||||
return $awardee;
|
||||
}
|
||||
}
|
||||
17
src/App/Service/AwardeeManagerFactory.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
class AwardeeManagerFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container) : AwardeeManager
|
||||
{
|
||||
$entityManager = $container->get(EntityManager::class);
|
||||
return new AwardeeManager($entityManager);
|
||||
}
|
||||
}
|
||||
121
src/App/Service/JudgeManager.php
Normal file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
class JudgeManager
|
||||
{
|
||||
public function getJudges()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'image' => 'agnes_soos',
|
||||
'name' => 'Dr Ágnes Soós',
|
||||
'desc' => 'National Institute for Sports Medicine, Director General',
|
||||
], [
|
||||
'image' => 'balazs_nagy_lantos',
|
||||
'name' => 'Balázs Nagy Lantos',
|
||||
'desc' => 'Mensa HungarIQa,Former President',
|
||||
], [
|
||||
'image' => 'bertalan_mesko',
|
||||
'name' => 'Dr Bertalan Meskó',
|
||||
'desc' => 'Winner of GRAN PRIZE 2013, medical futurist, founder of Webicina',
|
||||
], [
|
||||
'image' => 'edit_nemeth',
|
||||
'name' => 'Dr Edit Németh',
|
||||
'desc' => 'ELTE Institute of Business Economics, Management and Business Law Faculty',
|
||||
], [
|
||||
'image' => 'erno_keszei',
|
||||
'name' => 'Prof. Ernő Keszei',
|
||||
'desc' => 'Eötvös Loránd University, Former Vice-Rector for Science, Research, and Innovation',
|
||||
], [
|
||||
'image' => 'gabor_kopek',
|
||||
'name' => 'Gábor Kopek',
|
||||
'desc' => 'Moholy-Nagy University of Art and Design Budapest, Former Rector',
|
||||
], [
|
||||
'image' => 'gabor_nemeth',
|
||||
'name' => 'Dr Gábor Németh',
|
||||
'desc' => 'Hungarian Intellectual Property Office, Director',
|
||||
], [
|
||||
'image' => 'gabor_szabo',
|
||||
'name' => 'Dr Gábor Szabó',
|
||||
'desc' => 'University of Szeged, Rector; Hungarian Association for Innovation, President',
|
||||
], [
|
||||
'image' => 'gyorgy_nagy',
|
||||
'name' => 'György Nagy',
|
||||
'desc' => 'Sigma Technology, Managing Director; Swedish Chamber of Commerce in Hungary, Vice-President',
|
||||
], [
|
||||
'image' => 'gyula_patko',
|
||||
'name' => 'Dr Gyula Patkó',
|
||||
'desc' => 'University of Miskolc, Former Rector',
|
||||
], [
|
||||
'image' => 'ildiko_csejtei',
|
||||
'name' => 'Ildikó B. Csejtei',
|
||||
'desc' => 'Independent Media Group, Owner, Director',
|
||||
], [
|
||||
'image' => 'istvan_salgo',
|
||||
'name' => 'István Salgó',
|
||||
'desc' => 'Business Council for Sustainable Development in Hungary, Honorary President',
|
||||
], [
|
||||
'image' => 'janos_durr',
|
||||
'name' => 'János Dürr',
|
||||
'desc' => 'Club of Hungarian Science Journalists, President',
|
||||
], [
|
||||
'image' => 'janos_takacs',
|
||||
'name' => 'János Takács',
|
||||
'desc' => 'Swedish Chamber of Commerce, President',
|
||||
], [
|
||||
'image' => 'jozsef_fulop',
|
||||
'name' => 'József Fülöp',
|
||||
'desc' => 'Moholy-Nagy University of Art and Design Budapest, Rector',
|
||||
], [
|
||||
'image' => 'jozsef_peter_martin',
|
||||
'name' => 'Dr József Péter Martin',
|
||||
'desc' => 'Transparency International Hungary, Managing Director',
|
||||
], [
|
||||
'image' => 'maria_judit_molnar',
|
||||
'name' => 'Dr Mária Judit Molnár',
|
||||
'desc' => 'SOTE Institute of Genomic Medicine and Rare Disorders, Head of the Institute',
|
||||
], [
|
||||
'image' => 'melinda_kamasz',
|
||||
'name' => 'Melinda Kamasz',
|
||||
'desc' => 'Figyelő, Deputy Editor in Chief, Figyelő Trend, Editor in Chief',
|
||||
], [
|
||||
'image' => 'miklos_antalovits',
|
||||
'name' => 'Dr Miklós Antalovits',
|
||||
'desc' => 'Budapest University of Technology and Economics, Professor Emeritus',
|
||||
], [
|
||||
'image' => 'miklos_bendzsel',
|
||||
'name' => 'Dr Miklós Bendzsel',
|
||||
'desc' => 'Hungarian Academy of Engineers, Vice-President; Hungarian Intellectual Property Office, Former President',
|
||||
], [
|
||||
'image' => 'peter_szauer',
|
||||
'name' => 'Péter Szauer',
|
||||
'desc' => 'HVG, President and Chief Executive Officer',
|
||||
], [
|
||||
'image' => 'richard_bogdan',
|
||||
'name' => 'Richárd Bogdán',
|
||||
'desc' => 'Mensa HungarIQa, President',
|
||||
], [
|
||||
'image' => 'rita_istivan',
|
||||
'name' => 'Rita Istiván',
|
||||
'desc' => 'BME, Honorary Associate Professor; Swedish Chamber of Commerce, Secretary General',
|
||||
], [
|
||||
'image' => 'roland_jakab',
|
||||
'name' => 'Roland Jakab',
|
||||
'desc' => 'Ericsson Hungary, Managing Director; Swedish Chamber of Commerce, Member of the Board',
|
||||
], [
|
||||
'image' => 'szabolcs_farkas',
|
||||
'name' => 'Dr Szabolcs Farkas',
|
||||
'desc' => 'Hungarian Intellectual Property Office, Vice-President',
|
||||
], [
|
||||
'image' => 'zoltan_bruckner',
|
||||
'name' => 'Zoltán Bruckner',
|
||||
'desc' => 'Primus Capital Management, Investment Director, Managing Partner',
|
||||
// ], [
|
||||
// 'image' => '',
|
||||
// 'name' => 'Dr Viktor Łuszcz',
|
||||
// 'desc' => 'Hungarian Intellectual Property Office, President',
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
19
templates/app/aspect-for-selection.phtml
Normal file
@ -0,0 +1,19 @@
|
||||
<?php $this->layout('layout::default', ['title' => 'Aspect for Selection']) ?>
|
||||
<section class="article">
|
||||
<article>
|
||||
<p>During the selection, the Board of Judges takes into consideration the following aspects:</p>
|
||||
<img class="embedded-image" src="<?= $this->serverurl('/img/aspects_for_selection.png') ?>">
|
||||
<ul>
|
||||
<li>Novelty (innovation, original idea)</li>
|
||||
<li>Social responsibility</li>
|
||||
<li>Sustainable thinking</li>
|
||||
<li>Environmental care</li>
|
||||
<li>Economic potential</li>
|
||||
<li>Technological aspect</li>
|
||||
<li>Interdisciplinary approach</li>
|
||||
</ul>
|
||||
</article>
|
||||
<section class="sidebar">
|
||||
<img src="<?= $this->serverurl('/img/aspects_for_selection.png') ?>">
|
||||
</section>
|
||||
</section>
|
||||
11
templates/app/awardees.phtml
Normal file
@ -0,0 +1,11 @@
|
||||
<?php $this->layout('layout::default', ['title' => sprintf("%s's %s", $year, count($awardees) > 1 ? 'awardees' : 'awardee')]) ?>
|
||||
<section class="awardees">
|
||||
<?php foreach ($awardees as $awardee): ?>
|
||||
<a class="awardee" href="<?= $this->url('awardee', ['slug' => $awardee->getSlug()]) ?>">
|
||||
<img class="profile" src="<?= $this->serverurl(sprintf('/img/awardees/%s.jpg', $awardee->getSlug())) ?>">
|
||||
<div class="year"><?= $year ?></div>
|
||||
<div class="name"><?= $awardee->getName() ?></div>
|
||||
<div class="description"><?= $this->batch($awardee->getText(), 'excerpt|mdtohtml') ?></div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</section>
|
||||
13
templates/app/background-and-purpose.phtml
Normal file
@ -0,0 +1,13 @@
|
||||
<?php $this->layout('layout::default', ['title' => 'Background and Purpose']) ?>
|
||||
<section class="article">
|
||||
<article>
|
||||
<p>The Gran Prize was officially established on 12th December, 2012, by the Swedish Chamber of Commerce in Hungary (SCCH) to stimulate innovative thinking aimed at improving the quality of life. The Chamber chose a popular Swedish symbol, the pine tree, as the emblem of the prize. For most of the planet, the pine tree represents Christmas and is also a metaphor for nature.</p>
|
||||
<img class="embedded-image" src="<?= $this->serverurl('/img/background_and_purpose.jpg') ?>">
|
||||
<p>Ancient philosophers discussed happiness and living in harmony with nature, and this aspiration is becoming vital to modern man too. Gran in Swedish means pine tree, pointing to the characteristics of this award focused on sustainable development and environmental protection.</p>
|
||||
<p>The Chamber's aim with this prize is twofold; firstly, to support and award outstanding innovative achievements, and secondly, to facilitate intercultural communication.</p>
|
||||
<p>In the spirit of open, consensus-based thinking, which is such a vital part of Swedish society, and with the aim of furthering Swedish-Hungarian cooperation, the SCCH has opened entry to the Gran Prize for every progressive company and private person in Hungary.</p>
|
||||
</article>
|
||||
<section class="sidebar">
|
||||
<img src="<?= $this->serverurl('/img/background_and_purpose.jpg') ?>">
|
||||
</section>
|
||||
</section>
|
||||
13
templates/app/description-and-values.phtml
Normal file
@ -0,0 +1,13 @@
|
||||
<?php $this->layout('layout::default', ['title' => 'Description and Values']) ?>
|
||||
<section class="article">
|
||||
<article>
|
||||
<p>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.</p>
|
||||
<p>The prize can be awarded to private persons, groups, companies, associations, organisations, institutions, students or student teams, as decided by the judging panel of the Gran Prize. The judging panel has the right to invite persons, associations, and companies to submit applications for the competition.</p>
|
||||
<img class="embedded-image" src="<?= $this->serverurl('/img/description_and_value.jpg') ?>">
|
||||
<p>The Gran Prize judging panel consists of leading authorities, scientists, and media representatives. The Board of Directors also decided to ensure the highest quality throughout the process of the Gran Prize initiative, including the choice of professional partners and the judging panel. The members of the judging panel may change from year to year, the permanent members being three directors from the Chamber.</p>
|
||||
<p>As announced publically by the SCCH to the press, the Chamber set aside HUF 5 million from its capital to finance this innovative prize from the annually accrued interest, and will invite other progressive decision makers and private individuals to participate with their sponsorship.</p>
|
||||
</article>
|
||||
<section class="sidebar">
|
||||
<img src="<?= $this->serverurl('/img/description_and_value.jpg') ?>">
|
||||
</section>
|
||||
</section>
|
||||
12
templates/app/gran-prize-award-events.phtml
Normal file
@ -0,0 +1,12 @@
|
||||
<?php $this->layout('layout::default', ['title' => 'Gran Prize Award and Events']) ?>
|
||||
<section class="article">
|
||||
<article>
|
||||
<p>The Gran Prize is a piece of art created by Swedish artist Ann Lundin and Hungarian artist Károly Szász. The sculpture is made of pebble and glass with a pine relief on its top; the amalgam of a timeless survivor with a human touch on innovation. It should be different each year, but always made of pebble and glass with a Gran pine relief.</p>
|
||||
<img class="embedded-image" src="<?= $this->serverurl('/img/gran_prize_award_and_events_prefered.jpg') ?>">
|
||||
<p>As part of the prize, the awardee receives, as a token of appreciation, a Swedish pine tree, CITRUS ATLANTICUS, from the Folly Arboretum founded in 1878, to be planted at the awardee's alma mater.</p>
|
||||
<p>The Award Giving Ceremony Gran Gala is held annually in May. Each year, in the week following the award gala, the so-called GRAN WEEK is held, when the winner of the award presents the winning entry and members of the SCCH hold presentations for university students.</p>
|
||||
</article>
|
||||
<section class="sidebar">
|
||||
<img src="<?= $this->serverurl('/img/gran_prize_award_and_events_prefered.jpg') ?>">
|
||||
</section>
|
||||
</section>
|
||||
@ -1,23 +1,10 @@
|
||||
<?php $this->layout('layout::default', ['title' => 'Home']) ?>
|
||||
<section class="content-container">
|
||||
<section class="profile-title">
|
||||
|
||||
</section>
|
||||
<article class="profile">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed quis ipsum ut turpis mollis commodo et id nisl. Vestibulum sed sem pellentesque, fermentum felis in, sollicitudin mauris. Integer mollis commodo velit, in volutpat nisl sagittis id. Vestibulum porttitor nulla convallis consectetur volutpat. Nam faucibus in felis a aliquet. Ut vitae malesuada ex. Integer eget pulvinar quam, a blandit leo. Nulla a felis sed nulla aliquet molestie. Donec tortor ligula, rhoncus et justo eget, ultrices posuere velit. Morbi finibus purus sed mauris semper tempus. Etiam lobortis magna id orci vestibulum, eu vulputate diam congue. Maecenas consectetur ipsum in mollis porttitor. Nullam vitae eros at massa viverra commodo. Etiam gravida eu turpis ac auctor.</p>
|
||||
|
||||
<p>Cras eget lobortis ex, nec eleifend tellus. Suspendisse potenti. Vivamus auctor diam at fermentum dignissim. Aliquam semper facilisis risus, eu interdum urna ultrices quis. Integer ut cursus lacus. Nunc vel lacus quis erat consequat bibendum ac at mi. Mauris pulvinar commodo semper. Nunc sed accumsan leo. Aliquam rhoncus tellus ut mollis commodo. Aenean euismod nunc vehicula, tincidunt magna at, porta turpis.</p>
|
||||
|
||||
<p>Nullam ut ullamcorper enim, sollicitudin faucibus est. Quisque vestibulum velit nec odio accumsan pharetra. Duis ante sem, bibendum id sodales in, lacinia sed turpis. Sed sagittis diam eu aliquet rutrum. Donec at lobortis lorem. Maecenas non condimentum nunc, sed ullamcorper massa. Aliquam placerat vehicula eros at pharetra. Pellentesque nec convallis eros, vitae scelerisque ligula. Vestibulum cursus, augue id fermentum ultrices, tortor augue eleifend lorem, ut dignissim erat lectus in nisl. Phasellus aliquam nunc nec orci pulvinar tincidunt. Etiam a facilisis turpis, at cursus mauris. Mauris dictum vitae nunc non maximus. Quisque consectetur est justo, nec blandit leo aliquam sit amet. Nullam in ligula mi. Sed sollicitudin velit a eleifend pellentesque.</p>
|
||||
<section class="profile-image">
|
||||
|
||||
</section>
|
||||
<p>Nunc eu massa non est mollis tempus. Duis posuere pharetra hendrerit. Vivamus egestas dictum interdum. Aliquam quam libero, dignissim at augue nec, laoreet efficitur ex. Aenean sollicitudin nibh placerat, mollis nisi eget, accumsan metus. Praesent in erat vel nisl hendrerit blandit vel eget turpis. Morbi fermentum, neque ac pretium vulputate, lectus arcu vehicula elit, ac consequat nibh tortor nec leo. Aliquam consequat hendrerit tempor. Sed eu viverra lacus. Nulla lacinia purus dapibus lobortis sollicitudin. In eget orci ligula. Nullam aliquet feugiat nunc, et facilisis justo. Duis quis est feugiat, tincidunt diam quis, facilisis neque. Duis tincidunt nisi ac rutrum lobortis. Proin nibh lorem, bibendum id nibh id, malesuada hendrerit diam.</p>
|
||||
|
||||
<p>Ut sodales, nunc varius lacinia iaculis, mi purus facilisis orci, sit amet feugiat lorem massa sit amet sapien. Ut vitae mauris nunc. Vivamus turpis quam, sollicitudin id dictum ac, pretium sed diam. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean tempus neque tortor, ac vulputate turpis consequat luctus. Nam auctor leo ut convallis euismod. Mauris fringilla eros a dui mollis, vel varius quam convallis. Phasellus erat dolor, sodales a porttitor sed, vestibulum ac orci. Praesent eu massa accumsan, tincidunt lectus sit amet, volutpat velit. Sed maximus, ante nec luctus tincidunt, tortor sapien sagittis lectus, at gravida arcu neque ac ligula. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ornare nisl eu nunc porta interdum.</p>
|
||||
<?php $this->layout('layout::default', ['title' => 'The Gran Prize']) ?>
|
||||
<section class="home">
|
||||
<img class="bimg" src="<?= $this->serverurl('/img/home_1.png') ?>">
|
||||
<img class="simg1" src="<?= $this->serverurl('/img/home_2.png') ?>">
|
||||
<img class="simg2" src="<?= $this->serverurl('/img/home_3.png') ?>">
|
||||
<article>
|
||||
<h1>The Gran Prize</h1>
|
||||
<p>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.</p>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<aside class="profile-image">
|
||||
|
||||
</aside>
|
||||
10
templates/app/judges.phtml
Normal file
@ -0,0 +1,10 @@
|
||||
<?php $this->layout('layout::default', ['title' => 'Judges']) ?>
|
||||
<section class="judges">
|
||||
<?php foreach ($judges as $judge): ?>
|
||||
<section class="judge">
|
||||
<img class="profile" src="<?= $this->serverurl(sprintf('/img/judges/%s.jpg', $judge['image'])) ?>">
|
||||
<span class="title"><?= $judge['name']?></span><br>
|
||||
<span class="description"><?= $judge['desc']?></span>
|
||||
</section>
|
||||
<?php endforeach; ?>
|
||||
</section>
|
||||
15
templates/app/profile.phtml
Normal file
@ -0,0 +1,15 @@
|
||||
<?php $this->layout('layout::default', ['title' => $awardee->getName()]) ?>
|
||||
<section class="profile">
|
||||
<section class="awardee">
|
||||
<img class="profile" src="<?= $this->serverurl(sprintf('/img/awardees/%s.jpg', $awardee->getSlug())) ?>">
|
||||
<div class="year"><?= $awardee->getYear() ?></div>
|
||||
<div class="name"><?= $awardee->getName() ?></div>
|
||||
<div class="description"><?= $this->mdtohtml($awardee->getText()) ?></div>
|
||||
</section>
|
||||
<aside class="sidebar">
|
||||
<img src="<?= $this->serverurl(sprintf('/img/awardees/%s-atadas.jpg', $awardee->getSlug())) ?>">
|
||||
<div class="image-label">
|
||||
<?= $this->e($awardee->getImageLabel()) ?>
|
||||
</div>
|
||||
</aside>
|
||||
</section>
|
||||
@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<title><?= $this->e($title) ?> - zend-expressive</title>
|
||||
<title><?= $this->e($title) ?> - Swedish Chamber</title>
|
||||
<link rel="shortcut icon" href="https://framework.zend.com/ico/favicon.ico"/>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Serif:700|Raleway:500">
|
||||
<link rel="stylesheet" href="<?= $this->serverurl('/styles/normalize.css') ?>"/>
|
||||
@ -13,21 +13,24 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-container">
|
||||
<header class="main-header">
|
||||
<div class="title">Gran Prize</div>
|
||||
<header class="main">
|
||||
<div class="title">
|
||||
Gran Prize
|
||||
<img class="granprize-logo" src="<?= $this->serverurl('/img/logo/gran_prize_logo.png') ?>">
|
||||
</div>
|
||||
<div class="description">
|
||||
Interdisciplinary<br>
|
||||
Innovative<br>
|
||||
Award
|
||||
</div>
|
||||
</header>
|
||||
<nav class="main-nav"><?=$this->navigation()?></nav>
|
||||
<nav class="main"><?=$this->navigation()?></nav>
|
||||
<?= $this->section('content') ?>
|
||||
<footer class="main-footer">
|
||||
<div class="footer-content">
|
||||
SPONSORED BY:
|
||||
SIGMA
|
||||
ERICSSON
|
||||
<div class="footer-lead">SPONSORED BY:</div>
|
||||
<img class="sigma-logo" src="<?= $this->serverurl('/img/logo/sigma_logo.png') ?>">
|
||||
<img class="ericsson-logo" src="<?= $this->serverurl('/img/logo/ericsson_logo.png') ?>">
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||