diff --git a/composer.json b/composer.json index 7537df6..5bd50c2 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "require": { + "require": { "slim/slim-skeleton": "^4.3", "ext-pdo": "*", "slim/psr7": "^1.4", @@ -15,6 +15,13 @@ "rbdwllr/psr-jwt": "^2.0", "tuupola/slim-jwt-auth": "^3.6", "ext-dom": "*", - "ext-libxml": "*" + "ext-libxml": "*", + "donatello-za/rake-php-plus": "^1.0" + }, + "repositories": [ + { + "type": "composer", + "url": "https:\/\/www.phpclasses.org\/" } + ] } diff --git a/composer.lock b/composer.lock index ae10e78..e8a2eee 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,69 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "79f27ef0ad8fb8ffff7e6726df8c1f79", + "content-hash": "f675ad7eec6390b82dca0b13dec49e5b", "packages": [ { + "name": "donatello-za/rake-php-plus", + "version": "v1.0.18", + "source": { + "type": "git", + "url": "https://github.com/Donatello-za/rake-php-plus.git", + "reference": "e9e9c0862b3dc953d288e8f42c76e4ceaeca0619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Donatello-za/rake-php-plus/zipball/e9e9c0862b3dc953d288e8f42c76e4ceaeca0619", + "reference": "e9e9c0862b3dc953d288e8f42c76e4ceaeca0619", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "php": ">=5.5.0", + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.13-dev" + } + }, + "autoload": { + "psr-4": { + "DonatelloZa\\RakePlus\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Don Schoeman", + "email": "ta.maximus@gmail.com" + } + ], + "description": "Yet another PHP implementation of the Rapid Automatic Keyword Extraction algorithm (RAKE).", + "homepage": "https://github.com/Donatello-za/rake-php-plus", + "keywords": [ + "Algorithm", + "automatic", + "extraction", + "keyword", + "rake", + "rapid" + ], + "support": { + "issues": "https://github.com/Donatello-za/rake-php-plus/issues", + "source": "https://github.com/Donatello-za/rake-php-plus" + }, + "time": "2022-02-23T18:42:03+00:00" + }, + { "name": "fig/http-message-util", "version": "1.1.5", "source": { @@ -121,22 +181,22 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.4.3", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "67c26b443f348a51926030c83481b85718457d3d" + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", - "reference": "67c26b443f348a51926030c83481b85718457d3d", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.1 || ^2.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -156,9 +216,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "2.4-dev" } }, "autoload": { @@ -220,7 +277,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.3" + "source": "https://github.com/guzzle/psr7/tree/2.6.1" }, "funding": [ { @@ -236,7 +293,7 @@ "type": "tidelift" } ], - "time": "2022-10-26T14:07:24+00:00" + "time": "2023-08-27T10:13:57+00:00" }, { "name": "http-interop/http-factory-guzzle", @@ -298,22 +355,22 @@ }, { "name": "laminas/laminas-diactoros", - "version": "2.24.0", + "version": "2.26.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "6028af6c3b5ced4d063a680d2483cce67578b902" + "reference": "6584d44eb8e477e89d453313b858daac6183cddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/6028af6c3b5ced4d063a680d2483cce67578b902", - "reference": "6028af6c3b5ced4d063a680d2483cce67578b902", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/6584d44eb8e477e89d453313b858daac6183cddc", + "reference": "6584d44eb8e477e89d453313b858daac6183cddc", "shasum": "" }, "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.1" }, "conflict": { "zendframework/zend-diactoros": "*" @@ -328,11 +385,11 @@ "ext-gd": "*", "ext-libxml": "*", "http-interop/http-factory-tests": "^0.9.0", - "laminas/laminas-coding-standard": "^2.4.0", + "laminas/laminas-coding-standard": "^2.5", "php-http/psr7-integration-tests": "^1.2", - "phpunit/phpunit": "^9.5.27", + "phpunit/phpunit": "^9.5.28", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.4" + "vimeo/psalm": "^5.6" }, "type": "library", "extra": { @@ -391,34 +448,34 @@ "type": "community_bridge" } ], - "time": "2022-12-20T12:22:40+00:00" + "time": "2023-10-29T16:17:44+00:00" }, { "name": "laminas/laminas-httphandlerrunner", - "version": "2.5.0", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-httphandlerrunner.git", - "reference": "7a47834aaad7852816d2ec4fdbb0492163b039ae" + "reference": "d3e84755a17e563b1c5f8290cbfb150210501a77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/7a47834aaad7852816d2ec4fdbb0492163b039ae", - "reference": "7a47834aaad7852816d2ec4fdbb0492163b039ae", + "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/d3e84755a17e563b1c5f8290cbfb150210501a77", + "reference": "d3e84755a17e563b1c5f8290cbfb150210501a77", "shasum": "" }, "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", - "psr/http-message": "^1.0", - "psr/http-message-implementation": "^1.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "psr/http-message": "^1.0 || ^2.0", + "psr/http-message-implementation": "^1.0 || ^2.0", "psr/http-server-handler": "^1.0" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-diactoros": "^2.18", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^5.0.0" + "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-diactoros": "^3.0.0", + "phpunit/phpunit": "^10.1.2", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.11" }, "type": "library", "extra": { @@ -458,20 +515,20 @@ "type": "community_bridge" } ], - "time": "2023-01-05T21:54:03+00:00" + "time": "2023-09-04T10:43:03+00:00" }, { "name": "laravel/serializable-closure", - "version": "v1.2.2", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" + "reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", - "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/076fe2cf128bd54b4341cdc6d49b95b34e101e4c", + "reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c", "shasum": "" }, "require": { @@ -518,20 +575,20 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-09-08T13:45:54+00:00" + "time": "2023-10-17T13:38:16+00:00" }, { "name": "monolog/monolog", - "version": "2.8.0", + "version": "2.9.2", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" + "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", + "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", "shasum": "" }, "require": { @@ -546,7 +603,7 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", "guzzlehttp/guzzle": "^7.4", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", @@ -608,7 +665,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.8.0" + "source": "https://github.com/Seldaek/monolog/tree/2.9.2" }, "funding": [ { @@ -620,7 +677,7 @@ "type": "tidelift" } ], - "time": "2022-07-24T11:55:47+00:00" + "time": "2023-10-27T15:25:26+00:00" }, { "name": "nikic/fast-route", @@ -674,38 +731,39 @@ }, { "name": "nyholm/psr7", - "version": "1.5.1", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/Nyholm/psr7.git", - "reference": "f734364e38a876a23be4d906a2a089e1315be18a" + "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a", - "reference": "f734364e38a876a23be4d906a2a089e1315be18a", + "url": "https://api.github.com/repos/Nyholm/psr7/zipball/3cb4d163b58589e47b35103e8e5e6a6a475b47be", + "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be", "shasum": "" }, "require": { - "php": ">=7.1", - "php-http/message-factory": "^1.0", + "php": ">=7.2", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.1 || ^2.0" }, "provide": { + "php-http/message-factory-implementation": "1.0", "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { "http-interop/http-factory-tests": "^0.9", + "php-http/message-factory": "^1.0", "php-http/psr7-integration-tests": "^1.0", - "phpunit/phpunit": "^7.5 || 8.5 || 9.4", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4", "symfony/error-handler": "^4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -735,7 +793,7 @@ ], "support": { "issues": "https://github.com/Nyholm/psr7/issues", - "source": "https://github.com/Nyholm/psr7/tree/1.5.1" + "source": "https://github.com/Nyholm/psr7/tree/1.8.0" }, "funding": [ { @@ -747,26 +805,26 @@ "type": "github" } ], - "time": "2022-06-22T07:13:36+00:00" + "time": "2023-05-02T11:26:24+00:00" }, { "name": "nyholm/psr7-server", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/Nyholm/psr7-server.git", - "reference": "b846a689844cef114e8079d8c80f0afd96745ae3" + "reference": "4335801d851f554ca43fa6e7d2602141538854dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/b846a689844cef114e8079d8c80f0afd96745ae3", - "reference": "b846a689844cef114e8079d8c80f0afd96745ae3", + "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/4335801d851f554ca43fa6e7d2602141538854dc", + "reference": "4335801d851f554ca43fa6e7d2602141538854dc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { "nyholm/nsa": "^1.1", @@ -801,7 +859,7 @@ ], "support": { "issues": "https://github.com/Nyholm/psr7-server/issues", - "source": "https://github.com/Nyholm/psr7-server/tree/1.0.2" + "source": "https://github.com/Nyholm/psr7-server/tree/1.1.0" }, "funding": [ { @@ -813,20 +871,20 @@ "type": "github" } ], - "time": "2021-05-12T11:11:27+00:00" + "time": "2023-11-08T09:30:43+00:00" }, { "name": "php-di/invoker", - "version": "2.3.3", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/PHP-DI/Invoker.git", - "reference": "cd6d9f267d1a3474bdddf1be1da079f01b942786" + "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/cd6d9f267d1a3474bdddf1be1da079f01b942786", - "reference": "cd6d9f267d1a3474bdddf1be1da079f01b942786", + "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/33234b32dafa8eb69202f950a1fc92055ed76a86", + "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86", "shasum": "" }, "require": { @@ -860,7 +918,7 @@ ], "support": { "issues": "https://github.com/PHP-DI/Invoker/issues", - "source": "https://github.com/PHP-DI/Invoker/tree/2.3.3" + "source": "https://github.com/PHP-DI/Invoker/tree/2.3.4" }, "funding": [ { @@ -868,7 +926,7 @@ "type": "github" } ], - "time": "2021-12-13T09:22:56+00:00" + "time": "2023-09-08T09:24:21+00:00" }, { "name": "php-di/php-di", @@ -988,60 +1046,6 @@ }, "time": "2020-10-12T12:39:22+00:00" }, - { - "name": "php-http/message-factory", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-http/message-factory.git", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Factory interfaces for PSR-7 HTTP Message", - "homepage": "http://php-http.org", - "keywords": [ - "factory", - "http", - "message", - "stream", - "uri" - ], - "support": { - "issues": "https://github.com/php-http/message-factory/issues", - "source": "https://github.com/php-http/message-factory/tree/master" - }, - "time": "2015-12-19T14:08:53+00:00" - }, { "name": "psr/container", "version": "1.1.2", @@ -1092,21 +1096,21 @@ }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -1126,7 +1130,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -1141,31 +1145,31 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "1.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -1194,27 +1198,27 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { "name": "psr/http-server-handler", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", "shasum": "" }, "require": { "php": ">=7.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -1234,7 +1238,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP server-side request handler", @@ -1250,28 +1254,27 @@ "server" ], "support": { - "issues": "https://github.com/php-fig/http-server-handler/issues", - "source": "https://github.com/php-fig/http-server-handler/tree/master" + "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" }, - "time": "2018-10-30T16:46:14+00:00" + "time": "2023-04-10T20:06:20+00:00" }, { "name": "psr/http-server-middleware", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5" + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", "shasum": "" }, "require": { "php": ">=7.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0 || ^2.0", "psr/http-server-handler": "^1.0" }, "type": "library", @@ -1292,7 +1295,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP server-side middleware", @@ -1308,9 +1311,9 @@ ], "support": { "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/master" + "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" }, - "time": "2018-10-30T17:12:04+00:00" + "time": "2023-04-11T06:14:47+00:00" }, { "name": "psr/log", @@ -1585,16 +1588,16 @@ }, { "name": "slim/psr7", - "version": "1.6", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/slimphp/Slim-Psr7.git", - "reference": "3471c22c1a0d26c51c78f6aeb06489d38cf46a4d" + "reference": "72d2b2bac94ab4575d369f605dbfafbe168d3163" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Psr7/zipball/3471c22c1a0d26c51c78f6aeb06489d38cf46a4d", - "reference": "3471c22c1a0d26c51c78f6aeb06489d38cf46a4d", + "url": "https://api.github.com/repos/slimphp/Slim-Psr7/zipball/72d2b2bac94ab4575d369f605dbfafbe168d3163", + "reference": "72d2b2bac94ab4575d369f605dbfafbe168d3163", "shasum": "" }, "require": { @@ -1613,7 +1616,7 @@ "adriansuter/php-autoload-override": "^1.3", "ext-json": "*", "http-interop/http-factory-tests": "^0.9.0", - "php-http/psr7-integration-tests": "dev-master", + "php-http/psr7-integration-tests": "1.1", "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^2.0", "phpstan/phpstan": "^1.8", @@ -1661,22 +1664,22 @@ ], "support": { "issues": "https://github.com/slimphp/Slim-Psr7/issues", - "source": "https://github.com/slimphp/Slim-Psr7/tree/1.6" + "source": "https://github.com/slimphp/Slim-Psr7/tree/1.6.1" }, - "time": "2022-11-05T18:50:24+00:00" + "time": "2023-04-17T16:02:20+00:00" }, { "name": "slim/slim", - "version": "4.11.0", + "version": "4.12.0", "source": { "type": "git", "url": "https://github.com/slimphp/Slim.git", - "reference": "b0f4ca393ea037be9ac7292ba7d0a34d18bac0c7" + "reference": "e9e99c2b24398b967841c6c4c3048622cc7e2b18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/b0f4ca393ea037be9ac7292ba7d0a34d18bac0c7", - "reference": "b0f4ca393ea037be9ac7292ba7d0a34d18bac0c7", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/e9e99c2b24398b967841c6c4c3048622cc7e2b18", + "reference": "e9e99c2b24398b967841c6c4c3048622cc7e2b18", "shasum": "" }, "require": { @@ -1685,26 +1688,26 @@ "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.1", "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { - "adriansuter/php-autoload-override": "^1.3", + "adriansuter/php-autoload-override": "^1.4", "ext-simplexml": "*", - "guzzlehttp/psr7": "^2.4", - "httpsoft/http-message": "^1.0", - "httpsoft/http-server-request": "^1.0", + "guzzlehttp/psr7": "^2.5", + "httpsoft/http-message": "^1.1", + "httpsoft/http-server-request": "^1.1", "laminas/laminas-diactoros": "^2.17", - "nyholm/psr7": "^1.5", + "nyholm/psr7": "^1.8", "nyholm/psr7-server": "^1.0", - "phpspec/prophecy": "^1.15", + "phpspec/prophecy": "^1.17", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.5", - "slim/http": "^1.2", - "slim/psr7": "^1.5", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.6", + "slim/http": "^1.3", + "slim/psr7": "^1.6", "squizlabs/php_codesniffer": "^3.7" }, "suggest": { @@ -1778,7 +1781,7 @@ "type": "tidelift" } ], - "time": "2022-11-06T16:33:39+00:00" + "time": "2023-07-23T04:54:29+00:00" }, { "name": "slim/slim-skeleton", @@ -1848,16 +1851,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -1866,7 +1869,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1911,7 +1914,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -1927,7 +1930,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "tuupola/callable-handler", @@ -2060,22 +2063,22 @@ }, { "name": "tuupola/slim-jwt-auth", - "version": "3.7.0", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/tuupola/slim-jwt-auth.git", - "reference": "ef05b93d4dac7307ef6ef3b62feaff30c32e82c1" + "reference": "7829d4482034e9eb5e051f3a1619db0c704ba7e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tuupola/slim-jwt-auth/zipball/ef05b93d4dac7307ef6ef3b62feaff30c32e82c1", - "reference": "ef05b93d4dac7307ef6ef3b62feaff30c32e82c1", + "url": "https://api.github.com/repos/tuupola/slim-jwt-auth/zipball/7829d4482034e9eb5e051f3a1619db0c704ba7e7", + "reference": "7829d4482034e9eb5e051f3a1619db0c704ba7e7", "shasum": "" }, "require": { "firebase/php-jwt": "^3.0|^4.0|^5.0", - "php": "^7.2|^8.0", - "psr/http-message": "^1.0", + "php": "^7.4|^8.0", + "psr/http-message": "^1.0|^2.0", "psr/http-server-middleware": "^1.0", "psr/log": "^1.0|^2.0|^3.0", "tuupola/callable-handler": "^1.0", @@ -2083,9 +2086,9 @@ }, "require-dev": { "equip/dispatch": "^2.0", - "laminas/laminas-diactoros": "^2.0", + "laminas/laminas-diactoros": "^2.0|^3.0", "overtrue/phplint": "^1.0", - "phpstan/phpstan": "^1.8", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^7.0|^8.5.30|^9.0", "squizlabs/php_codesniffer": "^3.7" }, @@ -2124,15 +2127,9 @@ ], "support": { "issues": "https://github.com/tuupola/slim-jwt-auth/issues", - "source": "https://github.com/tuupola/slim-jwt-auth/tree/3.7.0" + "source": "https://github.com/tuupola/slim-jwt-auth/tree/3.8.0" }, - "funding": [ - { - "url": "https://github.com/tuupola", - "type": "github" - } - ], - "time": "2022-12-23T11:23:05+00:00" + "time": "2023-10-20T09:51:26+00:00" } ], "packages-dev": [], @@ -2143,8 +2140,10 @@ "prefer-lowest": false, "platform": { "ext-pdo": "*", - "ext-json": "*" + "ext-json": "*", + "ext-dom": "*", + "ext-libxml": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/dist/api/blog/blogData.php b/dist/api/blog/blogData.php index a8f8c6f..3221e58 100644 --- a/dist/api/blog/blogData.php +++ b/dist/api/blog/blogData.php @@ -2,13 +2,20 @@ namespace api\blog; +use api\utils\feedGenerator\FeedWriter; use api\utils\imgUtils; use DOMDocument; use PDO; use Psr\Http\Message\UploadedFileInterface; +use DonatelloZa\RakePlus\RakePlus; +use function DI\string; +use const api\utils\feedGenerator\ATOM; +use const api\utils\feedGenerator\RSS2; + require_once __DIR__ . "/../utils/config.php"; require_once __DIR__ . "/../utils/imgUtils.php"; +require_once __DIR__ . "/../utils/feedGenerator/FeedWriter.php"; /** * Blog Data Class @@ -18,12 +25,15 @@ class blogData { /** * Get all blog posts - * @return array - Array of all blog posts or error message + * @return array - Array of all blog posts or error message */ public function getBlogPosts(): array { $conn = dbConn(); - $stmt = $conn->prepare("SELECT * FROM blog ORDER BY featured DESC, dateCreated DESC;"); + $stmt = $conn->prepare("SELECT ID, title, DATE_FORMAT(dateCreated, '%Y-%m-%dT%TZ') AS dateCreated, + DATE_FORMAT(dateModified, '%Y-%m-%dT%TZ') AS dateModified, featured, abstract, + headerImg, body, bodyText, categories, keywords, folderID FROM blog ORDER BY featured DESC, + dateCreated DESC;"); $stmt->execute(); // set the resulting array to associative @@ -40,12 +50,15 @@ class blogData /** * Get a blog post with the given ID * @param string $title - Title of the blog post - * @return array - Array of all blog posts or error message + * @return array - Array of blog post or error message */ public function getBlogPost(string $title): array { $conn = dbConn(); - $stmt = $conn->prepare("SELECT * FROM blog WHERE title = :title;"); + $stmt = $conn->prepare("SELECT ID, title, DATE_FORMAT(dateCreated, '%Y-%m-%dT%TZ') AS dateCreated, + DATE_FORMAT(dateModified, '%Y-%m-%dT%TZ') AS dateModified, featured, abstract, + headerImg, body, bodyText, categories, keywords, folderID FROM blog WHERE + title = :title;"); $stmt->bindParam(":title", $title); $stmt->execute(); @@ -67,7 +80,10 @@ class blogData public function getLatestBlogPost(): array { $conn = dbConn(); - $stmt = $conn->prepare("SELECT * FROM blog ORDER BY dateCreated DESC LIMIT 1;"); + $stmt = $conn->prepare("SELECT ID, title, DATE_FORMAT(dateCreated, '%Y-%m-%dT%TZ') AS dateCreated, + DATE_FORMAT(dateModified, '%Y-%m-%dT%TZ') AS dateModified, featured, abstract, + headerImg, body, bodyText, categories, keywords, folderID FROM blog ORDER BY + dateCreated DESC LIMIT 1;"); $stmt->execute(); // set the resulting array to associative @@ -88,7 +104,9 @@ class blogData public function getFeaturedBlogPost(): array { $conn = dbConn(); - $stmt = $conn->prepare("SELECT * FROM blog WHERE featured = 1;"); + $stmt = $conn->prepare("SELECT ID, title, DATE_FORMAT(dateCreated, '%Y-%m-%dT%TZ') AS dateCreated, + DATE_FORMAT(dateModified, '%Y-%m-%dT%TZ') AS dateModified, featured, abstract, + headerImg, body, bodyText, categories, keywords, folderID FROM blog WHERE featured = 1;"); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_ASSOC); @@ -209,7 +227,9 @@ class blogData $from = "../blog/imgs/tmp/"; $newBody = $this->changeHTMLSrc($body, $to, $from); - $stmt = $conn->prepare("UPDATE blog SET title = :title, featured = :featured, abstract = :abstract, body = :body, bodyText = :bodyText, dateModified = :dateModified, categories = :categories WHERE ID = :ID;"); + $keywords = implode(", ", RakePlus::create($bodyText)->keywords()); + + $stmt = $conn->prepare("UPDATE blog SET title = :title, featured = :featured, abstract = :abstract, body = :body, bodyText = :bodyText, dateModified = :dateModified, categories = :categories, keywords = :keywords WHERE ID = :ID;"); $stmt->bindParam(":ID", $ID); $stmt->bindParam(":title", $title); $stmt->bindParam(":featured", $featured); @@ -218,6 +238,7 @@ class blogData $stmt->bindParam(":bodyText", $bodyText); $stmt->bindParam(":dateModified", $dateModified); $stmt->bindParam(":categories", $categories); + $stmt->bindParam(":keywords", $keywords); return $stmt->execute(); } @@ -266,8 +287,10 @@ class blogData $stmtMainProject->execute(); } - $stmt = $conn->prepare("INSERT INTO blog (title, dateCreated, dateModified, featured, headerImg, abstract, body, bodyText, categories, folderID) - VALUES (:title, :dateCreated, :dateModified, :featured, :headerImg, :abstract, :body, :bodyText, :categories, :folderID);"); + $keywords = implode(", ", RakePlus::create($bodyText)->keywords()); + + $stmt = $conn->prepare("INSERT INTO blog (title, dateCreated, dateModified, featured, headerImg, abstract, body, bodyText, categories, keywords, folderID) + VALUES (:title, :dateCreated, :dateModified, :featured, :headerImg, :abstract, :body, :bodyText, :categories, :keywords, :folderID);"); $stmt->bindParam(":title", $title); $stmt->bindParam(":dateCreated", $dateCreated); $stmt->bindParam(":dateModified", $dateCreated); @@ -278,6 +301,7 @@ class blogData $stmt->bindParam(":body", $newBody); $stmt->bindParam(":bodyText", $bodyText); $stmt->bindParam(":categories", $categories); + $stmt->bindParam(":keywords", $keywords); $stmt->bindParam(":folderID", $folderID); if ($stmt->execute()) @@ -399,11 +423,10 @@ class blogData if (!in_array($from . $file, $srcList)) { unlink($from . $file); + continue; } - else - { - rename($from . $file, $to . $file); - } + + rename($from . $file, $to . $file); } } @@ -418,7 +441,7 @@ class blogData /** * Get all posts with the given category * @param string $category - Category of the post - * @return array - Array of all posts with the given category or error message + * @return array - Array of all posts with the given category or error message */ public function getPostsByCategory(string $category): array { @@ -432,7 +455,7 @@ class blogData /** * Search for a blog post with the given search term * @param string $searchTerm - Search term - * @return array - Array of all posts with the given search term or error message + * @return array - Array of all posts with the given search term or error message */ public function searchBlog(string $searchTerm): array { @@ -527,4 +550,109 @@ class blogData return $result; } + + /** + * Generate the XML feed + * @param mixed $type - Type of feed + * @return array|string - Error message or the XML feed + */ + private function generateXMLFeed(mixed $type): array|string + { + ob_start(); + $feed = new FeedWriter($type); + $feed->setTitle("Rohit Pai's Blog"); + $feed->setLink('https://rohitpai.co.uk/blog'); + $feed->setFeedURL('https://rohitpai.co.uk/api/blog/feed/atom'); + $feed->setChannelElement('updated', date(DATE_ATOM, time())); + $feed->setChannelElement('author', ['name' => 'Rohit Pai']); + $posts = $this->getBlogPosts(); + + if (isset($posts["errorMessage"])) + { + return $posts; + } + + foreach ($posts as $post) + { + $newItem = $feed->createNewItem(); + $newItem->setTitle($post["title"]); + $newItem->setLink("https://rohitpai.co.uk/blog/post/" . rawurlencode($post["title"]) . "#disqus_thread"); + $newItem->setDate($post["dateModified"]); + $newItem->setDescription($post["body"]); + $feed->addItem($newItem); + } + + $feed->generateFeed(); + $atom = ob_get_contents(); + ob_end_clean(); + return $atom; + } + + /** + * Generate the JSON feed + * @return array|array[] - Error message or the JSON feed + */ + private function generateJSONFeed(): array + { + $posts = $this->getBlogPosts(); + + if (isset($posts["errorMessage"])) + { + return $posts; + } + + $json = array(); + $json["version"] = "https://jsonfeed.org/version/1.1"; + $json["title"] = "Rohit Pai's Blog"; + $json["home_page_url"] = "https://rohitpai.co.uk/blog"; + $json["feed_url"] = "https://rohitpai.co.uk/api/blog/feed/json"; + $json["description"] = "Rohit Pai's personal blog on all things self hosting and various other tech topics"; + $json["author"] = array( + "name" => "Rohit Pai", + "url" => "https://rohitpai.co.uk", + "avatar" => "https://rohitpai.co.uk/imgs/profile.jpg" + ); + $items = array(); + foreach ($posts as $post) + { + $items[] = array( + "id" => string($post["ID"]), + "url" => "https://rohitpai.co.uk/blog/post/" . rawurlencode($post["title"]) . "#disqus_thread", + "title" => $post["title"], + "date_published" => date($post["dateCreated"]), + "date_modified" => date($post["dateModified"]), +// "description" => $post["abstract"], + "banner_image" => "https://rohitpai.co.uk/" . rawurlencode($post["headerImg"]), + "content_html" => $post["body"] + ); + } + $json["items"] = $items; + return $json; + } + + /** + * Generate the RSS feed based on type + * @param string $type - Type of feed + * @return string|array - RSS feed or an error message + */ + public function getFeed(string $type): string|array + { + $feed = ""; + if ($type == "atom") + { + $feed = $this->generateXMLFeed(ATOM); + } + + if ($type == "rss") + { + $feed = $this->generateXMLFeed(RSS2); + } + + if ($type == "json") + { + $feed = $this->generateJSONFeed(); + } + + return $feed; + } } \ No newline at end of file diff --git a/dist/api/blog/blogRoutes.php b/dist/api/blog/blogRoutes.php index d3c4201..975052c 100644 --- a/dist/api/blog/blogRoutes.php +++ b/dist/api/blog/blogRoutes.php @@ -4,6 +4,7 @@ namespace api\blog; require_once __DIR__ . "/../utils/routesInterface.php"; require_once "blogData.php"; + use api\utils\routesInterface; use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; @@ -80,35 +81,15 @@ class blogRoutes implements routesInterface $app->get("/blog/post/{type}", function (Request $request, Response $response, $args) { - if ($args["type"] != null) + if ($args["type"] == null) { - if ($args["type"] == "latest") - { - $post = $this->blogData->getLatestBlogPost(); - if (array_key_exists("errorMessage", $post)) - { - $response->getBody()->write(json_encode($post)); - return $response->withStatus(404); - } + $response->getBody()->write(json_encode(array("error" => "Please provide a title"))); + return $response->withStatus(400); + } - $response->getBody()->write(json_encode($post)); - return $response; - } - - if ($args["type"] == "featured") - { - $post = $this->blogData->getFeaturedBlogPost(); - if (array_key_exists("errorMessage", $post)) - { - $response->getBody()->write(json_encode($post)); - return $response->withStatus(404); - } - - $response->getBody()->write(json_encode($post)); - return $response; - } - - $post = $this->blogData->getBlogPost($args["type"]); + if ($args["type"] == "latest") + { + $post = $this->blogData->getLatestBlogPost(); if (array_key_exists("errorMessage", $post)) { $response->getBody()->write(json_encode($post)); @@ -119,114 +100,173 @@ class blogRoutes implements routesInterface return $response; } - $response->getBody()->write(json_encode(array("error" => "Please provide a title"))); + if ($args["type"] == "featured") + { + $post = $this->blogData->getFeaturedBlogPost(); + if (array_key_exists("errorMessage", $post)) + { + $response->getBody()->write(json_encode($post)); + return $response->withStatus(404); + } + + $response->getBody()->write(json_encode($post)); + return $response; + } + + $post = $this->blogData->getBlogPost($args["type"]); + if (array_key_exists("errorMessage", $post)) + { + $response->getBody()->write(json_encode($post)); + return $response->withStatus(404); + } + + $response->getBody()->write(json_encode($post)); + return $response; + + }); + + $app->get("/blog/feed/{type}", function (Request $request, Response $response, $args) + { + if ($args["type"] == null) + { + $response->getBody()->write(json_encode(array("error" => "Please provide a title"))); + return $response->withStatus(400); + } + + $feed = $this->blogData->getFeed($args["type"]); + if (is_array($feed)) + { + $response->getBody()->write(json_encode($feed)); + return $response->withStatus(404); + } + + if ($args["type"] == "atom") + { + $response->getBody()->write($feed); + return $response->withHeader("Content-Type", "application/atom+xml"); + } + + if ($args["type"] == "rss") + { + $response->getBody()->write($feed); + return $response->withHeader("Content-Type", "application/rss+xml"); + } + + if ($args["type"] == "json") + { + $response->getBody()->write(json_encode($feed)); + return $response->withHeader("Content-Type", "application/feed+json"); + } + + $response->getBody()->write(json_encode(array("error" => "Invalid feed type"))); return $response->withStatus(400); }); $app->get("/blog/search/{searchTerm}", function (Request $request, $response, $args) { - if ($args["searchTerm"] != null) + if ($args["searchTerm"] == null) { - $posts = $this->blogData->searchBlog($args["searchTerm"]); - - $json = json_encode($posts); - - $response->getBody()->write($json); - - if (array_key_exists("errorMessage", $posts)) - { - $response->withStatus(404); - } - - return $response; + $response->getBody()->write(json_encode(array("error" => "Please provide a search term"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide a search term"))); - return $response->withStatus(400); + $posts = $this->blogData->searchBlog($args["searchTerm"]); + + $json = json_encode($posts); + + $response->getBody()->write($json); + + if (array_key_exists("errorMessage", $posts)) + { + $response->withStatus(404); + } + + return $response; + }); $app->patch("/blog/post/{id}", function (Request $request, Response $response, $args) { $data = $request->getParsedBody(); - if ($args["id"] != null) + if ($args["id"] == null) { - if (empty($data["title"]) || strlen($data["featured"]) == 0 || empty($data["body"]) || empty($data["bodyText"]) || empty($data["dateModified"]) || empty($data["categories"])) - { - // uh oh sent some empty data - $response->getBody()->write(json_encode(array("error" => "Only some of the data was sent"))); - return $response->withStatus(400); - } - - if (!preg_match('/[a-zA-Z0-9 ]+, |\w+/mx', $data["categories"])) - { - // uh oh sent some empty data - $response->getBody()->write(json_encode(array("error" => "Categories must be in a CSV format"))); - return $response->withStatus(400); - } - - $message = $this->blogData->updatePost($args["id"], $data["title"], intval($data["featured"]), $data["abstract"], $data["body"], $data["bodyText"], $data["dateModified"], $data["categories"]); - - if ($message === "post not found") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, post not found"))); - return $response->withStatus(404); - } - - if ($message === "unset featured") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, cannot unset featured post, try updating another post to be featured first"))); - return $response->withStatus(409); - } - - if (!is_bool($message) || $message === false) - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => $message))); - return $response->withStatus(500); - } - - $response->withStatus(201); - return $response; - + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + if (empty($data["title"]) || strlen($data["featured"]) == 0 || empty($data["body"]) || empty($data["bodyText"]) || empty($data["dateModified"]) || empty($data["categories"])) + { + // uh oh sent some empty data + $response->getBody()->write(json_encode(array("error" => "Only some of the data was sent"))); + return $response->withStatus(400); + } + + if (!preg_match('/[a-zA-Z0-9 ]+, |\w+/mx', $data["categories"])) + { + // uh oh sent some empty data + $response->getBody()->write(json_encode(array("error" => "Categories must be in a CSV format"))); + return $response->withStatus(400); + } + + $message = $this->blogData->updatePost($args["id"], $data["title"], intval($data["featured"]), $data["abstract"], $data["body"], $data["bodyText"], $data["dateModified"], $data["categories"]); + + if ($message === "post not found") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, post not found"))); + return $response->withStatus(404); + } + + if ($message === "unset featured") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, cannot unset featured post, try updating another post to be featured first"))); + return $response->withStatus(409); + } + + if (!is_bool($message) || $message === false) + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => $message))); + return $response->withStatus(500); + } + + $response->withStatus(201); + return $response; + }); $app->delete("/blog/post/{id}", function (Request $request, Response $response, $args) { - if ($args["id"] != null) + if ($args["id"] == null) { - $message = $this->blogData->deletePost($args["id"]); - - if ($message === "post not found") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, post not found"))); - return $response->withStatus(404); - } - - if ($message === "error") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, something went wrong"))); - return $response->withStatus(500); - } - - if ($message === "cannot delete") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, cannot delete featured post"))); - return $response->withStatus(409); - } - return $response; + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + $message = $this->blogData->deletePost($args["id"]); + + if ($message === "post not found") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, post not found"))); + return $response->withStatus(404); + } + + if ($message === "error") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, something went wrong"))); + return $response->withStatus(500); + } + + if ($message === "cannot delete") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, cannot delete featured post"))); + return $response->withStatus(409); + } + return $response; }); $app->post("/blog/post", function (Request $request, Response $response) @@ -290,28 +330,28 @@ class blogRoutes implements routesInterface { $files = $request->getUploadedFiles(); - if ($args["id"] != null) + if ($args["id"] == null) { - if (empty($files)) - { - // uh oh sent some empty data - $response->getBody()->write(json_encode(array("error" => array("message" => "Error, empty data sent")))); - return $response->withStatus(400); - } - - $message = $this->blogData->uploadHeaderImage($args["id"], $files["headerImg"]); - if (!is_array($message)) - { - $response->getBody()->write(json_encode(array("error" => array("message" => $message)))); - return $response->withStatus(500); - } - - $response->getBody()->write(json_encode($message)); - return $response->withStatus(201); + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + if (empty($files)) + { + // uh oh sent some empty data + $response->getBody()->write(json_encode(array("error" => array("message" => "Error, empty data sent")))); + return $response->withStatus(400); + } + + $message = $this->blogData->uploadHeaderImage($args["id"], $files["headerImg"]); + if (!is_array($message)) + { + $response->getBody()->write(json_encode(array("error" => array("message" => $message)))); + return $response->withStatus(500); + } + + $response->getBody()->write(json_encode($message)); + return $response->withStatus(201); }); } } \ No newline at end of file diff --git a/dist/api/project/projectData.php b/dist/api/project/projectData.php index de02be7..8a81b2c 100644 --- a/dist/api/project/projectData.php +++ b/dist/api/project/projectData.php @@ -17,7 +17,7 @@ class projectData { /** * Get all project data - * @return array - Array of all project data or error message + * @return array - Array of all project data or error message */ public function getProjectData(): array { diff --git a/dist/api/project/projectRoutes.php b/dist/api/project/projectRoutes.php index 15171c6..a119a77 100644 --- a/dist/api/project/projectRoutes.php +++ b/dist/api/project/projectRoutes.php @@ -50,78 +50,78 @@ class projectRoutes implements routesInterface $app->patch("/projectData/{id}", function (Request $request, Response $response, array $args) { $data = $request->getParsedBody(); - if ($args["id"] != null) + if ($args["id"] == null) { - if (empty($data["title"]) || empty($data["isMainProject"]) || empty($data["information"]) || empty($data["gitLink"])) - { - // uh oh sent some empty data - $response->getBody()->write(json_encode(array("error" => "Only some of the data was sent"))); - return $response->withStatus(400); - } - - $isMainProject = $data["isMainProject"] === "true"; - $update = $this->projectData->updateProjectData($args["id"], $data["title"], $isMainProject, $data["information"], $data["projectLink"], $data["gitLink"]); - - if ($update === "project not found") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Project with ID " . $args["id"] . " not found"))); - return $response->withStatus(404); - } - - if ($update === "unset main project") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Can't unset project as main project, try updating another project as the main project"))); - return $response->withStatus(400); - } - - if (!$update) - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Something went wrong"))); - return $response->withStatus(500); - } - - return $response; + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + if (empty($data["title"]) || empty($data["isMainProject"]) || empty($data["information"]) || empty($data["gitLink"])) + { + // uh oh sent some empty data + $response->getBody()->write(json_encode(array("error" => "Only some of the data was sent"))); + return $response->withStatus(400); + } + + $isMainProject = $data["isMainProject"] === "true"; + $update = $this->projectData->updateProjectData($args["id"], $data["title"], $isMainProject, $data["information"], $data["projectLink"], $data["gitLink"]); + + if ($update === "project not found") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Project with ID " . $args["id"] . " not found"))); + return $response->withStatus(404); + } + + if ($update === "unset main project") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Can't unset project as main project, try updating another project as the main project"))); + return $response->withStatus(400); + } + + if (!$update) + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Something went wrong"))); + return $response->withStatus(500); + } + + return $response; }); $app->delete("/projectData/{id}", function (Request $request, Response $response, array $args) { - if ($args["id"] != null) + if ($args["id"] == null) { - $message = $this->projectData->deleteProjectData($args["id"]); - - if ($message === "project not found") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Project with ID " . $args["id"] . " not found"))); - return $response->withStatus(404); - } - - if ($message === "cannot delete") - { - //uh oh cannot delete the main project - $response->getBody()->write(json_encode(array("error" => "Cannot delete the main project"))); - return $response->withStatus(409); - } - - if ($message === "error") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Something went wrong"))); - return $response->withStatus(500); - } - - return $response; + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + $message = $this->projectData->deleteProjectData($args["id"]); + + if ($message === "project not found") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Project with ID " . $args["id"] . " not found"))); + return $response->withStatus(404); + } + + if ($message === "cannot delete") + { + //uh oh cannot delete the main project + $response->getBody()->write(json_encode(array("error" => "Cannot delete the main project"))); + return $response->withStatus(409); + } + + if ($message === "error") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Something went wrong"))); + return $response->withStatus(500); + } + + return $response; }); $app->post("/projectData", function (Request $request, Response $response) diff --git a/dist/api/timeline/timelineData.php b/dist/api/timeline/timelineData.php index 4bd8db7..f646e5e 100644 --- a/dist/api/timeline/timelineData.php +++ b/dist/api/timeline/timelineData.php @@ -14,7 +14,7 @@ class timelineData { /** * Get all education data - * @return array - Array of all education data or error message + * @return array - Array of all education data or error message */ public function getEduData(): array { diff --git a/dist/api/utils/feedGenerator/FeedItem.php b/dist/api/utils/feedGenerator/FeedItem.php new file mode 100644 index 0000000..784f187 --- /dev/null +++ b/dist/api/utils/feedGenerator/FeedItem.php @@ -0,0 +1,152 @@ + + * @link http://www.ajaxray.com/projects/rss + */ +class FeedItem +{ + private array $elements = []; // Collection of feed elements + private string $version; + + /** + * Constructor + * + * @param string $version (RSS1/RSS2/ATOM) RSS2 is the default. + */ + public function __construct(string $version = RSS2) + { + $this->version = $version; + } + + /** + * Add an element to elements array + * + * @param string $elementName The tag name of an element + * @param string $content The content of the tag + * @param array|null $attributes Attributes (if any) in 'attrName' => 'attrValue' format + */ + public function addElement(string $elementName, string $content, ?array $attributes = null): void + { + $this->elements[$elementName]['name'] = $elementName; + $this->elements[$elementName]['content'] = $content; + $this->elements[$elementName]['attributes'] = $attributes; + } + + /** + * Set multiple feed elements from an array. + * Elements that have attributes cannot be added by this method + * + * @param array $elementArray Array of elements in 'tagName' => 'tagContent' format. + */ + public function addElementArray(array $elementArray): void + { + foreach ($elementArray as $elementName => $content) + { + $this->addElement($elementName, $content); + } + } + + /** + * Return the collection of elements in this feed item + * + * @return array + */ + public function getElements(): array + { + return $this->elements; + } + + // Wrapper functions ------------------------------------------------------ + + /** + * Set the 'description' element of the feed item + * + * @param string $description The content of the 'description' element + */ + public function setDescription(string $description): void + { + $tag = ($this->version === ATOM) ? 'summary' : 'description'; + $this->addElement($tag, $description); + } + + /** + * Set the 'title' element of the feed item + * + * @param string $title The content of the 'title' element + */ + public function setTitle(string $title): void + { + $this->addElement('title', $title); + } + + /** + * Set the 'date' element of the feed item + * + * @param string|int $date The content of the 'date' element + */ + public function setDate(string|int $date): void + { + if (!is_numeric($date)) + { + $date = strtotime($date); + } + + if ($this->version === ATOM) + { + $tag = 'updated'; + $value = date(DATE_ATOM, $date); + } + elseif ($this->version === RSS2) + { + $tag = 'pubDate'; + $value = date(DATE_RSS, $date); + } + else + { + $tag = 'dc:date'; + $value = date("Y-m-d", $date); + } + + $this->addElement($tag, $value); + } + + /** + * Set the 'link' element of the feed item + * + * @param string $link The content of the 'link' element + */ + public function setLink(string $link): void + { + if ($this->version === RSS2 || $this->version === RSS1) + { + $this->addElement('link', $link); + } + else + { + $this->addElement('link', '', ['href' => $link]); + $this->addElement('id', FeedWriter::uuid($link, 'urn:uuid:')); + } + } + + /** + * Set the 'encloser' element of the feed item + * For RSS 2.0 only + * + * @param string $url The url attribute of the encloser tag + * @param string $length The length attribute of the encloser tag + * @param string $type The type attribute of the encloser tag + */ + public function setEncloser(string $url, string $length, string $type): void + { + $attributes = ['url' => $url, 'length' => $length, 'type' => $type]; + $this->addElement('enclosure', '', $attributes); + } +} diff --git a/dist/api/utils/feedGenerator/FeedWriter.php b/dist/api/utils/feedGenerator/FeedWriter.php new file mode 100644 index 0000000..d2ba973 --- /dev/null +++ b/dist/api/utils/feedGenerator/FeedWriter.php @@ -0,0 +1,386 @@ +version = $version; + + // Setting default values for essential channel elements + $this->channels['title'] = $version . ' Feed'; + $this->channels['link'] = 'http://www.ajaxray.com/blog'; + $this->channels["feedUrl"] = "http://example.com/feed"; + + // Tag names to encode in CDATA + $this->CDATAEncoding = ['description', 'content:encoded', 'summary']; + } + + // Public functions + + /** + * Set a channel element + * + * @param string $elementName Name of the channel tag + * @param string $content Content of the channel tag + */ + public function setChannelElement(string $elementName, string|array $content): void + { + $this->channels[$elementName] = $content; + } + + /** + * Generate the actual RSS/Atom file + */ + public function generateFeed(): void + { + $this->printHead(); + $this->printChannels(); + $this->printItems(); + $this->printTail(); + } + + /** + * Create a new FeedItem. + * + * @return FeedItem An instance of FeedItem class + */ + public function createNewItem(): FeedItem + { + $item = new FeedItem($this->version); + return $item; + } + + /** + * Add a FeedItem to the main class + * + * @param FeedItem $feedItem An instance of FeedItem class + */ + public function addItem(FeedItem $feedItem): void + { + $this->items[] = $feedItem; + } + + // Wrapper functions + + /** + * Set the 'title' channel element + * + * @param string $title Value of 'title' channel tag + */ + public function setTitle(string $title): void + { + $this->setChannelElement('title', $title); + } + + /** + * Set the 'description' channel element + * + * @param string $description Value of 'description' channel tag + */ + public function setDescription(string $description): void + { + $this->setChannelElement('description', $description); + } + + /** + * Set the 'link' channel element + * + * @param string $link Value of 'link' channel tag + */ + public function setLink(string $link): void + { + $this->setChannelElement('link', $link); + } + + /** + * Set the 'image' channel element + * + * @param string $title Title of the image + * @param string $link Link URL of the image + * @param string $url Path URL of the image + */ + public function setImage(string $title, string $link, string $url): void + { + $this->setChannelElement('image', ['title' => $title, 'link' => $link, 'url' => $url]); + } + + /** + * Set the 'about' channel element. Only for RSS 1.0 + * + * @param string $url Value of 'about' channel tag + */ + public function setChannelAbout(string $url): void + { + $this->data['ChannelAbout'] = $url; + } + + // Other functions + + /** + * Generates a UUID + * + * @param string $key An optional prefix + * @param string $prefix A prefix + * @return string The formatted UUID + */ + public static function uuid(?string $key = null, string $prefix = ''): string + { + $key = $key ?? uniqid((string)rand()); + $chars = md5($key); + $uuid = substr($chars, 0, 8) . '-'; + $uuid .= substr($chars, 8, 4) . '-'; + $uuid .= substr($chars, 12, 4) . '-'; + $uuid .= substr($chars, 16, 4) . '-'; + $uuid .= substr($chars, 20, 12); + + return $prefix . $uuid; + } + + // Private functions + + /** + * Prints the XML and RSS namespace + */ + private function printHead(): void + { + $out = '' . "\n"; + + if ($this->version == RSS2) + { + $out .= '' . PHP_EOL; + } + elseif ($this->version == RSS1) + { + $out .= '' . PHP_EOL; + } + elseif ($this->version == ATOM) + { + $out .= '' . PHP_EOL; + } + echo $out; + } + + /** + * Closes the open tags at the end of the file + */ + private function printTail(): void + { + if ($this->version == RSS2) + { + echo '' . PHP_EOL . ''; + } + elseif ($this->version == RSS1) + { + echo ''; + } + elseif ($this->version == ATOM) + { + echo ''; + } + } + + /** + * Creates a single node in XML format + * + * @param string $tagName Name of the tag + * @param mixed $tagContent Tag value as a string or an array of nested tags in 'tagName' => 'tagValue' format + * @param array|null $attributes Attributes (if any) in 'attrName' => 'attrValue' format + * @return string Formatted XML tag + */ + private function makeNode(string $tagName, $tagContent, ?array $attributes = null): string + { + $nodeText = ''; + $attrText = ''; + + if (is_array($attributes)) + { + foreach ($attributes as $key => $value) + { + $attrText .= " $key=\"$value\""; + } + } + + if (is_array($tagContent) && $this->version == RSS1) + { + $attrText = ' rdf:parseType="Resource"'; + } + + $attrText .= (in_array($tagName, $this->CDATAEncoding) && $this->version == ATOM) ? ' type="html" ' : ''; + $nodeText .= (in_array($tagName, $this->CDATAEncoding)) ? "<{$tagName}{$attrText}>"; + + if (is_array($tagContent)) + { + foreach ($tagContent as $key => $value) + { + $nodeText .= $this->makeNode($key, $value); + } + } + else + { + $nodeText .= (in_array($tagName, $this->CDATAEncoding)) ? $tagContent : htmlentities($tagContent); + } + + $nodeText .= (in_array($tagName, $this->CDATAEncoding)) ? "]]>" : ""; + + return $nodeText . PHP_EOL; + } + + /** + * Prints channel elements + */ + private function printChannels(): void + { + // Start channel tag + switch ($this->version) + { + case RSS2: + echo '' . PHP_EOL; + break; + case RSS1: + echo (isset($this->data['ChannelAbout'])) ? "data['ChannelAbout']}\">" : "channels['link']}\">"; + break; + } + + // Print items of channel + foreach ($this->channels as $key => $value) + { + if ($this->version == ATOM && $key == 'link') + { + // ATOM prints the link element as an href attribute + echo $this->makeNode($key, '', ['href' => $value]); + // Add the id for ATOM + echo $this->makeNode('id', $this->uuid($value, 'urn:uuid:')); + } + else if ($this->version == ATOM && $key == 'feedUrl') + { + echo $this->makeNode('link', '', ['rel' => 'self', 'href' => $value]); + } + else + { + echo $this->makeNode($key, $value); + } + } + + // RSS 1.0 has a special tag with channel + if ($this->version == RSS1) + { + echo "" . PHP_EOL . "" . PHP_EOL; + foreach ($this->items as $item) + { + $thisItems = $item->getElements(); + echo "" . PHP_EOL; + } + echo "" . PHP_EOL . "" . PHP_EOL . "" . PHP_EOL; + } + } + + /** + * Prints formatted feed items + */ + private function printItems(): void + { + foreach ($this->items as $item) + { + $thisItems = $item->getElements(); + + // The argument is printed as rdf:about attribute of item in RSS 1.0 + echo $this->startItem($thisItems['link']['content']); + + foreach ($thisItems as $feedItem) + { + echo $this->makeNode($feedItem['name'], $feedItem['content'], $feedItem['attributes']); + } + echo $this->endItem(); + } + } + + /** + * Makes the starting tag of items + * + * @param string|false $about The value of about tag, which is used only for RSS 1.0 + */ + private function startItem($about = false): void + { + if ($this->version == RSS2) + { + echo '' . PHP_EOL; + } + elseif ($this->version == RSS1) + { + if ($about) + { + echo "" . PHP_EOL; + } + else + { + die("link element is not set.\n It's required for RSS 1.0 to be used as the about attribute of the item"); + } + } + elseif ($this->version == ATOM) + { + echo "" . PHP_EOL; + } + } + + /** + * Closes the feed item tag + */ + private function endItem(): void + { + if ($this->version == RSS2 || $this->version == RSS1) + { + echo '' . PHP_EOL; + } + elseif ($this->version == ATOM) + { + echo "" . PHP_EOL; + } + } + + /** + * Set the Feed URL + * @param string $string - The URL of the feed + * @return void + */ + public function setFeedURL(string $string): void + { + $this->setChannelElement("feedUrl", $string); + } +} + + +// Define constants for RSS 1.0, RSS 2.0, and Atom +const RSS1 = 'RSS 1.0'; +const RSS2 = 'RSS 2.0'; +const ATOM = 'ATOM'; diff --git a/dist/api/utils/middleware.php b/dist/api/utils/middleware.php index 0181e91..14d7627 100644 --- a/dist/api/utils/middleware.php +++ b/dist/api/utils/middleware.php @@ -65,7 +65,12 @@ class middleware $app->add(function ($request, $handler) { $response = $handler->handle($request); - return $response->withHeader("Content-Type", "application/json"); + $contentType = $response->getHeaderLine("Content-Type"); + if (empty($contentType) || $contentType === "text/html") + { + return $response->withHeader("Content-Type", "application/json"); + } + return $response; }); } diff --git a/dist/blog/css/main.css b/dist/blog/css/main.css index 9aac408..becadfa 100644 --- a/dist/blog/css/main.css +++ b/dist/blog/css/main.css @@ -1 +1 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--mainHue:80;--mainSat:60%;--mainLight:50%;--primaryDefault:hsla(var(--mainHue), var(--mainSat), var(--mainLight), 1);--primaryHover:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) - 10%), 1);--timelineItemBrdr:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) - 20%), 1);--errorDefault:hsla(0, calc(var(--mainSat) + 10%), calc(var(--mainLight) + 10%), 1);--errorHover:hsla(0, calc(var(--mainSat) + 10%), calc(var(--mainLight) - 10%), 1);--grey:hsla(0, 0%, 39%, 1);--notAvailableDefault:hsla(0, 0%, 39%, 1);--notAvailableHover:hsla(0, 0%, 32%, 1);--mutedGrey:hsla(0, 0%, 78%, 1);--mutedBlack:hsla(0, 0%, 0%, 0.25);--mutedGreen:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) + 20%), 0.5);--navBack:hsla(0, 0%, 30%, 1);--titleFS:2.25rem;--generalFS:1.125rem;--headingFS:1.5rem}*{box-sizing:border-box}html{scroll-behavior:smooth}body{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--generalFS);line-height:1.625rem}a:visited{color:inherit}h1,nav{font-family:Share Tech Mono,monospace;font-style:normal;font-weight:400;font-size:var(--titleFS);line-height:2.5625rem;text-transform:lowercase}h2{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--headingFS);line-height:2.1875rem}a.btn,button.btn,form input[type=submit]{text-decoration:none;display:inline-flex;padding:1em 2em;border-radius:.625em;border:.3215em solid var(--primaryDefault);color:#fff;text-align:center;align-items:center;max-height:4em}form input[type=submit]{padding:1.1em 2em}a.btn:hover,button.btn:hover form input[type=submit]:hover{border:.3215em solid var(--primaryHover)}a.btn:hover::after,a.btn:hover::before{visibility:hidden}a.btnPrimary,button.btnPrimary,form input[type=submit]{background-color:var(--primaryDefault);cursor:pointer}a.btnOutline,button.btnOutline{background:#fff;color:var(--primaryDefault)}a.btnPrimary[disabled],button.btnPrimary[disabled]{pointer-events:none;background:var(--notAvailableDefault);border:.3215em solid var(--notAvailableDefault)}a.btnPrimary[disabled]:hover,button.btnPrimary[disabled]:hover{background:var(--notAvailableHover);border:.3215em solid var(--notAvailableHover)}a.btnPrimary:hover,button.btnPrimary:hover,form input[type=submit]:hover{background:var(--primaryHover);border:.3215em solid var(--primaryHover)}a.btn:active,button.btn:active,form input[type=submit]:active{padding:.8rem 1.8rem}.boxShadowOut:hover{box-shadow:0 6px 4px 0 var(--mutedBlack)}.boxShadowIn:active{box-shadow:inset 0 6px 4px 0 var(--mutedBlack)}.textShadow:hover{text-shadow:0 6px 4px var(--mutedBlack)}form .formControl input:not([type=submit]).invalid:invalid,form .formControl textarea.invalid:invalid{border:.3125em solid var(--errorDefault)}form .formControl input:not([type=submit]).invalid:invalid:focus,form .formControl textarea.invalid:invalid:focus{border:.3125em solid var(--errorHover);box-shadow:0 4px 2px 0 var(--mutedBlack)}form .formControl input:not([type=submit]){height:3em}form .formControl{width:100%;display:flex;flex-direction:column;justify-content:flex-start}form .formControl.passwordControl{display:block}form input[type=submit]{align-self:flex-start}div.menu input:not([type=submit]),form .formControl .ck.ck-editor__main .ck-content,form .formControl .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,form .formControl input:not([type=submit]),form .formControl textarea{width:100%;border:.3125em solid var(--primaryDefault);background:0 0;outline:0;-webkit-border-radius:.5em;-moz-border-radius:.5em;border-radius:.5em;padding:0 .5em}form .formControl textarea{padding:.5em}form .formControl input:not([type=submit]).invalid:invalid,form .formControl textarea.invalid:invalid{border:.3125em solid var(--errorDefault)}form .formControl input:not([type=submit]).invalid:invalid:focus,form .formControl textarea.invalid:invalid:focus{border:.3125em solid var(--errorHover);box-shadow:0 4px 2px 0 var(--mutedBlack)}div.menu input:not([type=submit]):focus,div.menu input:not([type=submit]):hover,form .formControl input:not([type=submit]):focus,form .formControl input:not([type=submit]):hover,form .formControl textarea:focus,form .formControl textarea:hover{border:.3125em solid var(--primaryHover)}form .formControl input:not([type=submit]){height:3em}form .formControl i.fa-eye,form .formControl i.fa-eye-slash{margin-left:-40px;cursor:pointer;color:var(--primaryDefault)}form .formControl input:not([type=submit]):focus+i.fa-eye,form .formControl input:not([type=submit]):focus+i.fa-eye-slash{color:var(--primaryHover)}form .formControl .checkContainer{display:block;position:relative;margin-bottom:1.25em;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}form .formControl .checkContainer input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}form .formControl .checkContainer .checkmark{position:absolute;top:1.25em;left:0;height:25px;width:25px;background-color:var(--mutedGrey)}form .formControl .checkContainer:hover input~.checkmark{background-color:var(--grey)}form .formControl .checkContainer input:checked~.checkmark{background-color:var(--primaryDefault)}form .formControl .checkContainer input:checked:hover~.checkmark{background-color:var(--primaryHover)}form .formControl .checkContainer .checkmark:after{content:"";position:absolute;display:none}form .formControl .checkContainer input:checked~.checkmark:after{display:block}form .formControl .checkContainer .checkmark:after{left:9px;top:5px;width:5px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}form .formControl input[type=file]{padding:0;cursor:pointer}form .formControl input[type=file]::file-selector-button{background-color:var(--primaryDefault);color:#fff;border:0;border-right:5px solid var(--mutedBlack);padding:15px;margin-right:20px;-webkit-transition:all .5s;-moz-transition:all .5s;-ms-transition:all .5s;-o-transition:all .5s;transition:all .5s}form .formControl input[type=file]:hover::file-selector-button{background-color:var(--primaryHover)}section#about,section#curriculumVitae h1{padding:0 5rem}a{color:#000;text-decoration:none;text-transform:lowercase}a.link::after,a.link::before{visibility:hidden;position:absolute;margin-top:1px}a.link::before{content:'<';margin-left:-.5em}a.link::after{content:'>'}a.link:hover::after,a.link:hover::before{visibility:visible}header{background:#6a6a6a url(../../imgs/hero.jpg) no-repeat bottom;background-size:cover;height:40%;color:#fff;backdrop-filter:grayscale(100%);position:relative}nav{display:flex;flex-direction:row;justify-content:space-between;padding:.25em;position:fixed;top:0;width:100%;transition:background-color .4s ease-in;color:#fff;z-index:1}nav.scrolled{background-color:var(--navBack)}nav #nav-check{display:none}nav .nav-btn{display:none}nav h1{margin:0}nav a{text-decoration:none;color:#fff}nav>h1{margin-left:.4em}nav ul{display:flex;flex-direction:row;gap:1em;margin:0 .5em 0 0;justify-content:flex-end;align-items:flex-end}nav ul li{list-style:none}nav ul li span{visibility:hidden}nav ul li .active::after,nav ul li .active::before{visibility:visible}header div{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-top:10em}header div .btn{margin:2em 0}header div button{background:0 0;border:none;display:inline-block;text-align:center;text-decoration:none;font-size:2rem;cursor:pointer}i.fa-chevron-down{color:hsla(0,0%,67%,.58);font-size:3.75em;margin:1.5rem 0}div h1 span{visibility:visible;animation:caret 1s steps(1) infinite}@keyframes caret{50%{visibility:hidden}}@media screen and (max-width:75em){nav{display:block;height:50px;width:100%;background-color:var(--navBack);position:fixed;top:0;padding:0}nav a h1{margin-left:1ch}nav .nav-btn{display:inline-block;position:absolute;right:75px;top:0}nav ul{position:fixed;display:block;width:100%;background-color:#333;transition:all .4s ease-in;overflow-y:hidden;padding-left:.5em;margin-top:7px}nav ul li a{display:block;width:100%;transform:translateX(-30px);transition:all .4s ease-in;opacity:0}.nav-btn label{display:inline-block;cursor:pointer;width:60px;height:50px;position:fixed;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.5s ease-in;-moz-transition:.5s ease-in;-o-transition:.5s ease-in;transition:.5s ease-in}.nav-btn label span{display:block;position:absolute;height:5px;width:100%;background-color:#fff;opacity:1;right:0;top:20px;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.25s ease-in;-moz-transition:.25s ease-in;-o-transition:.25s ease-in;transition:.25s ease-in}nav #nav-check:not(:checked)~ul{height:auto;max-height:0}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(1){top:8px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(2){top:23px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(3){top:38px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:checked~.nav-btn label,nav .nav-btn label:hover{background-color:rgba(-1,0,0,.3)}nav #nav-check:checked~ul{max-height:50vh;overflow-y:hidden}nav #nav-check:checked~ul li a{opacity:1;transform:translateX(0)}nav #nav-check:checked~ul li:nth-child(1) a{transition-delay:.15s}nav #nav-check:checked~ul li:nth-child(2) a{transition-delay:.25s}nav #nav-check:checked~ul li:nth-child(3) a{transition-delay:.35s}nav #nav-check:checked~ul li:nth-child(4) a{transition-delay:.45s}nav #nav-check:checked~ul li:nth-child(5) a{transition-delay:.55s}nav #nav-check:checked~.nav-btn label span:first-child{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}nav #nav-check:checked~.nav-btn label span:nth-child(2){width:0;opacity:0}nav #nav-check:checked~.nav-btn label span:last-child{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}}footer{background-color:var(--primaryDefault);margin-top:5em;padding:2em;display:flex;color:#fff}footer .spacer{width:100%;margin-right:auto}footer p{margin:auto;width:100%;text-align:center}footer .button{margin-left:auto;width:100%;text-align:center}footer .button button{border:5px solid #fff;background:0 0;font-size:3em;padding:.5rem 1rem;width:2em;color:#fff;-webkit-border-radius:.25em;-moz-border-radius:.25em;border-radius:.25em;cursor:pointer}.profile{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;max-width:70%}svg{width:2em;fill:var(--primaryDefault);font-size:2em}footer{margin-top:0}section#individualPost{display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch}div.byLine{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:1em}div.byLine h3:last-child{border-left:2px solid var(--mutedBlack);padding-left:1em;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:1em}div.byLine h3:last-child a{padding:0 1em}div.cover{width:100%;height:20rem;background-position:center;background-size:cover;border-radius:10px;box-shadow:0 4px 2px 0 var(--mutedBlack)}div.mainContent{border-right:5px solid var(--mutedGrey);min-height:100%;width:85%;display:flex;flex-direction:column;justify-content:space-between;align-items:stretch}article{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;padding:0 2em}article a::after,article a::before{visibility:hidden;position:absolute;margin-top:1px}article a::before{content:'<';margin-left:-.5em}article a::after{content:'>'}article a:hover::after,article a:hover::before{visibility:visible}article h1{margin-bottom:.5em}article h3{margin-top:0}aside.sideContent{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;width:15%;align-self:flex-start}div.authorInfo{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:repeat(4,auto);padding-left:1em;padding-top:.5em;border-bottom:5px solid var(--mutedGrey);width:100%}div.authorInfo .picture{display:flex;flex-direction:column;justify-content:center;align-items:center;grid-row:span 3}div.authorInfo h3{grid-column:span 2}div.otherPosts{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;padding:0 1em 1em;border-bottom:5px solid var(--mutedGrey);width:100%}div.otherPosts a{padding:.5em 1em}div.categories{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;padding:0 1em 1em;width:100%}.image img,.image_resized img{max-width:100%;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;box-shadow:0 4px 2px 0 var(--mutedBlack)}.image{justify-self:center;align-self:center}.image-style-side{justify-self:flex-end;align-self:flex-end}section.comments{padding:0 2em 2em}.banner{max-width:30%;box-shadow:0 6px 4px 0 var(--mutedBlack);-webkit-border-radius:.625rem;-moz-border-radius:.625rem;border-radius:.625rem;border:2px solid var(--mutedGrey)}h2{font-family:Share Tech Mono,monospace;font-style:normal;font-weight:400;font-size:var(--headingFS);line-height:2.5625rem;text-transform:lowercase}h3{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--generalFS);line-height:2.1875rem}div.menu{width:100%;border-bottom:5px solid var(--mutedGrey)}div.menu input:not([type=submit]){width:auto;border-top-right-radius:0;border-bottom-right-radius:0}div.menu>ul{list-style:none;display:flex;flex-direction:row;justify-content:space-around}div.menu ul li{display:flex;flex-direction:row}div.menu ul li button.btn{padding:initial;border-radius:0 .5em .5em 0}div.menu ul li input:not([type=submit]):focus+button.btn,div.menu ul li:focus button.btn,div.menu ul li:hover button.btn{background:var(--primaryHover);border:.3215em solid var(--primaryHover)}div.menu ul li:focus input:not([type=submit]),div.menu ul li:hover input:not([type=submit]){border:.3215em solid var(--primaryHover)}section.largePost{display:flex;flex-direction:column;justify-content:space-evenly;align-items:flex-start;gap:2em;width:100%;padding:0 5em 1em}section.largePost:not(:last-child){border-bottom:5px solid var(--mutedGrey)}section.largePost .outerContent{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-around;align-items:center;gap:1em}section.largePost .outerContent>.content,section.largePost .outerContent>img{width:50%}section.largePost .outerContent .postContent{display:flex;flex-direction:column;justify-content:space-evenly;align-items:flex-start}section.largePost .outerContent .postContent h2{align-self:center}section.largePost .outerContent .postContent a{align-self:flex-end}#main .error{display:table;width:100%;height:100vh;text-align:center}.fof{display:table-cell;vertical-align:middle}main>h1{padding-left:3em}section.catPosts .largePost{margin-bottom:3em}section.categories{display:flex;flex-direction:row;justify-content:center;align-items:center;flex-wrap:wrap;width:100%;margin-bottom:5em}section.categories .btnContainer{flex-basis:33.3333333%;display:flex;flex-direction:row;justify-content:center;align-items:center;flex-wrap:wrap}code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8292a2}.token.punctuation{color:#f8f8f2}.token.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.token a{color:inherit}div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;z-index:10;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none}.prism-previewer,.prism-previewer:after,.prism-previewer:before{position:absolute;pointer-events:none}.prism-previewer,.prism-previewer:after{left:50%}.prism-previewer{margin-top:-48px;width:32px;height:32px;margin-left:-16px;z-index:10;opacity:0;-webkit-transition:opacity .25s;-o-transition:opacity .25s;transition:opacity .25s}.prism-previewer.flipped{margin-top:0;margin-bottom:-48px}.prism-previewer:after,.prism-previewer:before{content:'';position:absolute;pointer-events:none}.prism-previewer:before{top:-5px;right:-5px;left:-5px;bottom:-5px;border-radius:10px;border:5px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.5) inset,0 0 10px rgba(0,0,0,.75)}.prism-previewer:after{top:100%;width:0;height:0;margin:5px 0 0 -7px;border:7px solid transparent;border-color:rgba(255,0,0,0);border-top-color:#fff}.prism-previewer.flipped:after{top:auto;bottom:100%;margin-top:0;margin-bottom:5px;border-top-color:rgba(255,0,0,0);border-bottom-color:#fff}.prism-previewer.active{opacity:1}.prism-previewer-angle:before{border-radius:50%;background:#fff}.prism-previewer-angle:after{margin-top:4px}.prism-previewer-angle svg{width:32px;height:32px;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.prism-previewer-angle[data-negative] svg{-webkit-transform:scaleX(-1) rotate(-90deg);-moz-transform:scaleX(-1) rotate(-90deg);-ms-transform:scaleX(-1) rotate(-90deg);-o-transform:scaleX(-1) rotate(-90deg);transform:scaleX(-1) rotate(-90deg)}.prism-previewer-angle circle{fill:transparent;stroke:#2d3438;stroke-opacity:.9;stroke-width:32;stroke-dasharray:0,500}.prism-previewer-gradient{background-image:linear-gradient(45deg,#bbb 25%,transparent 25%,transparent 75%,#bbb 75%,#bbb),linear-gradient(45deg,#bbb 25%,#eee 25%,#eee 75%,#bbb 75%,#bbb);background-size:10px 10px;background-position:0 0,5px 5px;width:64px;margin-left:-32px}.prism-previewer-gradient:before{content:none}.prism-previewer-gradient div{position:absolute;top:-5px;left:-5px;right:-5px;bottom:-5px;border-radius:10px;border:5px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.5) inset,0 0 10px rgba(0,0,0,.75)}.prism-previewer-color{background-image:linear-gradient(45deg,#bbb 25%,transparent 25%,transparent 75%,#bbb 75%,#bbb),linear-gradient(45deg,#bbb 25%,#eee 25%,#eee 75%,#bbb 75%,#bbb);background-size:10px 10px;background-position:0 0,5px 5px}.prism-previewer-color:before{background-color:inherit;background-clip:padding-box}.prism-previewer-easing{margin-top:-76px;margin-left:-30px;width:60px;height:60px;background:#333}.prism-previewer-easing.flipped{margin-bottom:-116px}.prism-previewer-easing svg{width:60px;height:60px}.prism-previewer-easing circle{fill:#2d3438;stroke:#fff}.prism-previewer-easing path{fill:none;stroke:#fff;stroke-linecap:round;stroke-width:4}.prism-previewer-easing line{stroke:#fff;stroke-opacity:.5;stroke-width:2}@-webkit-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@-o-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@-moz-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}.prism-previewer-time:before{border-radius:50%;background:#fff}.prism-previewer-time:after{margin-top:4px}.prism-previewer-time svg{width:32px;height:32px;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.prism-previewer-time circle{fill:transparent;stroke:#2d3438;stroke-opacity:.9;stroke-width:32;stroke-dasharray:0,500;stroke-dashoffset:0;-webkit-animation:prism-previewer-time linear infinite 3s;-moz-animation:prism-previewer-time linear infinite 3s;-o-animation:prism-previewer-time linear infinite 3s;animation:prism-previewer-time linear infinite 3s}.token.punctuation.brace-hover,.token.punctuation.brace-selected{outline:solid 1px}.rainbow-braces .token.punctuation.brace-level-1,.rainbow-braces .token.punctuation.brace-level-5,.rainbow-braces .token.punctuation.brace-level-9{color:#e50;opacity:1}.rainbow-braces .token.punctuation.brace-level-10,.rainbow-braces .token.punctuation.brace-level-2,.rainbow-braces .token.punctuation.brace-level-6{color:#0b3;opacity:1}.rainbow-braces .token.punctuation.brace-level-11,.rainbow-braces .token.punctuation.brace-level-3,.rainbow-braces .token.punctuation.brace-level-7{color:#26f;opacity:1}.rainbow-braces .token.punctuation.brace-level-12,.rainbow-braces .token.punctuation.brace-level-4,.rainbow-braces .token.punctuation.brace-level-8{color:#e0e;opacity:1}pre.diff-highlight>code .token.deleted:not(.prefix),pre>code.diff-highlight .token.deleted:not(.prefix){background-color:rgba(255,0,0,.1);color:inherit;display:block}pre.diff-highlight>code .token.inserted:not(.prefix),pre>code.diff-highlight .token.inserted:not(.prefix){background-color:rgba(0,255,128,.1);color:inherit;display:block}@media screen and (max-width:90em){div.mainContent{width:80%}aside.sideContent{width:20%}}@media screen and (max-width:75em){div.menuBar .menu ul{flex-direction:column;align-items:center;padding-left:1.25em}div.menuBar .menu ul li input[type=search]{width:100%}section.largePost{padding:1em}section.largePost .outerContent{flex-direction:column;justify-content:center;align-items:center}.banner{max-width:50%}section.largePost .outerContent>.content,section.largePost .outerContent>img{width:90%}section#individualPost{flex-direction:column-reverse;justify-content:center;align-items:center}div.mainContent{width:100%;border-right:none}aside.sideContent{width:100%;flex-direction:row;align-items:stretch;justify-content:space-around;border-bottom:5px solid var(--mutedGrey)}div.authorInfo,div.otherPosts{border-bottom:none}aside.sideContent>div.authorInfo{grid-template-columns:1fr 1fr 1fr}aside.sideContent>div.authorInfo .picture{grid-row:1;grid-column:span 3}aside.sideContent>div.authorInfo h3{grid-column:span 3}div.otherPosts{justify-content:space-between}aside.sideContent>div{border-right:5px solid var(--mutedGrey);flex-basis:50%}aside.sideContent>div:last-child{border-right:none}main>h1{padding-left:1em}}@media screen and (max-width:55em){.banner{max-width:75%}aside.sideContent{flex-wrap:wrap}aside.sideContent>div.authorInfo{grid-template-columns:2fr 1fr;border-bottom:5px solid var(--mutedGrey);flex-basis:100%}aside.sideContent>div.authorInfo .picture{grid-row:span 3;grid-column:initial}div.byLine{flex-direction:column;align-items:flex-start}div.byLine h3:last-child{border-left:none;padding-left:0}aside.sideContent>div.authorInfo h3{grid-column:span 2}aside.sideContent>div.categories{flex-basis:100%}aside.sideContent>div.otherPosts{border-bottom:5px solid var(--mutedGrey)}}@media screen and (max-width:30em){.profile{max-width:50%}section#individualPost{flex-direction:column}aside.sideContent{flex-direction:column;align-items:center;border-bottom:none}aside.sideContent>div.authorInfo{grid-template-columns:1fr 1fr 1fr;border-top:5px solid var(--mutedGrey)}aside.sideContent>div.authorInfo .picture{grid-row:1;grid-column:span 3}aside.sideContent>div.authorInfo h3{grid-column:span 3}} \ No newline at end of file +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--mainHue:80;--mainSat:60%;--mainLight:50%;--primaryDefault:hsla(var(--mainHue), var(--mainSat), var(--mainLight), 1);--primaryHover:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) - 10%), 1);--timelineItemBrdr:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) - 20%), 1);--errorDefault:hsla(0, calc(var(--mainSat) + 10%), calc(var(--mainLight) + 10%), 1);--errorHover:hsla(0, calc(var(--mainSat) + 10%), calc(var(--mainLight) - 10%), 1);--grey:hsla(0, 0%, 39%, 1);--notAvailableDefault:hsla(0, 0%, 39%, 1);--notAvailableHover:hsla(0, 0%, 32%, 1);--mutedGrey:hsla(0, 0%, 78%, 1);--mutedBlack:hsla(0, 0%, 0%, 0.25);--mutedGreen:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) + 20%), 0.5);--navBack:hsla(0, 0%, 30%, 1);--titleFS:2.25rem;--generalFS:1.125rem;--headingFS:1.5rem}*{box-sizing:border-box}html{scroll-behavior:smooth}body{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--generalFS);line-height:1.625rem}a:visited{color:inherit}h1,nav{font-family:Share Tech Mono,monospace;font-style:normal;font-weight:400;font-size:var(--titleFS);line-height:2.5625rem;text-transform:lowercase}h2{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--headingFS);line-height:2.1875rem}a.btn,button.btn,form input[type=submit]{text-decoration:none;display:inline-flex;padding:1em 2em;border-radius:.625em;border:.3215em solid var(--primaryDefault);color:#fff;text-align:center;align-items:center;max-height:4em}form input[type=submit]{padding:1.1em 2em}a.btn:hover,button.btn:hover form input[type=submit]:hover{border:.3215em solid var(--primaryHover)}a.btn:hover::after,a.btn:hover::before{visibility:hidden}a.btnPrimary,button.btnPrimary,form input[type=submit]{background-color:var(--primaryDefault);cursor:pointer}a.btnOutline,button.btnOutline{background:#fff;color:var(--primaryDefault)}a.btnPrimary[disabled],button.btnPrimary[disabled]{pointer-events:none;background:var(--notAvailableDefault);border:.3215em solid var(--notAvailableDefault)}a.btnPrimary[disabled]:hover,button.btnPrimary[disabled]:hover{background:var(--notAvailableHover);border:.3215em solid var(--notAvailableHover)}a.btnPrimary:hover,button.btnPrimary:hover,form input[type=submit]:hover{background:var(--primaryHover);border:.3215em solid var(--primaryHover)}a.btn:active,button.btn:active,form input[type=submit]:active{padding:.8rem 1.8rem}.boxShadowOut:hover{box-shadow:0 6px 4px 0 var(--mutedBlack)}.boxShadowIn:active{box-shadow:inset 0 6px 4px 0 var(--mutedBlack)}.textShadow:hover{text-shadow:0 6px 4px var(--mutedBlack)}form .formControl input:not([type=submit]).invalid:invalid,form .formControl textarea.invalid:invalid{border:.3125em solid var(--errorDefault)}form .formControl input:not([type=submit]).invalid:invalid:focus,form .formControl textarea.invalid:invalid:focus{border:.3125em solid var(--errorHover);box-shadow:0 4px 2px 0 var(--mutedBlack)}form .formControl input:not([type=submit]){height:3em}form .formControl{width:100%;display:flex;flex-direction:column;justify-content:flex-start}form .formControl.passwordControl{display:block}form input[type=submit]{align-self:flex-start}div.menu input:not([type=submit]),form .formControl .ck.ck-editor__main .ck-content,form .formControl .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,form .formControl input:not([type=submit]),form .formControl textarea{width:100%;border:.3125em solid var(--primaryDefault);background:0 0;outline:0;-webkit-border-radius:.5em;-moz-border-radius:.5em;border-radius:.5em;padding:0 .5em}form .formControl textarea{padding:.5em}form .formControl input:not([type=submit]).invalid:invalid,form .formControl textarea.invalid:invalid{border:.3125em solid var(--errorDefault)}form .formControl input:not([type=submit]).invalid:invalid:focus,form .formControl textarea.invalid:invalid:focus{border:.3125em solid var(--errorHover);box-shadow:0 4px 2px 0 var(--mutedBlack)}div.menu input:not([type=submit]):focus,div.menu input:not([type=submit]):hover,form .formControl input:not([type=submit]):focus,form .formControl input:not([type=submit]):hover,form .formControl textarea:focus,form .formControl textarea:hover{border:.3125em solid var(--primaryHover)}form .formControl input:not([type=submit]){height:3em}form .formControl i.fa-eye,form .formControl i.fa-eye-slash{margin-left:-40px;cursor:pointer;color:var(--primaryDefault)}form .formControl input:not([type=submit]):focus+i.fa-eye,form .formControl input:not([type=submit]):focus+i.fa-eye-slash{color:var(--primaryHover)}form .formControl .checkContainer{display:block;position:relative;margin-bottom:1.25em;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}form .formControl .checkContainer input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}form .formControl .checkContainer .checkmark{position:absolute;top:1.25em;left:0;height:25px;width:25px;background-color:var(--mutedGrey)}form .formControl .checkContainer:hover input~.checkmark{background-color:var(--grey)}form .formControl .checkContainer input:checked~.checkmark{background-color:var(--primaryDefault)}form .formControl .checkContainer input:checked:hover~.checkmark{background-color:var(--primaryHover)}form .formControl .checkContainer .checkmark:after{content:"";position:absolute;display:none}form .formControl .checkContainer input:checked~.checkmark:after{display:block}form .formControl .checkContainer .checkmark:after{left:9px;top:5px;width:5px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}form .formControl input[type=file]{padding:0;cursor:pointer}form .formControl input[type=file]::file-selector-button{background-color:var(--primaryDefault);color:#fff;border:0;border-right:5px solid var(--mutedBlack);padding:15px;margin-right:20px;-webkit-transition:all .5s;-moz-transition:all .5s;-ms-transition:all .5s;-o-transition:all .5s;transition:all .5s}form .formControl input[type=file]:hover::file-selector-button{background-color:var(--primaryHover)}section#about,section#curriculumVitae h1{padding:0 5rem}a{color:#000;text-decoration:none;text-transform:lowercase}a.link{padding:0 .5em}a.link::after,a.link::before{visibility:hidden;position:absolute;margin-top:1px}a.link::before{content:' <';margin-left:-.5em}a.link::after{content:'> '}a.link:hover::after,a.link:hover::before{visibility:visible}header{background:#6a6a6a url(../../imgs/hero.jpg) no-repeat bottom;background-size:cover;height:40%;color:#fff;backdrop-filter:grayscale(100%);position:relative}nav{display:flex;flex-direction:row;justify-content:space-between;padding:.25em;position:fixed;top:0;width:100%;transition:background-color .4s ease-in;color:#fff;z-index:100000000000000000000000000}nav.scrolled{background-color:var(--navBack)}nav #nav-check{display:none}nav .nav-btn{display:none}nav h1{margin:0}nav a{text-decoration:none;color:#fff}nav>h1{margin-left:.4em}nav ul{display:flex;flex-direction:row;gap:1em;margin:0 .5em 0 0;justify-content:flex-end;align-items:flex-end}nav ul li{list-style:none}nav ul li span{visibility:hidden}nav ul li .active::after,nav ul li .active::before{visibility:visible}header div{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-top:10em}header div .btn{margin:2em 0}header div button{background:0 0;border:none;display:inline-block;text-align:center;text-decoration:none;font-size:2rem;cursor:pointer}i.fa-chevron-down{color:hsla(0,0%,67%,.58);font-size:3.75em;margin:1.5rem 0}div h1 span{visibility:visible;animation:caret 1s steps(1) infinite}@keyframes caret{50%{visibility:hidden}}@media screen and (max-width:75em){nav{display:block;height:50px;width:100%;background-color:var(--navBack);position:fixed;top:0;padding:0}nav a h1{margin-left:1ch}nav .nav-btn{display:inline-block;position:absolute;right:75px;top:0}nav ul{position:fixed;display:block;width:100%;background-color:#333;transition:all .4s ease-in;overflow-y:hidden;padding-left:.5em;margin-top:7px}nav ul li a{display:block;width:100%;transform:translateX(-30px);transition:all .4s ease-in;opacity:0}.nav-btn label{display:inline-block;cursor:pointer;width:60px;height:50px;position:fixed;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.5s ease-in;-moz-transition:.5s ease-in;-o-transition:.5s ease-in;transition:.5s ease-in}.nav-btn label span{display:block;position:absolute;height:5px;width:100%;background-color:#fff;opacity:1;right:0;top:20px;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.25s ease-in;-moz-transition:.25s ease-in;-o-transition:.25s ease-in;transition:.25s ease-in}nav #nav-check:not(:checked)~ul{height:auto;max-height:0}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(1){top:8px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(2){top:23px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(3){top:38px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:checked~.nav-btn label,nav .nav-btn label:hover{background-color:rgba(-1,0,0,.3)}nav #nav-check:checked~ul{max-height:50vh;overflow-y:hidden}nav #nav-check:checked~ul li a{opacity:1;transform:translateX(0)}nav #nav-check:checked~ul li:nth-child(1) a{transition-delay:.15s}nav #nav-check:checked~ul li:nth-child(2) a{transition-delay:.25s}nav #nav-check:checked~ul li:nth-child(3) a{transition-delay:.35s}nav #nav-check:checked~ul li:nth-child(4) a{transition-delay:.45s}nav #nav-check:checked~ul li:nth-child(5) a{transition-delay:.55s}nav #nav-check:checked~.nav-btn label span:first-child{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}nav #nav-check:checked~.nav-btn label span:nth-child(2){width:0;opacity:0}nav #nav-check:checked~.nav-btn label span:last-child{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}}footer{background-color:var(--primaryDefault);margin-top:5em;padding:2em;display:flex;color:#fff}footer .spacer{width:100%;margin-right:auto}footer .nav{width:100%;margin-right:auto;display:flex;flex-direction:row;justify-content:center;align-items:center}footer .nav ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;justify-content:space-around}footer .nav ul a{color:#fff}footer p{margin:auto;width:100%;text-align:center}footer .button{margin-left:auto;width:100%;text-align:center}footer .button button{border:5px solid #fff;background:0 0;font-size:3em;padding:.5rem 1rem;width:2em;color:#fff;-webkit-border-radius:.25em;-moz-border-radius:.25em;border-radius:.25em;cursor:pointer}.profile{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;max-width:70%}svg{width:2em;fill:var(--primaryDefault);font-size:2em}footer{margin-top:0}section#individualPost{display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch}div.byLine{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:1em}div.byLine h3:last-child{border-left:2px solid var(--mutedBlack);padding-left:1em;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:1em}div.byLine h3:last-child a{padding:0 1em}div.cover{width:100%;height:20rem;background-position:center;background-size:cover;border-radius:10px;box-shadow:0 4px 2px 0 var(--mutedBlack)}div.mainContent{border-right:5px solid var(--mutedGrey);min-height:100%;width:85%;display:flex;flex-direction:column;justify-content:space-between;align-items:stretch}article{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;padding:0 2em}article a{padding:0 1em}article a::after,article a::before{visibility:hidden;position:absolute;margin-top:1px}article a::before{content:' <';margin-left:-.5em}article a::after{content:'>'}article a:hover::after,article a:hover::before{visibility:visible}article h1{margin-bottom:.5em}article h3{margin-top:0}aside.sideContent{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;width:15%;align-self:flex-start}div.authorInfo{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:repeat(4,auto);padding-left:1em;padding-top:.5em;border-bottom:5px solid var(--mutedGrey);width:100%}div.authorInfo .picture{display:flex;flex-direction:column;justify-content:center;align-items:center;grid-row:span 3}div.authorInfo h3{grid-column:span 2}div.feeds,div.newsletter,div.otherPosts{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;padding:0 1em 1em;border-bottom:5px solid var(--mutedGrey);width:100%}div.feeds a,div.otherPosts a{padding:.5em 1em}div.newsletter form input[type=submit]{margin-top:1em;padding:.5em 1em}div.feeds .icons{display:flex;flex-direction:row;justify-content:space-around;align-items:flex-start;gap:.5em;flex-wrap:wrap-reverse}div.feeds h2{margin-bottom:0}div.feeds i.fa-solid.fa-rss{font-size:2em}div.feeds img.atom,div.feeds img.json{width:2em}div.categories{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;padding:0 1em 1em;width:100%}.image img,.image_resized img{max-width:100%;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;box-shadow:0 4px 2px 0 var(--mutedBlack)}.image{justify-self:center;align-self:center}.image-style-side{justify-self:flex-end;align-self:flex-end}section.comments{padding:0 2em 2em}.banner{max-width:30%;box-shadow:0 6px 4px 0 var(--mutedBlack);-webkit-border-radius:.625rem;-moz-border-radius:.625rem;border-radius:.625rem;border:2px solid var(--mutedGrey)}h2{font-family:Share Tech Mono,monospace;font-style:normal;font-weight:400;font-size:var(--headingFS);line-height:2.5625rem;text-transform:lowercase}h3{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--generalFS);line-height:2.1875rem}div.menu{width:100%;border-bottom:5px solid var(--mutedGrey)}div.menu input:not([type=submit]){width:auto;border-top-right-radius:0;border-bottom-right-radius:0}div.menu>ul{list-style:none;display:flex;flex-direction:row;justify-content:space-around}div.menu ul li{display:flex;flex-direction:row}div.menu ul li button.btn{padding:initial;border-radius:0 .5em .5em 0}div.menu ul li input:not([type=submit]):focus+button.btn,div.menu ul li:focus button.btn,div.menu ul li:hover button.btn{background:var(--primaryHover);border:.3215em solid var(--primaryHover)}div.menu ul li:focus input:not([type=submit]),div.menu ul li:hover input:not([type=submit]){border:.3215em solid var(--primaryHover)}section.largePost{display:flex;flex-direction:column;justify-content:space-evenly;align-items:flex-start;gap:2em;width:100%;padding:0 5em 1em}section.largePost:not(:last-child){border-bottom:5px solid var(--mutedGrey)}section.largePost .outerContent{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-around;align-items:center;gap:1em}section.largePost .outerContent>.content,section.largePost .outerContent>img{width:50%}section.largePost .outerContent .postContent{display:flex;flex-direction:column;justify-content:space-evenly;align-items:flex-start}section.largePost .outerContent .postContent h2{align-self:center}section.largePost .outerContent .postContent a{align-self:flex-end}#main .error{display:table;width:100%;height:100vh;text-align:center}.fof{display:table-cell;vertical-align:middle}main>h1{padding-left:3em}section.catPosts .largePost{margin-bottom:3em}section.categories{display:flex;flex-direction:row;justify-content:center;align-items:center;flex-wrap:wrap;width:100%;margin-bottom:5em}section.categories .btnContainer{flex-basis:33.3333333%;display:flex;flex-direction:row;justify-content:center;align-items:center;flex-wrap:wrap}code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8292a2}.token.punctuation{color:#f8f8f2}.token.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.token a{color:inherit}div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;z-index:10;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none}.prism-previewer,.prism-previewer:after,.prism-previewer:before{position:absolute;pointer-events:none}.prism-previewer,.prism-previewer:after{left:50%}.prism-previewer{margin-top:-48px;width:32px;height:32px;margin-left:-16px;z-index:10;opacity:0;-webkit-transition:opacity .25s;-o-transition:opacity .25s;transition:opacity .25s}.prism-previewer.flipped{margin-top:0;margin-bottom:-48px}.prism-previewer:after,.prism-previewer:before{content:'';position:absolute;pointer-events:none}.prism-previewer:before{top:-5px;right:-5px;left:-5px;bottom:-5px;border-radius:10px;border:5px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.5) inset,0 0 10px rgba(0,0,0,.75)}.prism-previewer:after{top:100%;width:0;height:0;margin:5px 0 0 -7px;border:7px solid transparent;border-color:rgba(255,0,0,0);border-top-color:#fff}.prism-previewer.flipped:after{top:auto;bottom:100%;margin-top:0;margin-bottom:5px;border-top-color:rgba(255,0,0,0);border-bottom-color:#fff}.prism-previewer.active{opacity:1}.prism-previewer-angle:before{border-radius:50%;background:#fff}.prism-previewer-angle:after{margin-top:4px}.prism-previewer-angle svg{width:32px;height:32px;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.prism-previewer-angle[data-negative] svg{-webkit-transform:scaleX(-1) rotate(-90deg);-moz-transform:scaleX(-1) rotate(-90deg);-ms-transform:scaleX(-1) rotate(-90deg);-o-transform:scaleX(-1) rotate(-90deg);transform:scaleX(-1) rotate(-90deg)}.prism-previewer-angle circle{fill:transparent;stroke:#2d3438;stroke-opacity:.9;stroke-width:32;stroke-dasharray:0,500}.prism-previewer-gradient{background-image:linear-gradient(45deg,#bbb 25%,transparent 25%,transparent 75%,#bbb 75%,#bbb),linear-gradient(45deg,#bbb 25%,#eee 25%,#eee 75%,#bbb 75%,#bbb);background-size:10px 10px;background-position:0 0,5px 5px;width:64px;margin-left:-32px}.prism-previewer-gradient:before{content:none}.prism-previewer-gradient div{position:absolute;top:-5px;left:-5px;right:-5px;bottom:-5px;border-radius:10px;border:5px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.5) inset,0 0 10px rgba(0,0,0,.75)}.prism-previewer-color{background-image:linear-gradient(45deg,#bbb 25%,transparent 25%,transparent 75%,#bbb 75%,#bbb),linear-gradient(45deg,#bbb 25%,#eee 25%,#eee 75%,#bbb 75%,#bbb);background-size:10px 10px;background-position:0 0,5px 5px}.prism-previewer-color:before{background-color:inherit;background-clip:padding-box}.prism-previewer-easing{margin-top:-76px;margin-left:-30px;width:60px;height:60px;background:#333}.prism-previewer-easing.flipped{margin-bottom:-116px}.prism-previewer-easing svg{width:60px;height:60px}.prism-previewer-easing circle{fill:#2d3438;stroke:#fff}.prism-previewer-easing path{fill:none;stroke:#fff;stroke-linecap:round;stroke-width:4}.prism-previewer-easing line{stroke:#fff;stroke-opacity:.5;stroke-width:2}@-webkit-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@-o-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@-moz-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}.prism-previewer-time:before{border-radius:50%;background:#fff}.prism-previewer-time:after{margin-top:4px}.prism-previewer-time svg{width:32px;height:32px;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.prism-previewer-time circle{fill:transparent;stroke:#2d3438;stroke-opacity:.9;stroke-width:32;stroke-dasharray:0,500;stroke-dashoffset:0;-webkit-animation:prism-previewer-time linear infinite 3s;-moz-animation:prism-previewer-time linear infinite 3s;-o-animation:prism-previewer-time linear infinite 3s;animation:prism-previewer-time linear infinite 3s}.token.punctuation.brace-hover,.token.punctuation.brace-selected{outline:solid 1px}.rainbow-braces .token.punctuation.brace-level-1,.rainbow-braces .token.punctuation.brace-level-5,.rainbow-braces .token.punctuation.brace-level-9{color:#e50;opacity:1}.rainbow-braces .token.punctuation.brace-level-10,.rainbow-braces .token.punctuation.brace-level-2,.rainbow-braces .token.punctuation.brace-level-6{color:#0b3;opacity:1}.rainbow-braces .token.punctuation.brace-level-11,.rainbow-braces .token.punctuation.brace-level-3,.rainbow-braces .token.punctuation.brace-level-7{color:#26f;opacity:1}.rainbow-braces .token.punctuation.brace-level-12,.rainbow-braces .token.punctuation.brace-level-4,.rainbow-braces .token.punctuation.brace-level-8{color:#e0e;opacity:1}pre.diff-highlight>code .token.deleted:not(.prefix),pre>code.diff-highlight .token.deleted:not(.prefix){background-color:rgba(255,0,0,.1);color:inherit;display:block}pre.diff-highlight>code .token.inserted:not(.prefix),pre>code.diff-highlight .token.inserted:not(.prefix){background-color:rgba(0,255,128,.1);color:inherit;display:block}.policy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding-left:5em;padding-bottom:5em}.policy h3{font-weight:700}@media screen and (max-width:90em){div.mainContent{width:80%}aside.sideContent{width:20%}}@media screen and (max-width:75em){div.menuBar .menu ul{flex-direction:column;align-items:center;padding-left:1.25em}div.menuBar .menu ul li input[type=search]{width:100%}section.largePost{padding:1em}section.largePost .outerContent{flex-direction:column;justify-content:center;align-items:center}.banner{max-width:50%}section.largePost .outerContent>.content,section.largePost .outerContent>img{width:90%}section#individualPost{flex-direction:column-reverse;justify-content:center;align-items:center}div.mainContent{width:100%;border-right:none}aside.sideContent{width:100%;flex-direction:row;align-items:stretch;justify-content:space-around;border-bottom:5px solid var(--mutedGrey);flex-wrap:wrap}aside.sideContent>div.authorInfo{grid-template-columns:4fr 1fr 1fr 1fr;flex-basis:100%}aside.sideContent>div.authorInfo .picture{grid-row:span 3}div.byLine{flex-direction:column;align-items:flex-start}div.byLine h3:last-child{border-left:none;padding-left:0}aside.sideContent>div.authorInfo h3{grid-column-start:2;grid-column-end:end;grid-row:3}aside.sideContent>div.categories{flex-basis:100%}aside.sideContent>div.otherPosts{border-bottom:5px solid var(--mutedGrey)}div.feeds,div.newsletter,div.otherPosts{justify-content:space-between;width:50%}aside.sideContent>div{border-right:5px solid var(--mutedGrey);flex-basis:50%}aside.sideContent>div:last-child{border-right:none}main>h1{padding-left:1em}}@media screen and (max-width:55em){.banner{max-width:75%}aside.sideContent>div.authorInfo{grid-template-columns:2fr 1fr 1fr;grid-template-rows:1fr 1fr}aside.sideContent>div.authorInfo h3{grid-row:2}}@media screen and (max-width:30em){.profile{max-width:50%}section#individualPost{flex-direction:column}aside.sideContent{flex-direction:column;align-items:center;border-bottom:none}aside.sideContent>div.authorInfo{grid-template-columns:1fr 1fr 1fr;grid-template-rows:repeat(3,auto);border-top:5px solid var(--mutedGrey)}aside.sideContent>div.authorInfo .picture{grid-row:1;grid-column:span 3}aside.sideContent>div.authorInfo h3{grid-column:span 3}div.feeds,div.newsletter,div.otherPosts{width:100%}} \ No newline at end of file diff --git a/dist/blog/imgs/atomFeed.svg b/dist/blog/imgs/atomFeed.svg new file mode 100644 index 0000000..4af0d29 --- /dev/null +++ b/dist/blog/imgs/atomFeed.svg @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + + + + + + + + + diff --git a/dist/blog/imgs/jsonFeed.svg b/dist/blog/imgs/jsonFeed.svg new file mode 100644 index 0000000..bff5bde --- /dev/null +++ b/dist/blog/imgs/jsonFeed.svg @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/dist/blog/index.html b/dist/blog/index.html index 471db0e..104d134 100644 --- a/dist/blog/index.html +++ b/dist/blog/index.html @@ -1 +1 @@ -Rohit Pai - Blog

full stack developer

Contact Me

© Rohit Pai all rights reserved

\ No newline at end of file +Rohit Pai - Blog

full stack developer

Contact Me
\ No newline at end of file diff --git a/dist/blog/js/index.js b/dist/blog/js/index.js index dc5f439..b4ff6cb 100644 --- a/dist/blog/js/index.js +++ b/dist/blog/js/index.js @@ -1 +1 @@ -const scrollLimit=150;function goToURL(e){let t=e.split("/");if("/blog/"!==e&&"/blog"!==e){if("post"!==t[2])return"category"===t[2]?t[3]?void loadPostsByCategory(t[t.length-1]):void loadAllCategories().catch((e=>console.log(e))):void("search"===t[2]&&t[3]?loadSearchResults(t[t.length-1]):show404());loadIndividualPost(t[t.length-1]).catch((e=>console.log(e)))}else loadHomeContent()}function createLargePost(e){let t=document.createElement("div");t.classList.add("outerContent");let n=document.createElement("img");n.className="banner",n.src=e.headerImg,n.alt=e.title,t.appendChild(n);let a=document.createElement("div");a.classList.add("content");let o=document.createElement("div");o.classList.add("postContent");let s="";return e.categories.split(", ").forEach((t=>{s+=`${t}`,e.categories.split(", ").length>1&&(s+=", ")})),s.endsWith(", ")&&(s=s.substring(0,s.length-2)),o.innerHTML=`\n

${e.title}

\n

Last updated: ${e.dateModified} | ${s}

\n

${e.abstract}

\n See Post\n `,a.appendChild(o),t.appendChild(a),t}function loadHomeContent(){fetch("/api/blog/post").then((e=>e.json().then((e=>{for(let t=0;te.json())),await fetch("/api/blog/post/featured").then((e=>e.json()))]}function csvToArray(e){let t="",n=[""],a=0,o=!0,s=null;for(s of e)'"'===s?(o&&s===t&&(n[a]+=s),o=!o):","===s&&o?s=n[++a]="":"\n"===s&&o?("\r"===t&&(row[a]=row[a].slice(0,-1)),n=n[++r]=[s=""],a=0):n[a]+=s,t=s;return n}async function getCategories(){let e=await fetch("/api/blog/categories").then((e=>e.json())),t=[];return e.forEach((e=>t=t.concat(csvToArray(e.categories.replace(/\s*,\s*/g,","))))),[...new Set(t)]}function createCategories(e){let t="";return e.forEach((e=>t+=`${e}`)),t}function createButtonCategories(e){let t="";return e.forEach((e=>e.forEach((e=>t+=`${e}`)))),t}async function createSideContent(){let e=await getLatestAndFeaturedPosts(),t=e[0],n=e[1],a=createCategories(await getCategories()),o=document.createElement("aside");return o.classList.add("sideContent"),o.innerHTML=`\n
\n
\n My professional picture taken in brighton near \n                                        north street at night wearing a beige jacket and checkered shirt\n

Rohit Pai

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n

Avid Full Stack Dev | Uni of Notts Grad | Amateur Blogger

\n\n
\n \n \n
\n

categories

\n ${a}\n
\n `,o}async function loadIndividualPost(e){document.title="Rohit Pai - "+decodeURI(e),await fetch(`/api/blog/post/${e}`).then((async e=>{e.ok?await e.json().then((async e=>{let t=document.createElement("section");t.classList.add("post"),t.id="individualPost";let n=document.createElement("div");n.classList.add("mainContent");let a=document.createElement("article");a.innerHTML=`\n

${e.title}

\n \n
\n ${e.body}\n `;let o=document.createElement("section");o.classList.add("comments"),o.innerHTML='

Comments

\n
\n ',n.appendChild(a),n.appendChild(o);let s=await createSideContent();t.appendChild(n),t.appendChild(s),document.querySelector("#main").appendChild(t);var c,l;c=document,(l=c.createElement("script")).src="https://rohitpaiportfolio.disqus.com/embed.js",l.setAttribute("data-timestamp",+new Date),c.body.appendChild(l)})):show404()}))}async function loadAllCategories(){document.title="Rohit Pai - Categories";let e=await getCategories(),t=document.querySelector("#main"),n=document.createElement("section");n.classList.add("categories"),n.id="allCategories";let a=document.createElement("h1");a.innerHTML="Categories",t.appendChild(a);for(let t of e){let e=document.createElement("div");e.classList.add("btnContainer");let a=document.createElement("a");a.classList.add("btn"),a.classList.add("btnPrimary"),a.innerHTML=t,a.href=`/blog/category/${t}`,e.appendChild(a),n.appendChild(e)}t.appendChild(n)}function loadPostsByCategory(e){document.title="Rohit Pai - "+decodeURI(e),fetch(`/api/blog/categories/${e}`).then((t=>t.json().then((t=>{let n=document.querySelector("#main"),a=document.createElement("section");a.classList.add("catPosts"),a.id="postsByCategory";let o=document.createElement("h1");o.innerHTML=decodeURI(e),n.appendChild(o);for(let e=0;ee.json().then((e=>{let t=document.querySelector("#main"),n=document.createElement("section");n.classList.add("catPosts"),n.id="searchResults";let a=document.createElement("h1");a.innerHTML="Search Results",t.appendChild(a);for(let t=0;t{goToURL(window.location.pathname)})),window.addEventListener("popstate",(e=>{goToURL(window.history.state)})),window.onscroll=()=>{document.body.scrollTop>=150||document.documentElement.scrollTop>=150?document.querySelector("nav").classList.add("scrolled"):document.querySelector("nav").classList.remove("scrolled")},document.querySelector("#searchBtn").addEventListener("click",(e=>{let t=document.querySelector("#searchField").value;t.length>0&&(window.history.pushState(null,null,`/blog/search/${t}`),document.querySelector("#searchField").value="",document.querySelector("#main").innerHTML="",goToURL(`/blog/search/${t}`))})),document.querySelector("#searchField").addEventListener("keyup",(e=>{"Enter"===e.key&&document.querySelector("#searchBtn").click()})); \ No newline at end of file +const scrollLimit=150;function goToURL(t){let e=t.split("/");if("/blog/"!==t&&"/blog"!==t)if("post"!==e[2]){if("category"===e[2])return e[3]?void loadPostsByCategory(e[e.length-1]):void loadAllCategories().catch((t=>console.log(t)));if("search"===e[2]&&e[3])loadSearchResults(e[e.length-1]);else{if("policy"===e[2]){if("privacy"===e[3])return void loadPrivacyPolicy();if("cookie"===e[3])return void loadCookiePolicy()}show404()}}else loadIndividualPost(e[e.length-1]).catch((t=>console.log(t)));else loadHomeContent()}function createFormattedDate(t){return new Date(t).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}function createLargePost(t){let e=document.createElement("div");e.classList.add("outerContent");let n=document.createElement("img");n.className="banner",n.src=t.headerImg,n.alt=t.title,e.appendChild(n);let o=document.createElement("div");o.classList.add("content");let a=document.createElement("div");a.classList.add("postContent");let i="";t.categories.split(", ").forEach((e=>{i+=`${e}`,t.categories.split(", ").length>1&&(i+=", ")})),i.endsWith(", ")&&(i=i.substring(0,i.length-2));let r=createFormattedDate(t.dateModified);return a.innerHTML=`\n

${t.title}

\n

Last updated: ${r} | ${i}

\n

${t.abstract}

\n See Post\n `,o.appendChild(a),e.appendChild(o),e}function loadHomeContent(){fetch("/api/blog/post").then((t=>t.json().then((t=>{for(let e=0;et.json())),await fetch("/api/blog/post/featured").then((t=>t.json()))]}function csvToArray(t){let e="",n=[""],o=0,a=!0,i=null;for(i of t)'"'===i?(a&&i===e&&(n[o]+=i),a=!a):","===i&&a?i=n[++o]="":"\n"===i&&a?("\r"===e&&(row[o]=row[o].slice(0,-1)),n=n[++r]=[i=""],o=0):n[o]+=i,e=i;return n}async function getCategories(){let t=await fetch("/api/blog/categories").then((t=>t.json())),e=[];return t.forEach((t=>e=e.concat(csvToArray(t.categories.replace(/\s*,\s*/g,","))))),[...new Set(e)]}function createCategories(t){let e="";return t.forEach((t=>e+=`${t}`)),e}function createButtonCategories(t){let e="";return t.forEach((t=>t.forEach((t=>e+=`${t}`)))),e}async function createSideContent(){let t=await getLatestAndFeaturedPosts(),e=t[0],n=t[1],o=createCategories(await getCategories()),a=document.createElement("aside");return a.classList.add("sideContent"),a.innerHTML=`\n
\n
\n My professional picture taken in brighton near \n                                        north street at night wearing a beige jacket and checkered shirt\n

Rohit Pai

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n

Avid Full Stack Dev | Uni of Notts Grad | Amateur Blogger

\n
\n \n \n \n
\n\t\t\t\t\t\t\t\t

feeds

\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tAtom\n\t\t\t\t\t\t\t\t\tJSON\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n
\n

categories

\n ${o}\n
\n \n `,a}function createMetaTag(t,e,n){let o=document.querySelector(`meta[name="${t}"], meta[property="${t}"]`);if(!o){let o=document.createElement("meta");return o.setAttribute(t.includes("name")?"name":"property",t),o.setAttribute(e,n),void document.head.appendChild(o)}o.setAttribute(e,n)}function insertMetaTags(t){document.querySelector('meta[name="description"]').setAttribute("content",t.abstract),createMetaTag("twitter:title","content",t.title),createMetaTag("twitter:description","content",t.abstract),createMetaTag("twitter:image","content",t.headerImg),createMetaTag("og:title","content",t.title),createMetaTag("og:description","content",t.abstract),createMetaTag("og:image","content",t.headerImg),createMetaTag("og:url","content",window.location.href),createMetaTag("og:type","content","blog"),createMetaTag("og:site_name","content","Rohit Pai's Blog"),createMetaTag("og:locale","content","en_GB");let e=document.querySelector('meta[name="keywords"]'),n=e.getAttribute("content");n+=`, ${t.keywords}`,e.setAttribute("content",n)}async function loadIndividualPost(t){document.title="Rohit Pai - "+decodeURI(t),await fetch(`/api/blog/post/${t}`).then((async e=>{e.ok?await e.json().then((async e=>{insertMetaTags(e);let n=document.createElement("section");n.classList.add("post"),n.id="individualPost";let o=document.createElement("div");o.classList.add("mainContent");let a=document.createElement("article");a.innerHTML=`\n

${e.title}

\n \n
\n ${e.body}\n `;let i=document.createElement("section");i.classList.add("comments"),i.innerHTML='

Comments

\n
\n ',o.appendChild(a),o.appendChild(i);let r=await createSideContent();n.appendChild(o),n.appendChild(r),document.querySelector("#main").appendChild(n);var s,c;s=document,(c=s.createElement("script")).src="https://rohitpaiportfolio.disqus.com/embed.js",c.setAttribute("data-timestamp",+new Date),s.body.appendChild(c)})):show404()}))}async function loadAllCategories(){document.title="Rohit Pai - Categories";let t=await getCategories(),e=document.querySelector("#main"),n=document.createElement("section");n.classList.add("categories"),n.id="allCategories";let o=document.createElement("h1");o.innerHTML="Categories",e.appendChild(o);for(let e of t){let t=document.createElement("div");t.classList.add("btnContainer");let o=document.createElement("a");o.classList.add("btn"),o.classList.add("btnPrimary"),o.innerHTML=e,o.href=`/blog/category/${e}`,t.appendChild(o),n.appendChild(t)}e.appendChild(n)}function loadPostsByCategory(t){document.title="Rohit Pai - "+decodeURI(t),fetch(`/api/blog/categories/${t}`).then((e=>e.json().then((e=>{let n=document.querySelector("#main"),o=document.createElement("section");o.classList.add("catPosts"),o.id="postsByCategory";let a=document.createElement("h1");a.innerHTML=decodeURI(t),n.appendChild(a);for(let t=0;tt.json().then((t=>{let e=document.querySelector("#main"),n=document.createElement("section");n.classList.add("catPosts"),n.id="searchResults";let o=document.createElement("h1");o.innerHTML="Search Results",e.appendChild(o);for(let e=0;e\n\t\t\t
\n\n\t\t\t

Sources of Information and Tracking Technologies

\n\t\t\t

\n\t\t\t\tI collect information that you directly provide to me, such as when you submit a form or send me a message with your information. I may also receive information about you from my partners, including but not limited to distribution partners, data services, and marketing firms. I may combine this information with other information I collect from or about you. In these cases, my Privacy Policy governs the handling of the combined information. I and my partners may collect the information noted in this privacy policy using cookies, web beacons, pixels, and other similar technologies. These technologies are used for authentication, to store your preferences or progress, for analytics, and for advertising and analytics. Cookies are small text files stored on your computer. You can set your browser to reject cookies altogether, to reject my cookies in particular, or to delete cookies. However, this may cause some or all of my Services not to function on your computer or device.\n\t\t\t

\n\t\t\t
\n\t\t\t

How I Use Your Information

\n\t\t\t

\n\t\t\t\tI use information I collect about you to provide, maintain, and improve my Services and other interactions I have with you. For example, I use the information collected to:\n\t\t\t

\n\t\t\t
    \n\t\t\t\t
  • Facilitate and improve your online experience;
  • \n\t\t\t\t
  • Provide and deliver products and services, perform authentication, process transactions and returns, and send you related information, including confirmations, receipts, invoices, customer experience surveys, and product or Services-related notices;
  • \n\t\t\t\t
  • Process and deliver promotions;
  • \n\t\t\t\t
  • Respond to your comments and questions and provide customer service;
  • \n\t\t\t\t
  • If you have indicated to me that you wish to receive notifications or promotional messages;
  • \n\t\t\t\t
  • Detect, investigate and prevent fraudulent transactions and other illegal activities and protect my rights and property and others;
  • \n\t\t\t\t
  • Comply with my legal and financial obligations;
  • \n\t\t\t\t
  • Monitor and analyze trends, usage, and activities;
  • \n\t\t\t\t
  • Provide and allow my partners to provide advertising and marketing targeted toward your interests.
  • \n\t\t\t
\n\t\t\t
\n\t\t\t

How I May Share Information

\n\t\t\t

\n\t\t\t\tI may share your Personal Information in the following situations:\n\t\t\t

\n\t\t\t
    \n\t\t\t\t
  • \n\t\t\t\t\tThird Party Services Providers.\n\t\t\t\t\tI may share data with service providers, vendors, contractors, or agents who complete transactions or perform services on my behalf, such as those that assist me with my business and internal operations like shipping and delivery, payment processing, fraud prevention, customer service, gift cards, experiences, personalization, marketing, and advertising;\n\t\t\t\t
  • \n\t\t\t\t
  • \n\t\t\t\t\tChange in Business.\n\t\t\t\t\tI may share data in connection with a corporate business transaction, such as a merger or acquisition of all or a portion of my business to another company, joint venture, corporate reorganization, insolvency or bankruptcy, financing or sale of company assets;\n\t\t\t\t
  • \n\t\t\t\t
  • \n\t\t\t\t\tTo Comply with Law.\n\t\t\t\t\tI may share data to facilitate legal process from lawful requests by public authorities, including to meet national security or law enforcement demands as permitted by law.\n\t\t\t\t
  • \n\t\t\t\t
  • \n\t\t\t\t\tWith Your Consent.\n\t\t\t\t\tI may share data with third parties when I have your consent.\n\t\t\t\t
  • \n\t\t\t\t
  • \n\t\t\t\t\tWith Advertising and Analytics Partners.\n\t\t\t\t\tSee the section entitled “Advertising and Analytics” below.\n\t\t\t\t
  • \n\t\t\t
\n\t\t\t
\n\t\t\t

Advertising and Analytics

\n\t\t\t

\n\t\t\t\tI use advertising and analytics technologies to better understand your online activity on my Services to provide personalized products and services that may interest you. I may allow third-party companies, including ad networks, to serve advertisements, provide other advertising services, and/or collect certain information when you visit my website. Third-party companies may use pseudonymized personal data (e.g., click stream information, browser type, time and date, subject of advertisements clicked or scrolled over) during your visit to this website in order to provide advertisements about goods and services likely to be of interest to you, on this website and others. To learn more about Interest-Based Advertising or to opt-out of this type of advertising, you can visit AboutAds.info/choices or www.networkadvertising.org/choices. Some third-party companies may also use non-cookie technologies, such as statistical IDs. Please keep in mind that your web browser may not permit you to block the use of these non-cookie technologies, and those browser settings that block cookies may have no effect on such techniques. If the third-party company uses the non-cookie technologies for interest-based advertising, you can opt out at www.networkadvertising.org/choices. Please note the industry opt out only applies to use for interest-based advertising and may not apply to use for analytics or attribution. Some websites have “do not track” features that allow you to tell a website not to track you. These features are not all uniform. I do not currently respond to those signals.\n\t\t\t

\n\t\t\t
\n\t\t\t

Data Security

\n\t\t\t

\n\t\t\t\tI implement commercially reasonable security measures designed to protect your information. Despite my best efforts, however, no security measures are completely impenetrable.\n\t\t\t

\n\t\t\t
\n\t\t\t

Data Retention

\n\t\t\t

\n\t\t\t\tI store the information I collect about you for as long as necessary for the purpose(s) for which I collected it or for other legitimate business purposes, including to meet my legal, regulatory, or other compliance obligations.\n\t\t\t

\n\t\t\t
\n\n\t\t\t

EU Privacy Rights

\n\n\t\t\t

Individuals located in certain countries, including the European Economic Area (EEA) and the United Kingdom, have certain statutory rights under the General Data Protection Regulation (GDPR) in relation to their personal data.

\n\t\t\t

To the extent information I collect is associated with an identified or identifiable natural person and is protected as personal data under GDPR, it is referred to in this Privacy Policy as “Personal Data”.

\n\t\t\t

\n\t\t\t\tData Subject Access Requests\n\t\t\t

\n\t\t\t

\n\t\t\t\tSubject to any exemptions provided by law, you may have the right to request:\n\t\t\t

\n\t\t\t
    \n\t\t\t\t
  • \n\t\t\t\t\ta copy of the Personal Data I hold about you;\n\t\t\t\t
  • \n\t\t\t\t
  • \n\t\t\t\t\tto correct the Personal Data I hold about you;\n\t\t\t\t
  • \n\t\t\t\t
  • \n\t\t\t\t\tto delete your Account or Personal Data;\n\t\t\t\t
  • \n\t\t\t\t
  • \n\t\t\t\t\tto object to processing of your Personal Data for certain purposes;\n\t\t\t\t
  • \n\t\t\t
\n\n\t\t\t

\n\t\t\t\tTo access your privacy rights, send me an email at rohit@rohitpai.co.uk.\n\t\t\t

\n\t\t\t

\n\t\t\t\tI will generally process requests within one month. I may need to request specific information from you to help me confirm your identity and/or the jurisdiction in which you reside. If your request is complicated or if you have made a large number of requests, it may take me longer. I will let you know if I need longer than one month to respond.\n\t\t\t

\n\t\t\t

\n\t\t\t\tLegal Bases For Processing Personal Data\n\t\t\t

\n\t\t\t

\n\t\t\t\tI may process your Personal Data under applicable data protection law on the following legal grounds:\n\t\t\t

\n\t\t\t
    \n\t\t\t\t
  • \n\t\t\t\t\tContractual Necessity:\n\t\t\t\t\tI may process your Personal Data to enter into or perform a contract with you.\n\t\t\t\t
  • \n\t\t\t\t
  • \n\t\t\t\t\tConsent:\n\t\t\t\t\twhere you have provided consent to process your Personal Data. You may withdraw your consent at any time.\n\t\t\t\t
  • \n\t\t\t\t
  • \n\t\t\t\t\tLegitimate interest:\n\t\t\t\t\tI process your Personal Data to provide my Services to you such as to provide my online user experience, communicate with you, provide customer service, market, analyze and improve my business, and to protect my Services.\n\t\t\t\t
  • \n\t\t\t
\n\t\t\t
\n\t\t\t

Age Limitations

\n\t\t\t

\n\t\t\t\tMy Service is intended for adults ages 18 years and above. I do not knowingly collect personally identifiable information from children. If you are a parent or legal guardian and think your child under 13 has given me information, please email or write to me at the address listed at the end of this Privacy Policy. Please mark your inquiries “COPPA Information Request.”\n\t\t\t

\n\t\t\t
\n\t\t\t

Changes to this Privacy Policy

\n\t\t\t

\n\t\t\t\tRohit Pai may change this Privacy Policy from time to time. I encourage you to visit this page to stay informed. If the changes are material, I may provide you additional notice to your email address or through my Services. Your continued use of the Services indicates your acceptance of the modified Privacy Policy.\n\t\t\t

\n\t\t\t
\n\t\t\t

Newsletters

\n\t\t\t

\n\t\t\t\tYou can opt in to receive my marketing emails and/or newsletters by below. I may still send you transactional messages, which include Services-related communications and responses to your questions.\n\t\t\t

\n\t\t\t
\n\t\t\t

Storage of Information in the United States

\n\t\t\t

\n\t\t\t\tInformation I maintain may be stored both within and outside of the United States. If you live outside of the United States, you understand and agree that I may transfer your information to the United States, and that U.S. laws may not afford the same level of protection as those in your country.\n\t\t\t

\n\t\t\t
\n\t\t\t

Contact Me

\n\t\t\t

\n\t\t\t\tIf you have questions, comments, or concerns about this Privacy Policy, you may contact me at:\n\t\t\t

\n\t\t\tContact\n\t\t\trohit@rohitpai.co.uk\n\t\t\n\t\t'}function loadCookiePolicy(){document.querySelector("#main").innerHTML='\n\t\t
\n\t\t\t

Cookies Policy

\n\t\t\t

I only use functional cookies for the blog which includes PHP Session ID, disqus and maybe share this. I think that these are functional cookies, if you don\'t, you\'re welcome to exit the site or tell me by emailing me through the email address below, or the contact form on the contact page.

\n\t\t\t
\n\t\t\trohit@rohitpai.co.uk\n\t\t\t
\n\t\t\tcontact\n\t\t
\n\t'}function show404(){document.querySelector("#main").innerHTML='\n
\n
\n

Blog post, Category or page not found

\n See all blog posts\n
\n
\n '}document.addEventListener("DOMContentLoaded",(()=>{goToURL(window.location.pathname)})),window.addEventListener("popstate",(t=>{goToURL(window.history.state)})),window.onscroll=()=>{document.body.scrollTop>=150||document.documentElement.scrollTop>=150?document.querySelector("nav").classList.add("scrolled"):document.querySelector("nav").classList.remove("scrolled")},document.querySelector("#searchBtn").addEventListener("click",(t=>{let e=document.querySelector("#searchField").value;e.length>0&&(window.history.pushState(null,null,`/blog/search/${e}`),document.querySelector("#searchField").value="",document.querySelector("#main").innerHTML="",goToURL(`/blog/search/${e}`))})),document.querySelector("#searchField").addEventListener("keyup",(t=>{"Enter"===t.key&&document.querySelector("#searchBtn").click()})); \ No newline at end of file diff --git a/dist/css/main.css b/dist/css/main.css index 6555568..85a44fb 100644 --- a/dist/css/main.css +++ b/dist/css/main.css @@ -1 +1 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--mainHue:80;--mainSat:60%;--mainLight:50%;--primaryDefault:hsla(var(--mainHue), var(--mainSat), var(--mainLight), 1);--primaryHover:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) - 10%), 1);--timelineItemBrdr:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) - 20%), 1);--errorDefault:hsla(0, calc(var(--mainSat) + 10%), calc(var(--mainLight) + 10%), 1);--errorHover:hsla(0, calc(var(--mainSat) + 10%), calc(var(--mainLight) - 10%), 1);--grey:hsla(0, 0%, 39%, 1);--notAvailableDefault:hsla(0, 0%, 39%, 1);--notAvailableHover:hsla(0, 0%, 32%, 1);--mutedGrey:hsla(0, 0%, 78%, 1);--mutedBlack:hsla(0, 0%, 0%, 0.25);--mutedGreen:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) + 20%), 0.5);--navBack:hsla(0, 0%, 30%, 1);--titleFS:2.25rem;--generalFS:1.125rem;--headingFS:1.5rem}*{box-sizing:border-box}html{scroll-behavior:smooth}body{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--generalFS);line-height:1.625rem}a:visited{color:inherit}h1,nav{font-family:Share Tech Mono,monospace;font-style:normal;font-weight:400;font-size:var(--titleFS);line-height:2.5625rem;text-transform:lowercase}h2{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--headingFS);line-height:2.1875rem}a.btn,button.btn,form input[type=submit]{text-decoration:none;display:inline-flex;padding:1em 2em;border-radius:.625em;border:.3215em solid var(--primaryDefault);color:#fff;text-align:center;align-items:center;max-height:4em}form input[type=submit]{padding:1.1em 2em}a.btn:hover,button.btn:hover form input[type=submit]:hover{border:.3215em solid var(--primaryHover)}a.btn:hover::after,a.btn:hover::before{visibility:hidden}a.btnPrimary,button.btnPrimary,form input[type=submit]{background-color:var(--primaryDefault);cursor:pointer}a.btnOutline,button.btnOutline{background:#fff;color:var(--primaryDefault)}a.btnPrimary[disabled],button.btnPrimary[disabled]{pointer-events:none;background:var(--notAvailableDefault);border:.3215em solid var(--notAvailableDefault)}a.btnPrimary[disabled]:hover,button.btnPrimary[disabled]:hover{background:var(--notAvailableHover);border:.3215em solid var(--notAvailableHover)}a.btnPrimary:hover,button.btnPrimary:hover,form input[type=submit]:hover{background:var(--primaryHover);border:.3215em solid var(--primaryHover)}a.btn:active,button.btn:active,form input[type=submit]:active{padding:.8rem 1.8rem}.boxShadowOut:hover{box-shadow:0 6px 4px 0 var(--mutedBlack)}.boxShadowIn:active{box-shadow:inset 0 6px 4px 0 var(--mutedBlack)}.textShadow:hover{text-shadow:0 6px 4px var(--mutedBlack)}form .formControl input:not([type=submit]).invalid:invalid,form .formControl textarea.invalid:invalid{border:.3125em solid var(--errorDefault)}form .formControl input:not([type=submit]).invalid:invalid:focus,form .formControl textarea.invalid:invalid:focus{border:.3125em solid var(--errorHover);box-shadow:0 4px 2px 0 var(--mutedBlack)}form .formControl input:not([type=submit]){height:3em}form .formControl{width:100%;display:flex;flex-direction:column;justify-content:flex-start}form .formControl.passwordControl{display:block}form input[type=submit]{align-self:flex-start}div.menu input:not([type=submit]),form .formControl .ck.ck-editor__main .ck-content,form .formControl .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,form .formControl input:not([type=submit]),form .formControl textarea{width:100%;border:.3125em solid var(--primaryDefault);background:0 0;outline:0;-webkit-border-radius:.5em;-moz-border-radius:.5em;border-radius:.5em;padding:0 .5em}form .formControl textarea{padding:.5em}form .formControl input:not([type=submit]).invalid:invalid,form .formControl textarea.invalid:invalid{border:.3125em solid var(--errorDefault)}form .formControl input:not([type=submit]).invalid:invalid:focus,form .formControl textarea.invalid:invalid:focus{border:.3125em solid var(--errorHover);box-shadow:0 4px 2px 0 var(--mutedBlack)}div.menu input:not([type=submit]):focus,div.menu input:not([type=submit]):hover,form .formControl input:not([type=submit]):focus,form .formControl input:not([type=submit]):hover,form .formControl textarea:focus,form .formControl textarea:hover{border:.3125em solid var(--primaryHover)}form .formControl input:not([type=submit]){height:3em}form .formControl i.fa-eye,form .formControl i.fa-eye-slash{margin-left:-40px;cursor:pointer;color:var(--primaryDefault)}form .formControl input:not([type=submit]):focus+i.fa-eye,form .formControl input:not([type=submit]):focus+i.fa-eye-slash{color:var(--primaryHover)}form .formControl .checkContainer{display:block;position:relative;margin-bottom:1.25em;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}form .formControl .checkContainer input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}form .formControl .checkContainer .checkmark{position:absolute;top:1.25em;left:0;height:25px;width:25px;background-color:var(--mutedGrey)}form .formControl .checkContainer:hover input~.checkmark{background-color:var(--grey)}form .formControl .checkContainer input:checked~.checkmark{background-color:var(--primaryDefault)}form .formControl .checkContainer input:checked:hover~.checkmark{background-color:var(--primaryHover)}form .formControl .checkContainer .checkmark:after{content:"";position:absolute;display:none}form .formControl .checkContainer input:checked~.checkmark:after{display:block}form .formControl .checkContainer .checkmark:after{left:9px;top:5px;width:5px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}form .formControl input[type=file]{padding:0;cursor:pointer}form .formControl input[type=file]::file-selector-button{background-color:var(--primaryDefault);color:#fff;border:0;border-right:5px solid var(--mutedBlack);padding:15px;margin-right:20px;-webkit-transition:all .5s;-moz-transition:all .5s;-ms-transition:all .5s;-o-transition:all .5s;transition:all .5s}form .formControl input[type=file]:hover::file-selector-button{background-color:var(--primaryHover)}section#about,section#curriculumVitae h1{padding:0 5rem}a{color:#000;text-decoration:none;text-transform:lowercase}a.link::after,a.link::before{visibility:hidden;position:absolute;margin-top:1px}a.link::before{content:'<';margin-left:-.5em}a.link::after{content:'>'}a.link:hover::after,a.link:hover::before{visibility:visible}header{background:#6a6a6a url(../imgs/hero.jpg) no-repeat bottom;background-size:cover;height:40%;color:#fff;backdrop-filter:grayscale(100%);position:relative}nav{display:flex;flex-direction:row;justify-content:space-between;padding:.25em;position:fixed;top:0;width:100%;transition:background-color .4s ease-in;color:#fff;z-index:1}nav.scrolled{background-color:var(--navBack)}nav #nav-check{display:none}nav .nav-btn{display:none}nav h1{margin:0}nav a{text-decoration:none;color:#fff}nav>h1{margin-left:.4em}nav ul{display:flex;flex-direction:row;gap:1em;margin:0 .5em 0 0;justify-content:flex-end;align-items:flex-end}nav ul li{list-style:none}nav ul li span{visibility:hidden}nav ul li .active::after,nav ul li .active::before{visibility:visible}header div{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-top:10em}header div .btn{margin:2em 0}header div button{background:0 0;border:none;display:inline-block;text-align:center;text-decoration:none;font-size:2rem;cursor:pointer}i.fa-chevron-down{color:hsla(0,0%,67%,.58);font-size:3.75em;margin:1.5rem 0}div h1 span{visibility:visible;animation:caret 1s steps(1) infinite}@keyframes caret{50%{visibility:hidden}}@media screen and (max-width:75em){nav{display:block;height:50px;width:100%;background-color:var(--navBack);position:fixed;top:0;padding:0}nav a h1{margin-left:1ch}nav .nav-btn{display:inline-block;position:absolute;right:75px;top:0}nav ul{position:fixed;display:block;width:100%;background-color:#333;transition:all .4s ease-in;overflow-y:hidden;padding-left:.5em;margin-top:7px}nav ul li a{display:block;width:100%;transform:translateX(-30px);transition:all .4s ease-in;opacity:0}.nav-btn label{display:inline-block;cursor:pointer;width:60px;height:50px;position:fixed;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.5s ease-in;-moz-transition:.5s ease-in;-o-transition:.5s ease-in;transition:.5s ease-in}.nav-btn label span{display:block;position:absolute;height:5px;width:100%;background-color:#fff;opacity:1;right:0;top:20px;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.25s ease-in;-moz-transition:.25s ease-in;-o-transition:.25s ease-in;transition:.25s ease-in}nav #nav-check:not(:checked)~ul{height:auto;max-height:0}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(1){top:8px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(2){top:23px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(3){top:38px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:checked~.nav-btn label,nav .nav-btn label:hover{background-color:rgba(-1,0,0,.3)}nav #nav-check:checked~ul{max-height:50vh;overflow-y:hidden}nav #nav-check:checked~ul li a{opacity:1;transform:translateX(0)}nav #nav-check:checked~ul li:nth-child(1) a{transition-delay:.15s}nav #nav-check:checked~ul li:nth-child(2) a{transition-delay:.25s}nav #nav-check:checked~ul li:nth-child(3) a{transition-delay:.35s}nav #nav-check:checked~ul li:nth-child(4) a{transition-delay:.45s}nav #nav-check:checked~ul li:nth-child(5) a{transition-delay:.55s}nav #nav-check:checked~.nav-btn label span:first-child{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}nav #nav-check:checked~.nav-btn label span:nth-child(2){width:0;opacity:0}nav #nav-check:checked~.nav-btn label span:last-child{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}}section#about{margin-bottom:5rem}section#about div{padding:.1em 5em}section#curriculumVitae{background-color:var(--primaryDefault);color:#fff;padding:2em 0}section#curriculumVitae .cvGrid{display:flex;flex-direction:row;padding:0 1.5rem;flex-wrap:wrap}section#curriculumVitae .cvGrid>div{width:45%;display:flex;flex-direction:column;min-height:100%}section#curriculumVitae .cvGrid h2{text-align:center}section#curriculumVitae .timeline{position:relative;max-width:30em;gap:1em;display:flex;flex-direction:column;height:100%}section#curriculumVitae #work{margin:0 auto 0 8rem}section#curriculumVitae .timeline:before{content:"";position:absolute;height:100%;border:4px var(--timelineItemBrdr) solid;right:194px;top:0}section#curriculumVitae .timeline:after{content:"";display:table;clear:both}section#curriculumVitae .timelineItem{border:2px solid var(--timelineItemBrdr);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:0 1rem;width:50%;position:relative;background-color:var(--primaryHover)}.timelineItem:after,section#curriculumVitae .timelineItem:before{content:'';position:absolute}section#curriculumVitae .timelineItem:before{content:'';right:-20px;top:calc(50% - 5px);border-style:solid;border-color:var(--timelineItemBrdr) var(--timelineItemBrdr) transparent transparent;border-width:20px;transform:rotate(45deg)}section#curriculumVitae .timelineItem:nth-child(2n){margin-left:21em}section#curriculumVitae .timelineItem:nth-child(2n):before{right:auto;left:-20px;border-color:transparent transparent var(--timelineItemBrdr) var(--timelineItemBrdr)}section#curriculumVitae .timelineItem h3{font-weight:400}section#curriculumVitae .timelineItem span{color:#e5e5e5}section#projects{display:flex;flex-direction:row;padding:0 2.5rem;border-bottom:2px solid var(--mutedGrey)}section#projects .mainProj,section#projects .otherProj{width:50%;display:flex;flex-direction:column;align-items:center;gap:1em}section#projects .mainProj{border-right:2px solid var(--mutedGrey);padding:0 2.5em 5em 0}section#allProjects img,section#projects img{-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;display:block;margin:1em auto}section#projects .mainProj img{width:100%;max-width:40rem}section#projects .mainProj .flexRow{display:flex;flex-direction:row;gap:4em}section#projects .mainProj .flexCol{display:flex;flex-direction:column;gap:2.5em}section#projects .otherProj>a{margin:5rem 0}section#projects .otherProj>div{display:flex;flex-direction:column;gap:2em}section#allProjects #otherProj .oProjItem,section#projects .otherProj>div .oProjItem{display:flex;justify-content:center;align-items:center;flex-direction:row;width:90%;border:1px solid var(--grey);gap:1em;box-shadow:0 6px 4px 0 var(--mutedBlack);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:.75em 1em}section#projects .otherProj>div .oProjItem{margin:0 auto}section#projects .otherProj>div .oProjItem:nth-child(2){flex-direction:row-reverse}section#projects .otherProj .oProjItem img{max-width:15rem;width:100%;padding:0 1em}section#projects .oProjItem .flexCol div:nth-child(2){display:flex;flex-direction:row;justify-content:flex-start;gap:3em;margin-left:2em}section#projects .flexCol div:nth-child(2) .btn{padding:.25em .5em}section#allProjects{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:5em}section#allProjects #mainProj{display:flex;flex-direction:column;justify-content:center;align-items:center;border:1px solid var(--grey);box-shadow:0 6px 4px 0 var(--mutedBlack);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:1.5em 2em;margin:3em 2.5rem 0;width:50%}section#allProjects #mainProj img{width:100%;max-width:30rem}section#allProjects #otherProj{display:flex;flex-direction:row;justify-content:space-between;align-items:stretch;flex-wrap:wrap;gap:2rem;border-top:2px solid var(--grey);padding:5em 2.5rem 0}section#allProjects #otherProj .oProjItem{flex-direction:column;width:30%;height:auto}section#allProjects #otherProj img{width:100%;max-width:20rem}section#contact{display:flex;flex-direction:row;padding:0 2.5em}div#findMe,div#sayHello{width:50%;display:flex;flex-direction:column;align-items:center;gap:1em}div#findMe .findMeContainer{display:flex;flex-direction:row;justify-content:space-around;align-items:center;gap:2em;width:100%;height:100%;margin:5em 0}div#findMe .findMeContainer .profile{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}div#findMe .socialIcons{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:2em}div#findMe .socialIcons div{display:flex;flex-direction:column;gap:1.5em}div#findMe .socialIcons div svg{width:2.5em;fill:var(--primaryDefault);font-size:2em}div#findMe .socialIcons div a:hover svg{fill:var(--primaryHover)}div#sayHello #contactForm{display:flex;flex-direction:column;justify-content:center;align-items:center}#contactForm .flName{display:flex;flex-direction:row;gap:1em;width:100%}div.message{background:var(--primaryDefault);color:#fff;padding:.5em .8em;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;display:flex;justify-content:center;align-items:center;align-self:flex-start;flex-direction:row-reverse;position:relative;height:75px;visibility:visible;overflow:hidden;-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-ms-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out;opacity:1;margin-top:1em;margin-bottom:1em}div.message.error{background:var(--errorDefault)}div.message button{border:none;background:0 0;outline:0;cursor:pointer;color:#fff;font-size:1.25rem;margin-top:-5px;position:absolute;transform:translate(0,0);transform-origin:0 0;right:10px;top:10px}div.message.hidden{opacity:0;visibility:hidden;height:0}div.message button:hover{text-shadow:-1px 2px var(--mutedBlack)}footer{background-color:var(--primaryDefault);margin-top:5em;padding:2em;display:flex;color:#fff}footer .spacer{width:100%;margin-right:auto}footer p{margin:auto;width:100%;text-align:center}footer .button{margin-left:auto;width:100%;text-align:center}footer .button button{border:5px solid #fff;background:0 0;font-size:3em;padding:.5rem 1rem;width:2em;color:#fff;-webkit-border-radius:.25em;-moz-border-radius:.25em;border-radius:.25em;cursor:pointer}@media screen and (max-width:90em){section#curriculumVitae .cvGrid{flex-direction:column;justify-content:center;align-items:center}section#curriculumVitae .cvGrid>div{width:100%}section#curriculumVitae .cvGrid>div:first-child{padding-bottom:2.5em;margin-bottom:2.5em;border-bottom:5px #fff solid}section#curriculumVitae .cvGrid h2{margin-left:5em}section#curriculumVitae .cvGrid .timeline{margin:0 auto}}@media screen and (max-width:75em){section#about,section#curriculumVitae h1{padding:0 1em}section#about div{padding:.1em 2.5em}section#curriculumVitae .cvGrid{padding:0}section#projects{flex-direction:column;justify-content:center;align-items:center}section#projects .mainProj{border-right:0;padding:0;width:100%;margin:0 5em}section#projects .mainProj img{padding:0 1em}section#projects .mainProj .flexRow{flex-direction:column;margin:0 2.5em}section#projects .mainProj .flexCol{flex-direction:row;justify-content:center;align-items:center}section#projects .otherProj{width:100%}section#projects .otherProj .btn{width:10em;text-align:center}section#projects .otherProj>div .oProjItem,section#projects .otherProj>div .oProjItem:nth-child(2){flex-direction:column}section#projects .oProjItem .flexCol div:nth-child(2){justify-content:center;margin-left:0;margin-bottom:1em}section#projects .otherProj>a{margin-left:3em;margin-right:3em;text-align:center}section#allProjects #otherProj .oProjItem{width:45%}section#contact{flex-direction:column;justify-content:center;align-items:center}div#findMe,div#sayHello{width:100%}div#findMe .findMeContainer{flex-direction:column;justify-content:center}div#findMe .socialIcons{flex-direction:row}div#findMe .socialIcons div{flex-direction:row}}@media screen and (max-width:55em){section#curriculumVitae .cvGrid .timeline,section#curriculumVitae .cvGrid .timeline#work{margin:0 auto;width:100%}section#curriculumVitae .timeline:before{border:none}section#curriculumVitae .timelineItem,section#curriculumVitae .timelineItem:nth-child(2n){width:95%;padding:0;margin:0 auto}section#curriculumVitae .timelineItem:before{right:unset;left:unset;border:none}section#allProjects #mainProj{width:auto}section#allProjects #otherProj{flex-direction:column;align-items:center}section#allProjects #otherProj .oProjItem{width:auto}div#findMe .socialIcons{flex-direction:column}#contactForm .flName{flex-direction:column;gap:0;width:100%}}@media screen and (max-width:31em){section#about,section#curriculumVitae h1{padding:0 1em}header div h1{text-align:center;height:5.125rem}section#about div{padding:.1em 1em}section#projects .mainProj .flexCol{flex-direction:column}section#projects .oProjItem .flexCol div:nth-child(2){flex-direction:column;justify-content:center;align-items:center}} \ No newline at end of file +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--mainHue:80;--mainSat:60%;--mainLight:50%;--primaryDefault:hsla(var(--mainHue), var(--mainSat), var(--mainLight), 1);--primaryHover:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) - 10%), 1);--timelineItemBrdr:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) - 20%), 1);--errorDefault:hsla(0, calc(var(--mainSat) + 10%), calc(var(--mainLight) + 10%), 1);--errorHover:hsla(0, calc(var(--mainSat) + 10%), calc(var(--mainLight) - 10%), 1);--grey:hsla(0, 0%, 39%, 1);--notAvailableDefault:hsla(0, 0%, 39%, 1);--notAvailableHover:hsla(0, 0%, 32%, 1);--mutedGrey:hsla(0, 0%, 78%, 1);--mutedBlack:hsla(0, 0%, 0%, 0.25);--mutedGreen:hsla(var(--mainHue), var(--mainSat), calc(var(--mainLight) + 20%), 0.5);--navBack:hsla(0, 0%, 30%, 1);--titleFS:2.25rem;--generalFS:1.125rem;--headingFS:1.5rem}*{box-sizing:border-box}html{scroll-behavior:smooth}body{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--generalFS);line-height:1.625rem}a:visited{color:inherit}h1,nav{font-family:Share Tech Mono,monospace;font-style:normal;font-weight:400;font-size:var(--titleFS);line-height:2.5625rem;text-transform:lowercase}h2{font-family:Noto Sans KR,sans-serif;font-style:normal;font-weight:500;font-size:var(--headingFS);line-height:2.1875rem}a.btn,button.btn,form input[type=submit]{text-decoration:none;display:inline-flex;padding:1em 2em;border-radius:.625em;border:.3215em solid var(--primaryDefault);color:#fff;text-align:center;align-items:center;max-height:4em}form input[type=submit]{padding:1.1em 2em}a.btn:hover,button.btn:hover form input[type=submit]:hover{border:.3215em solid var(--primaryHover)}a.btn:hover::after,a.btn:hover::before{visibility:hidden}a.btnPrimary,button.btnPrimary,form input[type=submit]{background-color:var(--primaryDefault);cursor:pointer}a.btnOutline,button.btnOutline{background:#fff;color:var(--primaryDefault)}a.btnPrimary[disabled],button.btnPrimary[disabled]{pointer-events:none;background:var(--notAvailableDefault);border:.3215em solid var(--notAvailableDefault)}a.btnPrimary[disabled]:hover,button.btnPrimary[disabled]:hover{background:var(--notAvailableHover);border:.3215em solid var(--notAvailableHover)}a.btnPrimary:hover,button.btnPrimary:hover,form input[type=submit]:hover{background:var(--primaryHover);border:.3215em solid var(--primaryHover)}a.btn:active,button.btn:active,form input[type=submit]:active{padding:.8rem 1.8rem}.boxShadowOut:hover{box-shadow:0 6px 4px 0 var(--mutedBlack)}.boxShadowIn:active{box-shadow:inset 0 6px 4px 0 var(--mutedBlack)}.textShadow:hover{text-shadow:0 6px 4px var(--mutedBlack)}form .formControl input:not([type=submit]).invalid:invalid,form .formControl textarea.invalid:invalid{border:.3125em solid var(--errorDefault)}form .formControl input:not([type=submit]).invalid:invalid:focus,form .formControl textarea.invalid:invalid:focus{border:.3125em solid var(--errorHover);box-shadow:0 4px 2px 0 var(--mutedBlack)}form .formControl input:not([type=submit]){height:3em}form .formControl{width:100%;display:flex;flex-direction:column;justify-content:flex-start}form .formControl.passwordControl{display:block}form input[type=submit]{align-self:flex-start}div.menu input:not([type=submit]),form .formControl .ck.ck-editor__main .ck-content,form .formControl .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,form .formControl input:not([type=submit]),form .formControl textarea{width:100%;border:.3125em solid var(--primaryDefault);background:0 0;outline:0;-webkit-border-radius:.5em;-moz-border-radius:.5em;border-radius:.5em;padding:0 .5em}form .formControl textarea{padding:.5em}form .formControl input:not([type=submit]).invalid:invalid,form .formControl textarea.invalid:invalid{border:.3125em solid var(--errorDefault)}form .formControl input:not([type=submit]).invalid:invalid:focus,form .formControl textarea.invalid:invalid:focus{border:.3125em solid var(--errorHover);box-shadow:0 4px 2px 0 var(--mutedBlack)}div.menu input:not([type=submit]):focus,div.menu input:not([type=submit]):hover,form .formControl input:not([type=submit]):focus,form .formControl input:not([type=submit]):hover,form .formControl textarea:focus,form .formControl textarea:hover{border:.3125em solid var(--primaryHover)}form .formControl input:not([type=submit]){height:3em}form .formControl i.fa-eye,form .formControl i.fa-eye-slash{margin-left:-40px;cursor:pointer;color:var(--primaryDefault)}form .formControl input:not([type=submit]):focus+i.fa-eye,form .formControl input:not([type=submit]):focus+i.fa-eye-slash{color:var(--primaryHover)}form .formControl .checkContainer{display:block;position:relative;margin-bottom:1.25em;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}form .formControl .checkContainer input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}form .formControl .checkContainer .checkmark{position:absolute;top:1.25em;left:0;height:25px;width:25px;background-color:var(--mutedGrey)}form .formControl .checkContainer:hover input~.checkmark{background-color:var(--grey)}form .formControl .checkContainer input:checked~.checkmark{background-color:var(--primaryDefault)}form .formControl .checkContainer input:checked:hover~.checkmark{background-color:var(--primaryHover)}form .formControl .checkContainer .checkmark:after{content:"";position:absolute;display:none}form .formControl .checkContainer input:checked~.checkmark:after{display:block}form .formControl .checkContainer .checkmark:after{left:9px;top:5px;width:5px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}form .formControl input[type=file]{padding:0;cursor:pointer}form .formControl input[type=file]::file-selector-button{background-color:var(--primaryDefault);color:#fff;border:0;border-right:5px solid var(--mutedBlack);padding:15px;margin-right:20px;-webkit-transition:all .5s;-moz-transition:all .5s;-ms-transition:all .5s;-o-transition:all .5s;transition:all .5s}form .formControl input[type=file]:hover::file-selector-button{background-color:var(--primaryHover)}section#about,section#curriculumVitae h1{padding:0 5rem}a{color:#000;text-decoration:none;text-transform:lowercase}a.link{padding:0 .5em}a.link::after,a.link::before{visibility:hidden;position:absolute;margin-top:1px}a.link::before{content:' <';margin-left:-.5em}a.link::after{content:'> '}a.link:hover::after,a.link:hover::before{visibility:visible}header{background:#6a6a6a url(../imgs/hero.jpg) no-repeat bottom;background-size:cover;height:40%;color:#fff;backdrop-filter:grayscale(100%);position:relative}nav{display:flex;flex-direction:row;justify-content:space-between;padding:.25em;position:fixed;top:0;width:100%;transition:background-color .4s ease-in;color:#fff;z-index:100000000000000000000000000}nav.scrolled{background-color:var(--navBack)}nav #nav-check{display:none}nav .nav-btn{display:none}nav h1{margin:0}nav a{text-decoration:none;color:#fff}nav>h1{margin-left:.4em}nav ul{display:flex;flex-direction:row;gap:1em;margin:0 .5em 0 0;justify-content:flex-end;align-items:flex-end}nav ul li{list-style:none}nav ul li span{visibility:hidden}nav ul li .active::after,nav ul li .active::before{visibility:visible}header div{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-top:10em}header div .btn{margin:2em 0}header div button{background:0 0;border:none;display:inline-block;text-align:center;text-decoration:none;font-size:2rem;cursor:pointer}i.fa-chevron-down{color:hsla(0,0%,67%,.58);font-size:3.75em;margin:1.5rem 0}div h1 span{visibility:visible;animation:caret 1s steps(1) infinite}@keyframes caret{50%{visibility:hidden}}@media screen and (max-width:75em){nav{display:block;height:50px;width:100%;background-color:var(--navBack);position:fixed;top:0;padding:0}nav a h1{margin-left:1ch}nav .nav-btn{display:inline-block;position:absolute;right:75px;top:0}nav ul{position:fixed;display:block;width:100%;background-color:#333;transition:all .4s ease-in;overflow-y:hidden;padding-left:.5em;margin-top:7px}nav ul li a{display:block;width:100%;transform:translateX(-30px);transition:all .4s ease-in;opacity:0}.nav-btn label{display:inline-block;cursor:pointer;width:60px;height:50px;position:fixed;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.5s ease-in;-moz-transition:.5s ease-in;-o-transition:.5s ease-in;transition:.5s ease-in}.nav-btn label span{display:block;position:absolute;height:5px;width:100%;background-color:#fff;opacity:1;right:0;top:20px;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.25s ease-in;-moz-transition:.25s ease-in;-o-transition:.25s ease-in;transition:.25s ease-in}nav #nav-check:not(:checked)~ul{height:auto;max-height:0}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(1){top:8px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(2){top:23px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:not(:checked)~.nav-btn label span:nth-child(3){top:38px;-webkit-transform-origin:left center;-moz-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}nav #nav-check:checked~.nav-btn label,nav .nav-btn label:hover{background-color:rgba(-1,0,0,.3)}nav #nav-check:checked~ul{max-height:50vh;overflow-y:hidden}nav #nav-check:checked~ul li a{opacity:1;transform:translateX(0)}nav #nav-check:checked~ul li:nth-child(1) a{transition-delay:.15s}nav #nav-check:checked~ul li:nth-child(2) a{transition-delay:.25s}nav #nav-check:checked~ul li:nth-child(3) a{transition-delay:.35s}nav #nav-check:checked~ul li:nth-child(4) a{transition-delay:.45s}nav #nav-check:checked~ul li:nth-child(5) a{transition-delay:.55s}nav #nav-check:checked~.nav-btn label span:first-child{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}nav #nav-check:checked~.nav-btn label span:nth-child(2){width:0;opacity:0}nav #nav-check:checked~.nav-btn label span:last-child{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}}section#about{margin-bottom:5rem}section#about div{padding:.1em 5em}section#curriculumVitae{background-color:var(--primaryDefault);color:#fff;padding:2em 0}section#curriculumVitae .cvGrid{display:flex;flex-direction:row;padding:0 1.5rem;flex-wrap:wrap}section#curriculumVitae .cvGrid>div{width:45%;display:flex;flex-direction:column;min-height:100%}section#curriculumVitae .cvGrid h2{text-align:center}section#curriculumVitae .timeline{position:relative;max-width:30em;gap:1em;display:flex;flex-direction:column;height:100%}section#curriculumVitae #work{margin:0 auto 0 8rem}section#curriculumVitae .timeline:before{content:"";position:absolute;height:100%;border:4px var(--timelineItemBrdr) solid;right:194px;top:0}section#curriculumVitae .timeline:after{content:"";display:table;clear:both}section#curriculumVitae .timelineItem{border:2px solid var(--timelineItemBrdr);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:0 1rem;width:50%;position:relative;background-color:var(--primaryHover)}.timelineItem:after,section#curriculumVitae .timelineItem:before{content:'';position:absolute}section#curriculumVitae .timelineItem:before{content:'';right:-20px;top:calc(50% - 5px);border-style:solid;border-color:var(--timelineItemBrdr) var(--timelineItemBrdr) transparent transparent;border-width:20px;transform:rotate(45deg)}section#curriculumVitae .timelineItem:nth-child(2n){margin-left:21em}section#curriculumVitae .timelineItem:nth-child(2n):before{right:auto;left:-20px;border-color:transparent transparent var(--timelineItemBrdr) var(--timelineItemBrdr)}section#curriculumVitae .timelineItem h3{font-weight:400}section#curriculumVitae .timelineItem span{color:#e5e5e5}section#projects{display:flex;flex-direction:row;padding:0 2.5rem;border-bottom:2px solid var(--mutedGrey)}section#projects .mainProj,section#projects .otherProj{width:50%;display:flex;flex-direction:column;align-items:center;gap:1em}section#projects .mainProj{border-right:2px solid var(--mutedGrey);padding:0 2.5em 5em 0}section#allProjects img,section#projects img{-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;display:block;margin:1em auto}section#projects .mainProj img{width:100%;max-width:40rem}section#projects .mainProj .flexRow{display:flex;flex-direction:row;gap:4em}section#projects .mainProj .flexCol{display:flex;flex-direction:column;gap:2.5em}section#projects .otherProj>a{margin:5rem 0}section#projects .otherProj>div{display:flex;flex-direction:column;gap:2em}section#allProjects #otherProj .oProjItem,section#projects .otherProj>div .oProjItem{display:flex;justify-content:center;align-items:center;flex-direction:row;width:90%;border:1px solid var(--grey);gap:1em;box-shadow:0 6px 4px 0 var(--mutedBlack);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:.75em 1em}section#projects .otherProj>div .oProjItem{margin:0 auto}section#projects .otherProj>div .oProjItem:nth-child(2){flex-direction:row-reverse}section#projects .otherProj .oProjItem img{max-width:15rem;width:100%;padding:0 1em}section#projects .oProjItem .flexCol div:nth-child(2){display:flex;flex-direction:row;justify-content:flex-start;gap:3em;margin-left:2em}section#projects .flexCol div:nth-child(2) .btn{padding:.25em .5em}section#allProjects{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:5em}section#allProjects #mainProj{display:flex;flex-direction:column;justify-content:center;align-items:center;border:1px solid var(--grey);box-shadow:0 6px 4px 0 var(--mutedBlack);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:1.5em 2em;margin:3em 2.5rem 0;width:50%}section#allProjects #mainProj img{width:100%;max-width:30rem}section#allProjects #otherProj{display:flex;flex-direction:row;justify-content:space-between;align-items:stretch;flex-wrap:wrap;gap:2rem;border-top:2px solid var(--grey);padding:5em 2.5rem 0}section#allProjects #otherProj .oProjItem{flex-direction:column;width:30%;height:auto}section#allProjects #otherProj img{width:100%;max-width:20rem}section#contact{display:flex;flex-direction:row;padding:0 2.5em}div#findMe,div#sayHello{width:50%;display:flex;flex-direction:column;align-items:center;gap:1em}div#findMe .findMeContainer{display:flex;flex-direction:row;justify-content:space-around;align-items:center;gap:2em;width:100%;height:100%;margin:5em 0}div#findMe .findMeContainer .profile{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}div#findMe .socialIcons{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:2em}div#findMe .socialIcons div{display:flex;flex-direction:column;gap:1.5em}div#findMe .socialIcons div svg{width:2.5em;fill:var(--primaryDefault);font-size:2em}div#findMe .socialIcons div a:hover svg{fill:var(--primaryHover)}div#sayHello #contactForm{display:flex;flex-direction:column;justify-content:center;align-items:center}#contactForm .flName{display:flex;flex-direction:row;gap:1em;width:100%}div.message{background:var(--primaryDefault);color:#fff;padding:.5em .8em;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;display:flex;justify-content:center;align-items:center;align-self:flex-start;flex-direction:row-reverse;position:relative;height:75px;visibility:visible;overflow:hidden;-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-ms-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out;opacity:1;margin-top:1em;margin-bottom:1em}div.message.error{background:var(--errorDefault)}div.message button{border:none;background:0 0;outline:0;cursor:pointer;color:#fff;font-size:1.25rem;margin-top:-5px;position:absolute;transform:translate(0,0);transform-origin:0 0;right:10px;top:10px}div.message.hidden{opacity:0;visibility:hidden;height:0}div.message button:hover{text-shadow:-1px 2px var(--mutedBlack)}footer{background-color:var(--primaryDefault);margin-top:5em;padding:2em;display:flex;color:#fff}footer .spacer{width:100%;margin-right:auto}footer .nav{width:100%;margin-right:auto;display:flex;flex-direction:row;justify-content:center;align-items:center}footer .nav ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;justify-content:space-around}footer .nav ul a{color:#fff}footer p{margin:auto;width:100%;text-align:center}footer .button{margin-left:auto;width:100%;text-align:center}footer .button button{border:5px solid #fff;background:0 0;font-size:3em;padding:.5rem 1rem;width:2em;color:#fff;-webkit-border-radius:.25em;-moz-border-radius:.25em;border-radius:.25em;cursor:pointer}@media screen and (max-width:90em){section#curriculumVitae .cvGrid{flex-direction:column;justify-content:center;align-items:center}section#curriculumVitae .cvGrid>div{width:100%}section#curriculumVitae .cvGrid>div:first-child{padding-bottom:2.5em;margin-bottom:2.5em;border-bottom:5px #fff solid}section#curriculumVitae .cvGrid h2{margin-left:5em}section#curriculumVitae .cvGrid .timeline{margin:0 auto}}@media screen and (max-width:75em){section#about,section#curriculumVitae h1{padding:0 1em}section#about div{padding:.1em 2.5em}section#curriculumVitae .cvGrid{padding:0}section#projects{flex-direction:column;justify-content:center;align-items:center}section#projects .mainProj{border-right:0;padding:0;width:100%;margin:0 5em}section#projects .mainProj img{padding:0 1em}section#projects .mainProj .flexRow{flex-direction:column;margin:0 2.5em}section#projects .mainProj .flexCol{flex-direction:row;justify-content:center;align-items:center}section#projects .otherProj{width:100%}section#projects .otherProj .btn{width:10em;text-align:center}section#projects .otherProj>div .oProjItem,section#projects .otherProj>div .oProjItem:nth-child(2){flex-direction:column}section#projects .oProjItem .flexCol div:nth-child(2){justify-content:center;margin-left:0;margin-bottom:1em}section#projects .otherProj>a{margin-left:3em;margin-right:3em;text-align:center}section#allProjects #otherProj .oProjItem{width:45%}section#contact{flex-direction:column;justify-content:center;align-items:center}div#findMe,div#sayHello{width:100%}div#findMe .findMeContainer{flex-direction:column;justify-content:center}div#findMe .socialIcons{flex-direction:row}div#findMe .socialIcons div{flex-direction:row}}@media screen and (max-width:55em){section#curriculumVitae .cvGrid .timeline,section#curriculumVitae .cvGrid .timeline#work{margin:0 auto;width:100%}section#curriculumVitae .timeline:before{border:none}section#curriculumVitae .timelineItem,section#curriculumVitae .timelineItem:nth-child(2n){width:95%;padding:0;margin:0 auto}section#curriculumVitae .timelineItem:before{right:unset;left:unset;border:none}section#allProjects #mainProj{width:auto}section#allProjects #otherProj{flex-direction:column;align-items:center}section#allProjects #otherProj .oProjItem{width:auto}div#findMe .socialIcons{flex-direction:column}#contactForm .flName{flex-direction:column;gap:0;width:100%}}@media screen and (max-width:31em){section#about,section#curriculumVitae h1{padding:0 1em}header div h1{text-align:center;height:5.125rem}section#about div{padding:.1em 1em}section#projects .mainProj .flexCol{flex-direction:column}section#projects .oProjItem .flexCol div:nth-child(2){flex-direction:column;justify-content:center;align-items:center}} \ No newline at end of file diff --git a/src/api/blog/blogData.php b/src/api/blog/blogData.php index a8f8c6f..3221e58 100644 --- a/src/api/blog/blogData.php +++ b/src/api/blog/blogData.php @@ -2,13 +2,20 @@ namespace api\blog; +use api\utils\feedGenerator\FeedWriter; use api\utils\imgUtils; use DOMDocument; use PDO; use Psr\Http\Message\UploadedFileInterface; +use DonatelloZa\RakePlus\RakePlus; +use function DI\string; +use const api\utils\feedGenerator\ATOM; +use const api\utils\feedGenerator\RSS2; + require_once __DIR__ . "/../utils/config.php"; require_once __DIR__ . "/../utils/imgUtils.php"; +require_once __DIR__ . "/../utils/feedGenerator/FeedWriter.php"; /** * Blog Data Class @@ -18,12 +25,15 @@ class blogData { /** * Get all blog posts - * @return array - Array of all blog posts or error message + * @return array - Array of all blog posts or error message */ public function getBlogPosts(): array { $conn = dbConn(); - $stmt = $conn->prepare("SELECT * FROM blog ORDER BY featured DESC, dateCreated DESC;"); + $stmt = $conn->prepare("SELECT ID, title, DATE_FORMAT(dateCreated, '%Y-%m-%dT%TZ') AS dateCreated, + DATE_FORMAT(dateModified, '%Y-%m-%dT%TZ') AS dateModified, featured, abstract, + headerImg, body, bodyText, categories, keywords, folderID FROM blog ORDER BY featured DESC, + dateCreated DESC;"); $stmt->execute(); // set the resulting array to associative @@ -40,12 +50,15 @@ class blogData /** * Get a blog post with the given ID * @param string $title - Title of the blog post - * @return array - Array of all blog posts or error message + * @return array - Array of blog post or error message */ public function getBlogPost(string $title): array { $conn = dbConn(); - $stmt = $conn->prepare("SELECT * FROM blog WHERE title = :title;"); + $stmt = $conn->prepare("SELECT ID, title, DATE_FORMAT(dateCreated, '%Y-%m-%dT%TZ') AS dateCreated, + DATE_FORMAT(dateModified, '%Y-%m-%dT%TZ') AS dateModified, featured, abstract, + headerImg, body, bodyText, categories, keywords, folderID FROM blog WHERE + title = :title;"); $stmt->bindParam(":title", $title); $stmt->execute(); @@ -67,7 +80,10 @@ class blogData public function getLatestBlogPost(): array { $conn = dbConn(); - $stmt = $conn->prepare("SELECT * FROM blog ORDER BY dateCreated DESC LIMIT 1;"); + $stmt = $conn->prepare("SELECT ID, title, DATE_FORMAT(dateCreated, '%Y-%m-%dT%TZ') AS dateCreated, + DATE_FORMAT(dateModified, '%Y-%m-%dT%TZ') AS dateModified, featured, abstract, + headerImg, body, bodyText, categories, keywords, folderID FROM blog ORDER BY + dateCreated DESC LIMIT 1;"); $stmt->execute(); // set the resulting array to associative @@ -88,7 +104,9 @@ class blogData public function getFeaturedBlogPost(): array { $conn = dbConn(); - $stmt = $conn->prepare("SELECT * FROM blog WHERE featured = 1;"); + $stmt = $conn->prepare("SELECT ID, title, DATE_FORMAT(dateCreated, '%Y-%m-%dT%TZ') AS dateCreated, + DATE_FORMAT(dateModified, '%Y-%m-%dT%TZ') AS dateModified, featured, abstract, + headerImg, body, bodyText, categories, keywords, folderID FROM blog WHERE featured = 1;"); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_ASSOC); @@ -209,7 +227,9 @@ class blogData $from = "../blog/imgs/tmp/"; $newBody = $this->changeHTMLSrc($body, $to, $from); - $stmt = $conn->prepare("UPDATE blog SET title = :title, featured = :featured, abstract = :abstract, body = :body, bodyText = :bodyText, dateModified = :dateModified, categories = :categories WHERE ID = :ID;"); + $keywords = implode(", ", RakePlus::create($bodyText)->keywords()); + + $stmt = $conn->prepare("UPDATE blog SET title = :title, featured = :featured, abstract = :abstract, body = :body, bodyText = :bodyText, dateModified = :dateModified, categories = :categories, keywords = :keywords WHERE ID = :ID;"); $stmt->bindParam(":ID", $ID); $stmt->bindParam(":title", $title); $stmt->bindParam(":featured", $featured); @@ -218,6 +238,7 @@ class blogData $stmt->bindParam(":bodyText", $bodyText); $stmt->bindParam(":dateModified", $dateModified); $stmt->bindParam(":categories", $categories); + $stmt->bindParam(":keywords", $keywords); return $stmt->execute(); } @@ -266,8 +287,10 @@ class blogData $stmtMainProject->execute(); } - $stmt = $conn->prepare("INSERT INTO blog (title, dateCreated, dateModified, featured, headerImg, abstract, body, bodyText, categories, folderID) - VALUES (:title, :dateCreated, :dateModified, :featured, :headerImg, :abstract, :body, :bodyText, :categories, :folderID);"); + $keywords = implode(", ", RakePlus::create($bodyText)->keywords()); + + $stmt = $conn->prepare("INSERT INTO blog (title, dateCreated, dateModified, featured, headerImg, abstract, body, bodyText, categories, keywords, folderID) + VALUES (:title, :dateCreated, :dateModified, :featured, :headerImg, :abstract, :body, :bodyText, :categories, :keywords, :folderID);"); $stmt->bindParam(":title", $title); $stmt->bindParam(":dateCreated", $dateCreated); $stmt->bindParam(":dateModified", $dateCreated); @@ -278,6 +301,7 @@ class blogData $stmt->bindParam(":body", $newBody); $stmt->bindParam(":bodyText", $bodyText); $stmt->bindParam(":categories", $categories); + $stmt->bindParam(":keywords", $keywords); $stmt->bindParam(":folderID", $folderID); if ($stmt->execute()) @@ -399,11 +423,10 @@ class blogData if (!in_array($from . $file, $srcList)) { unlink($from . $file); + continue; } - else - { - rename($from . $file, $to . $file); - } + + rename($from . $file, $to . $file); } } @@ -418,7 +441,7 @@ class blogData /** * Get all posts with the given category * @param string $category - Category of the post - * @return array - Array of all posts with the given category or error message + * @return array - Array of all posts with the given category or error message */ public function getPostsByCategory(string $category): array { @@ -432,7 +455,7 @@ class blogData /** * Search for a blog post with the given search term * @param string $searchTerm - Search term - * @return array - Array of all posts with the given search term or error message + * @return array - Array of all posts with the given search term or error message */ public function searchBlog(string $searchTerm): array { @@ -527,4 +550,109 @@ class blogData return $result; } + + /** + * Generate the XML feed + * @param mixed $type - Type of feed + * @return array|string - Error message or the XML feed + */ + private function generateXMLFeed(mixed $type): array|string + { + ob_start(); + $feed = new FeedWriter($type); + $feed->setTitle("Rohit Pai's Blog"); + $feed->setLink('https://rohitpai.co.uk/blog'); + $feed->setFeedURL('https://rohitpai.co.uk/api/blog/feed/atom'); + $feed->setChannelElement('updated', date(DATE_ATOM, time())); + $feed->setChannelElement('author', ['name' => 'Rohit Pai']); + $posts = $this->getBlogPosts(); + + if (isset($posts["errorMessage"])) + { + return $posts; + } + + foreach ($posts as $post) + { + $newItem = $feed->createNewItem(); + $newItem->setTitle($post["title"]); + $newItem->setLink("https://rohitpai.co.uk/blog/post/" . rawurlencode($post["title"]) . "#disqus_thread"); + $newItem->setDate($post["dateModified"]); + $newItem->setDescription($post["body"]); + $feed->addItem($newItem); + } + + $feed->generateFeed(); + $atom = ob_get_contents(); + ob_end_clean(); + return $atom; + } + + /** + * Generate the JSON feed + * @return array|array[] - Error message or the JSON feed + */ + private function generateJSONFeed(): array + { + $posts = $this->getBlogPosts(); + + if (isset($posts["errorMessage"])) + { + return $posts; + } + + $json = array(); + $json["version"] = "https://jsonfeed.org/version/1.1"; + $json["title"] = "Rohit Pai's Blog"; + $json["home_page_url"] = "https://rohitpai.co.uk/blog"; + $json["feed_url"] = "https://rohitpai.co.uk/api/blog/feed/json"; + $json["description"] = "Rohit Pai's personal blog on all things self hosting and various other tech topics"; + $json["author"] = array( + "name" => "Rohit Pai", + "url" => "https://rohitpai.co.uk", + "avatar" => "https://rohitpai.co.uk/imgs/profile.jpg" + ); + $items = array(); + foreach ($posts as $post) + { + $items[] = array( + "id" => string($post["ID"]), + "url" => "https://rohitpai.co.uk/blog/post/" . rawurlencode($post["title"]) . "#disqus_thread", + "title" => $post["title"], + "date_published" => date($post["dateCreated"]), + "date_modified" => date($post["dateModified"]), +// "description" => $post["abstract"], + "banner_image" => "https://rohitpai.co.uk/" . rawurlencode($post["headerImg"]), + "content_html" => $post["body"] + ); + } + $json["items"] = $items; + return $json; + } + + /** + * Generate the RSS feed based on type + * @param string $type - Type of feed + * @return string|array - RSS feed or an error message + */ + public function getFeed(string $type): string|array + { + $feed = ""; + if ($type == "atom") + { + $feed = $this->generateXMLFeed(ATOM); + } + + if ($type == "rss") + { + $feed = $this->generateXMLFeed(RSS2); + } + + if ($type == "json") + { + $feed = $this->generateJSONFeed(); + } + + return $feed; + } } \ No newline at end of file diff --git a/src/api/blog/blogRoutes.php b/src/api/blog/blogRoutes.php index d3c4201..975052c 100644 --- a/src/api/blog/blogRoutes.php +++ b/src/api/blog/blogRoutes.php @@ -4,6 +4,7 @@ namespace api\blog; require_once __DIR__ . "/../utils/routesInterface.php"; require_once "blogData.php"; + use api\utils\routesInterface; use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; @@ -80,35 +81,15 @@ class blogRoutes implements routesInterface $app->get("/blog/post/{type}", function (Request $request, Response $response, $args) { - if ($args["type"] != null) + if ($args["type"] == null) { - if ($args["type"] == "latest") - { - $post = $this->blogData->getLatestBlogPost(); - if (array_key_exists("errorMessage", $post)) - { - $response->getBody()->write(json_encode($post)); - return $response->withStatus(404); - } + $response->getBody()->write(json_encode(array("error" => "Please provide a title"))); + return $response->withStatus(400); + } - $response->getBody()->write(json_encode($post)); - return $response; - } - - if ($args["type"] == "featured") - { - $post = $this->blogData->getFeaturedBlogPost(); - if (array_key_exists("errorMessage", $post)) - { - $response->getBody()->write(json_encode($post)); - return $response->withStatus(404); - } - - $response->getBody()->write(json_encode($post)); - return $response; - } - - $post = $this->blogData->getBlogPost($args["type"]); + if ($args["type"] == "latest") + { + $post = $this->blogData->getLatestBlogPost(); if (array_key_exists("errorMessage", $post)) { $response->getBody()->write(json_encode($post)); @@ -119,114 +100,173 @@ class blogRoutes implements routesInterface return $response; } - $response->getBody()->write(json_encode(array("error" => "Please provide a title"))); + if ($args["type"] == "featured") + { + $post = $this->blogData->getFeaturedBlogPost(); + if (array_key_exists("errorMessage", $post)) + { + $response->getBody()->write(json_encode($post)); + return $response->withStatus(404); + } + + $response->getBody()->write(json_encode($post)); + return $response; + } + + $post = $this->blogData->getBlogPost($args["type"]); + if (array_key_exists("errorMessage", $post)) + { + $response->getBody()->write(json_encode($post)); + return $response->withStatus(404); + } + + $response->getBody()->write(json_encode($post)); + return $response; + + }); + + $app->get("/blog/feed/{type}", function (Request $request, Response $response, $args) + { + if ($args["type"] == null) + { + $response->getBody()->write(json_encode(array("error" => "Please provide a title"))); + return $response->withStatus(400); + } + + $feed = $this->blogData->getFeed($args["type"]); + if (is_array($feed)) + { + $response->getBody()->write(json_encode($feed)); + return $response->withStatus(404); + } + + if ($args["type"] == "atom") + { + $response->getBody()->write($feed); + return $response->withHeader("Content-Type", "application/atom+xml"); + } + + if ($args["type"] == "rss") + { + $response->getBody()->write($feed); + return $response->withHeader("Content-Type", "application/rss+xml"); + } + + if ($args["type"] == "json") + { + $response->getBody()->write(json_encode($feed)); + return $response->withHeader("Content-Type", "application/feed+json"); + } + + $response->getBody()->write(json_encode(array("error" => "Invalid feed type"))); return $response->withStatus(400); }); $app->get("/blog/search/{searchTerm}", function (Request $request, $response, $args) { - if ($args["searchTerm"] != null) + if ($args["searchTerm"] == null) { - $posts = $this->blogData->searchBlog($args["searchTerm"]); - - $json = json_encode($posts); - - $response->getBody()->write($json); - - if (array_key_exists("errorMessage", $posts)) - { - $response->withStatus(404); - } - - return $response; + $response->getBody()->write(json_encode(array("error" => "Please provide a search term"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide a search term"))); - return $response->withStatus(400); + $posts = $this->blogData->searchBlog($args["searchTerm"]); + + $json = json_encode($posts); + + $response->getBody()->write($json); + + if (array_key_exists("errorMessage", $posts)) + { + $response->withStatus(404); + } + + return $response; + }); $app->patch("/blog/post/{id}", function (Request $request, Response $response, $args) { $data = $request->getParsedBody(); - if ($args["id"] != null) + if ($args["id"] == null) { - if (empty($data["title"]) || strlen($data["featured"]) == 0 || empty($data["body"]) || empty($data["bodyText"]) || empty($data["dateModified"]) || empty($data["categories"])) - { - // uh oh sent some empty data - $response->getBody()->write(json_encode(array("error" => "Only some of the data was sent"))); - return $response->withStatus(400); - } - - if (!preg_match('/[a-zA-Z0-9 ]+, |\w+/mx', $data["categories"])) - { - // uh oh sent some empty data - $response->getBody()->write(json_encode(array("error" => "Categories must be in a CSV format"))); - return $response->withStatus(400); - } - - $message = $this->blogData->updatePost($args["id"], $data["title"], intval($data["featured"]), $data["abstract"], $data["body"], $data["bodyText"], $data["dateModified"], $data["categories"]); - - if ($message === "post not found") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, post not found"))); - return $response->withStatus(404); - } - - if ($message === "unset featured") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, cannot unset featured post, try updating another post to be featured first"))); - return $response->withStatus(409); - } - - if (!is_bool($message) || $message === false) - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => $message))); - return $response->withStatus(500); - } - - $response->withStatus(201); - return $response; - + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + if (empty($data["title"]) || strlen($data["featured"]) == 0 || empty($data["body"]) || empty($data["bodyText"]) || empty($data["dateModified"]) || empty($data["categories"])) + { + // uh oh sent some empty data + $response->getBody()->write(json_encode(array("error" => "Only some of the data was sent"))); + return $response->withStatus(400); + } + + if (!preg_match('/[a-zA-Z0-9 ]+, |\w+/mx', $data["categories"])) + { + // uh oh sent some empty data + $response->getBody()->write(json_encode(array("error" => "Categories must be in a CSV format"))); + return $response->withStatus(400); + } + + $message = $this->blogData->updatePost($args["id"], $data["title"], intval($data["featured"]), $data["abstract"], $data["body"], $data["bodyText"], $data["dateModified"], $data["categories"]); + + if ($message === "post not found") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, post not found"))); + return $response->withStatus(404); + } + + if ($message === "unset featured") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, cannot unset featured post, try updating another post to be featured first"))); + return $response->withStatus(409); + } + + if (!is_bool($message) || $message === false) + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => $message))); + return $response->withStatus(500); + } + + $response->withStatus(201); + return $response; + }); $app->delete("/blog/post/{id}", function (Request $request, Response $response, $args) { - if ($args["id"] != null) + if ($args["id"] == null) { - $message = $this->blogData->deletePost($args["id"]); - - if ($message === "post not found") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, post not found"))); - return $response->withStatus(404); - } - - if ($message === "error") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, something went wrong"))); - return $response->withStatus(500); - } - - if ($message === "cannot delete") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Error, cannot delete featured post"))); - return $response->withStatus(409); - } - return $response; + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + $message = $this->blogData->deletePost($args["id"]); + + if ($message === "post not found") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, post not found"))); + return $response->withStatus(404); + } + + if ($message === "error") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, something went wrong"))); + return $response->withStatus(500); + } + + if ($message === "cannot delete") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Error, cannot delete featured post"))); + return $response->withStatus(409); + } + return $response; }); $app->post("/blog/post", function (Request $request, Response $response) @@ -290,28 +330,28 @@ class blogRoutes implements routesInterface { $files = $request->getUploadedFiles(); - if ($args["id"] != null) + if ($args["id"] == null) { - if (empty($files)) - { - // uh oh sent some empty data - $response->getBody()->write(json_encode(array("error" => array("message" => "Error, empty data sent")))); - return $response->withStatus(400); - } - - $message = $this->blogData->uploadHeaderImage($args["id"], $files["headerImg"]); - if (!is_array($message)) - { - $response->getBody()->write(json_encode(array("error" => array("message" => $message)))); - return $response->withStatus(500); - } - - $response->getBody()->write(json_encode($message)); - return $response->withStatus(201); + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + if (empty($files)) + { + // uh oh sent some empty data + $response->getBody()->write(json_encode(array("error" => array("message" => "Error, empty data sent")))); + return $response->withStatus(400); + } + + $message = $this->blogData->uploadHeaderImage($args["id"], $files["headerImg"]); + if (!is_array($message)) + { + $response->getBody()->write(json_encode(array("error" => array("message" => $message)))); + return $response->withStatus(500); + } + + $response->getBody()->write(json_encode($message)); + return $response->withStatus(201); }); } } \ No newline at end of file diff --git a/src/api/project/projectData.php b/src/api/project/projectData.php index de02be7..8a81b2c 100644 --- a/src/api/project/projectData.php +++ b/src/api/project/projectData.php @@ -17,7 +17,7 @@ class projectData { /** * Get all project data - * @return array - Array of all project data or error message + * @return array - Array of all project data or error message */ public function getProjectData(): array { diff --git a/src/api/project/projectRoutes.php b/src/api/project/projectRoutes.php index 15171c6..a119a77 100644 --- a/src/api/project/projectRoutes.php +++ b/src/api/project/projectRoutes.php @@ -50,78 +50,78 @@ class projectRoutes implements routesInterface $app->patch("/projectData/{id}", function (Request $request, Response $response, array $args) { $data = $request->getParsedBody(); - if ($args["id"] != null) + if ($args["id"] == null) { - if (empty($data["title"]) || empty($data["isMainProject"]) || empty($data["information"]) || empty($data["gitLink"])) - { - // uh oh sent some empty data - $response->getBody()->write(json_encode(array("error" => "Only some of the data was sent"))); - return $response->withStatus(400); - } - - $isMainProject = $data["isMainProject"] === "true"; - $update = $this->projectData->updateProjectData($args["id"], $data["title"], $isMainProject, $data["information"], $data["projectLink"], $data["gitLink"]); - - if ($update === "project not found") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Project with ID " . $args["id"] . " not found"))); - return $response->withStatus(404); - } - - if ($update === "unset main project") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Can't unset project as main project, try updating another project as the main project"))); - return $response->withStatus(400); - } - - if (!$update) - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Something went wrong"))); - return $response->withStatus(500); - } - - return $response; + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + if (empty($data["title"]) || empty($data["isMainProject"]) || empty($data["information"]) || empty($data["gitLink"])) + { + // uh oh sent some empty data + $response->getBody()->write(json_encode(array("error" => "Only some of the data was sent"))); + return $response->withStatus(400); + } + + $isMainProject = $data["isMainProject"] === "true"; + $update = $this->projectData->updateProjectData($args["id"], $data["title"], $isMainProject, $data["information"], $data["projectLink"], $data["gitLink"]); + + if ($update === "project not found") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Project with ID " . $args["id"] . " not found"))); + return $response->withStatus(404); + } + + if ($update === "unset main project") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Can't unset project as main project, try updating another project as the main project"))); + return $response->withStatus(400); + } + + if (!$update) + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Something went wrong"))); + return $response->withStatus(500); + } + + return $response; }); $app->delete("/projectData/{id}", function (Request $request, Response $response, array $args) { - if ($args["id"] != null) + if ($args["id"] == null) { - $message = $this->projectData->deleteProjectData($args["id"]); - - if ($message === "project not found") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Project with ID " . $args["id"] . " not found"))); - return $response->withStatus(404); - } - - if ($message === "cannot delete") - { - //uh oh cannot delete the main project - $response->getBody()->write(json_encode(array("error" => "Cannot delete the main project"))); - return $response->withStatus(409); - } - - if ($message === "error") - { - // uh oh something went wrong - $response->getBody()->write(json_encode(array("error" => "Something went wrong"))); - return $response->withStatus(500); - } - - return $response; + $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); + return $response->withStatus(400); } - $response->getBody()->write(json_encode(array("error" => "Please provide an ID"))); - return $response->withStatus(400); + $message = $this->projectData->deleteProjectData($args["id"]); + + if ($message === "project not found") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Project with ID " . $args["id"] . " not found"))); + return $response->withStatus(404); + } + + if ($message === "cannot delete") + { + //uh oh cannot delete the main project + $response->getBody()->write(json_encode(array("error" => "Cannot delete the main project"))); + return $response->withStatus(409); + } + + if ($message === "error") + { + // uh oh something went wrong + $response->getBody()->write(json_encode(array("error" => "Something went wrong"))); + return $response->withStatus(500); + } + + return $response; }); $app->post("/projectData", function (Request $request, Response $response) diff --git a/src/api/timeline/timelineData.php b/src/api/timeline/timelineData.php index 4bd8db7..f646e5e 100644 --- a/src/api/timeline/timelineData.php +++ b/src/api/timeline/timelineData.php @@ -14,7 +14,7 @@ class timelineData { /** * Get all education data - * @return array - Array of all education data or error message + * @return array - Array of all education data or error message */ public function getEduData(): array { diff --git a/src/api/utils/feedGenerator/FeedItem.php b/src/api/utils/feedGenerator/FeedItem.php new file mode 100644 index 0000000..784f187 --- /dev/null +++ b/src/api/utils/feedGenerator/FeedItem.php @@ -0,0 +1,152 @@ + + * @link http://www.ajaxray.com/projects/rss + */ +class FeedItem +{ + private array $elements = []; // Collection of feed elements + private string $version; + + /** + * Constructor + * + * @param string $version (RSS1/RSS2/ATOM) RSS2 is the default. + */ + public function __construct(string $version = RSS2) + { + $this->version = $version; + } + + /** + * Add an element to elements array + * + * @param string $elementName The tag name of an element + * @param string $content The content of the tag + * @param array|null $attributes Attributes (if any) in 'attrName' => 'attrValue' format + */ + public function addElement(string $elementName, string $content, ?array $attributes = null): void + { + $this->elements[$elementName]['name'] = $elementName; + $this->elements[$elementName]['content'] = $content; + $this->elements[$elementName]['attributes'] = $attributes; + } + + /** + * Set multiple feed elements from an array. + * Elements that have attributes cannot be added by this method + * + * @param array $elementArray Array of elements in 'tagName' => 'tagContent' format. + */ + public function addElementArray(array $elementArray): void + { + foreach ($elementArray as $elementName => $content) + { + $this->addElement($elementName, $content); + } + } + + /** + * Return the collection of elements in this feed item + * + * @return array + */ + public function getElements(): array + { + return $this->elements; + } + + // Wrapper functions ------------------------------------------------------ + + /** + * Set the 'description' element of the feed item + * + * @param string $description The content of the 'description' element + */ + public function setDescription(string $description): void + { + $tag = ($this->version === ATOM) ? 'summary' : 'description'; + $this->addElement($tag, $description); + } + + /** + * Set the 'title' element of the feed item + * + * @param string $title The content of the 'title' element + */ + public function setTitle(string $title): void + { + $this->addElement('title', $title); + } + + /** + * Set the 'date' element of the feed item + * + * @param string|int $date The content of the 'date' element + */ + public function setDate(string|int $date): void + { + if (!is_numeric($date)) + { + $date = strtotime($date); + } + + if ($this->version === ATOM) + { + $tag = 'updated'; + $value = date(DATE_ATOM, $date); + } + elseif ($this->version === RSS2) + { + $tag = 'pubDate'; + $value = date(DATE_RSS, $date); + } + else + { + $tag = 'dc:date'; + $value = date("Y-m-d", $date); + } + + $this->addElement($tag, $value); + } + + /** + * Set the 'link' element of the feed item + * + * @param string $link The content of the 'link' element + */ + public function setLink(string $link): void + { + if ($this->version === RSS2 || $this->version === RSS1) + { + $this->addElement('link', $link); + } + else + { + $this->addElement('link', '', ['href' => $link]); + $this->addElement('id', FeedWriter::uuid($link, 'urn:uuid:')); + } + } + + /** + * Set the 'encloser' element of the feed item + * For RSS 2.0 only + * + * @param string $url The url attribute of the encloser tag + * @param string $length The length attribute of the encloser tag + * @param string $type The type attribute of the encloser tag + */ + public function setEncloser(string $url, string $length, string $type): void + { + $attributes = ['url' => $url, 'length' => $length, 'type' => $type]; + $this->addElement('enclosure', '', $attributes); + } +} diff --git a/src/api/utils/feedGenerator/FeedWriter.php b/src/api/utils/feedGenerator/FeedWriter.php new file mode 100644 index 0000000..d2ba973 --- /dev/null +++ b/src/api/utils/feedGenerator/FeedWriter.php @@ -0,0 +1,386 @@ +version = $version; + + // Setting default values for essential channel elements + $this->channels['title'] = $version . ' Feed'; + $this->channels['link'] = 'http://www.ajaxray.com/blog'; + $this->channels["feedUrl"] = "http://example.com/feed"; + + // Tag names to encode in CDATA + $this->CDATAEncoding = ['description', 'content:encoded', 'summary']; + } + + // Public functions + + /** + * Set a channel element + * + * @param string $elementName Name of the channel tag + * @param string $content Content of the channel tag + */ + public function setChannelElement(string $elementName, string|array $content): void + { + $this->channels[$elementName] = $content; + } + + /** + * Generate the actual RSS/Atom file + */ + public function generateFeed(): void + { + $this->printHead(); + $this->printChannels(); + $this->printItems(); + $this->printTail(); + } + + /** + * Create a new FeedItem. + * + * @return FeedItem An instance of FeedItem class + */ + public function createNewItem(): FeedItem + { + $item = new FeedItem($this->version); + return $item; + } + + /** + * Add a FeedItem to the main class + * + * @param FeedItem $feedItem An instance of FeedItem class + */ + public function addItem(FeedItem $feedItem): void + { + $this->items[] = $feedItem; + } + + // Wrapper functions + + /** + * Set the 'title' channel element + * + * @param string $title Value of 'title' channel tag + */ + public function setTitle(string $title): void + { + $this->setChannelElement('title', $title); + } + + /** + * Set the 'description' channel element + * + * @param string $description Value of 'description' channel tag + */ + public function setDescription(string $description): void + { + $this->setChannelElement('description', $description); + } + + /** + * Set the 'link' channel element + * + * @param string $link Value of 'link' channel tag + */ + public function setLink(string $link): void + { + $this->setChannelElement('link', $link); + } + + /** + * Set the 'image' channel element + * + * @param string $title Title of the image + * @param string $link Link URL of the image + * @param string $url Path URL of the image + */ + public function setImage(string $title, string $link, string $url): void + { + $this->setChannelElement('image', ['title' => $title, 'link' => $link, 'url' => $url]); + } + + /** + * Set the 'about' channel element. Only for RSS 1.0 + * + * @param string $url Value of 'about' channel tag + */ + public function setChannelAbout(string $url): void + { + $this->data['ChannelAbout'] = $url; + } + + // Other functions + + /** + * Generates a UUID + * + * @param string $key An optional prefix + * @param string $prefix A prefix + * @return string The formatted UUID + */ + public static function uuid(?string $key = null, string $prefix = ''): string + { + $key = $key ?? uniqid((string)rand()); + $chars = md5($key); + $uuid = substr($chars, 0, 8) . '-'; + $uuid .= substr($chars, 8, 4) . '-'; + $uuid .= substr($chars, 12, 4) . '-'; + $uuid .= substr($chars, 16, 4) . '-'; + $uuid .= substr($chars, 20, 12); + + return $prefix . $uuid; + } + + // Private functions + + /** + * Prints the XML and RSS namespace + */ + private function printHead(): void + { + $out = '' . "\n"; + + if ($this->version == RSS2) + { + $out .= '' . PHP_EOL; + } + elseif ($this->version == RSS1) + { + $out .= '' . PHP_EOL; + } + elseif ($this->version == ATOM) + { + $out .= '' . PHP_EOL; + } + echo $out; + } + + /** + * Closes the open tags at the end of the file + */ + private function printTail(): void + { + if ($this->version == RSS2) + { + echo '
' . PHP_EOL . ''; + } + elseif ($this->version == RSS1) + { + echo ''; + } + elseif ($this->version == ATOM) + { + echo ''; + } + } + + /** + * Creates a single node in XML format + * + * @param string $tagName Name of the tag + * @param mixed $tagContent Tag value as a string or an array of nested tags in 'tagName' => 'tagValue' format + * @param array|null $attributes Attributes (if any) in 'attrName' => 'attrValue' format + * @return string Formatted XML tag + */ + private function makeNode(string $tagName, $tagContent, ?array $attributes = null): string + { + $nodeText = ''; + $attrText = ''; + + if (is_array($attributes)) + { + foreach ($attributes as $key => $value) + { + $attrText .= " $key=\"$value\""; + } + } + + if (is_array($tagContent) && $this->version == RSS1) + { + $attrText = ' rdf:parseType="Resource"'; + } + + $attrText .= (in_array($tagName, $this->CDATAEncoding) && $this->version == ATOM) ? ' type="html" ' : ''; + $nodeText .= (in_array($tagName, $this->CDATAEncoding)) ? "<{$tagName}{$attrText}>"; + + if (is_array($tagContent)) + { + foreach ($tagContent as $key => $value) + { + $nodeText .= $this->makeNode($key, $value); + } + } + else + { + $nodeText .= (in_array($tagName, $this->CDATAEncoding)) ? $tagContent : htmlentities($tagContent); + } + + $nodeText .= (in_array($tagName, $this->CDATAEncoding)) ? "]]>" : ""; + + return $nodeText . PHP_EOL; + } + + /** + * Prints channel elements + */ + private function printChannels(): void + { + // Start channel tag + switch ($this->version) + { + case RSS2: + echo '' . PHP_EOL; + break; + case RSS1: + echo (isset($this->data['ChannelAbout'])) ? "data['ChannelAbout']}\">" : "channels['link']}\">"; + break; + } + + // Print items of channel + foreach ($this->channels as $key => $value) + { + if ($this->version == ATOM && $key == 'link') + { + // ATOM prints the link element as an href attribute + echo $this->makeNode($key, '', ['href' => $value]); + // Add the id for ATOM + echo $this->makeNode('id', $this->uuid($value, 'urn:uuid:')); + } + else if ($this->version == ATOM && $key == 'feedUrl') + { + echo $this->makeNode('link', '', ['rel' => 'self', 'href' => $value]); + } + else + { + echo $this->makeNode($key, $value); + } + } + + // RSS 1.0 has a special tag with channel + if ($this->version == RSS1) + { + echo "" . PHP_EOL . "" . PHP_EOL; + foreach ($this->items as $item) + { + $thisItems = $item->getElements(); + echo "" . PHP_EOL; + } + echo "" . PHP_EOL . "" . PHP_EOL . "" . PHP_EOL; + } + } + + /** + * Prints formatted feed items + */ + private function printItems(): void + { + foreach ($this->items as $item) + { + $thisItems = $item->getElements(); + + // The argument is printed as rdf:about attribute of item in RSS 1.0 + echo $this->startItem($thisItems['link']['content']); + + foreach ($thisItems as $feedItem) + { + echo $this->makeNode($feedItem['name'], $feedItem['content'], $feedItem['attributes']); + } + echo $this->endItem(); + } + } + + /** + * Makes the starting tag of items + * + * @param string|false $about The value of about tag, which is used only for RSS 1.0 + */ + private function startItem($about = false): void + { + if ($this->version == RSS2) + { + echo '' . PHP_EOL; + } + elseif ($this->version == RSS1) + { + if ($about) + { + echo "" . PHP_EOL; + } + else + { + die("link element is not set.\n It's required for RSS 1.0 to be used as the about attribute of the item"); + } + } + elseif ($this->version == ATOM) + { + echo "" . PHP_EOL; + } + } + + /** + * Closes the feed item tag + */ + private function endItem(): void + { + if ($this->version == RSS2 || $this->version == RSS1) + { + echo '' . PHP_EOL; + } + elseif ($this->version == ATOM) + { + echo "" . PHP_EOL; + } + } + + /** + * Set the Feed URL + * @param string $string - The URL of the feed + * @return void + */ + public function setFeedURL(string $string): void + { + $this->setChannelElement("feedUrl", $string); + } +} + + +// Define constants for RSS 1.0, RSS 2.0, and Atom +const RSS1 = 'RSS 1.0'; +const RSS2 = 'RSS 2.0'; +const ATOM = 'ATOM'; diff --git a/src/api/utils/middleware.php b/src/api/utils/middleware.php index 0181e91..14d7627 100644 --- a/src/api/utils/middleware.php +++ b/src/api/utils/middleware.php @@ -65,7 +65,12 @@ class middleware $app->add(function ($request, $handler) { $response = $handler->handle($request); - return $response->withHeader("Content-Type", "application/json"); + $contentType = $response->getHeaderLine("Content-Type"); + if (empty($contentType) || $contentType === "text/html") + { + return $response->withHeader("Content-Type", "application/json"); + } + return $response; }); } diff --git a/src/blog/css/blogPosts.css b/src/blog/css/blogPosts.css index e804fa7..4ef1a2b 100644 --- a/src/blog/css/blogPosts.css +++ b/src/blog/css/blogPosts.css @@ -73,6 +73,10 @@ article { padding: 0 2em; } +article a { + padding: 0 1em; +} + article a::before, article a::after { visibility: hidden; @@ -81,7 +85,7 @@ article a::after { } article a::before { - content: '<'; + content: ' <'; margin-left: -0.5em; } @@ -133,7 +137,7 @@ div.authorInfo h3 { grid-column: span 2; } -div.otherPosts { +div.otherPosts, div.newsletter, div.feeds { display: flex; flex-direction: column; justify-content: flex-start; @@ -143,10 +147,36 @@ div.otherPosts { width: 100%; } -div.otherPosts a { +div.otherPosts a, div.feeds a { padding: 0.5em 1em; } +div.newsletter form input[type="submit"] { + margin-top: 1em; + padding: 0.5em 1em; +} + +div.feeds .icons { + display: flex; + flex-direction: row; + justify-content: space-around; + align-items: flex-start; + gap: 0.5em; + flex-wrap: wrap-reverse; +} + +div.feeds h2 { + margin-bottom: 0; +} + +div.feeds i.fa-solid.fa-rss { + font-size: 2em; +} + +div.feeds img.atom, div.feeds img.json { + width: 2em; +} + div.categories { display: flex; flex-direction: column; diff --git a/src/blog/css/main.css b/src/blog/css/main.css index 747c40d..200525a 100644 --- a/src/blog/css/main.css +++ b/src/blog/css/main.css @@ -10,6 +10,18 @@ @import "category.css"; @import "prism.css"; +.policy { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: center; + padding-left: 5em; + padding-bottom: 5em; +} + +.policy h3 { + font-weight: bold; +} /**** Media Queries *****/ @@ -78,27 +90,46 @@ align-items: stretch; justify-content: space-around; border-bottom: 5px solid var(--mutedGrey); - } - - div.otherPosts, div.authorInfo { - border-bottom: none; + flex-wrap: wrap; } aside.sideContent > div.authorInfo { - grid-template-columns: 1fr 1fr 1fr; + grid-template-columns: 4fr 1fr 1fr 1fr; + flex-basis: 100%; } aside.sideContent > div.authorInfo .picture { - grid-row: 1; - grid-column: span 3; + grid-row: span 3; + } + + div.byLine { + flex-direction: column; + align-items: flex-start; + } + + div.byLine h3:last-child { + border-left: none; + padding-left: 0; } aside.sideContent > div.authorInfo h3 { - grid-column: span 3; + grid-column-start: 2; + grid-column-end: end; + grid-row: 3; } - div.otherPosts { + aside.sideContent > div.categories { + flex-basis: 100%; + } + + aside.sideContent > div.otherPosts { + border-bottom: 5px solid var(--mutedGrey); + } + + + div.otherPosts, div.newsletter, div.feeds { justify-content: space-between; + width: 50%; } aside.sideContent > div { @@ -125,41 +156,14 @@ } /***** Individual Blog Posts ***/ - aside.sideContent { - flex-wrap: wrap; - } aside.sideContent > div.authorInfo { - grid-template-columns: 2fr 1fr; - border-bottom: 5px solid var(--mutedGrey); - flex-basis: 100%; - } - - aside.sideContent > div.authorInfo .picture { - grid-row: span 3; - grid-column: initial; - } - - div.byLine { - flex-direction: column; - align-items: flex-start; - } - - div.byLine h3:last-child { - border-left: none; - padding-left: 0; + grid-template-columns: 2fr 1fr 1fr; + grid-template-rows: 1fr 1fr; } aside.sideContent > div.authorInfo h3 { - grid-column: span 2; - } - - aside.sideContent > div.categories { - flex-basis: 100%; - } - - aside.sideContent > div.otherPosts { - border-bottom: 5px solid var(--mutedGrey); + grid-row: 2; } } @@ -183,6 +187,7 @@ aside.sideContent > div.authorInfo { grid-template-columns: 1fr 1fr 1fr; + grid-template-rows: repeat(3, auto); border-top: 5px solid var(--mutedGrey); } @@ -194,4 +199,8 @@ aside.sideContent > div.authorInfo h3 { grid-column: span 3; } + + div.otherPosts, div.newsletter, div.feeds { + width: 100%; + } } \ No newline at end of file diff --git a/src/blog/imgs/atomFeed.svg b/src/blog/imgs/atomFeed.svg new file mode 100644 index 0000000..5cf5bf4 --- /dev/null +++ b/src/blog/imgs/atomFeed.svg @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + Openclipart + + + + + + + + + + + + diff --git a/src/blog/imgs/jsonFeed.svg b/src/blog/imgs/jsonFeed.svg new file mode 100644 index 0000000..acbb3f9 --- /dev/null +++ b/src/blog/imgs/jsonFeed.svg @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/src/blog/index.html b/src/blog/index.html index 838afd8..4dbe070 100644 --- a/src/blog/index.html +++ b/src/blog/index.html @@ -17,6 +17,9 @@ +