+
+
+ {% if basics.email is not empty %}
+ - {{ basics.email }}
+ {% endif %}
+ {% if basics.phone is not empty %}
+ - {{ basics.phone }}
+ {% endif %}
+ {% if basics.location|length > 0 and basics.location is not empty %}
+
+ {% for location in basics.location %}
+ {% if location.address is not empty %}
+ {{ location.address }}
+ {% endif %}
+ {% if location.city is not empty %}
+ {{ location.city }}
+ {% if location.postalCode is not empty %}
+ {{ location.postalCode }}
+ {% endif %}
+ {% if location.countryCode is not empty %}
+ {{ location.countryCode }}
+ {% endif %}
+ {% endif %}
+
+ {% endfor %}
+ {% endif %}
+
+
+
+
{% endblock %}
\ No newline at end of file
diff --git a/composer.json b/composer.json
index feb2f85..457fedb 100644
--- a/composer.json
+++ b/composer.json
@@ -37,7 +37,8 @@
"monolog/monolog": "^1.20",
"symfony/monolog-bridge": "^3.1",
"google/recaptcha": "^1.1",
- "hassankhan/config": "^0.10.0"
+ "hassankhan/config": "^0.10.0",
+ "silex/web-profiler": "^2.0"
},
"require-dev": {
"symfony/debug": "~2.8|^3.0",
@@ -46,7 +47,8 @@
"symfony/serializer": "~2.8|^3.0",
"symfony/var-dumper": "^3.1",
"symfony/console": "^3.1",
- "texthtml/whoops-silex": "^1.0"
+ "texthtml/whoops-silex": "^1.0",
+ "symfony/debug-bundle": "^3.1"
},
"autoload": {
"psr-4": {
diff --git a/composer.lock b/composer.lock
index 888396e..5cd7005 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "bff507b41d23db26ac64f22c144abe58",
- "content-hash": "fca3e43ff787d71afd6f495624a8bf9c",
+ "hash": "bc85e2d6fdda738f03a5e498d59ff477",
+ "content-hash": "d0a7cfefe30599f33ddbe16cd3cce33d",
"packages": [
{
"name": "google/recaptcha",
@@ -661,6 +661,62 @@
],
"time": "2016-06-14 09:27:51"
},
+ {
+ "name": "silex/web-profiler",
+ "version": "v2.0.1",
+ "target-dir": "Silex/Provider",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/silexphp/Silex-WebProfiler.git",
+ "reference": "605ebe9d16eb9597ab42603d1b4bec595ebf677d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/silexphp/Silex-WebProfiler/zipball/605ebe9d16eb9597ab42603d1b4bec595ebf677d",
+ "reference": "605ebe9d16eb9597ab42603d1b4bec595ebf677d",
+ "shasum": ""
+ },
+ "require": {
+ "silex/silex": "^2.0",
+ "symfony/stopwatch": "^2.8|^3.0",
+ "symfony/twig-bridge": "^2.8|^3.0",
+ "symfony/web-profiler-bundle": "^2.8|^3.0"
+ },
+ "conflict": {
+ "symfony/web-profiler-bundle": "3.1.0"
+ },
+ "require-dev": {
+ "symfony/browser-kit": "^2.8|^3.0",
+ "symfony/css-selector": "^2.8|^3.0",
+ "symfony/debug-bundle": "^2.8|^3.0",
+ "symfony/security": "^2.8|^3.0",
+ "symfony/security-bundle": "^2.8|^3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Silex\\Provider\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "A WebProfiler for Silex",
+ "homepage": "http://silex.sensiolabs.org/",
+ "time": "2016-06-15 07:44:40"
+ },
{
"name": "swiftmailer/swiftmailer",
"version": "v5.4.2",
@@ -1703,6 +1759,55 @@
],
"time": "2016-06-29 05:41:56"
},
+ {
+ "name": "symfony/stopwatch",
+ "version": "v3.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/stopwatch.git",
+ "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/bb42806b12c5f89db4ebf64af6741afe6d8457e1",
+ "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Stopwatch\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Stopwatch Component",
+ "homepage": "https://symfony.com",
+ "time": "2016-06-29 05:41:56"
+ },
{
"name": "symfony/swiftmailer-bridge",
"version": "v2.8.8",
@@ -1975,6 +2080,64 @@
"homepage": "https://symfony.com",
"time": "2016-06-29 05:41:56"
},
+ {
+ "name": "symfony/web-profiler-bundle",
+ "version": "v3.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/web-profiler-bundle.git",
+ "reference": "0043f504e8008542ee56e2fb52292cb6a3918c78"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/0043f504e8008542ee56e2fb52292cb6a3918c78",
+ "reference": "0043f504e8008542ee56e2fb52292cb6a3918c78",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.9",
+ "symfony/http-kernel": "~3.1",
+ "symfony/routing": "~2.8|~3.0",
+ "symfony/twig-bridge": "~2.8|~3.0"
+ },
+ "require-dev": {
+ "symfony/config": "~2.8|~3.0",
+ "symfony/console": "~2.8|~3.0",
+ "symfony/dependency-injection": "~2.8|~3.0",
+ "symfony/stopwatch": "~2.8|~3.0"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Bundle\\WebProfilerBundle\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony WebProfilerBundle",
+ "homepage": "https://symfony.com",
+ "time": "2016-06-29 05:41:56"
+ },
{
"name": "symfony/yaml",
"version": "v3.1.2",
@@ -2351,6 +2514,67 @@
"homepage": "https://symfony.com",
"time": "2016-06-29 07:02:31"
},
+ {
+ "name": "symfony/debug-bundle",
+ "version": "v3.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/debug-bundle.git",
+ "reference": "995b9d7c1f3e1489cfe3379e18276e6032f99aa3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/debug-bundle/zipball/995b9d7c1f3e1489cfe3379e18276e6032f99aa3",
+ "reference": "995b9d7c1f3e1489cfe3379e18276e6032f99aa3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.9",
+ "symfony/http-kernel": "~2.8|~3.0",
+ "symfony/twig-bridge": "~2.8|~3.0",
+ "symfony/var-dumper": "~2.8|~3.0"
+ },
+ "require-dev": {
+ "symfony/config": "~2.8|~3.0",
+ "symfony/dependency-injection": "~2.8|~3.0",
+ "symfony/web-profiler-bundle": "~2.8|~3.0"
+ },
+ "suggest": {
+ "symfony/config": "For service container configuration",
+ "symfony/dependency-injection": "For using as a service from the container"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Bundle\\DebugBundle\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony DebugBundle",
+ "homepage": "https://symfony.com",
+ "time": "2016-02-13 09:24:02"
+ },
{
"name": "symfony/phpunit-bridge",
"version": "v3.1.2",
diff --git a/data/resume.json b/data/resume.json
index d5fba97..1707ef6 100644
--- a/data/resume.json
+++ b/data/resume.json
@@ -1,116 +1,116 @@
{
- "basics": {
- "name": "R. Eric Wheeler",
- "label": "Developer / Systems",
- "picture": "http://rewiv.com/storage/me.png",
- "email": "eric@ericwheeler.net",
- "phone": "",
- "website": "https://code.reric.me",
- "summary": "",
- "location": {
- "address": "",
- "postalCode": "CA 94578",
- "city": "San Leandro",
- "countryCode": "US",
- "region": "California"
+ "basics": {
+ "name": "R. Eric Wheeler",
+ "label": "Developer / Systems",
+ "picture": "http://rewiv.com/storage/me.png",
+ "email": "eric@ericwheeler.net",
+ "phone": "",
+ "website": "https://code.reric.me",
+ "summary": "",
+ "location": {
+ "address": "",
+ "postalCode": "CA 94578",
+ "city": "San Leandro",
+ "countryCode": "US",
+ "region": "California"
+ },
+ "profiles": [
+ {
+ "network": "Twitter",
+ "username": "sikofitt",
+ "url": ""
+ },
+ {
+ "network": "Github",
+ "username": "sikofitt",
+ "url": ""
+ },
+ {
+ "network": "Private Git",
+ "username": "sikofitt",
+ "url": "https://repos.bgemi.net/u/sikofitt"
+ },
+ {
+ "network": "linkedin",
+ "username": "reric",
+ "url": "https://www.linkedin.com/in/reric"
+ }
+ ]
},
- "profiles": [
- {
- "network": "Twitter",
- "username": "sikofitt",
- "url": ""
- },
- {
- "network": "Github",
- "username": "sikofitt",
- "url": ""
- },
- {
- "network": "Private Git",
- "username": "sikofitt",
- "url": "https://repos.bgemi.net/u/sikofitt"
- },
- {
- "network": "linkedin",
- "username": "reric",
- "url": "https://www.linkedin.com/in/reric"
- }
+ "work": [
+ {
+ "company": "Stanford University",
+ "position": "Developer / Systems Administrator",
+ "website": "https://ee.stanford.edu",
+ "startDate": "2007-05-27",
+ "endDate": "2016-07-02",
+ "summary": "",
+ "highlights": [
+ "Build an algorithm for artist to detect if their music was violating copy right infringement laws",
+ "Successfully won Techcrunch Disrupt",
+ "Optimized an algorithm that holds the current world record for Weisman Scores"
+ ]
+ },
+ {
+ "company": "Searchathlon INC.",
+ "position": "Web Developer / Linux System Administration",
+ "website": "http://searchathlon.com",
+ "startDate": "2005-01-01",
+ "endDate": "2006-01-01",
+ "summary": "",
+ "highlights": []
+ }
+ ],
+ "volunteer": [],
+ "education": [],
+ "awards": [],
+ "publications": [],
+ "skills": [
+ {
+ "name": "Web Development / Design",
+ "level": "",
+ "keywords": [
+ "HTML5",
+ "CSS3",
+ "Javascript",
+ "jQuery",
+ "NPM",
+ "Bower",
+ "Grunt",
+ "Let's Encrypt"
+ ]
+ },
+ {
+ "name": "PHP",
+ "level": "",
+ "keywords": [
+ "PHP5",
+ "PHP7",
+ "Symfony 2",
+ "Symfony 3",
+ "OOP",
+ "Silex",
+ "Slim",
+ "Doctrine",
+ "Composer"
+ ]
+ }
+ ],
+ "languages": [],
+ "interests": [
+ {
+ "name": "Computers",
+ "keywords": [
+ "Hardware",
+ "Programming",
+ "Design"
+ ]
+ }
+ ],
+ "references": [
+ {
+ "name": "Erlich Bachman",
+ "reference": "It is my pleasure to recommend Richard, his performance working as a consultant for Main St. Company proved that he will be a valuable addition to any company."
+ }
]
- },
- "work": [
- {
- "company": "Stanford University",
- "position": "Developer / Systems Administrator",
- "website": "https://ee.stanford.edu",
- "startDate": "2007-05-27",
- "endDate": "2016-07-02",
- "summary": "",
- "highlights": [
- "Build an algorithm for artist to detect if their music was violating copy right infringement laws",
- "Successfully won Techcrunch Disrupt",
- "Optimized an algorithm that holds the current world record for Weisman Scores"
- ]
- },
- {
- "company": "Searchathlon INC.",
- "position": "Web Developer / Linux System Administration",
- "website": "http://searchathlon.com",
- "startDate": "2005-01-01",
- "endDate": "2006-01-01",
- "summary": "",
- "highlights": []
- }
- ],
- "volunteer": [],
- "education": [],
- "awards": [],
- "publications": [],
- "skills": [
- {
- "name": "Web Development / Design",
- "level": "",
- "keywords": [
- "HTML5",
- "CSS3",
- "Javascript",
- "jQuery",
- "NPM",
- "Bower",
- "Grunt",
- "Let's Encrypt"
- ]
- },
- {
- "name": "PHP",
- "level": "",
- "keywords": [
- "PHP5",
- "PHP7",
- "Symfony 2",
- "Symfony 3",
- "OOP",
- "Silex",
- "Slim",
- "Doctrine",
- "Composer"
- ]
- }
- ],
- "languages": [],
- "interests": [
- {
- "name": "Computers",
- "keywords": [
- "Hardware",
- "Programming",
- "Design"
- ]
- }
- ],
- "references": [
- {
- "name": "Erlich Bachman",
- "reference": "It is my pleasure to recommend Richard, his performance working as a consultant for Main St. Company proved that he will be a valuable addition to any company."
- }
- ]
}
diff --git a/dump.php b/dump.php
new file mode 100644
index 0000000..81c0245
--- /dev/null
+++ b/dump.php
@@ -0,0 +1,12 @@
+decodeFile('data/resume.json');
+
+dump($json);
+
+
diff --git a/src/Sikofitt/less/resume.less b/src/Sikofitt/less/resume.less
index 7cc4bda..ef0a943 100644
--- a/src/Sikofitt/less/resume.less
+++ b/src/Sikofitt/less/resume.less
@@ -4,4 +4,5 @@
@base-body-font-family : 'Lato';
@base-body-font-size : 26px;
@base-heading-font-family : 'Eczar';
-@base-body-line-height : 1.2em;
\ No newline at end of file
+@base-body-line-height : 1.2em;
+@thumbnail-mini-width : 100px;
\ No newline at end of file
diff --git a/web/index.php b/web/index.php
index d0a0107..631ee64 100644
--- a/web/index.php
+++ b/web/index.php
@@ -1,38 +1,52 @@
register(new Sikofitt\Config\ConfigServiceProvider(), [
'config.path' => $app->getConfDirectory(),
]);
-
$app->register (new TwigServiceProvider(), [
- 'twig.path' => APP_ROOT . 'app/views',
+ 'twig.path' => [APP_ROOT . 'app/views', APP_ROOT .'vendor/symfony/web-profiler-bundle/Resources/views/Profiler'],
]);
-$app['conf'] = function ($app) {
-
-};
$app->register (new WhoopsServiceProvider());
$app->register (new \Silex\Provider\AssetServiceProvider());
$app->register (new \Silex\Provider\MonologServiceProvider());
-$app->register (new \Silex\Provider\VarDumperServiceProvider());
+
$app->register (new \Silex\Provider\HttpKernelServiceProvider());
+$app->register(new \Silex\Provider\AssetServiceProvider());
+$app->register(new \Silex\Provider\FormServiceProvider());
+$app->register(new \Silex\Provider\HttpFragmentServiceProvider());
+$app->register(new \Silex\Provider\ServiceControllerServiceProvider());
+$app->register(new \Silex\Provider\RoutingServiceProvider());
+$app->register (new \Silex\Provider\VarDumperServiceProvider(), array(
+ 'var_dumper.dump_destination' => new \Symfony\Component\VarDumper\Cloner\VarCloner(),
+));
+
+$app->register(new \Silex\Provider\MonologServiceProvider(), array(
+ 'monolog.logfile' => $app->getDataDirectory() . '/logs/' . (null !== $app->config('app.environment') ? $app->config('app.environment') . '.log' : 'dev.log'),
+));
+
+$app->register(new \Silex\Provider\SessionServiceProvider());
+$app->register(new \Silex\Provider\WebProfilerServiceProvider(), array(
+ 'profiler.cache_dir' => $app->getDataDirectory() .'/cache/profiler',
+));
+$app->extend('twig', function(\Twig_Environment $twig, $app) {
+$twig->enableDebug();
+return $twig;
+});
$app->error(function (\Exception $e, $code) use($app) {
switch ($code) {
case 404:
@@ -41,7 +55,6 @@ $app->error(function (\Exception $e, $code) use($app) {
default:
$message = $app['twig']->render('error500.html.twig');
}
-
return new Response($message, $code);
});
$app['json.decoder'] = function ($app) {
@@ -54,16 +67,33 @@ $app['json.validator'] = function ($app) {
return new Webmozart\Json\JsonValidator();
};
-$app->get ('/', function () use ($app) {
- //$snappy = new Pdf($app->getRootDirectory() . '/vendor/bin/wkhtmltopdf-amd64');
- //$snappy->setTemporaryFolder(sys_get_temp_dir() . '/pdf');
- //$snappy->setOption( 'disable-external-links', true);
- //$snappy->setOption('toc', false);
- //$snappy->setOption('enable-internal-links', false);
- //$html = $app['twig']->render('resume.html.twig');
- //$snappy->generateFromHtml($html, $app->getRootDirectory() . '/test3.pdf');
- return $app['twig']->render('resume.html.twig');
+$app->get ('/', function () use ($app) {
+ $resumeData = $app['json.decoder']->decodeFile($app->getDataDirectory() .'/resume.json', $app->getDataDirectory() . '/resume.schema.json');
+ $basics = (isset($resumeData->basics) && count($resumeData->basics) > 0) ? $resumeData->basics : null;
+ $work = (isset($resumeData->work) && count($resumeData->work) > 0) ? $resumeData->work : null;
+ $volunteer = (isset($resumeData->volunteer) && count($resumeData->volunteer) > 0) ? $resumeData->volunteer : null;
+ $education = (isset($resumeData->education) && count($resumeData->education) > 0) ? $resumeData->education : null;
+ $awards = (isset($resumeData->awards) && count($resumeData->awards) > 0) ? $resumeData->awards : null;
+ $publications = (isset($resumeData->publications) && count($resumeData->publications) > 0) ? $resumeData->publications : null;
+ $skills = (isset($resumeData->skills) && count($resumeData->skills) > 0) ? $resumeData->skills : null;
+ $languages = (isset($resumeData->languages) && count($resumeData->languages) > 0) ? $resumeData->languages : null;
+ $interests = (isset($resumeData->interests) && count($resumeData->interests) > 0) ? $resumeData->interests : null;
+ $references = (isset($resumeData->references) && count($resumeData->references) > 0) ? $resumeData->references : null;
+
+
+ return $app['twig']->render('resume.html.twig', [
+ 'basics' => $basics,
+ 'work' => $work,
+ 'volunteer' => $volunteer,
+ 'education' => $education,
+ 'awards' => $awards,
+ 'publications' => $publications,
+ 'skills' => $skills,
+ 'languages' => $languages,
+ 'interests' => $interests,
+ 'references' => $references,
+ ]);
});
$app->run ();