diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96403d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__/* diff --git a/__pycache__/blog.cpython-36.pyc b/__pycache__/blog.cpython-36.pyc index 7ac76ec..8668e71 100644 Binary files a/__pycache__/blog.cpython-36.pyc and b/__pycache__/blog.cpython-36.pyc differ diff --git a/__pycache__/config.cpython-36.pyc b/__pycache__/config.cpython-36.pyc index 0ee9a30..dd63554 100644 Binary files a/__pycache__/config.cpython-36.pyc and b/__pycache__/config.cpython-36.pyc differ diff --git a/app/__pycache__/__init__.cpython-36.pyc b/app/__pycache__/__init__.cpython-36.pyc index 55d6087..1a6b9bf 100644 Binary files a/app/__pycache__/__init__.cpython-36.pyc and b/app/__pycache__/__init__.cpython-36.pyc differ diff --git a/app/__pycache__/auth.cpython-36.pyc b/app/__pycache__/auth.cpython-36.pyc index e37ab17..c794644 100644 Binary files a/app/__pycache__/auth.cpython-36.pyc and b/app/__pycache__/auth.cpython-36.pyc differ diff --git a/app/__pycache__/models.cpython-36.pyc b/app/__pycache__/models.cpython-36.pyc index 0aca102..e1f3b09 100644 Binary files a/app/__pycache__/models.cpython-36.pyc and b/app/__pycache__/models.cpython-36.pyc differ diff --git a/app/__pycache__/routes.cpython-36.pyc b/app/__pycache__/routes.cpython-36.pyc index 0522e51..981b8e4 100644 Binary files a/app/__pycache__/routes.cpython-36.pyc and b/app/__pycache__/routes.cpython-36.pyc differ diff --git a/app/auth.py b/app/auth.py index 7bf422e..2ef9338 100644 --- a/app/auth.py +++ b/app/auth.py @@ -6,7 +6,7 @@ bp = Blueprint('auth', __name__, url_prefix='/auth') -@bp.route('/register', methods=['POST', 'GET']) +@bp.route('/register', methods=['GET', 'POST']) def register(): if request.method == 'POST': username = request.form['username'] diff --git a/app/static/css/style.css b/app/static/css/style.css new file mode 100644 index 0000000..15fbf3a --- /dev/null +++ b/app/static/css/style.css @@ -0,0 +1,18 @@ +footer .container { + margin-top: 100px; +} + +.login { + padding: 10px 20px; + width: 40%; + margin: 30px auto; +} + +.login img { + display: block; + margin: auto; +} + +.login li { + color: red; +} diff --git a/app/static/images/feather.png b/app/static/images/feather.png new file mode 100644 index 0000000..60ce9a1 Binary files /dev/null and b/app/static/images/feather.png differ diff --git a/app/templates/auth/login.html b/app/templates/auth/login.html index e03fbff..e8afdff 100644 --- a/app/templates/auth/login.html +++ b/app/templates/auth/login.html @@ -1,17 +1,33 @@ -{%with messages = get_flashed_messages()%} - {%if messages%} - {%for message in messages%} -
{{ post.body }}
-Edit -{{ post.body }}
+ Edit +{% endblock %} diff --git a/app/templates/edit.html b/app/templates/edit.html index 24c7b46..18ad88f 100644 --- a/app/templates/edit.html +++ b/app/templates/edit.html @@ -1,8 +1,5 @@ - +{% extends "new.html" %} + +{% block title %}{{ post.title }}{% endblock %} +{% block post_title%}{{ post.title }}{% endblock %} +{% block post_body%}{{ post.body }}{% endblock %} diff --git a/app/templates/index.html b/app/templates/index.html index 4ca32ad..30fbe58 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -1,10 +1,15 @@ -New post -{% if posts %} -