[enh][mod] results ui refactor

This commit is contained in:
Adam Tauber 2014-05-09 01:27:55 +02:00
parent a41c1392f0
commit 47d548d6a2
5 changed files with 86 additions and 78 deletions

View File

@ -1,14 +1,14 @@
html{font-family:sans-serif;font-size:.9em;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;color:#444;padding:0;margin:0} html{font-family:sans-serif;font-size:.9em;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;color:#444;padding:0;margin:0}
body,#container{padding:0;margin:0} body,#container{padding:0;margin:0}
#container{width:100%;position:absolute;top:0} #container{width:100%;position:absolute;top:0}
.search{background:#ecf0f1;padding:0;margin:0}.search .checkbox_container label{border-bottom:4px solid #e8e7e6} .search{padding:0;margin:0}.search .checkbox_container label{font-size:.9em;border-bottom:2px solid #e8e7e6}
.search .checkbox_container label:hover{border-bottom:4px solid #3498db} .search .checkbox_container label:hover{border-bottom:2px solid #3498db}
.search .checkbox_container input[type="checkbox"]:checked+label{border-bottom:4px solid #2980b9} .search .checkbox_container input[type="checkbox"]:checked+label{border-bottom:2px solid #2980b9}
#search_wrapper{position:relative;max-width:600px;padding:10px} #search_wrapper{position:relative;width:50em;padding:10px}
.center #search_wrapper{margin-left:auto;margin-right:auto} .center #search_wrapper{margin-left:auto;margin-right:auto}
.q{background:none repeat scroll 0 0 #fff;border:1px solid #3498db;color:#222;font-size:16px;height:28px;margin:0;outline:medium none;padding:2px;padding-left:8px;padding-right:0 !important;width:100%;z-index:2} .q{background:none repeat scroll 0 0 #fff;border:1px solid #3498db;color:#222;font-size:16px;height:28px;margin:0;outline:medium none;padding:2px;padding-left:8px;padding-right:0 !important;width:100%;z-index:2}
#search_submit{position:absolute;top:13px;right:1px;padding:0;border:0;background:url('../img/search-icon.png') no-repeat;background-size:24px 24px;opacity:.8;width:24px;height:30px;font-size:0} #search_submit{position:absolute;top:13px;right:1px;padding:0;border:0;background:url('../img/search-icon.png') no-repeat;background-size:24px 24px;opacity:.8;width:24px;height:30px;font-size:0}
@media screen and (max-width:680px){#search_wrapper{width:90%;clear:both;overflow:hidden}}ul.autocompleter-choices{position:absolute;margin:0;padding:0;list-style:none;border:1px solid #3498db;border-left-color:#3498db;border-right-color:#3498db;border-bottom-color:#3498db;text-align:left;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;z-index:50;background-color:#fff;color:#444}ul.autocompleter-choices li{position:relative;margin:-2px 0 0 0;padding:.2em 1.5em .2em 1em;display:block;float:none !important;cursor:pointer;font-weight:normal;white-space:nowrap;font-size:1em;line-height:1.5em}ul.autocompleter-choices li.autocompleter-selected{background-color:#444;color:#fff}ul.autocompleter-choices li.autocompleter-selected span.autocompleter-queried{color:#9fcfff} @media screen and (max-width:50em){#search_wrapper{width:90%;clear:both;overflow:hidden}}ul.autocompleter-choices{position:absolute;margin:0;padding:0;list-style:none;border:1px solid #3498db;border-left-color:#3498db;border-right-color:#3498db;border-bottom-color:#3498db;text-align:left;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;z-index:50;background-color:#fff;color:#444}ul.autocompleter-choices li{position:relative;margin:-2px 0 0 0;padding:.2em 1.5em .2em 1em;display:block;float:none !important;cursor:pointer;font-weight:normal;white-space:nowrap;font-size:1em;line-height:1.5em}ul.autocompleter-choices li.autocompleter-selected{background-color:#444;color:#fff}ul.autocompleter-choices li.autocompleter-selected span.autocompleter-queried{color:#9fcfff}
ul.autocompleter-choices span.autocompleter-queried{display:inline;float:none;font-weight:bold;margin:0;padding:0} ul.autocompleter-choices span.autocompleter-queried{display:inline;float:none;font-weight:bold;margin:0;padding:0}
.row{max-width:800px;margin:20px auto;text-align:justify}.row h1{font-size:3em;margin-top:50px} .row{max-width:800px;margin:20px auto;text-align:justify}.row h1{font-size:3em;margin-top:50px}
.row p{padding:0 10px;max-width:700px} .row p{padding:0 10px;max-width:700px}
@ -35,7 +35,7 @@ label.deny{background:#2ecc71;padding:4px 8px;color:#444;display:inline}
.engine_checkbox input[type="checkbox"]:checked+label:nth-child(2)+label{display:none} .engine_checkbox input[type="checkbox"]:checked+label:nth-child(2)+label{display:none}
.engine_checkbox input[type="checkbox"]:checked+label.allow{display:inline} .engine_checkbox input[type="checkbox"]:checked+label.allow{display:inline}
a{text-decoration:none;color:#1a11be}a:visited{color:#8e44ad} a{text-decoration:none;color:#1a11be}a:visited{color:#8e44ad}
.result{margin:19px 0 18px 0;padding:0;max-width:53em;clear:both} .result{margin:19px 0 18px 0;padding:0;clear:both}
.result_title{margin-bottom:0}.result_title a{color:#2980b9;font-weight:normal;font-size:1.1em}.result_title a:hover{text-decoration:underline} .result_title{margin-bottom:0}.result_title a{color:#2980b9;font-weight:normal;font-size:1.1em}.result_title a:hover{text-decoration:underline}
.result_title a:visited{color:#8e44ad} .result_title a:visited{color:#8e44ad}
.result h3{font-size:1em;word-wrap:break-word;margin:5px 0 1px 0;padding:0} .result h3{font-size:1em;word-wrap:break-word;margin:5px 0 1px 0;padding:0}
@ -57,14 +57,14 @@ a{text-decoration:none;color:#1a11be}a:visited{color:#8e44ad}
table{width:100%} table{width:100%}
td{padding:0 4px} td{padding:0 4px}
tr:hover{background:#ddd} tr:hover{background:#ddd}
#results{margin:10px;padding:0;margin-bottom:20px} #results{margin:auto;padding:0;width:50em;margin-bottom:20px}
#sidebar{position:absolute;left:54em;width:15em;margin:0 2px 5px 5px;padding:0 2px 2px 2px} #sidebar{position:absolute;top:100px;left:10px;margin:0 2px 5px 5px;padding:0 2px 2px 2px;width:14em}#sidebar input{padding:2px;margin:1px;font-size:.8em;display:inline-block;background:transparent;color:#444;cursor:pointer}
#sidebar input[type="submit"]{text-decoration:underline}
#suggestions span{display:block;margin:0 2px 2px 2px;padding:0} #suggestions span{display:block;margin:0 2px 2px 2px;padding:0}
#suggestions form{display:block} #suggestions form{display:block}
#suggestions input{padding:2px 6px;margin:2px 4px;font-size:.8em;display:inline-block;background:#3498db;color:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0;cursor:pointer} #search_url{margin-top:8px}#search_url input{border:1px solid #888;padding:4px;color:#444;width:14em;display:block;margin:4px;font-size:.8em}
#search_url{margin-top:8px}#search_url input{border:1px solid #888;padding:4px;color:#444;width:20em;display:block;margin:4px}
#preferences{top:10px;padding:0;border:0;background:url('../img/preference-icon.png') no-repeat;background-size:28px 28px;opacity:.8;width:28px;height:30px;display:block}#preferences *{display:none} #preferences{top:10px;padding:0;border:0;background:url('../img/preference-icon.png') no-repeat;background-size:28px 28px;opacity:.8;width:28px;height:30px;display:block}#preferences *{display:none}
#pagination{clear:both} #pagination{clear:both;width:40em}
#apis{margin-top:8px;clear:both} #apis{margin-top:8px;clear:both}
@media screen and (max-width:60em){#sidebar{position:static;max-width:50em;margin:0 0 2px 0;padding:0;float:none;border:none;width:auto} #suggestions span{display:inline;font-size:.8em} #suggestions form{display:inline} #suggestions input{padding:2px 6px;margin:2px 4px;font-size:.8em;display:inline-block;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0;cursor:pointer}}@media screen and (max-width:680px){.right{display:none;postion:fixed !important;top:100px;right:0} #apis{display:none} #categories{font-size:80%;clear:both}#categories .checkbox_container{margin-top:2px;margin:0 2px} .checkbox_container{display:block;width:100%}.checkbox_container label{border-bottom:0} .result{border-top:1px solid #e8e7e6;margin:7px 0 6px 0}.result img{max-width:90%;width:auto;height:auto}}.favicon{float:left;margin-right:4px;margin-top:2px} @media screen and (max-width:50em){#categories{font-size:90%;clear:both}#categories .checkbox_container{margin-top:2px;margin:auto} #results{margin:auto;padding:0;width:90%} .checkbox_container{display:block;width:90%}.checkbox_container label{border-bottom:0}}@media screen and (max-width:70em){#suggestions span{display:inline} #suggestions form{display:inline} .right{display:none;postion:fixed !important;top:100px;right:0} #sidebar{position:static;max-width:50em;margin:0 0 2px 0;padding:0;float:none;border:none;width:auto}#sidebar input{border:0} #apis{display:none} #search_url{display:none} .result{border-top:1px solid #e8e7e6;margin:7px 0 6px 0}.result img{max-width:90%;width:auto;height:auto}}.favicon{float:left;margin-right:4px;margin-top:2px}
.preferences_back{background:none repeat scroll 0 0 #3498db;border:0 none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;display:inline-block;margin:2px 4px;padding:4px 6px}.preferences_back a{color:#fff} .preferences_back{background:none repeat scroll 0 0 #3498db;border:0 none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;display:inline-block;margin:2px 4px;padding:4px 6px}.preferences_back a{color:#fff}

View File

@ -17,6 +17,7 @@
@color-url-font: #1a11be; @color-url-font: #1a11be;
@color-url-visited-font: #8E44AD; @color-url-visited-font: #8E44AD;
@results-width: 50em;
/// Start-Screen /// Start-Screen

View File

@ -3,25 +3,25 @@
*/ */
.search { .search {
background: @color-result-search-background;
padding: 0; padding: 0;
margin: 0; margin: 0;
.checkbox_container label { .checkbox_container label {
border-bottom: 4px solid @color-categories-item-border-unselected; font-size: 0.9em;
border-bottom: 2px solid @color-categories-item-border-unselected;
} }
.checkbox_container label:hover { .checkbox_container label:hover {
border-bottom: 4px solid @color-categories-item-border-unselected-hover; border-bottom: 2px solid @color-categories-item-border-unselected-hover;
} }
.checkbox_container input[type="checkbox"]:checked + label { .checkbox_container input[type="checkbox"]:checked + label {
border-bottom: 4px solid @color-categories-item-border-selected; border-bottom: 2px solid @color-categories-item-border-selected;
} }
} }
#search_wrapper { #search_wrapper {
position: relative; position: relative;
max-width: 600px; width: 50em;
padding: 10px; padding: 10px;
} }
@ -59,7 +59,7 @@
font-size: 0; font-size: 0;
} }
@media screen and (max-width: 680px) { @media screen and (max-width: @results-width) {
#search_wrapper { #search_wrapper {
width: 90%; width: 90%;
clear:both; clear:both;

View File

@ -195,7 +195,6 @@ a {
.result { .result {
margin: 19px 0 18px 0; margin: 19px 0 18px 0;
padding: 0; padding: 0;
max-width: 53em;
clear: both; clear: both;
} }
@ -345,20 +344,36 @@ tr {
} }
#results { #results {
margin: 10px; margin: auto;
padding: 0; padding: 0;
width: @results-width;
margin-bottom: 20px; margin-bottom: 20px;
} }
#sidebar { #sidebar {
position: absolute; position: absolute;
left: 54em; top: 100px;
width: 15em; left: 10px;
margin: 0 2px 5px 5px; margin: 0 2px 5px 5px;
padding: 0 2px 2px 2px; padding: 0 2px 2px 2px;
width: 14em;
input {
padding: 2px;
margin: 1px;
font-size: 0.8em;
display: inline-block;
background: transparent;
color: @color-result-search-url-font;
cursor: pointer;
}
input[type="submit"] {
text-decoration: underline;
}
} }
#suggestions { #suggestions {
span { span {
display: block; display: block;
margin: 0 2px 2px 2px; margin: 0 2px 2px 2px;
@ -368,18 +383,6 @@ tr {
form { form {
display: block; display: block;
} }
input {
padding: 2px 6px;
margin: 2px 4px;
font-size: 0.8em;
display: inline-block;
background: @color-suggestions-button-background;
color: @color-suggestions-button-font;
.rounded-corners;
border: 0;
cursor: pointer;
}
} }
#search_url { #search_url {
@ -389,9 +392,10 @@ tr {
border: 1px solid @color-result-search-url-border; border: 1px solid @color-result-search-url-border;
padding: 4px; padding: 4px;
color: @color-result-search-url-font; color: @color-result-search-url-font;
width: 20em; width: 14em;
display: block; display: block;
margin: 4px; margin: 4px;
font-size: 0.8em;
} }
} }
@ -413,6 +417,7 @@ tr {
#pagination { #pagination {
clear: both; clear: both;
width: 40em;
} }
#apis { #apis {
@ -420,40 +425,45 @@ tr {
clear: both; clear: both;
} }
@media screen and (max-width: 60em) { @media screen and (max-width: @results-width) {
#sidebar {
position: static; #categories {
max-width: 50em; font-size: 90%;
margin: 0 0 2px 0; clear: both;
padding: 0;
float: none; .checkbox_container {
border: none; margin-top: 2px;
width: auto margin: auto;
}
} }
#results {
margin: auto;
padding: 0;
width: 90%;
}
.checkbox_container {
display: block;
width: 90%;
//float: left;
label {
border-bottom: 0;
}
}
}
@media screen and (max-width: 70em) {
#suggestions { #suggestions {
span { span {
display: inline; display: inline;
font-size: 0.8em
} }
form { form {
display: inline; display: inline;
} }
input {
padding: 2px 6px;
margin: 2px 4px;
font-size: 0.8em;
display: inline-block;
.rounded-corners;
border: 0;
cursor: pointer;
} }
}
}
@media screen and (max-width: 680px) {
.right { .right {
display: none; display: none;
postion: fixed !important; postion: fixed !important;
@ -461,28 +471,25 @@ tr {
right: 0px; right: 0px;
} }
#sidebar {
position: static;
max-width: @results-width;
margin: 0 0 2px 0;
padding: 0;
float: none;
border: none;
width: auto;
input {
border: 0;
}
}
#apis { #apis {
display: none; display: none;
} }
#categories { #search_url {
font-size: 80%; display: none;
clear: both;
.checkbox_container {
margin-top: 2px;
margin: 0 2px;
}
}
.checkbox_container {
display: block;
width: 100%;
//float: left;
label {
border-bottom: 0;
}
} }
.result { .result {

View File

@ -2,7 +2,7 @@
{% block title %}{{ q }} - {% endblock %} {% block title %}{{ q }} - {% endblock %}
{% block content %} {% block content %}
<div class="right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div> <div class="right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
<div class="small search"> <div class="small search center">
{% include 'search.html' %} {% include 'search.html' %}
</div> </div>
<div id="results"> <div id="results">