Skip to content

Commit

Permalink
Episode 36 complete
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyWay committed May 14, 2021
1 parent a5e57bd commit 8b5de5d
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 40 deletions.
4 changes: 2 additions & 2 deletions database/factories/CategoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class CategoryFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->word,
'slug' => $this->faker->slug
'name' => $this->faker->unique()->word,
'slug' => $this->faker->unique()->slug
];
}
}
4 changes: 2 additions & 2 deletions database/factories/PostFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public function definition()
'category_id' => Category::factory(),
'title' => $this->faker->sentence,
'slug' => $this->faker->slug,
'excerpt' => $this->faker->sentence,
'body' => $this->faker->paragraph
'excerpt' => '<p>' . implode('</p><p>', $this->faker->paragraphs(2)) . '</p>',
'body' => '<p>' . implode('</p><p>', $this->faker->paragraphs(6)) . '</p>',
];
}
}
44 changes: 18 additions & 26 deletions resources/views/_posts-header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
Latest <span class="text-blue-500">Laravel From Scratch</span> News
</h1>

<h2 class="inline-flex mt-2">By Lary Laracore <img src="/images/lary-head.svg"
alt="Head of Lary the mascot"></h2>

<p class="text-sm mt-14">
Another year. Another update. We're refreshing the popular Laravel series with new content.
I'm going to keep you guys up to speed with what's going on!
</p>

<div class="space-y-2 lg:space-y-0 lg:space-x-4 mt-8">
<div class="space-y-2 lg:space-y-0 lg:space-x-4 mt-4">
<!-- Category -->
<div class="relative lg:inline-flex bg-gray-100 rounded-xl">
<x-dropdown>
Expand All @@ -35,23 +27,23 @@
</div>

<!-- Other Filters -->
<div class="relative flex lg:inline-flex items-center bg-gray-100 rounded-xl">
<select class="flex-1 appearance-none bg-transparent py-2 pl-3 pr-9 text-sm font-semibold">
<option value="category" disabled selected>Other Filters</option>
<option value="foo">Foo</option>
<option value="bar">Bar</option>
</select>

<svg class="transform -rotate-90 absolute pointer-events-none" style="right: 12px;" width="22"
height="22" viewBox="0 0 22 22">
<g fill="none" fill-rule="evenodd">
<path stroke="#000" stroke-opacity=".012" stroke-width=".5" d="M21 1v20.16H.84V1z">
</path>
<path fill="#222"
d="M13.854 7.224l-3.847 3.856 3.847 3.856-1.184 1.184-5.04-5.04 5.04-5.04z"></path>
</g>
</svg>
</div>
{{-- <div class="relative flex lg:inline-flex items-center bg-gray-100 rounded-xl">--}}
{{-- <select class="flex-1 appearance-none bg-transparent py-2 pl-3 pr-9 text-sm font-semibold">--}}
{{-- <option value="category" disabled selected>Other Filters</option>--}}
{{-- <option value="foo">Foo</option>--}}
{{-- <option value="bar">Bar</option>--}}
{{-- </select>--}}

{{-- <svg class="transform -rotate-90 absolute pointer-events-none" style="right: 12px;" width="22"--}}
{{-- height="22" viewBox="0 0 22 22">--}}
{{-- <g fill="none" fill-rule="evenodd">--}}
{{-- <path stroke="#000" stroke-opacity=".012" stroke-width=".5" d="M21 1v20.16H.84V1z">--}}
{{-- </path>--}}
{{-- <path fill="#222"--}}
{{-- d="M13.854 7.224l-3.847 3.856 3.847 3.856-1.184 1.184-5.04-5.04 5.04-5.04z"></path>--}}
{{-- </g>--}}
{{-- </svg>--}}
{{-- </div>--}}

<!-- Search -->
<div class="relative flex lg:inline-flex items-center bg-gray-100 rounded-xl px-3 py-2">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/dropdown.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>

{{-- Links --}}
<div x-show="show" class="py-2 absolute bg-gray-100 mt-2 rounded-xl w-full z-50" style="display: none">
<div x-show="show" class="py-2 absolute bg-gray-100 mt-2 rounded-xl w-full z-50 overflow-auto max-h-52" style="display: none">
{{ $slot }}
</div>
</div>
6 changes: 2 additions & 4 deletions resources/views/components/post-card.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
</div>
</header>

<div class="text-sm mt-4">
<p>
{{ $post->excerpt }}
</p>
<div class="text-sm mt-4 space-y-4">
{!! $post->excerpt !!}
</div>

<footer class="flex justify-between items-center mt-8">
Expand Down
6 changes: 2 additions & 4 deletions resources/views/components/post-featured-card.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ class="px-3 py-1 border border-blue-300 rounded-full text-blue-300 text-xs upper
</div>
</header>

<div class="text-sm mt-2">
<p>
{{ $post->excerpt }}
</p>
<div class="text-sm mt-2 space-y-4">
{!! $post->excerpt !!}
</div>

<footer class="flex justify-between items-center mt-8">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/post.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class="transition-colors duration-300 relative inline-flex items-center text-lg
{{ $post->title }}
</h1>

<div class="space-y-4 lg:text-lg leading-loose">{{ $post->body }}</div>
<div class="space-y-4 lg:text-lg leading-loose">{!! $post->body !!}</div>
</div>
</article>
</main>
Expand Down

0 comments on commit 8b5de5d

Please sign in to comment.