1
Fork 0

Added content template

This commit is contained in:
Jake Howard 2015-11-25 19:39:11 +00:00
parent d1a44e98f3
commit 677e6a78d1
7 changed files with 49 additions and 10 deletions

View file

@ -5,7 +5,5 @@ from . import views
urlpatterns = [
url(r'^about/website/$', views.AboutWebsiteView.as_view(), name='about-website'),
url(r'^about/$', views.AboutIndexView.as_view(), name='about'),
url(r'^no-js/$', views.NoJavascriptView.as_view(), name='no-js'),
url(r'^404/$', views.Custom404View.as_view(), name='404'),
url(r'^$', views.IndexView.as_view(), name='index')
]

View file

@ -6,6 +6,7 @@ from project.pages.views import Custom404View, NoJavascriptView
urlpatterns = [
url(r'^site-admin/', include(admin.site.urls)),
url(r'^404/', Custom404View.as_view(), name="404"),
url(r'^404/', Custom404View.as_view(), name="404"),
url(r'^no-js/', NoJavascriptView.as_view(), name="no-js"),
url(r'', include('project.pages.urls', namespace='pages'))
]

View file

@ -117,4 +117,13 @@ footer {
float: right;
}
}
/* @end no-js*/
/* @end no-js*/
/* @group content base */
.jumbotron.header {
padding-top: 10px;
padding-bottom: 10px;
background-color: #232323;
color: white;
}
/* @end content base */

View file

@ -0,0 +1,12 @@
{% extends 'content_base.html' %}
{% block htmlTitle %}About the website{% endblock %}
{% block bodyClass %}{% endblock %}
{% block pageTitle %}About my website{% endblock %}
{% block content %}
{% endblock %}

View file

@ -2,15 +2,15 @@
<!DOCTYPE html>
<html>
<head>
<title>{% block htmltitle %}{% endblock %} | TheOrangeOne</title>
<title>{% block baseHtmlTitle %}{% endblock %} | TheOrangeOne</title>
<meta chatset='utf-8' />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<script type="text/javascript" src="{% static 'js/jquery.js' %}"></script>
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}"/>
<link rel="shortcut icon" href=""/>
</head>
<body class="{% block bodyClass%}{% endblock %}">
{% block content%}{% endblock %}
<body class="{% block baseBodyClass%}{% endblock %}">
{% block baseContent%}{% endblock %}
<footer>
<div class="container">
<div class="row">
@ -38,7 +38,7 @@
{% if not no_js_redirect %}
<noscript>
<style> html, body { display:none; }</style>
<meta http-equiv="refresh" content="0.0;url={% url 'pages:no-js' %}">
<meta http-equiv="refresh" content="0.0;url={% url 'no-js' %}">
</noscript>
{% endif %}
</body>

View file

@ -0,0 +1,19 @@
{% extends 'base.html' %}
{% block baseHtmlTitle%}
{% block htmlTitle %}{% endblock %}
{% endblock %}
{% block baseBodyClass %}
{% block bodyClass %}{% endblock %}
{% endblock%}
{% block baseContent %}
<div class="jumbotron header">
<div class="container">
<h1>{% block pageTitle %}{% endblock %}</h1>
</div>
</div>
{% block content %}{% endblock %}
{% endblock %}

View file

@ -1,8 +1,8 @@
{% extends 'base.html' %}
{% block htmltitle %}Homepage{% endblock %}
{% block bodyClass %}index{% endblock %}
{% block content%}
{% block baseHtmlTitle %}Homepage{% endblock %}
{% block baseBodyClass %}index{% endblock %}
{% block baseContent%}
<div class="container-fluid" id="header">
<div class="jumbotron container animated zoomInDown">
<img src="http://placehold.it/230x230"/>