diff --git a/bitshift/languages.py b/bitshift/languages.py index 36d7f63..21492ac 100644 --- a/bitshift/languages.py +++ b/bitshift/languages.py @@ -2,4 +2,4 @@ import json from os import path with open(path.join(path.dirname(__file__), "languages.json")) as lang_json: - LANGS = [lang for lang in json.load(lang_json)["languages"]] + LANGS = [str(lang) for lang in json.load(lang_json)["languages"]] diff --git a/static/js/index.advanced-search-form.js b/static/js/index.advanced-search-form.js index 0746b9a..9209a95 100644 --- a/static/js/index.advanced-search-form.js +++ b/static/js/index.advanced-search-form.js @@ -37,6 +37,8 @@ var searchGroups = $("div#search-groups"); searchGroups.append( searchGroup.append(createSearchGroupInput("language"))); $("div#sidebar input[type=checkbox]#language").prop("checked", true); + + searchGroups[0].scrollTop = searchGroups[0].scrollHeight; }); // Remove the currently selected group if it's not the only one, and mark @@ -82,6 +84,7 @@ var searchGroups = $("div#search-groups"); else $(this).prop("checked", true); } + searchGroups[0].scrollTop = searchGroups[0].scrollHeight; }); var previousAdvancedQuery = ""; @@ -129,7 +132,8 @@ function assembleQuery(){ groupQuery.push(genFieldQueryString( inputFields[field], regexCheckbox[field].checked)); - groupQueries.push(groupQuery.join(" AND ")); + if(groupQuery.length > 0) + groupQueries.push(groupQuery.join(" AND ")); } return groupQueries.join(" OR "); diff --git a/static/js/index.js b/static/js/index.js index 351a9b5..7012c40 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -302,3 +302,5 @@ function loadMoreResults(){ result * 20); } } + +loadMoreResults(); diff --git a/static/sass/index.sass b/static/sass/index.sass index 6ad28b1..730f020 100644 --- a/static/sass/index.sass +++ b/static/sass/index.sass @@ -236,7 +236,7 @@ div#advanced-search #search-groups margin-top: 1% - max-height: 93% + max-height: 87% overflow-y: auto width: 75% @@ -325,16 +325,20 @@ div#display-info #site text-transform: capitalize + + td#code width: $codeWidth height: inherit + padding: 0px + @include vendor(transition, width 0.2s ease-in-out) - .display-all & - width: 500px + // .display-all & + // width: 500px #tablecontainer - overflow: scroll + overflow: hidden width: 100% height: inherit background-color: #49483e @@ -344,9 +348,17 @@ td#code table table-layout:fixed border-collapse: collapse - border: none font-family: monospace + .linenos + padding-left: 1% + + pre + margin-top: 5px + + .code pre + margin-top: 5px + div#hidden-info width: $hiddenInfoWidth margin-left: -$hiddenInfoWidth - 10px diff --git a/templates/index.html b/templates/index.html index 4bd72ea..6b07c9d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -18,7 +18,7 @@ = endblock = block body -
+
bit