Skip to content

Commit

Permalink
Fixed styling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbigbear committed Dec 19, 2019
1 parent 6da60c8 commit 1c1da76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions imgbook/resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
<a class="navbar-brand" href="{{ url('/') }}">
{{ config('app.name', 'ImgBook') }}
</a>
@auth
<form class="form-inline" method="GET" action="{{ route('posts.create') }}">
@csrf
<button class="btn btn-sm btn-primary" type="submit">New Post</button>
</form>
@endauth
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span>
</button>
Expand Down
8 changes: 3 additions & 5 deletions imgbook/resources/views/posts/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
<div class="card">
<img src="{{ asset($post->image->image) }}" class="card-img-top">
<div class="card-body">

<div class="row">
<div class="col">
<small class="text-muted">Posted by: {{ $post->user->username }}</small>
<h5 class="card-title">{{ $post->title }}</h5>
</div>
@if ($post->user_id == $user_id)
@if ($post->user_id == $user_id)
<div class="col-md-auto">
<form method="GET"
action="{{ route('posts.edit', ['id' => $post->id]) }}">
Expand All @@ -33,10 +32,9 @@
@method('DELETE')
<button class="btn btn-danger" type="submit">Delete</button>
</form>
@endif
</div>
</div>
@endif
</div>

<p class="card-text">{{ $post->description }}</p>
<comment-component :post-id={{$post->id}} :user-id={{Auth::user()->id}}></comment-component>
</div>
Expand Down

0 comments on commit 1c1da76

Please sign in to comment.