pre, code { font-family: monospace; }
body, html { margin: 0; padding: 0; }
+
body {
+ background-color: #005;
+ font-size: normal;
+}
+
+div#outer {
background-color: white;
- font-size: normal;
+ width: 960; margin-bottom: 50;
+ margin-left: auto; margin-right: auto;
+}
+#mainpanel { background-color: white; padding: 0 12 24 12;
+min-height: 300;
}
-#mainpanel { background-color: white; padding: 0 12 24 12; }
/* General headers and footers */
#header a:hover { background-color: #fb7; color: black; text-decoration: none; }
#footer {
- margin-top: 12;
+ margin: 12;
padding-bottom: 12;
background-color: #ddf;
color: black;
+ border-bottom: white 10px solid;
}
h1 { font-size: 150%; }
/* item trees (tree of headings and items in a course */
.itemtree {
- margin-left: 30;
+padding-left: 25;
list-style-type: none;
list-style-position: inside;
}
.itemtree .itemtree { margin-left: 0;}
-.itemtree li { width: 400; }
+/* .itemtree li { width: 400; } */
.itemtree .metalink { padding-left: 8; color: gray; }
.itemtree .metalink a {
}
.itemtree .editlinks { padding-left: 12; color: gray;
- position: absolute; left: 0;
font-size: small;
}
.itemtree .editlinks a { color: navy; }
.itemadd {
- margin-left: 30; /* should match .itemtree{margin-left} */
- margin-top: 30;
+ margin-top: 30; font-size: smaller;
+ padding: 10; background-color: #eef;
}
+.itemadd a { color: navy; }
+
/* specialized display of items in tree, by type */
.itemtree li.item_HEADING {
+ list-style-image: url(tango/folder.png);
margin-top: 4;
}
.itemtree li.item_HEADING > a {
- font-weight: bold; color: navy;
+ color: navy;
}
.itemtree li.item_ELEC {
- list-style-image: url(tango/view_detailed.png);
+ list-style-image: url(tango/document.png);
margin-top: 4;
}
.newsitem {
max-width: 600;
}
+
+.menublockopener { color: gray !important; font-weight: normal !important; }
+.menublock { background-color: #f0f0e0; font-size: 95%; padding: 1 4; }
+
+#coursebanner { background-color: #f2e4cc; margin: -12 -12 0 -12; padding: 8; }
+
+#coursebanner h1 { padding: 0; font-size: 110%; }
+
+.breadcrumbs { margin: 8 8 8 0; }
--- /dev/null
+function init_blocks() {
+ $('span.menublock').each(make_opener);
+}
+
+var blocknum = 0;
+function make_opener() {
+ var menublock = $(this);
+ var blockid = 'menublock' + (blocknum++);
+ menublock.attr('id', blockid);
+ var opener = '<a class="menublockopener" onmouseover="openblock(\'' + blockid + '\');" href="javascript:openblock(\'' + blockid + '\');">»</a>';
+ menublock.before(opener);
+ menublock.hide();
+}
+
+function openblock(bid) {
+ $('span.menublock').hide();
+ $('#' + bid).fadeIn('fast');
+}
+
+$(init_blocks);
\ No newline at end of file
last_modified=datetime.now(),
url = url)
item.save()
- return HttpResponseRedirect(item_url(item) + 'meta/')
+ return HttpResponseRedirect(item_url(item, 'meta/'))
elif item_type == 'ELEC':
title = request.POST.get('title', '').strip()
upload = request.FILES.get('file')
item.fileobj.save(upload.name, upload)
item.save()
- return HttpResponseRedirect(item_url(item) + 'meta/')
+ return HttpResponseRedirect(item_url(item, 'meta/'))
else:
raise NotImplementedError
<ul py:def="show_tree(tree, edit=False)" py:if="tree" class="itemtree">
<li py:for="item, subs in tree" class="item_${item.item_type}">
<a href="${item_url(item)}">${item}</a>
- <span py:if="item.needs_meta_link()" class="metalink">
- [<a href="${item_url(item, 'meta/')}">about</a>]
+ <span py:if="item.needs_meta_link()" class="menublock">
+ <a href="${item_url(item, 'meta/')}">about</a>
</span>
- <span class="editlinks" py:if="edit">
- [<a href="${item_url(item, 'edit/')}">edit</a>]
- </span>
- ${show_tree(subs, edit)}
+ <!-- ${show_tree(subs, edit)} -->
</li>
</ul>
<div py:def="nested_title(item)"
py:with="hier=item.hierarchy()[:-1]; lastnum=len(hier)"
class="nestedtitle">
- <span><a href="${course_url(item.course)}">Top</a></span> »
+ <div class="breadcrumbs">
+ <span><a href="${course_url(item.course)}">Top</a></span> »
<span py:for="n, x in enumerate(hier)"><a href="${item_url(x)}">${x.title}</a> » </span>
- <h2>${item.title}</h2>
+<b>${item.title}</b>
+ </div>
</div>
- <ul py:def="add_subs(parent=None)" class="itemadd">
- <li>Add a new item...</li>
+ <div py:def="add_subs(parent=None)" class="itemadd">
+ <div>Add a new item:</div>
<ul py:with="prefix = (not parent) and 'item/0/' or ''">
- <li><a href="${prefix}add?item_type=HEADING">Add subheading</a></li>
- <li><a href="${prefix}add?item_type=URL">Add URL</a></li>
- <li><a href="${prefix}add?item_type=ELEC">Add Electronic Document</a></li>
- <li><a href="${prefix}add?item_type=PHYS">Add Physical Book/Document</a></li>
+ <li><a href="${prefix}add/?item_type=HEADING">Subheading</a></li>
+ <li><a href="${prefix}add/?item_type=URL">URL</a></li>
+ <li><a href="${prefix}add/?item_type=ELEC">Electronic Document</a></li>
+ <li><a href="${prefix}add/?item_type=PHYS">Physical Book/Document</a></li>
</ul>
- </ul>
+ </div>
</html>
<xi:include href="components/item.xhtml"/>
<head>
<title>${title}</title>
+ <script type="text/javascript" src="/static/menublocks.js"/>
</head>
<body>
- <p class="deptident">${course.department}</p>
+ <div id="coursebanner">
+ <div class="deptident">${course.department}</div>
<h1>${title}</h1>
+ </div>
<p py:if="not item_tree">
There are no items associated with this course yet.
</p>
<title>${title}</title>
</head>
<body>
- <div class="courseident">
+ <div id="coursebanner">
<div>${course.department}</div>
<h1><a href="${course_url(course)}">${course_title}</a></h1>
+ </div>
<div py:if="parent_item">${nested_title(parent_item)}</div>
- <h2>${title}</h2>
+ <h3>${title}</h3>
<form action=".?item_type=${item_type}" method="POST"
enctype="multipart/form-data">
<table>
</table>
<p><input type="submit" value="Upload file and Create item"/></p>
</form>
- </div>
</body>
</html>
</head>
<body>
<div class="courseident">
+ <div id="coursebanner">
<div>${course.department}</div>
<h1><a href="${course_url(course)}">${course_title}</a></h1>
+ </div>
<div py:if="parent_item">${nested_title(parent_item)}</div>
- <h2>${title}</h2>
+ <h3>${title}</h3>
<form action=".?item_type=${item_type}" method="POST">
<table>
<tr><th>Heading</th><td><input type="text" name="title"/></td></tr>
</head>
<body>
<div class="courseident">
+ <div id="coursebanner">
<div>${course.department}</div>
<h1><a href="${course_url(course)}">${course_title}</a></h1>
+ </div>
<div py:if="parent_item">${nested_title(parent_item)}</div>
- <h2>${title}</h2>
+ <h3>${title}</h3>
<form action=".?item_type=${item_type}" method="POST">
<table>
<tr><th>Title</th><td><input type="text" name="title"/></td></tr>
<xi:include href="components/item.xhtml"/>
<head>
<title>${title}</title>
+ <script type="text/javascript" src="/static/menublocks.js"/>
</head>
<body>
+ <div id="coursebanner">
<div class="courseident">
<div>${course.department}</div>
<h1><a href="${course_url(course)}">${course_title}</a></h1>
</div>
+ </div>
${nested_title(item)}
<!-- <p py:if="not item_tree"> -->
<!-- There are no items associated in this subheading. -->
<title>${title}</title>
</head>
<body>
+ <div id="coursebanner">
<div class="courseident">
<div>${course.department}</div>
<h1><a href="${course_url(course)}">${course_title}</a></h1>
</div>
+ </div>
${nested_title(item)}
<table>
</py:match>
<py:match path="body" once="true">
<body py:attrs="select('@*')">
+ <div id="outer">
<div id="brandheader">
<div style="float: right; font-size: x-large; padding: 12; color: #888;">
${app_name}
Syrup is a subproject of <a href="http://conifer.mcmaster.ca/">Project Conifer</a> © 2009
</div>
</div>
+ </div>
</body>
</py:match>
</html>