Commit 4d53b370 by Reda Lemeden

Edited the simple wiki templates to allow for more flexibility in title markup +…

Edited the simple wiki templates to allow for more flexibility in title markup + changed the layout of search results
parent 6446972d
......@@ -3,7 +3,10 @@ div.wiki-wrapper {
width: 100%;
section.wiki-body {
@extend .clearfix;
@extend .content;
position: relative;
header {
@extend .topbar;
......@@ -74,27 +77,70 @@ div.wiki-wrapper {
}
}
h1.wiki-title {
font-weight: bold;
padding-bottom: 10px;
margin-bottom: 20px;
border-bottom: 1px solid #ccc;
}
h2.wiki-title {
margin-top: 0;
margin-bottom: 15px;
width: flex-grid(4, 9);
padding-right: flex-gutter(9);
border-right: 1px dashed #ddd;
@include box-sizing(border-box);
display: table-cell;
vertical-align: top;
@media screen and (max-width:1120px) {
display: block;
width: auto;
border-right: 0;
}
@media print {
display: block;
width: auto;
border-right: 0;
}
}
p {
line-height: 1.6em;
}
ul.article-list {
margin-left: 15px;
section.results {
display: table-cell;
width: flex-grid(5, 9);
padding-left: flex-gutter(9);
@media screen and (max-width:1120px) {
display: block;
width: auto;
padding: 0;
}
li {
margin: 10px 0;
list-style-image: url('/static/images/bullet-triangle.png');
@media print {
display: block;
width: auto;
padding: 0;
h3 {
font-size: 18px;
font-weight: normal;
canvas, img {
page-break-inside: avoid;
}
}
ul.article-list {
margin-left: 15px;
li {
list-style: none;
margin: 0;
padding: 10px 0;
border-bottom: 1px solid #eee;
&:last-child {
border-bottom: 0;
}
h3 {
font-size: 18px;
font-weight: normal;
}
}
}
}
......
......@@ -127,8 +127,8 @@
<div style="display:none">
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}"/>
</div>
<input type="text" placeholder="Search" name="value" id="wiki_search_input" style="width: 72%" value="${wiki_search_query if wiki_search_query is not UNDEFINED else '' |h}"/>
<input type="submit" id="wiki_search_input_submit" value=Go! style="width: 20%" />
<input type="text" placeholder="Search" name="value" id="wiki_search_input" style="width: 71%" value="${wiki_search_query if wiki_search_query is not UNDEFINED else '' |h}"/>
<input type="submit" id="wiki_search_input_submit" value="Go!" style="width: 20%" />
</form>
</li>
</ul>
......@@ -163,8 +163,7 @@
%endif
</header>
<h1 class="wiki-title"><%block name="wiki_page_title"/></h1>
<%block name="wiki_page_title"/>
<%block name="wiki_body"/>
</section>
</div>
......
......@@ -5,7 +5,7 @@
<%block name="title"><title>Create Article - MITx 6.002 Wiki</title></%block>
<%block name="wiki_page_title">
Create article
<h1>Create article</h1>
</%block>
<%block name="wiki_body">
......
......@@ -5,7 +5,7 @@
<%block name="title"><title>${"Edit " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002 Wiki</title></%block>
<%block name="wiki_page_title">
${ wiki_article.title }
<h1>${ wiki_article.title }</h1>
</%block>
<%block name="wiki_head">
......
......@@ -10,7 +10,7 @@
<%block name="wiki_page_title">
Oops...
<h1>Oops...</h1>
</%block>
......
......@@ -9,7 +9,9 @@
%>
<%block name="wiki_page_title">
<h1>
${ wiki_article.title }
</h1>
</%block>
<%block name="wiki_body">
......
......@@ -9,14 +9,17 @@ from django.core.urlresolvers import reverse
%>
<%block name="wiki_page_title">
<h2 class="wiki-title">
%if wiki_search_query:
Search results for ${wiki_search_query | h}
%else:
Displaying all articles
%endif
</h2>
</%block>
<%block name="wiki_body">
<section class="results">
<ul class="article-list">
%for article in wiki_search_results:
<% article_deleted = not article.current_revision.deleted == 0 %>
......@@ -27,4 +30,5 @@ Displaying all articles
No articles matching <b>${wiki_search_query if wiki_search_query is not UNDEFINED else ""} </b>!
%endif
</ul>
</section>
</%block>
......@@ -5,7 +5,7 @@
<%block name="title"><title>${wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002 Wiki</title></%block>
<%block name="wiki_page_title">
${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''}
<h1>${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''}</h1>
</%block>
<%block name="wiki_body">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment