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 { ...@@ -3,7 +3,10 @@ div.wiki-wrapper {
width: 100%; width: 100%;
section.wiki-body { section.wiki-body {
@extend .clearfix;
@extend .content; @extend .content;
position: relative;
header { header {
@extend .topbar; @extend .topbar;
...@@ -74,27 +77,70 @@ div.wiki-wrapper { ...@@ -74,27 +77,70 @@ div.wiki-wrapper {
} }
} }
h1.wiki-title { h2.wiki-title {
font-weight: bold; margin-top: 0;
padding-bottom: 10px; margin-bottom: 15px;
margin-bottom: 20px; width: flex-grid(4, 9);
border-bottom: 1px solid #ccc; 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 { p {
line-height: 1.6em; line-height: 1.6em;
} }
ul.article-list { section.results {
margin-left: 15px; 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 { @media print {
margin: 10px 0; display: block;
list-style-image: url('/static/images/bullet-triangle.png'); width: auto;
padding: 0;
h3 { canvas, img {
font-size: 18px; page-break-inside: avoid;
font-weight: normal; }
}
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 @@ ...@@ -127,8 +127,8 @@
<div style="display:none"> <div style="display:none">
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}"/> <input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}"/>
</div> </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="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%" /> <input type="submit" id="wiki_search_input_submit" value="Go!" style="width: 20%" />
</form> </form>
</li> </li>
</ul> </ul>
...@@ -163,8 +163,7 @@ ...@@ -163,8 +163,7 @@
%endif %endif
</header> </header>
<h1 class="wiki-title"><%block name="wiki_page_title"/></h1> <%block name="wiki_page_title"/>
<%block name="wiki_body"/> <%block name="wiki_body"/>
</section> </section>
</div> </div>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<%block name="title"><title>Create Article - MITx 6.002 Wiki</title></%block> <%block name="title"><title>Create Article - MITx 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
Create article <h1>Create article</h1>
</%block> </%block>
<%block name="wiki_body"> <%block name="wiki_body">
......
...@@ -5,7 +5,7 @@ ...@@ -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="title"><title>${"Edit " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
${ wiki_article.title } <h1>${ wiki_article.title }</h1>
</%block> </%block>
<%block name="wiki_head"> <%block name="wiki_head">
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<%block name="wiki_page_title"> <%block name="wiki_page_title">
Oops... <h1>Oops...</h1>
</%block> </%block>
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
%> %>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
<h1>
${ wiki_article.title } ${ wiki_article.title }
</h1>
</%block> </%block>
<%block name="wiki_body"> <%block name="wiki_body">
......
...@@ -9,14 +9,17 @@ from django.core.urlresolvers import reverse ...@@ -9,14 +9,17 @@ from django.core.urlresolvers import reverse
%> %>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
<h2 class="wiki-title">
%if wiki_search_query: %if wiki_search_query:
Search results for ${wiki_search_query | h} Search results for ${wiki_search_query | h}
%else: %else:
Displaying all articles Displaying all articles
%endif %endif
</h2>
</%block> </%block>
<%block name="wiki_body"> <%block name="wiki_body">
<section class="results">
<ul class="article-list"> <ul class="article-list">
%for article in wiki_search_results: %for article in wiki_search_results:
<% article_deleted = not article.current_revision.deleted == 0 %> <% article_deleted = not article.current_revision.deleted == 0 %>
...@@ -27,4 +30,5 @@ Displaying all articles ...@@ -27,4 +30,5 @@ Displaying all articles
No articles matching <b>${wiki_search_query if wiki_search_query is not UNDEFINED else ""} </b>! No articles matching <b>${wiki_search_query if wiki_search_query is not UNDEFINED else ""} </b>!
%endif %endif
</ul> </ul>
</section>
</%block> </%block>
...@@ -5,7 +5,7 @@ ...@@ -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="title"><title>${wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%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>
<%block name="wiki_body"> <%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