File tree 3 files changed +64
-3
lines changed
3 files changed +64
-3
lines changed Original file line number Diff line number Diff line change
1
+ html {
2
+ box-sizing : border-box;
3
+ }
4
+
5
+ * ,
6
+ * : before ,
7
+ * : after {
8
+ box-sizing : inherit;
9
+ }
10
+
11
+ html ,
12
+ body {
13
+ margin : 0 ;
14
+ padding : 0 ;
15
+ }
16
+
17
+ body {
18
+ font-family : sans-serif;
19
+ }
20
+
21
+ main {
22
+ margin : 0 auto;
23
+ max-width : 100% ;
24
+ padding : 20px ;
25
+ width : 1200px ;
26
+ }
27
+
28
+ label ,
29
+ input ,
30
+ button {
31
+ display : block;
32
+ font-size : 16px ;
33
+ margin : 0 0 8px 0 ;
34
+ width : 100% ;
35
+ }
36
+
37
+ form {
38
+ border : 1px solid # 444 ;
39
+ max-width : 100% ;
40
+ padding : 20px ;
41
+ width : 400px ;
42
+ }
43
+
44
+ button {
45
+ background : transparent;
46
+ border : 1px solid # 444 ;
47
+ border-radius : 4px ;
48
+ cursor : pointer;
49
+ margin : 0 ;
50
+ padding : 4px 0 ;
51
+ }
52
+
53
+ button : hover {
54
+ background : # 444 ;
55
+ color : # fff ;
56
+ }
Original file line number Diff line number Diff line change 1
1
{% extends "layout.html" %}
2
2
3
3
{% block body %}
4
+ < h1 > Add a user</ h1 >
4
5
< form action ="{{ url_for('user') }} " method ="post ">
5
6
< label for ="name "> Name</ label >
6
- < input id ="name " type ="text " name ="name " placeholder ="John Smith "/>
7
+ < input id ="name " type ="text " name ="name " placeholder ="John Smith " required />
7
8
< label for ="email "> Email</ label >
8
- < input id ="
email "
type ="
text "
name ="
email "
placeholder ="
[email protected] "
/>
9
+ < input id ="
email "
type ="
email "
name ="
email "
placeholder ="
[email protected] "
required />
9
10
< button type ="submit "> Save</ button >
10
11
</ form >
12
+ < h2 > List of users</ h2 >
11
13
{% for u in users %}
12
14
< p > {{ u.name }} -- {{ u.email }}</ p >
13
15
{% endfor %}
Original file line number Diff line number Diff line change 1
1
<!DOCTYPE html>
2
2
< html lang ="en ">
3
3
< head >
4
+ < link rel ="stylesheet " href ="{{ url_for('static', filename='styles/main.css') }} " />
4
5
</ head >
5
6
< body >
6
- {% block body %}{% endblock %}
7
+ < main >
8
+ {% block body %}{% endblock %}
9
+ </ main >
7
10
</ body >
8
11
</ html >
You can’t perform that action at this time.
0 commit comments