{% extends 'templates/app.twig' %}

	{% block content %}
<div class="row">
	<div class="col-md-10">
		<div id="postlist">
			<div class="panel">
                <div class="panel-heading">
                    <div class="text-center">
                        <div class="row">
                            <div class="col-sm-9">
                                <h3 class="pull-left">Create new post</h3>
                            </div>
                            <div class="col-sm-3">
                                <h4 class="pull-right">
                                <small> {{ post.created_at }} </small>
                                </h4>
                            </div>
                        </div>
                    </div>
                </div>
                
            <div class="panel-body">
                <div class="login-form" >
          <form action="{{ path_for('posts.add') }}" method="post" autocomplete="off"> 
            <div class="form-group {{ errors.title ? 'has-error' : '' }}">
              <input type="text" class="form-control login-field"  name="title" placeholder="Enter your title" >
              <label class="login-field-icon fui-user" for="login-first-name"></label>
              {% if errors.title %}
              	<span class="help-block">{{ errors.title | first }}</span>
              {% endif %}
            </div>
            
            <div class="form-group {{ errors.body ? 'has-error' : '' }}">
              <textarea  rows="15" class="form-control login-field"  name="body" placeholder="Enter your content" > </textarea>
              
              <label class="login-field-icon fui-user" for="login-last-name"></label>
              
               {% if errors.body %}
              	<span class="help-block">{{ errors.body | first }}</span>
              {% endif %}	
            </div>
           
            <button class="btn btn-primary btn-lg" type="submit">Submit</button>
            
             {{ csrf.field | raw }}
            </form>
          </div>
            </div>
            
        </div>
        
       </div>
    </div>
    </div>
        <div class="col-md-1"></div>
        <div class="col-md-3">
        </div>
        <div class="col-md-1">
        </div>
    </div>
{% endblock %}
