diff --git a/static/font/Inconsolata.otf b/static/font/Inconsolata.otf
new file mode 100755
index 0000000..e7e1fa0
Binary files /dev/null and b/static/font/Inconsolata.otf differ
diff --git a/static/js/index.js b/static/js/index.js
index 7ef8da5..4b22d11 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -8,6 +8,8 @@ searchBar = $("form#search-bar input[type='text']")[0];
resultsDiv = $("div#results")[0];
var typingTimer, lastValue;
+//Obtained by parsing python file with pygments
+var codeExample = '
"""\nModule to contain all the project's Flask server plumbing.\n"""\n\nfrom flask import Flask\nfrom flask import render_template, session\n\nfrom bitshift import assets\n# from bitshift.database import Database\n# from bitshift.query import parse_query\n\napp = Flask(__name__)\napp.config.from_object("bitshift.config")\n\napp_env = app.jinja_env\napp_env.line_statement_prefix = "="\napp_env.globals.update(assets=assets)\n\n# database = Database()\n\n@app.route("/")\ndef index():\n return render_template("index.html")\n\n@app.route("/search/<query>")\ndef search(query):\n # tree = parse_query(query)\n # database.search(tree)\n pass\n\n@app.route("/about")\ndef about():\n return render_template("about.html")\n\n@app.route("/developers")\ndef developers():\n return render_template("developers.html")\n\nif __name__ == "__main__":\n app.run(debug=True)\n
\n'
searchBar.onkeyup = typingTimer;
// Enable infinite scrolling down the results page.
@@ -102,11 +104,8 @@ function queryServer(){
for(var result = 0; result < 20; result++){
var newDiv = document.createElement("div");
newDiv.classList.add("result");
- newDiv.innerHTML = Math.random();
- newDiv.style.textAlign = "center";
- newDiv.style.color = "#" + Math.floor(Math.random() *
- 16777215).toString(16);
- resultDivs.push(newDiv)
+ newDiv.innerHTML = codeExample;
+ resultDivs.push(newDiv);
}
return resultDivs;
diff --git a/static/sass/index.sass b/static/sass/index.sass
index ac49eb4..97cf6da 100644
--- a/static/sass/index.sass
+++ b/static/sass/index.sass
@@ -5,6 +5,10 @@
@import mixins
@import variables
+@font-face
+ font-family: "Inconsolata"
+ src: url("../../Inconsolata.otf") format("opentype")
+
div#search-field
@extend .t2
@@ -46,6 +50,7 @@ div#search-field
width: 100%
div#advanced-search
+ display: none
background-color: white
border: 1px solid $baseColor2
margin: 0px
@@ -98,7 +103,8 @@ div#results
width: 80%
div.result
- background-color: #F8F8F8
+ background-color: none
+ font-family: Arial, "Inconsolata"
margin-bottom: 10%
margin-top: 1%
padding: 1%
diff --git a/templates/index.html b/templates/index.html
index edef6a0..aa95add 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -6,11 +6,12 @@
= block head
{{ assets.tag("index.css") }}
+ {{ assets.tag("highlight.css") }}
{{ assets.tag("jquery.min.js") }}
= endblock
= block body
-