diff --git a/.DS_Store b/.DS_Store index 631487db9a87de89273d07fede9f51211e4dbdcb..6684892983868a93461a842ff3978a345b2ff125 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/public/css/style.css b/public/css/style.css index d4c921472cbbb2f3b0f0a5984117250c819c392a..31652d414512ff1795f52b582569233b9894b946 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1,8 +1,3 @@ -/*.jumbotron { - background: #3499CC !important; - color: white !important; -}*/ - .navbar { background-color: #003365 !important; border-radius: 0px !important; @@ -162,4 +157,35 @@ .header-login .title2 { font-weight: bold; font-style: initial; +} + +.header-create-post { + height: 650px; + background-color: #92c6f9; +} + +.header-create-post h1 { + color: white; + font-size: 4em; + text-align: right; + font-weight: bold; + margin-right: 20px; +} + +/* Clear the 1px gap on row and container */ +div.row:before, div.row:after { + display: none +} + +.post-view h1 { + font-size: 4em; +} + +.post-view h3 { + font-size: 1.5em; +} + +.post-view-img img { + max-height: inherit; + margin-top: 130px; } \ No newline at end of file diff --git a/resources/views/admin/createpost.blade.php b/resources/views/admin/createpost.blade.php index d3128896d3ae602ec4e80e26149f7e2668a4648f..ec05580298d3068a210c5397cbe8dfed52316603 100644 --- a/resources/views/admin/createpost.blade.php +++ b/resources/views/admin/createpost.blade.php @@ -1,8 +1,11 @@ @extends('layouts.app') @section('content') - <div class="post"> - <h1>Create New Post</h1> +<div class="row create-post-container"> + <div class="col-3 header-create-post"> + <h1>Create<br>Post</h1> + </div> + <div class="col-8 post"> {!! Form::open(['action' => 'PostsController@store', 'method' => 'POST', 'enctype' => 'multipart/form-data']) !!} <div class="form-group"> {{Form::label('title', 'Title')}} @@ -22,5 +25,6 @@ </a> </div> {!! Form::close() !!} - </div> + </div> +</div> @endsection \ No newline at end of file diff --git a/resources/views/admin/editpost.blade.php b/resources/views/admin/editpost.blade.php index fc2a09fd036513aa660b55f1268595d375648483..9dad2d05edf2c7c37bd61043a9491c2b9ac06ec9 100644 --- a/resources/views/admin/editpost.blade.php +++ b/resources/views/admin/editpost.blade.php @@ -1,8 +1,11 @@ @extends('layouts.app') @section('content') - <div class="post"> - <h1>Edit Post</h1> +<div class="row create-post-container"> + <div class="col-3 header-create-post"> + <h1>Edit <br>Post</h1> + </div> + <div class="col-8 post"> {!! Form::open(['action' => ['PostsController@update', $post->id], 'method' => 'POST', 'enctype' => 'multipart/form-data']) !!} <div class="form-group"> {{Form::label('title', 'Title')}} @@ -24,4 +27,5 @@ </div> {!! Form::close() !!} </div> +</div> @endsection \ No newline at end of file diff --git a/resources/views/admin/showeachpost.blade.php b/resources/views/admin/showeachpost.blade.php index df9d1443bca35a17cf0a7cb5b3b80b1909e957d8..62d42ce7bf6b3caf40521383c9954a65dfa13585 100644 --- a/resources/views/admin/showeachpost.blade.php +++ b/resources/views/admin/showeachpost.blade.php @@ -4,8 +4,25 @@ <h1>{{$post->title}}</h1> <!--@if ($post->cover_image !== 'noimage.jpg') <div class="row"> - <div class="col-sm-6 col-md-6"> - <img style="width:100%" src="/storage/cover_images/{{$post->cover_image}}"> + <div class="col-8"> + <h1>{{$post->title}}</h1> + <h3>By {{$post->user->name}}</h3> + <hr> + <div> + {!!$post->body!!} + </div> + <hr> + <i>Created on {{$post->created_at}}</i> + <hr> + <a href="/posts/{{$post->id}}/edit" class="btn btn-warning">Edit</a> + {!!Form::open(['action' => ['PostsController@destroy', $post->id], 'method' => 'POST', 'class' => 'pull-right'])!!} + {{Form::hidden('_method', 'DELETE')}} + {{Form::submit('Delete', ['class' => 'btn btn-danger', 'onclick' => "return confirm('Are you sure you want to delete?')"])}} + {!!Form::close() !!} + <a href="/posts" class="btn btn-info pull-down">← Back</a> + </div> + <div class="col-4 post-view-img"> + <img src="/storage/cover_images/{{$post->cover_image}}"> </div> </div> <br><br> diff --git a/resources/views/admin/showpost.blade.php b/resources/views/admin/showpost.blade.php index aafa27892d370d5477d5616528e1a2e07ea7bcd8..cac18d5d8f156968ddd3ce4729104143f8a90509 100644 --- a/resources/views/admin/showpost.blade.php +++ b/resources/views/admin/showpost.blade.php @@ -16,12 +16,12 @@ @foreach ($posts as $post) <div class="well"> <div class="row"> - <div class="col-md-4 col-sm-4"> - <img style="width:100%" src="/storage/cover_images/{{$post->cover_image}}"> - </div> - <div class="col-md-8 col-sm-8"> + <div class="col-8 post-card"> <h3><a href="/posts/{{$post->id}}">{{$post->title}}</a></h3> - <small>Written on {{$post->created_at}} by {{$post->user->name}}</small> + <i>Written on {{$post->created_at}} by {{$post->user->name}}</i> + </div> + <div class="col-4 img-card"> + <img style="width:100%" src="/storage/cover_images/{{$post->cover_image}}"> </div> </div> </div>