-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.html
80 lines (74 loc) · 1.14 KB
/
form.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<head>
<title>my blog</title>
</head>
<style type="text/css">
body {
font-family: sans-serif;
width:800px;
margin: 0 auto;
padding:10px;
}
.error {
color:red;
}
label{
display: block;
font-size: 20px;
}
input[type = text]{
width:400px;
font-size: 20px;
padding :2px;
}
textarea{
width: 400px;
height: 200px;
font-size: 17px;
font-family: monospace;
}
input[type = submit]{
font-size: 24px;
}
hr{
margin:20px auto;
}
.art + .art{
margin-top: 20px;
}
.art-title{
font-weight: bold;
font-size: 20px;
}
.art-body{
margin: 0;
font-size: 17px;
}
</style>
<body>
<h1>Add a new post</h1>
<br>
<form method="post">
<label>
<div>Title</div>
<input type="text" name="title" value="{{ title }}">
</label>
<label>
<div>post</div>
<textarea name="post" value="{{ art }}"></textarea>
</label>
<button>submit</button>
<div class="error">
<h2>{{ error }}</h2>
</div>
<hr>
{% for art in arts %}
<div class="art">
<div class="art-title">{{ art.title }}</div>
<pre class="art-body">{{ art.art }}</pre>
</div>
{% endfor %}
</form>
</body>
</html>