/
edit.html
51 lines (42 loc) · 2.46 KB
/
edit.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{% extends "admin_base.html" %}
{% block content %}
<div class="container-fluid">
{% include "admin_header.html" %}
<div class="row write-row">
<div class="col-md-6 editor">
<form role="form" class="write" action="/admin/post" method="POST">
<div class="form-group">
<div class="row">
<div class="col-md-11 col-sm-11 col-xs-11 pull-left">
<input type="text" id="title" name="title" class="form-control" placeholder="Title" value="{{post.title}}"/>
</div>
<div class="col-md-1 col-sm-1 col-xs-1 no-padding pull-right">
<div class="btn-group">
<button class="btn bsn-xs btn-default dropdown-toggle" id="add-fm" data-toggle="dropdown"><span class="glyphicon glyphicon-plus-sign"></span></button>
<ul class="dropdown-menu pull-right" role="menu">
{% if not post.summary %}<li><a href="#" class="dm-summary">Add Summary</a></li>{% endif %}
{% if not post.tags %}<li><a href="#" class="dm-tags">Add Tags</a></li>{% endif %}
</ul>
</div>
</div>
</div>
</div>
<div class="form-group front-matter">
<input type="text" id="date" name="date" class="form-control" placeholder="Date" value="{{post.date}}"/>
{% if post.summary %}<input type="text" id="summary" name="summary" class="form-control" placeholder="Summary" value="{{post.summary}}"/>{% endif %}
{% if post.tags %}<input type="text" id="tags" name="tags" class="form-control" placeholder="Tags" value="{{post.tags | join(',')}}"/>{% endif %}
</div>
<div class="form-group content-editor">
<textarea name="content" class="form-control" id="content-editor" placeholder="Content" oninput="this.editor.update()">{{post.rawContent}}</textarea>
</div>
<div class="form-group">
<input type="submit" name="post" value="Post" class="btn btn-lg btn-primary"/>
</div>
</form>
</div>
<div class="col-md-6 preview-col">
<div id="preview"></div>
</div>
</div>
</div>
{% endblock %}