rascunho

commit 3d9327547b9f3c54f32bbc2f8e5c150cb4d722a3

Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>

Display the first annotation

 core/blueprints/basic.py | 3 ++-
 core/static/rascunho.css | 27 +++++++++++++++++++++++++++
 core/templates/index.html | 8 ++++----


diff --git a/core/blueprints/basic.py b/core/blueprints/basic.py
index 047bac8980426225cb81b7ecffbefe8f27da8aa4..e9302a3447f7ca39f872ae3f08c2eef690b28511 100644
--- a/core/blueprints/basic.py
+++ b/core/blueprints/basic.py
@@ -8,7 +8,8 @@
 @basic.route("/", methods = ['GET', 'POST'])
 def index():
     if request.method == "GET":
-        return render_template('index.html')
+        doc = Document.query.first()
+        return render_template('index.html', doc = doc)
     else:
         return create(request.form)
 




diff --git a/core/static/rascunho.css b/core/static/rascunho.css
index cfff2cc71b9ad04bdea904f4cf3ab9a1daeaf352..3a10fce2e891353444449d0b869c99881edaa9ff 100644
--- a/core/static/rascunho.css
+++ b/core/static/rascunho.css
@@ -15,3 +15,30 @@
 .text-muted {
     color: #ccc;
 }
+
+.public-box > textarea {
+    width: 100%;
+    border: 0;
+    resize: none;
+}
+
+button {
+    background-color: #444;
+    border-color: transparent;
+    border-width: 1px;
+    color: white;
+    cursor: pointer;
+    justify-content: center;
+    padding-bottom: calc(0.5em - 1px);
+    padding-left: 1em;
+    padding-right: 1em;
+    padding-top: calc(0.5em - 1px);
+    text-align: center;
+    white-space: nowrap
+}
+
+button:hover {
+    background-color: #3e3e3e;
+    border-color: transparent;
+    color: #fff;
+}




diff --git a/core/templates/index.html b/core/templates/index.html
index 3239468672ecd0fbd8eb26353199ced1a4f952bc..58f7a3d1d3ccc6a082e675d35ecbbdf7ca6ddf54 100644
--- a/core/templates/index.html
+++ b/core/templates/index.html
@@ -3,14 +3,14 @@
 {% block body %}
 	<div class="row">
 		<div class="col-xs">
-			<h1> Yo :) </h1>
+			{{ doc.content | md | safe }}
 		</div>
 	</div>
 
-	<div class="row">
+	<div class="row box">
 		<div class="col-xs">
-			<form method="POST" action="/">
-				<textarea name="text" cols="72" rows="30"></textarea>
+			<form method="POST" action="/" class="public-box">
+				<textarea name="text" cols="72" rows="30" placeholder="Escreva aqui"></textarea>
 				<br />
 				<button type="submit">Enviar</button>
 			</form>