Skip to content
Snippets Groups Projects
Commit 9bad7176 authored by Rachel Sidney's avatar Rachel Sidney
Browse files

merge to existing

parents 5a31e58b 9c8cd0d4
No related merge requests found
No preview for this file type
/*.jumbotron {
background: #3499CC !important;
color: white !important;
}*/
.navbar { .navbar {
background-color: #003365 !important; background-color: #003365 !important;
border-radius: 0px !important; border-radius: 0px !important;
...@@ -162,4 +157,35 @@ ...@@ -162,4 +157,35 @@
.header-login .title2 { .header-login .title2 {
font-weight: bold; font-weight: bold;
font-style: initial; 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
@extends('layouts.app') @extends('layouts.app')
@section('content') @section('content')
<div class="post"> <div class="row create-post-container">
<h1>Create New Post</h1> <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']) !!} {!! Form::open(['action' => 'PostsController@store', 'method' => 'POST', 'enctype' => 'multipart/form-data']) !!}
<div class="form-group"> <div class="form-group">
{{Form::label('title', 'Title')}} {{Form::label('title', 'Title')}}
...@@ -22,5 +25,6 @@ ...@@ -22,5 +25,6 @@
</a> </a>
</div> </div>
{!! Form::close() !!} {!! Form::close() !!}
</div> </div>
</div>
@endsection @endsection
\ No newline at end of file
@extends('layouts.app') @extends('layouts.app')
@section('content') @section('content')
<div class="post"> <div class="row create-post-container">
<h1>Edit Post</h1> <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']) !!} {!! Form::open(['action' => ['PostsController@update', $post->id], 'method' => 'POST', 'enctype' => 'multipart/form-data']) !!}
<div class="form-group"> <div class="form-group">
{{Form::label('title', 'Title')}} {{Form::label('title', 'Title')}}
...@@ -24,4 +27,5 @@ ...@@ -24,4 +27,5 @@
</div> </div>
{!! Form::close() !!} {!! Form::close() !!}
</div> </div>
</div>
@endsection @endsection
\ No newline at end of file
...@@ -4,8 +4,25 @@ ...@@ -4,8 +4,25 @@
<h1>{{$post->title}}</h1> <h1>{{$post->title}}</h1>
<!--@if ($post->cover_image !== 'noimage.jpg') <!--@if ($post->cover_image !== 'noimage.jpg')
<div class="row"> <div class="row">
<div class="col-sm-6 col-md-6"> <div class="col-8">
<img style="width:100%" src="/storage/cover_images/{{$post->cover_image}}"> <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">&#8592; Back</a>
</div>
<div class="col-4 post-view-img">
<img src="/storage/cover_images/{{$post->cover_image}}">
</div> </div>
</div> </div>
<br><br> <br><br>
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
@foreach ($posts as $post) @foreach ($posts as $post)
<div class="well"> <div class="well">
<div class="row"> <div class="row">
<div class="col-md-4 col-sm-4"> <div class="col-8 post-card">
<img style="width:100%" src="/storage/cover_images/{{$post->cover_image}}">
</div>
<div class="col-md-8 col-sm-8">
<h3><a href="/posts/{{$post->id}}">{{$post->title}}</a></h3> <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> </div>
</div> </div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment