From 764398c27435df182dfee86626b7f67b208e2538 Mon Sep 17 00:00:00 2001 From: Severyn Kozak Date: Wed, 18 Jun 2014 11:41:36 -0400 Subject: [PATCH 1/3] Work on #74. Add docs route, partly-skeleton page. Add: templates/docs.html -Add a skeleton structure for the documentation page. -Add some content to certain sections. --- app.py | 4 ++++ templates/docs.html | 41 +++++++++++++++++++++++++++++++++++++++++ templates/layout.html | 1 + 3 files changed, 46 insertions(+) create mode 100644 templates/docs.html diff --git a/app.py b/app.py index 2772677..8192c07 100644 --- a/app.py +++ b/app.py @@ -55,6 +55,10 @@ def about(): def developers(): return render_template("developers.html") +@app.route("/docs") +def docs(): + return render_template("docs.html") + @app.errorhandler(404) def error404(error): return render_template("error404.html"), 404 diff --git a/templates/docs.html b/templates/docs.html new file mode 100644 index 0000000..70fd7f9 --- /dev/null +++ b/templates/docs.html @@ -0,0 +1,41 @@ += extends "layout.html" + += block title + docs += endblock + += block body +

Usage

+

+ bitshift is a search-engine optimized for source code: beyond supporting searches with the full range of ASCII + symbols, the engine understands code, allowing users to query for metadata, like time of creation/last + modification, programming language, and even symbols like function names and variables. Basic use boils down to + general and advanced searches. + +

general search

+

+ To perform a "general search," simply place your cursor in the search bar on our home page and begin typing; when + you stop typing for a short period of time, we'll automtically execute a query for you. As you scroll down the + results page, the front-end will query our server and seamlessly load more and more results. +

+ +

advanced search

+

+ General searches, though, are limited. To allow users to make the best of our engine, we created an advanced + search form that allows the creation of complex queries. + +

search fields

+

+

+ +

search groups

+

+

+

+ +

Handwritten Queries

+

+ +

Get involved

+

+= endblock diff --git a/templates/layout.html b/templates/layout.html index 6c6ab8d..d5db6ae 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -40,6 +40,7 @@ From 912c8e95912e5fde3126187b0656bb4d1946267b Mon Sep 17 00:00:00 2001 From: Severyn Kozak Date: Wed, 18 Jun 2014 12:54:25 -0400 Subject: [PATCH 2/3] Add content and styling to docs page. Add: templates/docs.html -Reorganize page structure into a nested-unordered-list tree, for the inherent indentation. -Add content to each section. static/sass/docs.sass -Add virtually all of the necessary styling for the docs page. --- static/sass/docs.sass | 39 +++++++++++++++ templates/docs.html | 135 +++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 145 insertions(+), 29 deletions(-) create mode 100644 static/sass/docs.sass diff --git a/static/sass/docs.sass b/static/sass/docs.sass new file mode 100644 index 0000000..a96cd57 --- /dev/null +++ b/static/sass/docs.sass @@ -0,0 +1,39 @@ +@import variables + +h1 + color: $baseColor1 + + span + color: $baseColor2 + +h2, h3 + color: $baseColor2 * 0.8 + +p + line-height: 1.8em + +ul + list-style: none + margin-bottom: 2% + + li + margin-bottom: 2% + +span + &#code + background-color: $baseColor3 * 1.2 + font-family: monospace + padding: 5px + + &#string + color: $baseColor1 + font-family: monospace + font-size: 1.1em + + &#title + color: $baseColor1 + font-weight: bold + +li#sec3 span#gasp + color: $baseColor2 * 0.8 + font-style: italic diff --git a/templates/docs.html b/templates/docs.html index 70fd7f9..9a319eb 100644 --- a/templates/docs.html +++ b/templates/docs.html @@ -4,38 +4,115 @@ docs = endblock += block head + {{ assets.tag("docs.css") }} += endblock + = block body -

Usage

-

- bitshift is a search-engine optimized for source code: beyond supporting searches with the full range of ASCII - symbols, the engine understands code, allowing users to query for metadata, like time of creation/last - modification, programming language, and even symbols like function names and variables. Basic use boils down to - general and advanced searches. - -

general search

-

- To perform a "general search," simply place your cursor in the search bar on our home page and begin typing; when - you stop typing for a short period of time, we'll automtically execute a query for you. As you scroll down the - results page, the front-end will query our server and seamlessly load more and more results. -

- -

advanced search

-

- General searches, though, are limited. To allow users to make the best of our engine, we created an advanced - search form that allows the creation of complex queries. - -

search fields

+ = endblock From 647eaf2a4ca51281c3ae15af7b2c98aa32e1c7d7 Mon Sep 17 00:00:00 2001 From: Severyn Kozak Date: Wed, 18 Jun 2014 13:05:21 -0400 Subject: [PATCH 3/3] Add _logo.sass, add logo to docs page. Add: static/sass/_logo.sass -The `bitshift` logo visible on our home-page may likely end up on other pages; move all of its styling to a SASS partial. templates/docs.html -Add `bitshift` logo. --- static/sass/_logo.sass | 18 ++++++++++++++++++ static/sass/docs.sass | 1 + static/sass/index.sass | 22 ++-------------------- templates/docs.html | 8 ++++++++ templates/index.html | 10 +++++----- 5 files changed, 34 insertions(+), 25 deletions(-) create mode 100644 static/sass/_logo.sass diff --git a/static/sass/_logo.sass b/static/sass/_logo.sass new file mode 100644 index 0000000..ea22411 --- /dev/null +++ b/static/sass/_logo.sass @@ -0,0 +1,18 @@ +a#logo + letter-spacing: 0.3em + text-decoration: none + + div#logo + font-size: 400% + padding-bottom: 0.2em + text-align: center + + #logo-bit + color: $baseColor1 + + #logo-angle + color: $baseColor3 + + #logo-shift + color: $baseColor2 + font-style: italic diff --git a/static/sass/docs.sass b/static/sass/docs.sass index a96cd57..6d23e32 100644 --- a/static/sass/docs.sass +++ b/static/sass/docs.sass @@ -1,4 +1,5 @@ @import variables +@import logo h1 color: $baseColor1 diff --git a/static/sass/index.sass b/static/sass/index.sass index 2c31167..550a8c6 100644 --- a/static/sass/index.sass +++ b/static/sass/index.sass @@ -4,6 +4,7 @@ @import mixins @import variables +@import logo $minSearchFieldsWidth: 490px $codeWidth: 700px @@ -84,25 +85,6 @@ div#search-field top: 0 width: 40% - a#title - letter-spacing: 0.3em - text-decoration: none - - div#title - font-size: 400% - padding-bottom: 0.2em - text-align: center - - #title-bit - color: $baseColor1 - - #title-angle - color: $baseColor3 - - #title-shift - color: $baseColor2 - font-style: italic - form#search-bar min-width: $minSearchFieldsWidth @@ -143,7 +125,7 @@ div#search-field position: absolute width: 100% - #title + #logo position: absolute top: -1% left: 1% diff --git a/templates/docs.html b/templates/docs.html index 9a319eb..0ac9bc5 100644 --- a/templates/docs.html +++ b/templates/docs.html @@ -9,6 +9,14 @@ = endblock = block body + +
  • » Usage

    diff --git a/templates/index.html b/templates/index.html index bdac619..62601fe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -19,11 +19,11 @@ = block body