diff --git a/README.md b/README.md index d90d5ca..37c957b 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,13 @@ #### Features: **List of features related with structure** - **public** -Contains the index.php file, to start application and configures auto-loading. Different server configurations added into this directory too. Finally, you can find the Sitemap generator that run after creation or updating a post. +Contains the index.php file, to start application and configures auto-loading. Different server configurations added into this directory too. Finally, you can find the Sitemap generator that runs after creation or updating a post. - **public/assets** Assets can contain your media files like images, audios & videos. - **public/css** & **public/js** Contains the styles & scripts _(After changes on these files, you can use minifier script to update minified versions, just run `docker-compose exec php-mvc-app php minifier.php`)_ - **public/feed** -There is a RSS generator in here and run after creation or updating a post. +There is a RSS generator in here and runs after creation or updating a post. - **src** Contains migrations for a DB and routes. - **src/App** @@ -58,7 +58,7 @@ Check Cross-site request forgery token - **Helper::slug(...)** Slugify string to make user-friendly URL - **Cache::checkCache(...)**, **Cache::cache(...)** & **Cache::clearCache(...)** -Check existed cache, cache data and clear cache, by Memcached +Check existing cache, cache data and clear cache, by Memcached - **UserInfo::current()** Return current user information - **UserInfo::info(...)** diff --git a/public/assets/images/banner.png b/public/assets/images/banner.png new file mode 100644 index 0000000..3467480 Binary files /dev/null and b/public/assets/images/banner.png differ diff --git a/public/assets/images/logo.png b/public/assets/images/logo.png new file mode 100644 index 0000000..b89bbe4 Binary files /dev/null and b/public/assets/images/logo.png differ diff --git a/public/sitemap.php b/public/sitemap.php index cb4756a..b635226 100755 --- a/public/sitemap.php +++ b/public/sitemap.php @@ -2,7 +2,7 @@ /** * This script can produce a sitemap.xml in public folder - * This one call by XmlGenerator::feed() function after + * That called by XmlGenerator::feed() function after * each post creation or updating */ diff --git a/src/Console/commands.php b/src/Console/commands.php index 09693a5..5c202ce 100644 --- a/src/Console/commands.php +++ b/src/Console/commands.php @@ -30,7 +30,7 @@ ]; /** - * Add script to current one to run it + * Run script if existed and match with timing */ foreach ($commands as $k => $v) { if ($timingMapping[$v]) { diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php index 1a7c07e..415ac11 100644 --- a/src/Controllers/AuthController.php +++ b/src/Controllers/AuthController.php @@ -29,7 +29,7 @@ public function registerForm() 'Auth/register', [ 'page_title' => 'Register', - 'page_subtitle' => 'Register to send post in Blog' + 'page_subtitle' => 'Register to send post in Blog', ] ); } @@ -96,7 +96,7 @@ public function verify() 'Auth/verify', [ 'page_title' => 'Email Verification', - 'page_subtitle' => 'Verification process failed! Please register again with a new email address.' + 'page_subtitle' => 'Verification process failed! Please register again with a new email address.', ] ); } @@ -118,7 +118,7 @@ public function loginForm() 'Auth/login', [ 'page_title' => 'Login', - 'page_subtitle' => 'Login to send post in Blog' + 'page_subtitle' => 'Login to send post in Blog', ] ); } diff --git a/src/Controllers/BlogController.php b/src/Controllers/BlogController.php index 22c4559..843f08f 100644 --- a/src/Controllers/BlogController.php +++ b/src/Controllers/BlogController.php @@ -31,8 +31,9 @@ public function index() [ 'page_title' => 'Blog', 'page_subtitle' => 'Basic PHP MVC | Blog', + 'page_type' => 'article', - 'posts' => $posts + 'posts' => $posts, ] ); } @@ -53,8 +54,10 @@ public function show(string $slug) [ 'page_title' => $post['title'], 'page_subtitle' => $post['subtitle'], + 'page_type' => 'article', + 'page_banner' => '/assets/images/' . Helper::slug($post['title'], '-', false) . '.jpg', - 'post' => $post + 'post' => $post, ] ); } @@ -75,7 +78,8 @@ public function create() 'Blog/create', [ 'page_title' => 'Create Post', - 'page_subtitle' => 'Create new post in Blog' + 'page_subtitle' => 'Create new post in Blog', + 'page_type' => 'article', ] ); } @@ -138,8 +142,9 @@ public function edit(string $slug) [ 'page_title' => 'Edit ' . $post['title'], 'page_subtitle' => $post['subtitle'], + 'page_type' => 'article', - 'post' => $post + 'post' => $post, ] ); } diff --git a/src/Views/Include/footer.php b/src/Views/Include/footer.php index 50ee63e..25f3322 100644 --- a/src/Views/Include/footer.php +++ b/src/Views/Include/footer.php @@ -20,6 +20,59 @@ + + + + diff --git a/src/Views/Include/header.php b/src/Views/Include/header.php index 52f19ef..ae5743e 100644 --- a/src/Views/Include/header.php +++ b/src/Views/Include/header.php @@ -9,19 +9,42 @@ - + + + + + + + + + + + + + + + + + + + + + @@ -96,4 +119,4 @@ - \ No newline at end of file +