##// END OF EJS Templates
Use template inheritance.
Stefan van der Walt -
Show More
@@ -0,0 +1,71 b''
1 <!DOCTYPE HTML>
2 <html>
3
4 <head>
5 <meta charset="utf-8">
6
7 <title>{% block title %}IPython Notebook{% end %}</title>
8
9 <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
10 <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" />
11 <link rel="stylesheet" href="static/css/layout.css" type="text/css" />
12 <link rel="stylesheet" href="static/css/base.css" type="text/css"/>
13 {% block stylesheet %}
14 {% end %}
15
16 <meta name="read_only" content="{{read_only}}"/>
17
18 </head>
19
20 <body>
21
22 <div id="header">
23 <span id="ipython_notebook"><h1>IPython Notebook</h1></span>
24 <span id="login_widget" class="hidden">
25 <button id="login">Login</button>
26 </span>
27 {% block header %}
28 {% end %}
29 </div>
30
31 <div id="header_border"></div>
32
33 <div id="main_app">
34
35 <div id="app_hbox">
36
37 <div id="left_panel">
38 {% block left_panel %}
39 {% end %}
40 </div>
41
42 <div id="content_panel">
43 {% if message %}
44 <div id="message">
45 {{message}}
46 </div>
47 {% end %}
48
49 {% block content_panel %}
50 {% end %}
51 </div>
52 <div id="right_panel">
53 {% block right_panel %}
54 {% end %}
55 </div>
56
57 </div>
58
59 </div>
60
61 <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>
62 <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script>
63 <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script>
64 <script src="static/js/loginmain.js" type="text/javascript" charset="utf-8"></script>
65 <script src="static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script>
66 {% block script %}
67 {% end %}
68
69 </body>
70
71 </html>
@@ -116,7 +116,14 b' def authenticate_unless_readonly(f, self, *args, **kwargs):'
116 # Top-level handlers
116 # Top-level handlers
117 #-----------------------------------------------------------------------------
117 #-----------------------------------------------------------------------------
118
118
119 class AuthenticatedHandler(web.RequestHandler):
119 class RequestHandler(web.RequestHandler):
120 """RequestHandler with default variable setting."""
121
122 def render(*args, **kwargs):
123 kwargs.setdefault('message', '')
124 return web.RequestHandler.render(*args, **kwargs)
125
126 class AuthenticatedHandler(RequestHandler):
120 """A RequestHandler with an authenticated user."""
127 """A RequestHandler with an authenticated user."""
121
128
122 def get_current_user(self):
129 def get_current_user(self):
@@ -1,61 +1,8 b''
1 <!DOCTYPE HTML>
1 {% extends layout.html %}
2 <html>
3
4 <head>
5 <meta charset="utf-8">
6
7 <title>IPython Notebook</title>
8
9 <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
10 <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" />
11 <link rel="stylesheet" href="static/css/layout.css" type="text/css" />
12 <link rel="stylesheet" href="static/css/base.css" type="text/css" />
13
14 <meta name="read_only" content="{{read_only}}"/>
15
16 </head>
17
18 <body>
19
20 <div id="header">
21 <span id="ipython_notebook"><h1>IPython Notebook</h1></span>
22 </div>
23
24 <div id="header_border"></div>
25
26 <div id="main_app">
27
28 <div id="app_hbox">
29
30 <div id="left_panel">
31 </div>
32
33 <div id="content_panel">
34 {% if message %}
35 <div id="message">
36 {{message}}
37 </div>
38 {% end %}
39
2
3 {% block content_panel %}
40 <form action="/login?next={{url_escape(next)}}" method="post">
4 <form action="/login?next={{url_escape(next)}}" method="post">
41 Password: <input type="password" name="password">
5 Password: <input type="password" name="password">
42 <input type="submit" value="Sign in" id="signin">
6 <input type="submit" value="Sign in" id="signin">
43 </form>
7 </form>
44 </div>
8 {% end %}
45 <div id="right_panel">
46 </div>
47
48 </div>
49
50 </div>
51
52 <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>
53 <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script>
54 <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script>
55 <script src="static/js/loginmain.js" type="text/javascript" charset="utf-8"></script>
56
57 </body>
58
59 </html>
60
61
@@ -1,41 +1,14 b''
1 <!DOCTYPE HTML>
1 {% extends layout.html %}
2 <html>
3
2
4 <head>
3 {% block title %}
5 <meta charset="utf-8">
4 IPython Dashboard
5 {% end %}
6
6
7 <title>IPython Dashboard</title>
7 {% block stylesheet %}
8
9 <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
10 <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" />
11 <link rel="stylesheet" href="static/css/layout.css" type="text/css" />
12 <link rel="stylesheet" href="static/css/base.css" type="text/css" />
13 <link rel="stylesheet" href="static/css/projectdashboard.css" type="text/css" />
8 <link rel="stylesheet" href="static/css/projectdashboard.css" type="text/css" />
9 {% end %}
14
10
15 <meta name="read_only" content="{{read_only}}"/>
11 {% block content_panel %}
16
17 </head>
18
19 <body data-project={{project}} data-base-project-url={{base_project_url}}
20 data-base-kernel-url={{base_kernel_url}}>
21
22 <div id="header">
23 <span id="ipython_notebook"><h1>IPython Notebook</h1></span>
24 <span id="login_widget" class="hidden">
25 <button id="login">Login</button>
26 </span>
27 </div>
28
29 <div id="header_border"></div>
30
31 <div id="main_app">
32
33 <div id="app_hbox">
34
35 <div id="left_panel">
36 </div>
37
38 <div id="content_panel">
39 <div id="content_toolbar">
12 <div id="content_toolbar">
40 <span id="drag_info">Drag files onto the list to import notebooks.</span>
13 <span id="drag_info">Drag files onto the list to import notebooks.</span>
41 <span id="notebooks_buttons">
14 <span id="notebooks_buttons">
@@ -45,25 +18,9 b''
45 <div id="notebook_list">
18 <div id="notebook_list">
46 <div id="project_name"><h2>{{project}}</h2></div>
19 <div id="project_name"><h2>{{project}}</h2></div>
47 </div>
20 </div>
21 {% end %}
48
22
49 </div>
23 {% block script %}
50
51 <div id="right_panel">
52 </div>
53
54 </div>
55
56 </div>
57
58 <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>
59 <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script>
60 <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script>
61 <script src="static/js/notebooklist.js" type="text/javascript" charset="utf-8"></script>
24 <script src="static/js/notebooklist.js" type="text/javascript" charset="utf-8"></script>
62 <script src="static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script>
63 <script src="static/js/projectdashboardmain.js" type="text/javascript" charset="utf-8"></script>
25 <script src="static/js/projectdashboardmain.js" type="text/javascript" charset="utf-8"></script>
64
26 {% end %}
65 </body>
66
67 </html>
68
69
General Comments 0
You need to be logged in to leave comments. Login now