[enh] set up special css classes for highlighting results + highlight definitions with dark grey border

This commit is contained in:
rhapsodhy 2014-01-11 03:31:54 +00:00
parent 04c408389d
commit 74ca542a02
3 changed files with 14 additions and 8 deletions

View File

@ -16,6 +16,7 @@ def response(resp):
res = {'title' : search_res.get('Heading', '')
,'content' : search_res.get('Definition', '')
,'url' : search_res.get('AbstractURL', '')
,'class' : 'definition_result'
}
results.append(res)

View File

@ -97,6 +97,11 @@ a:visited { color: #7b11be; }
.image_result p span a { color: #FFFFFF; }
.image_result p:hover span a { display: block; position: absolute; bottom: 0; right: 0; padding: 4px; background-color: rgba(0, 0, 0, 0.6); font-size: 0.7em; }
.torrent_result { border-left: 10px solid lightgray; padding-left: 3px; }
.torrent_result p { margin: 3px; font-size: 0.8em; }
.definition_result { border-left: 10px solid gray; padding-left: 3px; }
.percentage { position: relative; width: 300px; }
.percentage div { background: #444444; }
td { padding: 0 4px; }

View File

@ -1,4 +1,4 @@
<div class="result">
<div class="result {{ result.class }}">
<h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
<p class="content">{% if result.content %}{{ result.content|safe }}<br />{% endif %}</p>
<p class="url">{{ result.pretty_url }}</p>