@extends('layouts.site')

@section('content')

<div class="within">
  <div class="bar">投稿の追加</div>
  <div class="back">
    @if ($err)
    <div class="alert alert-danger" role="alert">
      {{ $err }}
    </div>
    @endif
    <form method="POST" action="/content/add">
      @csrf
      <div class="row body">
        <div class="col-sm-4"><b>件名</b></div>
        <div class="col"><input id="title" name="title" type="text" class="form-control" /></div>
      </div>
      <div class="row body">
        <div class="col-sm-4"><b>スラッグ</b></div>
        <div class="col"><input id="slug" name="slug" type="text" class="form-control" /></div>
      </div>
      <div class="row body">
        <div class="col-sm-4"><b>スラッグ</b></div>
        <div class="col"><input id="slug" name="slug" type="text" class="form-control" /></div>
      </div>
      <div class="row body">
        <div class="col-sm-4"><b>種類</b></div>
        <div class="col">
          <input id="type-post" name="isPost" type="radio" class="form-control" value="1" />
          <label for="type-post">ポスト</label>
          <input id="type-page" name="isPost" type="radio" class="form-control" value="0" />
          <label for="type-page">ページ</label>
        </div>
      </div>
      投稿はポストの場合
      <div class="row body">
        <div class="col-sm-4"><b>公開</b></div>
        <div class="col">
          <select id="publicity" name="published_at" class="">
            <option value="0">公開</option>
          </select>
        </div>
      </div>
      投稿はページの場合
      <div class="row body">
        <div class="col-sm-4"><b>メニュー</b></div>
        <div class="col"><input id="menu" name="isMenu" type="checkbox" class="form-control" />メニューに表示する</div>
      </div>
      <b>文章</b>
      <div class="row body">
        <div class="col"><textarea id="message" name="message" col="16" class="form-control"></textarea></div>
      </div>
      <div class="row body">
        <div class="col-sm-4"></div>
        <div class="col"><input name="submit" type="submit" class="btn btn-success btn-block" value="投稿" /></div>
      </div>
    </form>
  </div>
</div>

@endsection
