Repository: marcoplaisier/QuotePad

Issue:
Homepage
Create a basic homepage with:
- button to create new text
- some simple explanation text
- link to another page to view the texts

Discussion:

Patch:
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..e29ccdf
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,12 @@
+language: python
+matrix:
+  include:
+    - python: 3.6
+    - python: 3.7
+      dist: xenial
+      sudo: true
+install:
+- pip install -r requirements/test.txt
+- pip install -e .
+script:
+- pytest
diff --git a/app.py b/app.py
index 4b059ec..e9302f5 100644
--- a/app.py
+++ b/app.py
@@ -1,11 +1,21 @@
-from flask import Flask
+from flask import Flask, render_template
 
 app = Flask(__name__)
 
 
 @app.route('/')
-def hello_world():
-    return 'Hello World!'
+def homepage():
+    return render_template("homepage.html")
+
+
+@app.route('/create')
+def create():
+    return render_template("create.html")
+
+
+@app.route('/index')
+def index():
+    return render_template("index.html")
 
 
 if __name__ == '__main__':
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..75002ff
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="UTF-8">
+        <title>Setting your texts alight - Quotepad</title>
+    </head>
+
+    <body>
+    {% block content %}{% endblock %}
+    </body>
+</html>
\ No newline at end of file
diff --git a/templates/create.html b/templates/create.html
new file mode 100644
index 0000000..3df7d9b
--- /dev/null
+++ b/templates/create.html
@@ -0,0 +1,5 @@
+{% extends "base.html" %}
+
+{% block content %}
+<p>Create a new template placeholder</p>
+{% endblock %}
\ No newline at end of file
diff --git a/templates/homepage.html b/templates/homepage.html
new file mode 100644
index 0000000..ab84e68
--- /dev/null
+++ b/templates/homepage.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+
+{% block content %}
+<p>Create, update and send your texts to your display</p>
+<ul>
+    <li><a id="new_text" href="{{ url_for("create") }}">New text</a></li>
+    <li><a id="overview" href="{{ url_for("index") }}">Existing texts</a></li>
+</ul>
+<p>Click on the links above to create a new text or see a list of existing texts.</p>
+{% endblock %}
\ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..cddbe83
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,5 @@
+{% extends "base.html" %}
+
+{% block content %}
+<p>All texts placeholder</p>
+{% endblock %}
\ No newline at end of file


Test patch:
diff --git a/requirements/test.txt b/requirements/test.txt
index 8c3c0cc..b8ca54f 100644
--- a/requirements/test.txt
+++ b/requirements/test.txt
@@ -1,6 +1,5 @@
 -r common.txt
 pytest
-behave
 bump
 twine
 setuptools
diff --git a/tests/test_flask.py b/tests/test_flask.py
index bc3a15e..9ade764 100644
--- a/tests/test_flask.py
+++ b/tests/test_flask.py
@@ -10,4 +10,4 @@ def client():
 
 def test_simple(client):
     t = client.get('/')
-    assert b'Hello' in t.data
+    assert b'Setting your texts alight - Quotepad' in t.data