Added content template
This commit is contained in:
parent
d1a44e98f3
commit
677e6a78d1
7 changed files with 49 additions and 10 deletions
|
@ -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')
|
||||
]
|
||||
|
|
|
@ -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'))
|
||||
]
|
||||
|
|
|
@ -118,3 +118,12 @@ footer {
|
|||
}
|
||||
}
|
||||
/* @end no-js*/
|
||||
|
||||
/* @group content base */
|
||||
.jumbotron.header {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
background-color: #232323;
|
||||
color: white;
|
||||
}
|
||||
/* @end content base */
|
12
templates/about/website.html
Normal file
12
templates/about/website.html
Normal 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 %}
|
|
@ -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>
|
||||
|
|
19
templates/content_base.html
Normal file
19
templates/content_base.html
Normal 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 %}
|
||||
|
|
@ -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"/>
|
||||
|
|
Reference in a new issue