From: Perfectfire33 Date: Fri, 8 Jul 2022 20:24:51 +0000 (-0400) Subject: Updated color scheme & delete blog post X-Git-Url: http://openhouseparty.us:13001/gitweb/?a=commitdiff_plain;h=1e6847569caa0bd68b983aadb33d2a42d5bc2f9b;p=openhouseparty.online%2F.git Updated color scheme & delete blog post --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 1beee8f..f078ad8 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,12 +2,12 @@ - + - - - - + + + + @@ -258,12 +252,6 @@ - - - - - - @@ -372,6 +360,25 @@ + + + + + + + + + + + + + + + + + + + @@ -647,13 +654,6 @@ - - - - - - - @@ -661,13 +661,6 @@ - - - - - - - @@ -675,85 +668,96 @@ - + - - + + - + - + - - + + + + + + + + + - - - - - + + - + - - + + - + - + - - + + - + - - + + - + - - - - - + + - - + + - + - + + + + - + - - + + + + + + + + + diff --git a/flaskr/__pycache__/blog.cpython-37.pyc b/flaskr/__pycache__/blog.cpython-37.pyc index 497995c..2501818 100644 Binary files a/flaskr/__pycache__/blog.cpython-37.pyc and b/flaskr/__pycache__/blog.cpython-37.pyc differ diff --git a/flaskr/blog.py b/flaskr/blog.py index a5997cd..1759e5a 100644 --- a/flaskr/blog.py +++ b/flaskr/blog.py @@ -79,7 +79,7 @@ def create(): def get_post(id, check_author=True): post = get_db().execute( - 'SELECT p.post_id, post_title, post_body, post_created, post_author_id, xuser_username' + 'SELECT p.post_id, post_title, post_body, post_created, post_images, post_author_id, xuser_username' ' FROM post p JOIN xuser u ON p.post_author_id = u.xuser_id' ' WHERE p.post_id = ?', (id,) @@ -145,7 +145,15 @@ def update(id): @bp.route('//delete', methods=('POST',)) @login_required def delete(id): - get_post(id) + post = get_post(id) + + dirname = os.path.dirname(__file__) + upload_folder = os.path.join(dirname, 'upload') + file_to_delete = os.path.join(upload_folder, post['post_images']) + os.remove(file_to_delete) + + + db = get_db() db.execute('DELETE FROM post WHERE post_id = ?', (id,)) db.commit() diff --git a/flaskr/static/breaking_the_law.png b/flaskr/static/breaking_the_law.png new file mode 100644 index 0000000..07da86d Binary files /dev/null and b/flaskr/static/breaking_the_law.png differ diff --git a/flaskr/static/microhouse.png b/flaskr/static/microhouse.png new file mode 100644 index 0000000..0b1b312 Binary files /dev/null and b/flaskr/static/microhouse.png differ diff --git a/flaskr/static/style.css b/flaskr/static/style.css index caee809..49ac48d 100644 --- a/flaskr/static/style.css +++ b/flaskr/static/style.css @@ -1,10 +1,14 @@ html { font-family: sans-serif; background: #eee; padding: 1rem; } /* body { max-width: 960px; margin: 0 auto; background: white; } */ body { max-width: 90%; margin: 0 auto; } -h1 { font-family: serif; color: #377ba8; margin: 1rem 0; } -a { color: #377ba8; } +/* h1 { font-family: serif; color: #377ba8; margin: 1rem 0; } */ +h1 { font-family: serif; color: black; margin: 1rem 0; } +/* a { color: #377ba8; } */ +a { color: black; } hr { border: none; border-top: 1px solid lightgray; } -nav { background: lightgray; display: flex; align-items: center; padding: 0 0.5rem; } +/* nav { background: lightgray; display: flex; align-items: center; padding: 0 0.5rem; } */ +nav { background: white; display: flex; align-items: center; padding: 0 0.5rem; } + nav h1 { flex: auto; margin: 0; } nav h1 a { text-decoration: none; padding: 0.25rem 0.5rem; } nav ul { display: flex; list-style: none; margin: 0; padding: 0; } @@ -13,6 +17,7 @@ nav ul li a, nav ul li span, header .action { display: block; padding: 0.5rem; } .content > header { border-bottom: 1px solid lightgray; display: flex; align-items: flex-end; } .content > header h1 { flex: auto; margin: 1rem 0 0.25rem 0; } .flash { margin: 1em 0; padding: 1em; background: #cae6f6; border: 1px solid #377ba8; } +.post { width: 50%; margin-left: 25%;} .post > header { display: flex; align-items: flex-end; font-size: 0.85em; } .post > header > div:first-of-type { flex: auto; } .post > header h1 { font-size: 1.5em; margin-bottom: 0; } @@ -27,7 +32,8 @@ input.danger { color: #cc2f2e; } input[type=submit] { align-self: start; min-width: 10em; } .bottom { background: lightyellow; display: flex; align-items: center; padding: 0 0.5rem; } -p2 {background-color: black; color: orange; font-size: 30px; } +p2 {background-color: none; color: black; font-size: 25px; margin-left: 35%; } +p3 {background-color: none; color: black; font-size: 25px; margin-left: 20%; } .center { display: block; diff --git a/flaskr/templates/base.html b/flaskr/templates/base.html index 8a9304f..f175a6f 100644 --- a/flaskr/templates/base.html +++ b/flaskr/templates/base.html @@ -18,6 +18,7 @@ } li a:hover { background-color: #111; + color: white; } diff --git a/flaskr/templates/home.html b/flaskr/templates/home.html index 57933f3..3fcf85e 100644 --- a/flaskr/templates/home.html +++ b/flaskr/templates/home.html @@ -3,15 +3,18 @@

{% block title %}Home{% endblock %}

{% endblock %} {% block content %} + + Create Your Dream Home! + +
+ + Empowering people to create their dream home with the OpenHouseParty! kit. + +
+
- - Create Your Dream Home! -
-
- Empowering people to create their dream home with the OpenHouseParty! kit. -
-
+
@@ -25,6 +28,7 @@

+
diff --git a/flaskr/upload/breaking_the_law.png b/flaskr/upload/breaking_the_law.png new file mode 100644 index 0000000..07da86d Binary files /dev/null and b/flaskr/upload/breaking_the_law.png differ diff --git a/flaskr/upload/microhouse.png b/flaskr/upload/microhouse.png new file mode 100644 index 0000000..0b1b312 Binary files /dev/null and b/flaskr/upload/microhouse.png differ diff --git a/flaskr/upload/testImage.png b/flaskr/upload/testImage.png deleted file mode 100644 index 0273221..0000000 Binary files a/flaskr/upload/testImage.png and /dev/null differ diff --git a/instance/flaskr.sqlite b/instance/flaskr.sqlite index 58470c6..e39bbdb 100644 Binary files a/instance/flaskr.sqlite and b/instance/flaskr.sqlite differ