diff --git a/lincoln/templates/base.html b/lincoln/templates/base.html
index 3fc6c99..a73fee2 100644
--- a/lincoln/templates/base.html
+++ b/lincoln/templates/base.html
@@ -24,6 +24,16 @@
+
+
@@ -40,10 +50,14 @@
Lincoln
diff --git a/lincoln/templates/search_results.html b/lincoln/templates/search_results.html
new file mode 100644
index 0000000..291a584
--- /dev/null
+++ b/lincoln/templates/search_results.html
@@ -0,0 +1,11 @@
+{% set title = "Search results" %}
+{% set page = "search_results" %}
+{% extends "base.html" %}
+{% block content %}
+ Search results
+ Blocks
+{% include "blocks_table.html" %}
+ Transactions
+{% include "transaction_table.html" %}
+{% endblock %}
+
diff --git a/lincoln/views.py b/lincoln/views.py
index c1d37a4..d200ecf 100644
--- a/lincoln/views.py
+++ b/lincoln/views.py
@@ -52,3 +52,14 @@ def favicon():
return send_from_directory(
os.path.join(root, 'static'),
'favicon.ico', mimetype='image/vnd.microsoft.icon')
+
+@main.route('/search/')
+def search(query):
+ blob = core.lx(query)
+
+ # Query for items
+ blocks = m.Block.query.filter(m.Block.hash.like(blob)).limit(10)
+ transactions = m.Transaction.query.filter(m.Transaction.txid.like(blob)).limit(10)
+ return render_template('search_results.html',
+ blocks=blocks,
+ transactions=transactions)