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 = [ urlpatterns = [
url(r'^about/website/$', views.AboutWebsiteView.as_view(), name='about-website'), url(r'^about/website/$', views.AboutWebsiteView.as_view(), name='about-website'),
url(r'^about/$', views.AboutIndexView.as_view(), name='about'), 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') url(r'^$', views.IndexView.as_view(), name='index')
] ]

View file

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

View file

@ -117,4 +117,13 @@ footer {
float: right; 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> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>{% block htmltitle %}{% endblock %} | TheOrangeOne</title> <title>{% block baseHtmlTitle %}{% endblock %} | TheOrangeOne</title>
<meta chatset='utf-8' /> <meta chatset='utf-8' />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<script type="text/javascript" src="{% static 'js/jquery.js' %}"></script> <script type="text/javascript" src="{% static 'js/jquery.js' %}"></script>
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}"/> <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}"/>
<link rel="shortcut icon" href=""/> <link rel="shortcut icon" href=""/>
</head> </head>
<body class="{% block bodyClass%}{% endblock %}"> <body class="{% block baseBodyClass%}{% endblock %}">
{% block content%}{% endblock %} {% block baseContent%}{% endblock %}
<footer> <footer>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
@ -38,7 +38,7 @@
{% if not no_js_redirect %} {% if not no_js_redirect %}
<noscript> <noscript>
<style> html, body { display:none; }</style> <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> </noscript>
{% endif %} {% endif %}
</body> </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' %} {% extends 'base.html' %}
{% block htmltitle %}Homepage{% endblock %} {% block baseHtmlTitle %}Homepage{% endblock %}
{% block bodyClass %}index{% endblock %} {% block baseBodyClass %}index{% endblock %}
{% block content%} {% block baseContent%}
<div class="container-fluid" id="header"> <div class="container-fluid" id="header">
<div class="jumbotron container animated zoomInDown"> <div class="jumbotron container animated zoomInDown">
<img src="http://placehold.it/230x230"/> <img src="http://placehold.it/230x230"/>