[mod] more web page modification

This commit is contained in:
Dalf 2014-01-07 00:21:08 +01:00
parent 289a5707ed
commit 8433421156
3 changed files with 32 additions and 25 deletions

View file

@ -61,27 +61,18 @@ input[type="checkbox"] { visibility: hidden; }
user-select: none; user-select: none;
} }
.checkbox_container input[type="checkbox"]:checked + label { .checkbox_container input[type="checkbox"]:checked + label { background: #b8c1d9; }
background: #b8c1d9; .search .checkbox_container label { border-bottom: 4px solid #e8e7e6; }
} .search .checkbox_container input[type="checkbox"]:checked + label { border-bottom: 4px solid #1a11be; }
.search .checkbox_container label { a { text-decoration: none; color: #1a11be; }
border-bottom: 4px solid #e8e7e6; a:visited { color: #7b11be; }
}
.search .checkbox_container input[type="checkbox"]:checked + label { .result { margin: 19px 0 18px 0; padding: 0; max-width: 55em; }
border-bottom: 4px solid #8098d9;
}
a { text-decoration: none; }
.result { margin-bottom: 16px; clear: both; }
.result_title { margin-bottom: 0; } .result_title { margin-bottom: 0; }
.result p { margin-top: 0; padding-top: 0; font-size: 0.8em; max-width: 54em; word-wrap:break-word; } .result h3 { font-size: 1em; word-wrap:break-word; margin: 5px 0 1px 0; padding: 0 }
.result h3 { font-size: 0.9em; word-wrap:break-word; } .result .content { font-size: 0.8em; margin: 0; padding: 0; max-width: 54em; word-wrap:break-word; line-height: 1.24; }
.result { max-width: 70em; } .result .url { font-size: 0.8em; margin: 3px 0 0 0; padding: 0; max-width: 54em; word-wrap:break-word; color: #2e1c0b; }
.url { font-weight: bold; word-wrap:break-word; }
.q { width: 30em; } .q { width: 30em; }
@ -142,10 +133,13 @@ tr:hover td { background: #DDDDDD; }
height: 30px; height: 30px;
} }
#results { margin-left: 10px; margin-top: 10px; margin-right: 10px; } #results { margin: 10px; padding: 0; }
#suggestions { max-width: 50em;} #result_count { font-size: 0.8em; margin: 2px 0 2px 0; padding: 0 }
#suggestions form { display: inline; }
#suggestions { position: absolute; left: 54em; width: 12em; margin: 0 2px 5px 5px; padding: 0 2px 2px 2px; }
#suggestions span { display: block; font-size: 0.8em; margin: 0 2px 10px 2px; padding: 0; }
#suggestions form { display: block; }
#suggestions input { padding: 2px 6px; margin: 2px 4px; font-size: 0.8em; display: inline-block; background: #E4E4E4; border-radius: 4px; border: 0; cursor: pointer; } #suggestions input { padding: 2px 6px; margin: 2px 4px; font-size: 0.8em; display: inline-block; background: #E4E4E4; border-radius: 4px; border: 0; cursor: pointer; }
#preferences { #preferences {
@ -168,8 +162,18 @@ tr:hover td { background: #DDDDDD; }
clear: both; clear: both;
} }
@media screen and (max-width: 60em) {
#suggestions { position: static; max-width: 50em; margin: 0 0 2px 0; padding: 0; float: none; border: none; width: auto }
#suggestions span { display: inline; font-size: 0.8em }
#suggestions form { display: inline; }
#suggestions input { padding: 2px 6px; margin: 2px 4px; font-size: 0.8em; display: inline-block; background: #E4E4E4; border-radius: 4px; border: 0; cursor: pointer; }
}
@media screen and (max-width: 680px) { @media screen and (max-width: 680px) {
#search_wrapper { width: 90%; clear:both; }
#search_wrapper { width: 90%; clear:both; overflow: hidden }
.right { display: none; postion: fixed !important; top: 100px; right: 0px; } .right { display: none; postion: fixed !important; top: 100px; right: 0px; }
@ -177,5 +181,7 @@ tr:hover td { background: #DDDDDD; }
#categories .checkbox_container { margin-top: 2px; margin: 0 2px; } #categories .checkbox_container { margin-top: 2px; margin: 0 2px; }
.result { border-top: 1px solid #e8e7e6; margin: 7px 0 6px 0; }
.result img { max-width: 90%; width: auto; height: auto } .result img { max-width: 90%; width: auto; height: auto }
} }

View file

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

View file

@ -7,9 +7,9 @@
</div> </div>
<div id="results"> <div id="results">
{% if suggestions %} {% if suggestions %}
<div id="suggestions">Suggestions: {% for suggestion in suggestions %}<form method="post" action="/"><input type="hidden" name="q" value="{{suggestion}}"><input type="submit" value="{{ suggestion }}" /></form>{% endfor %}</div> <div id="suggestions"><span>Suggestions: </span>{% for suggestion in suggestions %}<form method="post" action="/"><input type="hidden" name="q" value="{{suggestion}}"><input type="submit" value="{{ suggestion }}" /></form>{% endfor %}</div>
{% endif %} {% endif %}
<div> <div id ="result_count">
Number of results: {{ number_of_results }} Number of results: {{ number_of_results }}
</div> </div>
{% for result in results %} {% for result in results %}