mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
improve login page styling
fixup css
This commit is contained in:
@@ -30,6 +30,7 @@ class RootHandler(BaseHandler):
|
|||||||
|
|
||||||
class HomeHandler(BaseHandler):
|
class HomeHandler(BaseHandler):
|
||||||
"""Render the user's home page."""
|
"""Render the user's home page."""
|
||||||
|
|
||||||
@web.authenticated
|
@web.authenticated
|
||||||
def get(self):
|
def get(self):
|
||||||
html = self.render_template('home.html',
|
html = self.render_template('home.html',
|
||||||
@@ -40,6 +41,7 @@ class HomeHandler(BaseHandler):
|
|||||||
|
|
||||||
class AdminHandler(BaseHandler):
|
class AdminHandler(BaseHandler):
|
||||||
"""Render the admin page."""
|
"""Render the admin page."""
|
||||||
|
|
||||||
@admin_only
|
@admin_only
|
||||||
def get(self):
|
def get(self):
|
||||||
html = self.render_template('admin.html',
|
html = self.render_template('admin.html',
|
||||||
@@ -48,8 +50,9 @@ class AdminHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
self.finish(html)
|
self.finish(html)
|
||||||
|
|
||||||
|
|
||||||
default_handlers = [
|
default_handlers = [
|
||||||
(r'/', RootHandler),
|
(r'/', RootHandler),
|
||||||
(r'/home', HomeHandler),
|
(r'/home', HomeHandler),
|
||||||
(r'/admin', AdminHandler),
|
(r'/admin', AdminHandler),
|
||||||
]
|
]
|
||||||
|
49
share/jupyter/static/less/login.less
Normal file
49
share/jupyter/static/less/login.less
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
#login-main {
|
||||||
|
& > form {
|
||||||
|
margin: 80px auto;
|
||||||
|
width: 400px;
|
||||||
|
padding: 50px;
|
||||||
|
margin-top: 8px;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
& .input-group{
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
& .input-group-addon {
|
||||||
|
width:100px;
|
||||||
|
border-radius:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& .form-control{
|
||||||
|
font-size:large;
|
||||||
|
}
|
||||||
|
|
||||||
|
& input[type=username]
|
||||||
|
{
|
||||||
|
width:100%;
|
||||||
|
border-radius:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& input[type=password]{
|
||||||
|
width:100%;
|
||||||
|
margin-top:-1px;
|
||||||
|
border-radius:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& button[type=submit]{
|
||||||
|
margin-top:10px;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
& input[type=password]:focus,input[type=username]:focus{
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
& #pwd-addon{
|
||||||
|
border-top:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -24,3 +24,4 @@
|
|||||||
@import "./page.less";
|
@import "./page.less";
|
||||||
@import "./error.less";
|
@import "./error.less";
|
||||||
@import "./logout.less";
|
@import "./logout.less";
|
||||||
|
@import "./login.less";
|
||||||
|
@@ -7,25 +7,19 @@
|
|||||||
|
|
||||||
<div id="login-main" class="container">
|
<div id="login-main" class="container">
|
||||||
<form action="{{login_url}}?next={{next}}" method="post" role="form">
|
<form action="{{login_url}}?next={{next}}" method="post" role="form">
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6 col-sm-offset-3">
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon">Username:</span>
|
<span class="input-group-addon">Username:</span>
|
||||||
<input type="username" class="form-control" name="username" id="username_input" val="{{username}}">
|
<input type="username" class="form-control" name="username" id="username_input" val="{{username}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6 col-sm-offset-3">
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon">Password:</span>
|
<span id='pwd-addon' class="input-group-addon">Password:</span>
|
||||||
<input type="password" class="form-control" name="password" id="password_input">
|
<input type="password" class="form-control" name="password" id="password_input">
|
||||||
|
</div>
|
||||||
|
<div class="input-group">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="submit" id="login_submit" class="btn btn-default">Log in</button>
|
<button type="submit" id="login_submit" class="btn btn-default">Log in</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
{% if message %}
|
{% if message %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Reference in New Issue
Block a user