mirror of
https://github.com/bspeice/Melodia
synced 2024-12-24 23:58:16 -05:00
Initial web pages commit
Contains new templates, assets, url mappings, and views. A lot changed.
This commit is contained in:
parent
ff95b1072e
commit
c1bd19041a
@ -205,3 +205,6 @@ if use_cache:
|
||||
'LOCATION': CACHE_DIR,
|
||||
}
|
||||
}
|
||||
|
||||
#URL to use for logins
|
||||
LOGIN_URL="/login"
|
||||
|
4742
bootstrap.css
vendored
4742
bootstrap.css
vendored
File diff suppressed because it is too large
Load Diff
2159
web/static/js/bootstrap.js
vendored
Normal file
2159
web/static/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
web/static/js/bootstrap.min.js
vendored
Normal file
6
web/static/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
70
web/templates/base
Normal file
70
web/templates/base
Normal file
@ -0,0 +1,70 @@
|
||||
{% comment %}
|
||||
|
||||
List of block elements in this page:
|
||||
page_title
|
||||
navbar_title
|
||||
navbar_content
|
||||
sidebar
|
||||
sidebar_content
|
||||
body
|
||||
body_content
|
||||
scripts
|
||||
|
||||
{% endcomment %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block page_title %}{% endblock %}</title>
|
||||
|
||||
<link href="{{ STATIC_URL }}css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body {
|
||||
padding-top: 60px; /* Make sure that there is a gap on the navbar. */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{# Navbar code #}
|
||||
<div class="navbar navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a class="brand" href="#">{% block navbar_title %}{% endblock %}</a>
|
||||
{% block navbar_content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
{# Sidebar code #}
|
||||
{# Note that the sidebar is its own block, so we can remove it if need be. #}
|
||||
{% block sidebar %}
|
||||
<div class="span3">
|
||||
<div class="well sidebar-nav">
|
||||
{% block sidebar_content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="span10">
|
||||
{% block body_content %}{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
{# General scripts #}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.9.0.min.js"></script>
|
||||
<!--<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-ui-1.10.0.custom.min.js"></script>-->
|
||||
{% endblock %}
|
||||
</html>
|
11
web/templates/login
Normal file
11
web/templates/login
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block page_title %}Login to Melodia{% endblock %}
|
||||
|
||||
{% block navbar_title %}Login to Melodia{% endblock %}
|
||||
|
||||
{# Specifying a blank sidebar, rather than sidebar_content, allows us to remove the sidebar entirely. #}
|
||||
{% block sidebar %}{% endblock %}
|
||||
|
||||
{% block body_content %}
|
||||
{% endblock %}
|
@ -1,20 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Login to Melodia</title>
|
||||
|
||||
<link href="{{ STATIC_URL }}bootstrap.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a data-toggle="collapse" data-target=".nav-collapse" class="btn btn-navbar"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Apparently putting javascript at the bottom makes it load faster... -->
|
||||
<!-- Also, this is the login page... -->
|
||||
</body>
|
||||
</html>
|
13
web/templates/main
Normal file
13
web/templates/main
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block page_title %}Melodia Music Player{% endblock %}
|
||||
|
||||
{% block navbar_title %}Melodia{% endblock %}
|
||||
|
||||
{% block sidebar_content %}
|
||||
<a href="#">Sidebar content goes here.</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block body_content %}
|
||||
<h1>Welcome to Melodia!</h1>
|
||||
{% endblock %}
|
@ -1,19 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Login to Melodia</title>
|
||||
|
||||
<link href="{{ STATIC_URL }}bootstrap.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a data-toggle="collapse" data-target=".nav-collapse" class="btn btn-navbar"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Apparently putting javascript at the bottom makes it load faster... -->
|
||||
</body>
|
||||
</html>
|
@ -5,6 +5,6 @@ web_urls = patterns('web.views',
|
||||
# url(r'^$', 'Melodia.views.home', name='home'),
|
||||
# url(r'^Melodia/', include('Melodia.foo.urls')),
|
||||
|
||||
url(r'^$|main/', 'main.main'),
|
||||
url(r'^login/', 'login_page.login_page'),
|
||||
url(r'^$|main/', 'main'),
|
||||
url(r'^login/', 'login'),
|
||||
)
|
||||
|
11
web/views.py
Normal file
11
web/views.py
Normal file
@ -0,0 +1,11 @@
|
||||
from django.http import HttpResponse
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.template import RequestContext
|
||||
from django.shortcuts import render_to_response
|
||||
|
||||
@login_required
|
||||
def main(request):
|
||||
return render_to_response("main", context_instance = RequestContext(request))
|
||||
|
||||
def login(request):
|
||||
return render_to_response("login", context_instance = RequestContext(request))
|
@ -1,6 +0,0 @@
|
||||
from django.http import HttpResponse
|
||||
from django.template import RequestContext
|
||||
from django.shortcuts import render_to_response
|
||||
|
||||
def login_page(request):
|
||||
return render_to_response("login.html", context_instance = RequestContext(request))
|
@ -1,6 +0,0 @@
|
||||
from django.http import HttpResponse
|
||||
from django.template import RequestContext
|
||||
from django.shortcuts import render_to_response
|
||||
|
||||
def main(request):
|
||||
return render_to_response("main.html", context_instance = RequestContext(request))
|
Loading…
Reference in New Issue
Block a user