diff --git a/learning_journal/routes.py b/learning_journal/routes.py
index 9e890bf..101c2e4 100644
--- a/learning_journal/routes.py
+++ b/learning_journal/routes.py
@@ -7,3 +7,5 @@ def includeme(config):
config.add_route("update", "/journal/{id:\d+}/edit-entry")
config.add_route("login", "/login")
config.add_route("logout", "/logout")
+ config.add_route("delete", "/delete/{id:\d+}")
+ config.add_route("tweet", "/tweet/{id:\d+}")
diff --git a/learning_journal/static/app.js b/learning_journal/static/app.js
new file mode 100644
index 0000000..4920d9c
--- /dev/null
+++ b/learning_journal/static/app.js
@@ -0,0 +1,25 @@
+$(document).ready(function(){
+ $("#homeSubmitButton").on("click", function(e){
+ e.preventDefault()
+ entry = $(this).parent().serializeArray()
+ $.ajax({
+ method: 'POST',
+ url: '/journal/new-entry',
+ data: {
+ "csrf_token": entry[0]["value"],
+ "title": entry[1]["value"],
+ "body": entry[2]["value"]
+ },
+ success: function(result){
+ new_id = parseInt($(".entryListItem a").first().attr('href').split('/')[4]) + 1
+ $(".entryListItem").first().prepend(
+ "
" +
+ "" +
+ "Created " + Date.now() + "
" +
+ "
" +
+ ""
+ )
+ }
+ });
+ });
+});
diff --git a/learning_journal/static/assets/awesome.png b/learning_journal/static/assets/awesome.png
new file mode 100644
index 0000000..5dd9a9e
Binary files /dev/null and b/learning_journal/static/assets/awesome.png differ
diff --git a/learning_journal/static/base.css b/learning_journal/static/base.css
index 7ac7a6e..ee17947 100644
--- a/learning_journal/static/base.css
+++ b/learning_journal/static/base.css
@@ -17,3 +17,8 @@ h2{
h3{
font-size:1.25em;
}
+
+body, main{
+ margin: 0px;
+ width: 100%;
+}
\ No newline at end of file
diff --git a/learning_journal/static/layout.css b/learning_journal/static/layout.css
index 34df568..57816a2 100644
--- a/learning_journal/static/layout.css
+++ b/learning_journal/static/layout.css
@@ -8,11 +8,28 @@ header a{
font-family: Share Tech Mono;
color: white;
line-height: 40px;
- padding-left: 8px;
+ margin-left: 12px;
+}
+
+header a:hover {
+ border-bottom: 2px solid white;
}
main {
width: 90%;
height: 100%;
margin: auto;
+}
+
+.entryEditList li{
+ display: inline;
+ margin-left: 12px;
+}
+
+.entryEditList a{
+ color: black;
+}
+
+.entryEditList a:hover{
+ border-bottom: 2px solid black;
}
\ No newline at end of file
diff --git a/learning_journal/static/module.css b/learning_journal/static/module.css
index f01d472..da39266 100644
--- a/learning_journal/static/module.css
+++ b/learning_journal/static/module.css
@@ -6,6 +6,12 @@
background-color: lightgrey;
}
+#entryListWrapper ul{
+ list-style: none;
+ margin: 0px;
+ padding-left: 2px;
+}
+
#entryDisplayWrapper{
width: 80%;
margin: auto;
@@ -69,4 +75,11 @@ form #submitButton{
#pageTitle{
text-align: center;
+}
+
+header img {
+ float: right;
+ height: 100px;
+ width: 100px;
+ padding-right: 10px;
}
\ No newline at end of file
diff --git a/learning_journal/static/reset.css b/learning_journal/static/reset.css
deleted file mode 100644
index bba3cdf..0000000
--- a/learning_journal/static/reset.css
+++ /dev/null
@@ -1,48 +0,0 @@
-/* http://meyerweb.com/eric/tools/css/reset/
- v2.0 | 20110126
- License: none (public domain)
-*/
-
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, embed,
-figure, figcaption, footer, header, hgroup,
-menu, nav, output, ruby, section, summary,
-time, mark, audio, video {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- font: inherit;
-}
-/* HTML5 display-role reset for older browsers */
-article, aside, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section {
- display: block;
-}
-body {
- line-height: 1;
-}
-ol, ul {
- list-style: none;
-}
-blockquote, q {
- quotes: none;
-}
-blockquote:before, blockquote:after,
-q:before, q:after {
- content: '';
- content: none;
-}
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
-
diff --git a/learning_journal/templates/entry.jinja2 b/learning_journal/templates/entry.jinja2
index ea6eaa8..19efaf6 100644
--- a/learning_journal/templates/entry.jinja2
+++ b/learning_journal/templates/entry.jinja2
@@ -7,9 +7,14 @@
by Ted Callahan
- {{ entry.body|e }}
+ {{ entry.body|safe }}
{% if request.authenticated_userid %}
- EDIT
+
{% endif %}
+
{% endblock %}
diff --git a/learning_journal/templates/form.jinja2 b/learning_journal/templates/form.jinja2
index 16b322f..ccfc890 100644
--- a/learning_journal/templates/form.jinja2
+++ b/learning_journal/templates/form.jinja2
@@ -5,6 +5,7 @@