Permalink
Browse files

Slightly improved result style.

  • Loading branch information...
1 parent 740d3dd commit 5432b7def9fea9a05fe70d043bf66d1fdac9b9f2 @dnephin committed Jun 28, 2011
View
@@ -1,7 +1,7 @@
from setuptools import setup
PACKAGE = 'TracAdvancedSearch'
-VERSION = '0.4'
+VERSION = '0.4.1'
setup(name=PACKAGE,
version=VERSION,
@@ -1,5 +1,5 @@
-#general_filters,
+#general_filters,
#ticket_filters {
max-width: 300px;
float: left;
@@ -28,3 +28,29 @@
font-style: italic;
}
+
+.result_header {
+ margin: 2px 0;
+ font-weight: bold;
+}
+
+.even {
+ background: #eee;
+}
+
+.result_header SPAN.result_type {
+ padding: 0 4px 0 0;
+}
+
+.result_summary {
+ font-size: 0.8em;
+}
+
+.result_footer {
+ font-size: 0.8em;
+ margin-top: 2px;
+}
+
+.result {
+ padding: 5px 10px;
+}
@@ -84,23 +84,28 @@ <h2 py:if="results">
Results <span class="numresults">(${results.displayed_items()})</span>
</h2>
<div>
- <dl id="results">
- <py:for each="result in results">
- <dt>
- <em>[${result.source}]</em>
+ <div id="results">
+ <py:for each="idx, result in enumerate(results)">
+ <div class="result ${'even' if not idx % 2 else None}">
+ <div class="result_header">
+ <span class="result_type">${result.source}</span>
<a href="${result.href}" class="searchable">${result.title}</a>
- </dt>
- <dd class="searchable">${result.summary}</dd>
- <dd>
+ </div>
+ <div class="result_summary">${result.summary}</div>
+ <div class="result_footer">
<py:if test="result.author">
<span class="author" i18n:msg="author">By ${format_author(result.author)}</span> &mdash;
</py:if>
<span class="date">${result.date}</span>
- </dd>
+ </div>
+ </div>
</py:for>
- </dl>
+ </div>
+
<py:if test="results.has_next_page">
+ <p>
<a href="#" onclick="return next_page(${start_points})">Next Page (${page+1})</a>
+ </p>
</py:if>
</div>
</py:if>

0 comments on commit 5432b7d

Please sign in to comment.