Commit eeac2082 by Vik Paruchuri

Setup bootstrap and do minimal styling

parent b27096b0
......@@ -274,12 +274,27 @@ PIPELINE_JS = {
'js/backbone.js',
'js/backbone.validations.js'
'js/jquery.cookie.js',
'js/bootstrap.js',
],
'output_filename': 'js/util.js',
}
},
'new_dashboard' : {
'source_filenames': [
'js/api-framework.js'
],
'output_filename': 'js/new_dashboard.js',
},
}
PIPELINE_CSS = {
'bootstrap': {
'source_filenames': [
'css/bootstrap.css',
'css/bootstrap-responsive.css',
'css/bootstrap-extensions.css',
],
'output_filename': 'css/bootstrap.css',
},
}
PIPELINE_DISABLE_WRAPPER = True
......
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% load compressed %}
{% compressed_js 'util' %}
{% compressed_css 'bootstrap' %}
{% block additional_js %}
{% endblock %}
<title>Analytics</title>
<meta name="csrf-token" content="{{csrf_token}}">
<div id="navbar">
{% block nav %}
<a href="/">Home</a>
{% if user.is_authenticated %}
<a href="/frontend/logout">Logout</a>
{% else %}
<a href="/frontend/login">Login</a>
{% endif %}
{% endblock %}
</div>
</head>
<body>
<div id="navbar" class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
{% block nav %}
<a href="/" class="brand">edX Analytics</a>
<ul class="nav">
{% if user.is_authenticated %}
<li class="">
<a href="/frontend/logout">Logout</a>
</li>
{% else %}
<li class="">
<a href="/frontend/login">Login</a>
</li>
{% endif %}
</ul>
{% endblock %}
</div>
</div>
</div>
<header class="subhead">
<div class="container">
{% block header %}
{% endblock %}
</div>
</header>
<div class="container">
{% block content %}
{% endblock %}
</div>
</body>
</html>
\ No newline at end of file
{% extends "base.html" %}
{% block additional_js %}
{% load compressed %}
{% compressed_js 'new_dashboard' %}
{% endblock %}
{% block content %}
<section class="analytics-select">
</section>
<section class="analytics-container">
</section>
{% endblock %}
\ No newline at end of file
{% extends "base.html" %}
{% block header %}
<h1>Login to Analytics</h1>
{% endblock %}
{% block content %}
{%if form.errors %}
<p> Invalid username/password combination, please try again </p>
{% endif %}
<h1>Login to Analytics</h1>
<form action="{% url django.contrib.auth.views.login %}" method="post">
{% csrf_token %}
{{form.username.label_tag}}{{form.username}}
{{form.password.label_tag}}{{form.password}}
<input type="submit" id="submit" name="submit" value="Sign in" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
<div class="row">
<div class="span12">
<form action="{% url django.contrib.auth.views.login %}" method="post" class="form-horizontal">
{% csrf_token %}
{{form.username.label_tag}}{{form.username}}
{{form.password.label_tag}}{{form.password}}
<input type="submit" id="submit" name="submit" value="Sign in" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
</div>
</div>
{% endblock %}
\ No newline at end of file
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from django.contrib.auth.decorators import login_required
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
......
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'anserv.views.home', name='home'),
# url(r'^anserv/', include('anserv.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
)
.center.navbar .nav,
.center.navbar .nav > li {
float:none;
display:inline-block;
*display:inline; /* ie7 fix */
*zoom:1; /* hasLayout ie7 trigger */
vertical-align: top;
}
.center .navbar-inner {
text-align:center;
}
.center .dropdown-menu {
text-align: left;
}
body { padding-top: 40px; }
@media screen and (max-width: 768px) {
body { padding-top: 0px; }
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment