From 2c869478f6c08da19a649ff313ccd72365d16478 Mon Sep 17 00:00:00 2001 From: "R. Eric Wheeler" Date: Mon, 4 Jul 2016 18:09:37 -0700 Subject: [PATCH] End of day --- .idea/resume.iml | 1 + .idea/workspace.xml | 352 +++++++++++++++++++++++----------- composer.lock | 2 +- src/Sikofitt/less/resume.less | 4 +- web/index.php | 20 +- 5 files changed, 264 insertions(+), 115 deletions(-) diff --git a/.idea/resume.iml b/.idea/resume.iml index a2129e1..3c86638 100644 --- a/.idea/resume.iml +++ b/.idea/resume.iml @@ -49,5 +49,6 @@ + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2e9c41a..0ba9b69 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,17 +2,9 @@ - - - - - - - - @@ -26,7 +18,6 @@ - @@ -36,20 +27,22 @@ - + - - - + + + + + - + - + @@ -59,10 +52,11 @@ - + + @@ -71,10 +65,10 @@ - + - + @@ -83,10 +77,10 @@ - + - + @@ -95,7 +89,7 @@ - + @@ -105,8 +99,8 @@ - - + + @@ -115,7 +109,7 @@ - + @@ -149,11 +143,11 @@ @@ -163,12 +157,15 @@ true DEFINITION_ORDER + + + - @@ -195,7 +192,6 @@ - @@ -320,6 +316,7 @@ + @@ -331,22 +328,6 @@ - - \ No newline at end of file diff --git a/composer.lock b/composer.lock index 23e4ef3..888396e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "32d114eedd6f34d0a8de316e291f4a69", + "hash": "bff507b41d23db26ac64f22c144abe58", "content-hash": "fca3e43ff787d71afd6f495624a8bf9c", "packages": [ { diff --git a/src/Sikofitt/less/resume.less b/src/Sikofitt/less/resume.less index b3d3f01..7cc4bda 100644 --- a/src/Sikofitt/less/resume.less +++ b/src/Sikofitt/less/resume.less @@ -1,7 +1,7 @@ @import 'uikit.less'; -@import 'https://fonts.googleapis.com/css?family=Lato:300|Oswald:300'; +@import 'https://fonts.googleapis.com/css?family=Lato:300|Eczar'; @base-body-font-family : 'Lato'; @base-body-font-size : 26px; -@base-heading-font-family : 'Oswald'; +@base-heading-font-family : 'Eczar'; @base-body-line-height : 1.2em; \ No newline at end of file diff --git a/web/index.php b/web/index.php index 7217599..d0a0107 100644 --- a/web/index.php +++ b/web/index.php @@ -1,7 +1,9 @@ register (new \Silex\Provider\AssetServiceProvider()); $app->register (new \Silex\Provider\MonologServiceProvider()); $app->register (new \Silex\Provider\VarDumperServiceProvider()); $app->register (new \Silex\Provider\HttpKernelServiceProvider()); +$app->error(function (\Exception $e, $code) use($app) { + switch ($code) { + case 404: + $message = $app['twig']->render('error404.html.twig'); + break; + default: + $message = $app['twig']->render('error500.html.twig'); + } + return new Response($message, $code); +}); $app['json.decoder'] = function ($app) { return new Webmozart\Json\JsonDecoder(); }; @@ -44,7 +56,13 @@ $app['json.validator'] = function ($app) { $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'); });