From 80b9894ca5c73dfe700b82f435f8ae9f9f7746d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fukan=20=C3=9Crker?= Date: Wed, 6 Dec 2023 19:14:44 +0300 Subject: [PATCH 1/5] Navbar styling fixes for long usernames fixed #24 --- static/css/navbar.css | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/static/css/navbar.css b/static/css/navbar.css index cce99d8b..3539bf38 100644 --- a/static/css/navbar.css +++ b/static/css/navbar.css @@ -2,7 +2,7 @@ align-items: center; display: flex; width: 100%; - justify-content: space-between; + justify-content: space-around; padding-top: 1rem; user-select: none; } @@ -38,7 +38,6 @@ text-align: center; display: inline-block; height: fit-content; - } .profileText { @@ -85,12 +84,13 @@ margin-left: 5rem; } -@media screen and (max-width: 968px) { +@media screen and (max-width: 1068px) { .btnHome { margin: 0 1rem 0 0; } - .btns, .searchBar { + .btns, + .searchBar { display: none; } @@ -101,15 +101,15 @@ .searchBarPage { display: block; } - } -@media (min-width:968px) and (max-width:1280px) { - .btnHome, .btns { +@media (min-width: 1068px) and (max-width: 1600px) { + .btnHome, + .btns { margin-right: 2rem; } .btnHome { margin-left: 1rem; } -} \ No newline at end of file +} From 987d3d88179a128a3501064d85f2a6e94ab01dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fukan=20=C3=9Crker?= Date: Thu, 14 Dec 2023 19:42:38 +0300 Subject: [PATCH 2/5] A bug fixed when adding photo to post with post editing #28 --- routes/editPost.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/routes/editPost.py b/routes/editPost.py index eebd6289..927272ee 100644 --- a/routes/editPost.py +++ b/routes/editPost.py @@ -56,13 +56,16 @@ def editPost(postID): connection = sqlite3.connect("db/posts.db") cursor = connection.cursor() cursor.execute( - f'update posts set title = "{postTitle}" where id = {post[0]}' + """update posts set title = ? where id = ? """, + (postTitle, post[0]), ) cursor.execute( - f'update posts set tags = "{postTags}" where id = {post[0]}' + """update posts set tags = ? where id = ? """, + (postTags, post[0]), ) cursor.execute( - f'update posts set content = "{postContent}" where id = {post[0]}' + """update posts set content = ? where id = ? """, + (postContent, post[0]), ) cursor.execute( f'update posts set lastEditDate = "{currentDate()}" where id = {post[0]}' From f70aae4fb98281176c79993b81b078240623baec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fukan=20=C3=9Crker?= Date: Thu, 14 Dec 2023 19:43:12 +0300 Subject: [PATCH 3/5] #29 fixed --- helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers.py b/helpers.py index 179218e0..86056f38 100644 --- a/helpers.py +++ b/helpers.py @@ -51,7 +51,7 @@ def message(color, message): f"\033[95m {currentTime(True)}]\033[0m" f"\033[9{color}m {message}\033[0m\n" ) - logFile = open("log.log", "a") + logFile = open("log.log", "a", encoding="utf-8") logFile.write(f"[{currentDate()}" f"|{currentTime(True)}]" f" {message}\n") logFile.close() From c9bc5c0bfa2dd5dce979bc927955623d2f4ea8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fukan=20=C3=9Crker?= Date: Thu, 14 Dec 2023 19:49:22 +0300 Subject: [PATCH 4/5] Image in posts width size fixes --- static/css/post.css | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/static/css/post.css b/static/css/post.css index 610f68b9..30c805d0 100644 --- a/static/css/post.css +++ b/static/css/post.css @@ -5,6 +5,10 @@ margin-top: 1.5rem; } +.post p img { + max-width: 100%; +} + .post h1 { text-align: center; } @@ -101,13 +105,13 @@ small { text-align: right; } - @media screen and (max-width: 600px) { - .comments, .comments small { + .comments, + .comments small { max-width: 100% !important; } .navbar * { width: 100%; } -} \ No newline at end of file +} From 98a325291998e253efcde4b6f0f007eda593c49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fukan=20=C3=9Crker?= Date: Thu, 14 Dec 2023 19:50:17 +0300 Subject: [PATCH 5/5] comment box overflow fixed on mobile screens --- static/css/post.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/css/post.css b/static/css/post.css index 30c805d0..9fa1d72f 100644 --- a/static/css/post.css +++ b/static/css/post.css @@ -111,6 +111,10 @@ small { max-width: 100% !important; } + .commentForm textarea { + width: 100%; + } + .navbar * { width: 100%; }