From 572b48d85144d30772b1de851f978f28bbe58948 Mon Sep 17 00:00:00 2001 From: Brandon Clothier Date: Sat, 17 Jun 2017 01:20:35 -0400 Subject: [PATCH] LastModifiedServiceProvider: Return a Carbon instance. base.blade: Use app()->getLocale for a bugfix for this issue: https://github.com/laravel/framework/pull/19405 Also check the environment and only add site verification meta if in production. footer-error.blade: If running in production use HTTPS on the image URL, otherwise don't. Also intval the year when comparing it to 2017. Format the Carbon instance, footer.blade: Only render social media widget buttons if in production mode. Also intval year before comparing and format the Carbon instance. index.blade: Bring OpenGraph title in line iwth website title. Intval the year when comparing it to 2017. Add sameAs meta for my social media pages. Add a WebSite schema. Only include the social media JavaScript if in production. about.blade: Remove extra closing p tag. resume.blade: Only use HTTPS if in production mode on profile image. --- app/Providers/LastModifiedServiceProvider.php | 5 ++-- resources/views/base.blade.php | 4 ++- .../views/components/footer-error.blade.php | 6 ++--- resources/views/components/footer.blade.php | 8 +++--- resources/views/index.blade.php | 27 ++++++++++++++++--- resources/views/sections/about.blade.php | 1 - resources/views/sections/resume.blade.php | 2 +- 7 files changed, 38 insertions(+), 15 deletions(-) diff --git a/app/Providers/LastModifiedServiceProvider.php b/app/Providers/LastModifiedServiceProvider.php index d8472e3..4fbe37b 100644 --- a/app/Providers/LastModifiedServiceProvider.php +++ b/app/Providers/LastModifiedServiceProvider.php @@ -2,6 +2,7 @@ namespace App\Providers; +use Carbon\Carbon; use RecursiveIteratorIterator; use RecursiveDirectoryIterator; use Illuminate\Support\ServiceProvider; @@ -37,7 +38,7 @@ public function register() /** * Function to get the last modified file time for the web application directory. * - * @return string + * @return \Carbon\Carbon */ protected function getLastModifiedDate() { @@ -53,6 +54,6 @@ protected function getLastModifiedDate() } } - return date('F jS, Y', $timeStamp).' at '.date('h:i:s A T', $timeStamp); + return Carbon::createFromTimestamp($timeStamp); } } diff --git a/resources/views/base.blade.php b/resources/views/base.blade.php index 64e2e25..a64d71a 100644 --- a/resources/views/base.blade.php +++ b/resources/views/base.blade.php @@ -1,5 +1,5 @@ - + @@ -11,6 +11,7 @@ @yield('social-media-meta', '') + @if(config('app.env') === 'production') @@ -19,6 +20,7 @@ + @endif @yield('title', config('app.name')) diff --git a/resources/views/components/footer-error.blade.php b/resources/views/components/footer-error.blade.php index e4bb9df..0920d1a 100644 --- a/resources/views/components/footer-error.blade.php +++ b/resources/views/components/footer-error.blade.php @@ -5,7 +5,7 @@
diff --git a/resources/views/components/footer.blade.php b/resources/views/components/footer.blade.php index 7d50a67..71407f2 100644 --- a/resources/views/components/footer.blade.php +++ b/resources/views/components/footer.blade.php @@ -4,8 +4,9 @@
diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index ac1a716..4867a2e 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -23,7 +23,7 @@ - + @@ -39,8 +39,8 @@ - - + + @@ -55,6 +55,23 @@ "email": "mailto:brandon14125@gmail.com", "jobTitle": "Web Developer", "image": "https://brandonclothier.me/images/profile-small.png", + "url": "https://brandonclothier.me", + "sameAs": [ + "https://www.facebook.com/brandon14125", + "https://plus.google.com/+BrandonClothier", + "https://www.instagram.com/b_randon14", + "https://twitter.com/inhal3exh4le", + "https://brandon14125.tumblr.com/", + "https://www.linkedin.com/in/brandon-clothier-16190b123" + ] + } + + @@ -74,6 +91,8 @@ @includeIf('components.footer') @includeIf('components.app-js') @includeIf('components.ie10-viewport-js') - @includeIf('components.social-media-js') + @if(config('app.env') === 'production') + @includeIf('components.social-media-js') + @endif @endsection diff --git a/resources/views/sections/about.blade.php b/resources/views/sections/about.blade.php index 85c30e2..37bc705 100644 --- a/resources/views/sections/about.blade.php +++ b/resources/views/sections/about.blade.php @@ -39,7 +39,6 @@
  • Modern software design patterns such as MVC and dependency injection
  • SOLID principles
  • -

    diff --git a/resources/views/sections/resume.blade.php b/resources/views/sections/resume.blade.php index 963378d..be5e122 100644 --- a/resources/views/sections/resume.blade.php +++ b/resources/views/sections/resume.blade.php @@ -11,7 +11,7 @@