From 400279182ed24cb6204194e77cf15f372ffad7ed Mon Sep 17 00:00:00 2001 From: dalf Date: Sat, 25 Oct 2014 17:05:37 +0200 Subject: [fix] no horizontal scrolling on small screen [fix] small images in the results aren't not "zoomed" --- searx/static/default/less/style.less | 40 +++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) (limited to 'searx/static/default/less') diff --git a/searx/static/default/less/style.less b/searx/static/default/less/style.less index c43c0fe72..286a1d045 100644 --- a/searx/static/default/less/style.less +++ b/searx/static/default/less/style.less @@ -126,6 +126,7 @@ fieldset { #categories { margin: 0 10px; + .user-select; } .checkbox_container { @@ -297,14 +298,14 @@ a { } .image_result { - float: left; + display: inline-block; margin: 10px 10px; position: relative; - height: 160px; + max-height: 160px; img { border: 0; - height: 160px; + max-height: 160px; } p { @@ -369,17 +370,17 @@ tr { #results { margin: auto; padding: 0; - width: @results-width; + width: @results-width; margin-bottom: 20px; } #sidebar { position: fixed; - bottom: 10px; - left: 10px; + bottom: 10px; + left: 10px; margin: 0 2px 5px 5px; padding: 0 2px 2px 2px; - width: 14em; + width: 14em; input { padding: 0; @@ -390,9 +391,9 @@ tr { color: @color-result-search-url-font; cursor: pointer; } - input[type="submit"] { + input[type="submit"] { text-decoration: underline; - } + } } #suggestions, #answers { @@ -501,7 +502,6 @@ tr { #pagination { clear: both; - width: 40em; } #apis { @@ -511,18 +511,19 @@ tr { @media screen and (max-width: @results-width) { - #results { - margin: auto; - padding: 0; - width: 90%; - } + #results { + margin: auto; + padding: 0; + width: 90%; + } + .github { display: none; } .checkbox_container { display: block; - width: 90%; + width: 90%; //float: left; label { @@ -591,6 +592,13 @@ tr { border-top: 1px solid @color-result-top-border; margin: 7px 0 6px 0; } + + .image_result { + max-width: 98%; + img { + max-width: 98%; + } + } } .favicon { -- cgit v1.2.3 From a71b326d9e210da2d4ed67fade819c0433fb95d3 Mon Sep 17 00:00:00 2001 From: dalf Date: Sun, 26 Oct 2014 11:14:05 +0100 Subject: [mod] default template modifications - more smartphone friendly - more text browser friendly - next button always on the right - in case of small screen supporting touch event, categories are displayed on one line with a scroll --- searx/static/default/less/style.less | 102 ++++++++++++++++++++++++++++------- 1 file changed, 83 insertions(+), 19 deletions(-) (limited to 'searx/static/default/less') diff --git a/searx/static/default/less/style.less b/searx/static/default/less/style.less index 286a1d045..d72c92234 100644 --- a/searx/static/default/less/style.less +++ b/searx/static/default/less/style.less @@ -97,6 +97,7 @@ h1 { div.title { background: url('../img/searx.png') no-repeat; width: 100%; + min-height: 80px; background-position: center; h1 { @@ -261,8 +262,12 @@ a { .published_date { font-size: 0.8em; color: @color-result-publishdate-font; - margin: 5px 20px; + Margin: 5px 20px; } + + .thumbnail { + width: 400px; + } } .engines { @@ -396,6 +401,14 @@ tr { } } +#suggestions { + + span { + display: block; + } + +} + #suggestions, #answers { margin-top: 20px; @@ -419,7 +432,8 @@ tr { } form { - display: inline; + display: inline-block; + min-width: 210px; } } @@ -437,6 +451,7 @@ tr { border: 1px solid #ddd; padding: 5px; font-size: 0.8em; + /* box-shadow: 0px 0px 5px #CCC; */ img { max-width: 20em; @@ -502,6 +517,10 @@ tr { #pagination { clear: both; + + br { + clear: both; + } } #apis { @@ -531,7 +550,7 @@ tr { } } - .right { + .preferences_container { display: none; postion: fixed !important; top: 100px; @@ -542,20 +561,61 @@ tr { @media screen and (max-width: 75em) { - #infoboxes { - position: inherit; - max-width: inherit; + div.title { + + h1 { + font-size: 1em; + } + } + + html.touch #categories { + width: 95%; + height: 30px; + text-align: left; + overflow-x: scroll; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + + #categories_container { + width: 1000px; + width: -moz-max-content; + width: -webkit-max-content; + width: max-content; + + .checkbox_container { + display: inline-block; + width: auto; + } + } + } + + #categories { + font-size: 90%; + clear: both; + + .checkbox_container { + margin-top: 2px; + margin: auto; + } + } + + #suggestions, #answers { + margin-top: 5px; + } + + #infoboxes { + position: inherit; + max-width: inherit; - .infobox { - clear:both; + .infobox { + clear:both; - img { - float: left; - max-width: 10em; - } - } - - } + img { + float: left; + max-width: 10em; + } + } + } #categories { font-size: 90%; @@ -584,13 +644,17 @@ tr { display: none; } - #search_url { - display: none; - } + #search_url { + display: none; + } .result { border-top: 1px solid @color-result-top-border; - margin: 7px 0 6px 0; + margin: 8px 0 8px 0; + + .thumbnail { + max-width: 98%; + } } .image_result { -- cgit v1.2.3