33{% bootstrap_css %}
44{% bootstrap_javascript %}
55
6- < div class ="container ">
7- < div class ="page-header ">
8- < h1 > < a href ="/ "> Simple QA </ a > < small > Login</ small > </ h1 >
9- </ div >
10-
11- < div class ="row ">
12- < div class ="col-md-6 ">
13- < div class ="panel panel-default ">
14- < div class ="panel-heading ">
15- < h3 class ="panel-title "> Login</ h3 >
16- </ div >
17- < div class ="panel-body ">
18- < form id ="login_form " method ="post " action ="/login/ ">
19- {% csrf_token %}
20- < input class ="input-md " style ="width:98% " placeholder ="Username " type ="text " name ="username " value ="" size ="50 " />
21- < br /> < br />
22- < input class ="input-md " style ="width:98% " placeholder ="Password " type ="password " name ="password " value ="" size ="50 " />
23- < br /> < br />
6+ < style >
7+ body {
8+ padding-top : 120px ;
9+ padding-bottom : 40px ;
10+ background-color : # eee ;
11+
12+ }
13+ .btn
14+ {
15+ outline : 0 ;
16+ border : none;
17+ border-top : none;
18+ border-bottom : none;
19+ border-left : none;
20+ border-right : none;
21+ box-shadow : inset 2px -3px rgba (0 , 0 , 0 , 0.15 );
22+ }
23+ .btn : focus
24+ {
25+ outline : 0 ;
26+ -webkit-outline : 0 ;
27+ -moz-outline : 0 ;
28+ }
29+ .fullscreen_bg {
30+ position : fixed;
31+ top : 0 ;
32+ right : 0 ;
33+ bottom : 0 ;
34+ left : 0 ;
35+ background-size : cover;
36+ background-position : 50% 50% ;
37+ background-image : url ('http://cleancanvas.herokuapp.com/img/backgrounds/color-splash.jpg' );
38+ background-repeat : repeat;
39+ }
40+ .form-signin {
41+ max-width : 280px ;
42+ padding : 15px ;
43+ margin : 0 auto;
44+ margin-top : 50px ;
45+ }
46+ .form-signin .form-signin-heading , .form-signin {
47+ margin-bottom : 10px ;
48+ }
49+ .form-signin .form-control {
50+ position : relative;
51+ font-size : 16px ;
52+ height : auto;
53+ padding : 10px ;
54+ -webkit-box-sizing : border-box;
55+ -moz-box-sizing : border-box;
56+ box-sizing : border-box;
57+ }
58+ .form-signin .form-control : focus {
59+ z-index : 2 ;
60+ }
61+ .form-signin input [type = "text" ] {
62+ margin-bottom : -1px ;
63+ border-bottom-left-radius : 0 ;
64+ border-bottom-right-radius : 0 ;
65+ border-top-style : solid;
66+ border-right-style : solid;
67+ border-bottom-style : none;
68+ border-left-style : solid;
69+ border-color : # 000 ;
70+ }
71+ .form-signin input [type = "password" ] {
72+ margin-bottom : 10px ;
73+ border-top-left-radius : 0 ;
74+ border-top-right-radius : 0 ;
75+ border-top-style : none;
76+ border-right-style : solid;
77+ border-bottom-style : solid;
78+ border-left-style : solid;
79+ border-color : rgb (0 , 0 , 0 );
80+ border-top : 1px solid rgba (0 , 0 , 0 , 0.08 );
81+ }
82+ .form-signin-heading {
83+ color : # fff ;
84+ text-align : center;
85+ text-shadow : 0 2px 2px rgba (0 , 0 , 0 , 0.5 );
86+ }
87+ </ style >
2488
25- < input class ="btn btn-primary " type ="submit " value ="Login " />
26- </ form >
27- </ div >
28- </ div >
29- </ div >
89+ < div id ="fullscreen_bg " class ="fullscreen_bg "/>
3090
31- < div class ="col-md-6 ">
32- < div class ="panel panel-info ">
33- < div class ="panel-heading ">
34- < h3 class ="panel-title "> New User?</ h3 >
35- </ div >
36- < div class ="panel-body ">
37- < a href ="/register "> Create new Account!</ a >
38- </ div >
39- </ div >
40- </ div >
4191
42- </ div >
92+ < div class ="container ">
93+ < form class ="form-signin " id ="login_form " method ="post " action ="/login/ ">
94+ < center > < a href ="/ "> < h1 class ="form-signin-heading text-muted "> Simple QA</ h1 > </ a > </ center > < br />
95+ < h1 class ="form-signin-heading text-muted "> Sign In</ h1 >
96+ < input type ="text " class ="form-control " placeholder ="Username " type ="text " name ="username " required ="" autofocus ="">
97+ < input type ="password " class ="form-control " placeholder ="Password " type ="password " name ="password " required ="">
98+ {% csrf_token %}
99+ < button class ="btn btn-lg btn-primary btn-block " type ="submit ">
100+ Sign In
101+ </ button >
102+ </ form >
43103
104+ < center > < h2 class ="form-signin-heading text-muted "> or</ h2 >
105+ < a class ="btn btn-lg btn-success " href ="/register " type ="submit "> New User? Sign Up</ a > </ center >
44106</ div >
45- < hr >
46- < center >
47- {% if user.is_authenticated %}
48- < small > Logged in as < b > {{ user.username }}</ b > ( < a href ="/profile/{{ user.id }} "> My Profile</ a > | < a href ="/logout/ "> Logout</ a > )</ small >
49- {% else %}
50- < small > < a href ="/login "> Login</ a > </ small >
51- {% endif %}
52- | < a href ="/admin "> Admin Panel</ a > </ small > </ center >
53- < br /> < br />
107+
108+
0 commit comments