fmartingr
/
shelfzilla
Archived
1
0
Fork 0

Added homepage app

This commit is contained in:
Felipe Martin 2014-03-28 13:30:35 +01:00
parent 79a79debc7
commit b92a79c132
9 changed files with 75 additions and 0 deletions

View File

View File

@ -0,0 +1 @@
# Django happy

View File

@ -0,0 +1,8 @@
from django.conf.urls import patterns, url
from .views import HomepageView
urlpatterns = patterns(
'',
url(r'^$', HomepageView.as_view(), name='homepage'),
)

View File

@ -0,0 +1,11 @@
from django.views.generic import View
from django.template import RequestContext
from django.shortcuts import render_to_response
class HomepageView(View):
template = 'homepage/home.html'
def get(self, request):
ctx = RequestContext(request, {})
return render_to_response(self.template, context_instance=ctx)

View File

@ -49,6 +49,7 @@ INSTALLED_APPS = (
'south',
# Apps
'shelfzilla.apps.homepage',
'shelfzilla.apps.landing',
'shelfzilla.apps.manga',
)

View File

@ -1,3 +1,9 @@
// jquery vegas, background with opacity
.vegas-background {
opacity: .3;
}
// bootstrap navbar, margin-top
.navbar {
margin-top: 20px;
}

View File

@ -1,3 +1,4 @@
{% load i18n %}
<!DOCTYPE html>
<html>
<head>
@ -6,6 +7,48 @@
<title>{% block page_title %}Shelfzilla{% endblock %}</title>
</head>
<body>
<div class="container">
<nav class="navbar navbar-inverse" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url "homepage" %}">Shelfzilla</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li {% if navigation.section == "series" %}class="active"{% endif %}>
<a href="#">{% trans "Series" %}</a>
</li>
<li {% if navigation.section == "publishers" %}class="active"{% endif %}>
<a href="#">{% trans "Publishers" %}</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
{% if user.is_authenticated %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.username }} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">{% trans "My collection" %}</a></li>
<li><a href="#">{% trans "Profile" %}</a></li>
</li>
</ul>
<li><a href="{% url "logout" %}"><i class="glyphicon glyphicon-log-out"></i> Logout</a>
</li>
{% else %}
<li><a href="{% url "login" %}"><i class="glyphicon glyphicon-log-in"></i> {% trans "Log in" %}</a>
{% endif %}
</ul>
</div>
</div>
</nav>
</div>
{% block messages %}
{% if messages %}
@ -18,6 +61,7 @@
{% endblock %}
{% block main_content %}{% endblock %}
{% block extra_js %}{% endblock %}
<script src="/static/js/site.js"></script>
</body>

View File

@ -0,0 +1,3 @@
{% extends "_layout.html" %}
{% block content %}asd{% endblock %}

View File

@ -7,5 +7,6 @@ urlpatterns = patterns(
'',
url(r'^', include('shelfzilla.apps.landing.urls')),
url(r'^', include('shelfzilla.apps.users.urls')),
url(r'^$', include('shelfzilla.apps.homepage.urls')),
url(r'^admin/', include(admin.site.urls)),
)