39 lines
1.7 KiB
PHP
39 lines
1.7 KiB
PHP
|
@extends('layout.master')
|
||
|
|
||
|
@section('content')
|
||
|
<form method="POST" action="">
|
||
|
<input type="hidden" name="_token" value="{{ $_SESSION['_token'] }}">
|
||
|
<div class="form-group">
|
||
|
<input type="text" class="form-control" name="title" placeholder="Enter title" maxlength="255" value="{{ $title ?? $post->title }}">
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<textarea id="source-content" class="form-control" name="content" rows="10">{{ $content ?? $post->content }}</textarea>
|
||
|
</div>
|
||
|
<div class="form-group row">
|
||
|
<label class="col-sm-1 col-form-label text-right">Tags: </label>
|
||
|
<div class="col-sm-11">
|
||
|
<input type="text" class="form-control" name="tags" placeholder="Separated by commas (,)" maxlength="255" value="{{ $tags ?? $post->tags }}">
|
||
|
</div>
|
||
|
</div>
|
||
|
<button type="submit" class="btn btn-primary float-right">@section('submit') Edit @show</button>
|
||
|
<button type="button" id="preview-post-btn" class="preview-post-btn btn btn-secondary float-right" data-toggle="modal" data-target="#preview-post">Preview</button>
|
||
|
</form>
|
||
|
|
||
|
<div class="modal fade" id="preview-post" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||
|
<div class="modal-dialog modal-lg" role="document">
|
||
|
<div class="modal-content">
|
||
|
<div class="modal-header">
|
||
|
<h5 class="modal-title" id="exampleModalLabel">Preview</h5>
|
||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
|
<span aria-hidden="true">×</span>
|
||
|
</button>
|
||
|
</div>
|
||
|
<div class="modal-body" id="preview-content">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||
|
@endsection
|