Skip to content

Commit 9c02768

Browse files
authored
Merge pull request #38 from DanielRTRD/blog-update
Blog update
2 parents 82f825a + 71825ca commit 9c02768

File tree

7 files changed

+24
-17
lines changed

7 files changed

+24
-17
lines changed

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
|
6868
*/
6969

70-
'timezone' => 'UTC',
70+
'timezone' => 'Europe/Oslo',
7171

7272
/*
7373
|--------------------------------------------------------------------------

public/css/app.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"/js/app.js": "/js/app.js?id=a9ed37c629f1a4ac6473",
3-
"/css/app.css": "/css/app.css?id=14eed065634adcad8dc1"
2+
"/js/app.js": "/js/app.js?id=7d3342683fd10d0407026f7fb32d3920",
3+
"/css/app.css": "/css/app.css?id=d2df13f4a851ac8669232e0083d3bfe4"
44
}

resources/views/blog/index.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
</div>
77
@endif
88
<div class="flex flex-col items-center">
9-
<div class="grid w-full grid-cols-1 gap-8">
9+
<div class="grid gap-4 pt-8 sm:gap-6 md:grid-cols-2 w-full">
1010
@forelse($posts as $post)
11-
<div class="w-full m-auto overflow-hidden border border-gray-200 rounded-lg shadow-lg cursor-pointer bg-gray-50 hover:bg-gray-100 group dark:bg-gray-800/50 hover:dark:bg-gray-800 dark:border-gray-700 dark:shadow-gray-100/10">
11+
<div class="w-full h-full m-auto overflow-hidden border border-gray-200 rounded-lg shadow-lg cursor-pointer bg-gray-50/50 hover:bg-gray-50 dark:border-gray-700 group dark:bg-gray-800/50 hover:dark:bg-gray-800 dark:shadow-gray-100/10">
1212
<a href="{{ route('blog.show', $post->slug) }}" class="block w-full h-full">
1313
{{--<img alt="blog photo" src="{{ asset('img/daniel.jpg') }}" class="object-cover w-full max-h-28"/>--}}
1414
<div class="w-full p-4 ">
1515
<p class="text-sm font-medium text-orange-500 dark:text-orange-400">
16-
{{ now()->subMonth(1) > $post->published_at ? $post->published_at->isoFormat('D MMMM YYYY') : $post->published_at->diffForHumans() }} &middot; {{ read_time($post->body)}} &middot; {{ App\Helpers\NumberHelper::nearestK(views($post)->count()) }} {{ Str::plural('view', views($post)->count()) }} &middot; {{ $post->likes_count }} {{ Str::plural('like', $post->likes_count) }}
16+
{{ now()->subMonth(1) > $post->published_at ? $post->published_at->isoFormat('D. MMMM YYYY') : $post->published_at->diffForHumans() }} &middot; {{ read_time($post->body)}} &middot; {{ App\Helpers\NumberHelper::nearestK(views($post)->count()) }} {{ Str::plural('view', views($post)->count()) }} &middot; {{ $post->likes_count }} {{ Str::plural('like', $post->likes_count) }}
1717
</p>
1818
<p class="my-2 text-2xl font-semibold text-gray-800 sm:text-3xl dark:text-white">
1919
{{ $post->title }}
2020
</p>
21-
<p class="text-sm font-light text-gray-400 dark:text-gray-300">
21+
<p class="text-sm font-light text-gray-500 dark:text-gray-300">
2222
{!! strip_tags(Str::of(Str::limit($post->body, 500))->markdown()) !!}
2323
</p>
2424
</div>
@@ -32,4 +32,4 @@
3232
@endforelse
3333
</div>
3434
</div>
35-
</x-guest-layout>
35+
</x-guest-layout>

resources/views/blog/show.blade.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<x-guest-layout>
2-
<div class="flex flex-col max-w-2xl mx-auto mt-6 sm:mt-0">
2+
<div class="flex flex-col max-w-2xl mx-auto">
3+
4+
<a href="{{ route('blog.index') }}" class="text-base md:text-sm text-orange-400 hover:text-orange-300 font-bold no-underline mb-8">
5+
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 inline-block" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
6+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
7+
</svg>
8+
Back to the blog
9+
</a>
310

411
<h1 class="text-3xl font-semibold sm:text-4xl lg:text-5xl break-word"><x-gradient-text>{{ $post->title }}</x-gradient-text></h1>
512

6-
<p class="text-sm font-medium text-orange-800/90 dark:text-orange-100/50">
7-
{{ now()->subMonth(1) > $post->published_at ? $post->published_at->isoFormat('D MMMM YYYY') : $post->published_at->diffForHumans() }} &middot; {{ read_time($post->body)}} &middot; {{ App\Helpers\NumberHelper::nearestK(views($post)->count()) }} {{ Str::plural('view', views($post)->count()) }}
13+
<p class="text-sm font-medium text-gray-500">
14+
{{ now()->subMonth(1) > $post->published_at ? $post->published_at->isoFormat('D. MMMM YYYY') : $post->published_at->diffForHumans() }} &middot; {{ read_time($post->body)}} &middot; {{ App\Helpers\NumberHelper::nearestK(views($post)->count()) }} {{ Str::plural('view', views($post)->count()) }}
815
{{--@foreach ($post->tags as $tag)
916
<span class="inline-flex items-center justify-center mr-1 font-semibold leading-none uppercase">{{ $tag->name }}</span>
1017
@endforeach--}}
@@ -26,12 +33,12 @@
2633
<span class="inline-flex items-center justify-center px-2 py-1 mr-1 font-bold leading-none uppercase bg-gray-900 rounded text-orange-50 dark:text-gray-300 dark:bg-gray-700">{{ $tag->name }}</span>
2734
@endforeach
2835
</div>--}}
29-
36+
3037
<article class="w-full mt-6 prose lg:mt-10 dark:prose-invert prose-a:text-orange-500 prose-h1:text-4xl">
3138
<x-markdown>{!! $post->body !!}</x-markdown>
3239
</article>
3340

3441
<livewire:like :post="$post" />
35-
42+
3643
</div>
3744
</x-guest-layout>

resources/views/home.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<h4 class="mt-2 text-gray-500 dark:text-gray-400 text-md">My thoughts on what I'm building and learning.</h4>
2424
<div class="grid gap-4 pt-8 sm:gap-6 md:grid-cols-2 lg:gap-8">
2525
@foreach ($posts as $post)
26-
<div class="w-full h-full m-auto overflow-hidden border border-gray-200 rounded-lg shadow-lg cursor-pointer bg-gray-50 hover:bg-gray-100 dark:border-gray-700 group dark:bg-gray-800/50 hover:dark:bg-gray-800 dark:shadow-gray-100/10">
26+
<div class="w-full h-full m-auto overflow-hidden border border-gray-100 rounded-lg shadow-lg cursor-pointer bg-gray-50/50 hover:bg-gray-50 dark:border-gray-700 group dark:bg-gray-800/50 hover:dark:bg-gray-800 dark:shadow-gray-100/10">
2727
<a href="{{ route('blog.show', $post->slug) }}" class="block w-full h-full">
2828
{{--<img alt="blog photo" src="{{ asset('img/daniel.jpg') }}" class="object-cover w-full max-h-28"/>--}}
2929
<div class="w-full p-4">

0 commit comments

Comments
 (0)