We've now got a sane template structure. webtemplates/base.html is the parent of all pages. index.html in that directory is the default page, and sub-directories from there will hold the templates for various applications. Notice how in index.html and the file in the news directory are put together. It's really simple, see the Template documentation on djangoproject.com for more in-depth details.
This commit is contained in:
parent
a3ac4ff17c
commit
1afcd6bf99
5 changed files with 147 additions and 188 deletions
|
|
@ -15,8 +15,8 @@ def show_news(request, entry_id):
|
||||||
#news_entries = NewsEntry.objects.all().order_by('-date_posted')[:10]
|
#news_entries = NewsEntry.objects.all().order_by('-date_posted')[:10]
|
||||||
|
|
||||||
pagevars = {
|
pagevars = {
|
||||||
"page_title": "Front Page",
|
"page_title": "News Entry",
|
||||||
}
|
}
|
||||||
|
|
||||||
context_instance = RequestContext(request)
|
context_instance = RequestContext(request)
|
||||||
return render_to_response('base.html', pagevars, context_instance)
|
return render_to_response('news/show_entry.html', pagevars, context_instance)
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ def page_index(request):
|
||||||
|
|
||||||
pagevars = {
|
pagevars = {
|
||||||
"page_title": "Front Page",
|
"page_title": "Front Page",
|
||||||
|
"no_sidebar": True,
|
||||||
"news_entries": news_entries,
|
"news_entries": news_entries,
|
||||||
"players_connected_recent": recent_players,
|
"players_connected_recent": recent_players,
|
||||||
"num_players_connected": functions_db.get_connected_players().count(),
|
"num_players_connected": functions_db.get_connected_players().count(),
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,17 @@
|
||||||
<meta name="author" content="haran" />
|
<meta name="author" content="haran" />
|
||||||
<meta name="generator" content="haran" />
|
<meta name="generator" content="haran" />
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{media_url}}css/prosimii-screen-alt.css" media="screen" title="Prosimii (alternative)" />
|
{% if no_sidebar %}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{media_url}}css/prosimii-screen.css" media="screen" title="Prosimii" />
|
||||||
|
{% else %}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{media_url}}css/prosimii-screen-alt.css" media="screen" title="Prosimii (Sidebar)" />
|
||||||
|
{% endif %}
|
||||||
<link rel="stylesheet alternative" type="text/css" href="{{media_url}}css/prosimii-print.css" media="screen" title="Print Preview" />
|
<link rel="stylesheet alternative" type="text/css" href="{{media_url}}css/prosimii-print.css" media="screen" title="Print Preview" />
|
||||||
<link rel="stylesheet" type="text/css" href="{{media_url}}css/prosimii-print.css" media="print" />
|
<link rel="stylesheet" type="text/css" href="{{media_url}}css/prosimii-print.css" media="print" />
|
||||||
|
|
||||||
|
{% block header_ext %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
<title>{{game_name}}</title>
|
<title>{{game_name}}</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
@ -46,7 +53,7 @@
|
||||||
|
|
||||||
<div class="subHeader">
|
<div class="subHeader">
|
||||||
<span class="doNotDisplay">Navigation:</span>
|
<span class="doNotDisplay">Navigation:</span>
|
||||||
<a href="./index.html">Home</a> |
|
<a href="/">Home</a> |
|
||||||
<a href="./index.html">About</a> |
|
<a href="./index.html">About</a> |
|
||||||
<a href="./index.html">Documentation</a> |
|
<a href="./index.html">Documentation</a> |
|
||||||
<a href="./index.html">Staff List</a> |
|
<a href="./index.html">Staff List</a> |
|
||||||
|
|
@ -55,67 +62,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ##### Side Menu ##### -->
|
<!-- ##### Side Menu ##### -->
|
||||||
|
{% block sidebar %}{% endblock %}
|
||||||
<p class="doNotDisplay doNotPrint">This page’s menu:</p>
|
|
||||||
<ul id="side-bar">
|
|
||||||
<li><a href="#alt-layout" title="Alternative layout">Alt. layout</a></li>
|
|
||||||
<li><a href="#compatibility" title="Improved cross-browser compatibility">Compatibility</a></li>
|
|
||||||
<li><a href="#stylesheets" title="Comprehensive stylesheets">Stylesheets</a></li>
|
|
||||||
<li><a href="#accessibility" title="Accessibility features">Accessibility</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<!-- ##### Main Copy ##### -->
|
<!-- ##### Main Copy ##### -->
|
||||||
|
|
||||||
<div id="main-copy">
|
<div id="main-copy">
|
||||||
<h1 id="alt-layout">Alternative Layout</h1>
|
{% block content %}
|
||||||
<p>This is an alternative layout of <span lang="la">Prosimii</span>. Notice the presence of a
|
{% endblock %}
|
||||||
side menu on the left of page. If you are viewing this page in a <span class="titleTip"
|
|
||||||
title="eg: a Gecko family member or Opera">fully standards-compliant browser</span>, the side
|
|
||||||
menu will scroll with the page. If you are viewing in Internet Explorer, however, the menu
|
|
||||||
will appear stationary.</p>
|
|
||||||
|
|
||||||
<p>The following text is essentially the same as the previous page except elaborated.</p>
|
|
||||||
|
|
||||||
<h1 id="compatibility">Improved Cross-browser Compatibility</h1>
|
|
||||||
<p>Before <span lang="la">Prosimii</span>, I did not test my designs in Opera prior to submitting
|
|
||||||
them to OSWD. As a result, these templates don’t render properly in that browser. In
|
|
||||||
contrast, <span lang="la">Prosimii</span> has been fully tested in
|
|
||||||
<a href="http://www.opera.com">Opera</a> (7.01), Gecko
|
|
||||||
(<a href="http://www.mozilla.org">Mozilla</a> <a href="http://www.getfirefox.com">Firefox</a> 0.10.1)
|
|
||||||
and Internet Explorer (6.0) for consistent rendering.</p>
|
|
||||||
|
|
||||||
<p>This means that people using <span class="titleTip" title="eg: Mozilla 1+, Opera 7+, Netscape 6+, Internet Explorer 6+">standards-compliant browsers</span>
|
|
||||||
will see the same format and layout of your page.</p>
|
|
||||||
|
|
||||||
<h1 id="stylesheets">Comprehensive Stylesheets</h1>
|
|
||||||
<dl>
|
|
||||||
<dt>More robust screen stylesheet</dt>
|
|
||||||
<dd>The improved cross-browser consistency is a result of
|
|
||||||
<span lang="la">Prosimii’s</span> more comprehensive screen stylesheet. Major style
|
|
||||||
parameters are explicitly defined in the stylesheet, resulting in less dependence on
|
|
||||||
browser-determined defaults and thus fewer rendering idiosyncrasies.</dd>
|
|
||||||
<dt>Addition of a print media stylesheet</dt>
|
|
||||||
<dd><span lang="la">Prosimii</span> has a print media stylesheet that styles the page in a
|
|
||||||
format appropriate for black and white printing. To see the effect of this stylesheet,
|
|
||||||
select <span class="smallCaps">print preview</span> from the
|
|
||||||
<span class="smallCaps">file</span> menu, or direct this page to a printer (NB: print only
|
|
||||||
this frame if you are viewing this template in a multi-frame document). Alternatively,
|
|
||||||
if you're using <a href="http://www.getfirefox.com">Firefox</a>, use the stylesheet switcher
|
|
||||||
in the bottom right-hand corner of the browser window.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h1 id="accessibility">Accessibility Features</h1>
|
|
||||||
<p><span lang="la">Prosimii</span> incorporates accessibility features for people with impaired
|
|
||||||
vision. The template tentatively conforms to the <a href="http://www.w3.org/TR/WCAG10">
|
|
||||||
<acronym title="Web Content Accessibility Guidelines">WCAG</acronym> double A rating</a> and
|
|
||||||
<a href="http://www.access-board.gov/508.htm">§ 508</a> guidelines for web content
|
|
||||||
accessibility. The relative simplicity of the template’s underlying markup ensures that
|
|
||||||
your page can be easily transformed for rendering in aural, tactile (braille) and other
|
|
||||||
non-visual user agents.</p>
|
|
||||||
|
|
||||||
<p>Additionally, the majority of document metrics (widths, lengths and spacings) are font-size
|
|
||||||
relative. This means that a user can increase the default font size of your page (using their
|
|
||||||
browser) without compromising it’s layout.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ##### Footer ##### -->
|
<!-- ##### Footer ##### -->
|
||||||
|
|
|
||||||
|
|
@ -1,62 +1,12 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
{% extends "base.html" %}
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-AU">
|
{% block sidebar %}
|
||||||
<head>
|
{% endblock %}
|
||||||
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
|
|
||||||
<meta name="author" content="haran" />
|
|
||||||
<meta name="generator" content="haran" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{media_url}}css/prosimii-screen.css" media="screen, tv, projection" title="Default" />
|
{% block header_ext %}
|
||||||
<link rel="stylesheet alternative" type="text/css" href="{{media_url}}css/prosimii-print.css" media="screen" title="Print Preview" />
|
{% endblock %}
|
||||||
<link rel="stylesheet" type="text/css" href="{{media_url}}css/prosimii-print.css" media="print" />
|
|
||||||
|
|
||||||
<title>{{game_name}}</title>
|
{% block content %}
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- For non-visual user agents: -->
|
|
||||||
<div id="top"><a href="#main-copy" class="doNotDisplay doNotPrint">Skip to main content.</a></div>
|
|
||||||
|
|
||||||
<!-- ##### Header ##### -->
|
|
||||||
|
|
||||||
<div id="header">
|
|
||||||
<div class="superHeader">
|
|
||||||
<span>Related Sites:</span>
|
|
||||||
<a href="http://evennia.com" title="The Python-based MUD server">Evennia</a> |
|
|
||||||
<a href="http://www.oswd.org/userinfo.phtml?user=haran" title="Other designs by haran">haran’s Designs</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="midHeader">
|
|
||||||
<h1 class="headerTitle" lang="la">{{game_name}}</h1>
|
|
||||||
<div class="headerSubTitle" title="Slogan">
|
|
||||||
<!-- Insert a slogan here if you want -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br class="doNotDisplay doNotPrint" />
|
|
||||||
|
|
||||||
<div class="headerLinks">
|
|
||||||
<span class="doNotDisplay">Tools:</span>
|
|
||||||
<a href="/login">Log In «</a>
|
|
||||||
<span class="doNotDisplay">|</span>
|
|
||||||
<a href="/register">Register «</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="subHeader">
|
|
||||||
<span class="doNotDisplay">Navigation:</span>
|
|
||||||
<a href="./index.html">Home</a> |
|
|
||||||
<a href="./index.html">About</a> |
|
|
||||||
<a href="./index.html">Documentation</a> |
|
|
||||||
<a href="./index.html">Staff List</a> |
|
|
||||||
<a href="/admin/">Admin Interface</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ##### Main Copy ##### -->
|
|
||||||
|
|
||||||
<div id="main-copy">
|
|
||||||
<div class="rowOfBoxes">
|
<div class="rowOfBoxes">
|
||||||
<div class="twoThirds noBorderOnLeft">
|
<div class="twoThirds noBorderOnLeft">
|
||||||
<h1>Welcome!</h1>
|
<h1>Welcome!</h1>
|
||||||
|
|
@ -122,16 +72,6 @@
|
||||||
combination of technology allows for the quick and easy creation
|
combination of technology allows for the quick and easy creation
|
||||||
of games, as simple as complex as one desires.</p>
|
of games, as simple as complex as one desires.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ##### Footer ##### -->
|
|
||||||
|
|
||||||
<div id="footer">
|
|
||||||
<span class="doNotPrint">
|
|
||||||
Powered by
|
|
||||||
<a href="http://evennia.com">Evennia</a><br />
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
{% endblock %}
|
||||||
</html>
|
|
||||||
66
webtemplates/prosimii/news/show_entry.html
Normal file
66
webtemplates/prosimii/news/show_entry.html
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block header_ext %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block sidebar %}
|
||||||
|
<p class="doNotDisplay doNotPrint">This page’s menu:</p>
|
||||||
|
<ul id="side-bar">
|
||||||
|
<li><a href="#alt-layout" title="Alternative layout">Alt. layout</a></li>
|
||||||
|
<li><a href="#compatibility" title="Improved cross-browser compatibility">Compatibility</a></li>
|
||||||
|
<li><a href="#stylesheets" title="Comprehensive stylesheets">Stylesheets</a></li>
|
||||||
|
<li><a href="#accessibility" title="Accessibility features">Accessibility</a></li>
|
||||||
|
</ul>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1 id="alt-layout">Alternative Layout</h1>
|
||||||
|
<p>This is an alternative layout of <span lang="la">Prosimii</span>. Notice the presence of a
|
||||||
|
side menu on the left of page. If you are viewing this page in a <span class="titleTip"
|
||||||
|
title="eg: a Gecko family member or Opera">fully standards-compliant browser</span>, the side
|
||||||
|
menu will scroll with the page. If you are viewing in Internet Explorer, however, the menu
|
||||||
|
will appear stationary.</p>
|
||||||
|
|
||||||
|
<p>The following text is essentially the same as the previous page except elaborated.</p>
|
||||||
|
|
||||||
|
<h1 id="compatibility">Improved Cross-browser Compatibility</h1>
|
||||||
|
<p>Before <span lang="la">Prosimii</span>, I did not test my designs in Opera prior to submitting
|
||||||
|
them to OSWD. As a result, these templates don’t render properly in that browser. In
|
||||||
|
contrast, <span lang="la">Prosimii</span> has been fully tested in
|
||||||
|
<a href="http://www.opera.com">Opera</a> (7.01), Gecko
|
||||||
|
(<a href="http://www.mozilla.org">Mozilla</a> <a href="http://www.getfirefox.com">Firefox</a> 0.10.1)
|
||||||
|
and Internet Explorer (6.0) for consistent rendering.</p>
|
||||||
|
|
||||||
|
<p>This means that people using <span class="titleTip" title="eg: Mozilla 1+, Opera 7+, Netscape 6+, Internet Explorer 6+">standards-compliant browsers</span>
|
||||||
|
will see the same format and layout of your page.</p>
|
||||||
|
|
||||||
|
<h1 id="stylesheets">Comprehensive Stylesheets</h1>
|
||||||
|
<dl>
|
||||||
|
<dt>More robust screen stylesheet</dt>
|
||||||
|
<dd>The improved cross-browser consistency is a result of
|
||||||
|
<span lang="la">Prosimii’s</span> more comprehensive screen stylesheet. Major style
|
||||||
|
parameters are explicitly defined in the stylesheet, resulting in less dependence on
|
||||||
|
browser-determined defaults and thus fewer rendering idiosyncrasies.</dd>
|
||||||
|
<dt>Addition of a print media stylesheet</dt>
|
||||||
|
<dd><span lang="la">Prosimii</span> has a print media stylesheet that styles the page in a
|
||||||
|
format appropriate for black and white printing. To see the effect of this stylesheet,
|
||||||
|
select <span class="smallCaps">print preview</span> from the
|
||||||
|
<span class="smallCaps">file</span> menu, or direct this page to a printer (NB: print only
|
||||||
|
this frame if you are viewing this template in a multi-frame document). Alternatively,
|
||||||
|
if you're using <a href="http://www.getfirefox.com">Firefox</a>, use the stylesheet switcher
|
||||||
|
in the bottom right-hand corner of the browser window.</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<h1 id="accessibility">Accessibility Features</h1>
|
||||||
|
<p><span lang="la">Prosimii</span> incorporates accessibility features for people with impaired
|
||||||
|
vision. The template tentatively conforms to the <a href="http://www.w3.org/TR/WCAG10">
|
||||||
|
<acronym title="Web Content Accessibility Guidelines">WCAG</acronym> double A rating</a> and
|
||||||
|
<a href="http://www.access-board.gov/508.htm">§ 508</a> guidelines for web content
|
||||||
|
accessibility. The relative simplicity of the template’s underlying markup ensures that
|
||||||
|
your page can be easily transformed for rendering in aural, tactile (braille) and other
|
||||||
|
non-visual user agents.</p>
|
||||||
|
|
||||||
|
<p>Additionally, the majority of document metrics (widths, lengths and spacings) are font-size
|
||||||
|
relative. This means that a user can increase the default font size of your page (using their
|
||||||
|
browser) without compromising it’s layout.</p>
|
||||||
|
{% endblock %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue