diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3819313 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.swp +*.swo diff --git a/indexer.py b/indexer.py index c6dd5dd..c302593 100644 --- a/indexer.py +++ b/indexer.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 #/* vim:set ts=2 set noexpandtab */ -from flask import Flask, render_template, url_for +from flask import Flask, render_template, url_for, request app = Flask(__name__) @app.route("/") @@ -15,5 +15,9 @@ def categorys(): def create(): return render_template("create.html") +@app.route("/search", methods=['GET']) +def search(): + return render_template("result.html", results=request.args.get("q", "")) + if __name__ == "__main__": app.run(debug=True) diff --git a/static/css/search.css b/static/css/search.css new file mode 100644 index 0000000..befb597 --- /dev/null +++ b/static/css/search.css @@ -0,0 +1,10 @@ +.logo { + max-width: 40%; + margin-bottom: 20px; +} + +.search-box { + width: 80%; + margin-left: auto; + margin-right: auto; +} diff --git a/static/css/style.css b/static/css/style.css index 9d566de..2c3df37 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -110,7 +110,7 @@ body { */ .cover { - padding: 0 20px; + padding: 20px; } .cover .btn-lg { padding: 10px 20px; @@ -135,7 +135,7 @@ body { @media (min-width: 768px) { /* Pull out the header and footer */ .masthead { - position: fixed; + /*position: fixed;*/ top: 0; } .mastfoot { @@ -144,7 +144,7 @@ body { } /* Start the vertical centering */ .site-wrapper-inner { - vertical-align: middle; + /*vertical-align: middle;*/ } /* Handle the widths */ .masthead, diff --git a/static/images/Pirates.svg b/static/images/Pirates.svg new file mode 100644 index 0000000..4f39b1b --- /dev/null +++ b/static/images/Pirates.svg @@ -0,0 +1,120 @@ + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 679961e..c456606 100644 --- a/templates/index.html +++ b/templates/index.html @@ -40,7 +40,7 @@ vim: ts=2 noexpandtab -
{{results}}
+{% endblock content%} diff --git a/templates/search.html b/templates/search.html index aceaf6d..2ad9088 100644 --- a/templates/search.html +++ b/templates/search.html @@ -5,5 +5,22 @@ vim: ts=2 noexpandtab {% block title %}{{ super() }} - Search{% endblock%} {% set active_page = "search" %} {% block content %} -SEARCH
+ + +