diff --git a/static/css/adminPanel.css b/static/css/adminPanel.css deleted file mode 100644 index a8cfc647..00000000 --- a/static/css/adminPanel.css +++ /dev/null @@ -1,67 +0,0 @@ -a { - margin-left: 0rem !important; -} - -section p { - width: 50rem !important; -} - -.toPanel { - font-size: 1.5rem; - font-weight: bold; -} - -.deleteUserButton { - font-size: 1rem; -} - -.deleteUserButton, -.toPanel { - cursor: pointer; -} - -.userContainer { - display: block; - text-align: center; - border: 1px solid var(--primaryColor); - border-radius: 0.5rem; - width: fit-content; - padding: 1rem; - margin: 1rem auto 1rem auto; -} - -.userContainer .picture { - width: 2rem; - height: 2rem; -} - -.stats { - display: flex; - width: 22rem; - justify-content: space-between; -} - -.stats p, -.stats a { - text-align: left; - margin-left: 1rem; -} - -.toPanelsContainer { - text-align: center; - transform: translate(-50%, -50%); - position: absolute; - top: 50%; - left: 50%; - padding: 1rem; -} - -@media screen and (max-width: 600px) { - .userContainer { - width: 90%; - } - - .stats { - width: 100%; - } -} diff --git a/static/css/changeProfilePicture.css b/static/css/changeProfilePicture.css deleted file mode 100644 index af11a734..00000000 --- a/static/css/changeProfilePicture.css +++ /dev/null @@ -1,8 +0,0 @@ -p { - margin: 0.5rem; -} - -.seedForm { - width: fit-content; - margin: 1rem auto 0 auto; -} diff --git a/static/css/changeTheme.css b/static/css/changeTheme.css deleted file mode 100644 index 75712532..00000000 --- a/static/css/changeTheme.css +++ /dev/null @@ -1,19 +0,0 @@ -.changeThemeContainer { - position: relative; - user-select: none; -} - -.changeTheme { - font-size: 1rem; - position: absolute; - top: 0px; - right: 0px; - margin: 0; -} - -@media screen and (min-width: 968px) { - .changeTheme:hover { - font-size: 1.5rem; - } - -} \ No newline at end of file diff --git a/static/css/dashboard.css b/static/css/dashboard.css deleted file mode 100644 index 5a92d331..00000000 --- a/static/css/dashboard.css +++ /dev/null @@ -1,23 +0,0 @@ -button { - margin: 0 !important; -} - -section, -.info { - display: flex; - justify-content: space-between; -} - -.content { - -webkit-line-clamp: 2; -} - -.info p { - margin: 1rem 0 0 0; - font-size: 0.8rem; -} - -.userDashboardNoPost { - width: fit-content; - margin: 2rem auto 2rem auto; -} diff --git a/static/css/flash.css b/static/css/flash.css deleted file mode 100644 index a574ba75..00000000 --- a/static/css/flash.css +++ /dev/null @@ -1,45 +0,0 @@ -#flash { - text-align: center; - border-radius: 1rem; - padding: 0.5rem; - user-select: none; -} - -.error { - background-color: #ED1C24; -} - -.success { - background-color: #00A550; -} - -.flashContainer { - width: 10rem; - text-align: center; - transform: translate(-50%, -50%); - position: absolute; - top: 15%; - left: 50%; - -moz-animation: cssAnimation 0s ease-in 2.5s forwards; - -webkit-animation: cssAnimation 0s ease-in 2.5s forwards; - -o-animation: cssAnimation 0s ease-in 2.5s forwards; - animation: cssAnimation 0s ease-in 2.5s forwards; - -webkit-animation-fill-mode: forwards; - animation-fill-mode: forwards; -} - -@keyframes cssAnimation { - to { - width: 0; - height: 0; - overflow: hidden; - } -} - -@-webkit-keyframes cssAnimation { - to { - width: 0; - height: 0; - visibility: hidden; - } -} \ No newline at end of file diff --git a/static/css/general.css b/static/css/general.css deleted file mode 100644 index 35262a77..00000000 --- a/static/css/general.css +++ /dev/null @@ -1,140 +0,0 @@ -:root { - --themePrimary: #000; - --themeSecondary: #fff; - --themeHelper: #303030; - --primaryColor: #ff206e; - --primaryHelper: #FF4F8C; -} - -* { - font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - color: var(--themePrimary); -} - -html { - font-size: 125% !important; -} - -body { - background-color: var(--themeSecondary); -} - -a { - text-decoration: none; - user-select: none; -} - -*::-webkit-scrollbar { - width: 0.4rem; -} - -*::-webkit-scrollbar-thumb { - border-radius: 1rem; - background: var(--themePrimary); -} - -*::-webkit-scrollbar-track, -*::-webkit-scrollbar-button { - background: transparent; -} - -button { - background-color: transparent; - border: 0; -} - -.form { - height: fit-content; - width: fit-content; -} - -.input { - margin-bottom: 1rem; - border: 0px; - height: 2rem; - width: 14rem; - text-align: center; - display: block; - color: var(--themePrimary); - background-color: transparent; - font-size: 1rem; - border-bottom: 1px solid var(--themePrimary); - transition: 0.4s; - border-radius: 0.1rem; -} - -.centeredHorizontally { - margin-left: auto; - margin-right: auto; -} - -.input:focus { - outline: none; - border-color: var(--primaryColor); -} - -.btn { - height: fit-content; - width: fit-content; - border-radius: 2rem; - border: 0px; - transition: 0.25s; - font-weight: 500; - cursor: pointer; - font-size: 0.9rem; - text-align: center; - margin: 0rem 0.25rem; -} - -.btnPrimary { - padding: 0.5rem 1rem 0.5rem 1rem; - color: var(--themeSecondary); - background-color: var(--themePrimary); -} - -.btnLink { - background-color: transparent; -} - -.btnPrimary:hover { - background-color: var(--themeHelper); -} - -.btnLink:hover { - color: var(--themeHelper); -} - -.textPrimary { - color: var(--primaryColor); - transition: 0.25s; -} - -.textPrimary:hover { - color: var(--primaryHelper); -} - -.errorMessage, .formPost { - text-align: center; - margin-top: 6rem; -} - -.textCenter { - text-align: center; -} - -.goBackToAdmin { - position: absolute; - bottom: 0px; - left: 0px; - -} - -@media screen and (max-width: 600px) { - body { - max-width: 100% !important; - } - - .navbar * { - width: 100% !important; - } -} \ No newline at end of file diff --git a/static/css/index.css b/static/css/index.css deleted file mode 100644 index 77153cad..00000000 --- a/static/css/index.css +++ /dev/null @@ -1,24 +0,0 @@ -.post { - max-width: 35rem; - max-height: fit-content; - margin-top: 2rem; - border: 1px solid var(--themePrimary); - border-radius: 1rem; - padding: 1rem; -} - -.content { - display: -webkit-box; - overflow: hidden; - -webkit-line-clamp: 8; - -webkit-box-orient: vertical; - margin: 1rem 0rem; -} - -.content p { - display: inline; -} - -.title { - font-size: 1.5rem; -} \ No newline at end of file diff --git a/static/css/navbar.css b/static/css/navbar.css deleted file mode 100644 index 3539bf38..00000000 --- a/static/css/navbar.css +++ /dev/null @@ -1,115 +0,0 @@ -.navbar { - align-items: center; - display: flex; - width: 100%; - justify-content: space-around; - padding-top: 1rem; - user-select: none; -} - -.btns { - margin-right: 12rem; - order: 5; -} - -.btnHome { - margin-left: 12rem; - order: 1; - font-size: 2rem; - font-weight: 550; -} - -.fa-solid { - transition: 0.25s; - margin-left: 0.25rem; -} - -.fa-solid:hover { - color: var(--themeHelper); -} - -.profilePicture { - height: 1rem; - width: 1rem; - display: inline-block; -} - -.user { - text-align: center; - display: inline-block; - height: fit-content; -} - -.profileText { - margin: 0; - padding-left: 0; - color: var(--themeSecondary); -} - -#searchInput { - display: inline-block; - margin-right: 0.5rem; -} - -.hamburger { - position: relative; - display: none; - width: fit-content; -} - -.hamburgerContent { - display: none; - position: absolute; - background-color: var(--themeSecondary); - min-width: 160px; - box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); - z-index: 1; -} - -.hamburgerContent a { - color: var(--themePrimary); - padding: 12px 16px; - text-decoration: none; - display: block; -} - -.show { - display: block; -} - -.hamburgerBtn { - font-size: 1rem; - text-align: right; - width: fit-content !important; - margin-left: 5rem; -} - -@media screen and (max-width: 1068px) { - .btnHome { - margin: 0 1rem 0 0; - } - - .btns, - .searchBar { - display: none; - } - - .hamburger { - display: inline-block; - } - - .searchBarPage { - display: block; - } -} - -@media (min-width: 1068px) and (max-width: 1600px) { - .btnHome, - .btns { - margin-right: 2rem; - } - - .btnHome { - margin-left: 1rem; - } -} diff --git a/static/css/search.css b/static/css/search.css deleted file mode 100644 index ced05a35..00000000 --- a/static/css/search.css +++ /dev/null @@ -1,24 +0,0 @@ -h3, h2 { - margin-left: auto; - margin-right: auto; - width: fit-content; -} - -.post img { - width: 5rem; - height: 5rem; -} - -.userBox { - width: fit-content; - padding-bottom: 0.3rem; -} - -.container { - text-align: center; - transform: translate(-50%, -50%); - position: absolute; - top: 50%; - left: 50%; - padding: 1rem; -} \ No newline at end of file diff --git a/static/css/submit.css b/static/css/submit.css deleted file mode 100644 index 1c12a629..00000000 --- a/static/css/submit.css +++ /dev/null @@ -1,14 +0,0 @@ -.container { - text-align: center; - transform: translate(-50%, -50%); - position: absolute; - top: 50%; - left: 50%; - padding: 1rem; -} - -#passwordReset { - display: block; - font-size: 0.75rem; - margin-top: 0.5rem; -} \ No newline at end of file diff --git a/static/css/user.css b/static/css/user.css deleted file mode 100644 index 32e34dab..00000000 --- a/static/css/user.css +++ /dev/null @@ -1,108 +0,0 @@ -h1 { - width: 36rem; - margin: 1rem 0 0 0; -} - -h2 { - font-size: 2rem; -} - -.head img, h2 { - display: inline-block; -} - -.container { - display: flex; - flex-direction: column; - align-items: center; - padding-top: 2rem; -} - -.userProfilePicture { - height: 6rem; - width: 6rem; - border: 1px solid var(--primaryColor); - border-radius: 1rem; - padding: 1rem; -} - -.userName { - margin: 6rem 0 0 1rem; -} - -.head { - display: flex; - width: 20rem; - margin: 2rem 0 2rem 0; -} - - -.stats { - display: flex; - width: 22rem; - justify-content: space-between; -} - -.stats p, .stats a { - text-align: left; - margin-left: 1rem; -} - -.content { - -webkit-line-clamp: 4; -} - -.comment { - display: flex; - justify-content: space-between; -} - -.commentCreationDate { - margin-right: 1rem; -} - -@media screen and (max-width: 600px) { - .userName { - display: block; - font-size: 1.5rem; - margin-top: 0; - } - - .userProfilePicture { - display: block; - } - - .stats { - width: 100%; - margin: 0; - } - - .stats * { - margin: 0 0 0.5rem 0 !important; - - } - - .container { - display: block; - width: 100%; - } - - .userContainer { - padding: 1rem; - } - - .userProfilePicture { - height: 3rem; - width: 3rem; - } - - .head { - display: block; - text-align: center; - width: 100%; - } - - .postsText, .commentsText { - width: fit-content; - } -} \ No newline at end of file diff --git a/static/js/changeTheme.js b/static/js/changeTheme.js index a670bda1..7d175a0a 100644 --- a/static/js/changeTheme.js +++ b/static/js/changeTheme.js @@ -1,29 +1 @@ -var root = document.querySelector(":root"); -var changeTheme = document.querySelector(".changeTheme"); - -var theme; - -if (localStorage.getItem(theme) === "dark") { - toDark() -} -else if (localStorage.getItem(theme) === "light") { - toLight() -} - -function toLight() { - localStorage.setItem(theme, "light"); - root.style.setProperty("--themePrimary", "#000"); - root.style.setProperty("--themeSecondary", "#fff"); - root.style.setProperty("--themeHelper", "#303030"); - changeTheme.innerHTML = "🌞"; - changeTheme.setAttribute("onclick", "javascript: toDark();") -} - -function toDark() { - localStorage.setItem(theme, "dark"); - root.style.setProperty("--themePrimary", "#fff"); - root.style.setProperty("--themeSecondary", "#000"); - root.style.setProperty("--themeHelper", "#C6C6C6") - changeTheme.innerHTML = "🌚"; - changeTheme.setAttribute("onclick", "javascript: toLight();") -} +// 🚀 diff --git a/templates/404.html b/templates/404.html index 9b633bf5..32e46d1f 100644 --- a/templates/404.html +++ b/templates/404.html @@ -5,10 +5,10 @@ href="data:image/svg+xml,🔎" /> {% endblock head %} {%block body%} -
+

I don't know what is

-

{{ request.path }}

+

{{ request.path }}

sorry :(

-

home

+

home

{% endblock body %} diff --git a/templates/accountSettings.html b/templates/accountSettings.html index 432fd3de..eba0fd4f 100644 --- a/templates/accountSettings.html +++ b/templates/accountSettings.html @@ -1,26 +1,20 @@ {% extends 'layout.html'%} {%block head%} Account Settings - {% endblock head %} {%block body%} -
+

- change username + change username

- change password + change password

- change profile picture + change profile picture

-
diff --git a/templates/adminPanel.html b/templates/adminPanel.html index a72da51a..d59f18f4 100644 --- a/templates/adminPanel.html +++ b/templates/adminPanel.html @@ -1,19 +1,15 @@ {% extends 'layout.html'%} {%block head%} Admin Panel - {% endblock head %} {%block body%} -
+ diff --git a/templates/adminPanelComments.html b/templates/adminPanelComments.html index 5dfc1ff7..f7c38488 100644 --- a/templates/adminPanelComments.html +++ b/templates/adminPanelComments.html @@ -1,50 +1,34 @@ {% extends 'layout.html'%} {%block head%} Admin Panel --> Comments - - {% endblock head %} {%block body%} -

Comments

+

Comments

{% for comment in comments %} -
+

Post ID: - {{comment[1]}} + {{comment[1]}}

-
{{comment[2]}}
+
{{comment[2]}}
-
-
+

Creation Time: {{comment[5]}}

Creation Date: {{comment[4]}}

{% if request.path == "/admin/comments" %}

Author: - {{comment[3]}} + {{comment[3]}}

{% endif %}
{% endfor %} {% if request.path == "/admin/comments" %} -↩️go back to admin panel +↩️go back to admin panel {% endif %} {% endblock body %} diff --git a/templates/adminPanelUsers.html b/templates/adminPanelUsers.html index 331ff851..709b3ae4 100644 --- a/templates/adminPanelUsers.html +++ b/templates/adminPanelUsers.html @@ -1,51 +1,41 @@ {% extends 'layout.html'%} {%block head%} Admin Panel - {% endblock head %} {%block body%} -
-

Users

+
+

Users

{% for user in users %} -
-
+
+

ID: {{user[0]}}

Role: {{user[5]}}

-
+

User Name: - {{user[1]}} + {{user[1]}}

- {{user[1]}} + {{user[1]}}
-
+

email: {{user[2]}}

Points: {{user[6]}}

-
+

Join Date: {{user[7]}}

Join Time: {{user[8]}}

-
+
-
{% if user[5] == "admin" %} - set user role to user + set user role to user {% else %} - set user role to admin {% endif %} @@ -53,5 +43,5 @@

Users

{% endfor %}
-↩️go back to admin panel +↩️go back to admin panel {% endblock body %} diff --git a/templates/changePassword.html b/templates/changePassword.html index c64a8d7b..6112a7d1 100644 --- a/templates/changePassword.html +++ b/templates/changePassword.html @@ -1,16 +1,11 @@ {% extends 'layout.html'%} {%block head%} Change Password - {% endblock head %} {%block body%} -
-
+
+ - {{form.oldPassword(class_="input")}} {{form.password(class_="input")}} - {{form.passwordConfirm(class_="input")}} - + {{form.oldPassword()}} {{form.password()}} {{form.passwordConfirm()}} +
{% endblock body %} diff --git a/templates/changeProfilePicture.html b/templates/changeProfilePicture.html index 97a78917..7dd51a62 100644 --- a/templates/changeProfilePicture.html +++ b/templates/changeProfilePicture.html @@ -1,15 +1,7 @@ {% extends 'layout.html'%} {%block head%} Change Profile Picture - - {% endblock head %} {%block body%} -
+

https://api.dicebear.com/7.x/identicon/svg?seed={SEED}

default seed is your username
@@ -17,11 +9,11 @@ >click for more information about profile picture seeds
-
-
+
+ - {{form.newProfilePictureSeed(class_="input")}} - diff --git a/templates/changeTheme.html b/templates/changeTheme.html index 7dac78f9..8b137891 100644 --- a/templates/changeTheme.html +++ b/templates/changeTheme.html @@ -1,8 +1 @@ - -
- - -
+ diff --git a/templates/changeUserName.html b/templates/changeUserName.html index 14d19ea6..6bd72688 100644 --- a/templates/changeUserName.html +++ b/templates/changeUserName.html @@ -1,15 +1,11 @@ {% extends 'layout.html'%} {%block head%} Change Username - {% endblock head %} {%block body%} -
-
+
+ - {{form.newUserName(class_="input")}} - + {{form.newUserName()}} +
{% endblock body %} diff --git a/templates/createPost.html b/templates/createPost.html index 027defc9..ce8587a6 100644 --- a/templates/createPost.html +++ b/templates/createPost.html @@ -1,15 +1,14 @@ {% extends 'layout.html'%} {%block head%} Create Post {% endblock head %} {%block body%} -
-
+
+ - {{form.postTitle(class_="input centeredHorizontally" , autocomplete="off")}} - {{form.postTags(class_="input centeredHorizontally" , autocomplete="off")}} + {{form.postTitle(autocomplete="off")}} {{form.postTags(autocomplete="off")}} (separete with comma) {{form.postContent(class_="editor", autocomplete="off")}} - +
{% endblock body %} diff --git a/templates/dashboard.html b/templates/dashboard.html index 40af3f9b..b4bda977 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -3,73 +3,60 @@ Admin Panel --> Posts {% else %} {{session["userName"]}}'s Dashboard -{% endif %} - - -{% endblock head %} {%block body%} {% if showPosts %} -

Posts

+{% endif %} {% endblock head %} {%block body%} {% if showPosts %} +

Posts

{% for post in posts %} -
- {{post[1]}} -
{{post[3]|safe}}
+
+ {{post[1]}} +
{{post[3]|safe}}
- edit + edit
-
-
+

Tags: {{post[2]}}

Views: {{post[7]}}

-
+

Creation Time: {{post[6]}}

Last Edit Time: {{post[9]}}

-
+

Creation Date: {{post[5]}}

Last Edit Date: {{post[8]}}

{% if request.path == "/admin/posts" %}

Author: - {{post[4]}} + {{post[4]}}

{% endif %}
{% endfor %} {% elif not showPosts %} {% if request.path == "/admin/posts" %}

This user haven't posted yet.

{% else %} -

+

You don't have any posts. Do you want - create a post ? + create a post ?

{% endif %} {% endif %} {% if showComments and not request.path == "/admin/posts"%} -

Comments

+

Comments

{% for comment in comments %} -
-
{{comment[2]}}
-
-

Creation Date: {{comment[4]}}

-

Creation Time: {{comment[5]}}

+
+
{{comment[2]}}
+
+

Creation Date: {{comment[4]}}

+

Creation Time: {{comment[5]}}

- go to post + go to post
{% endfor %} {% endif %} {% if request.path == "/admin/posts" %} -↩️go back to admin panel +↩️go back to admin panel {% endif %} {% endblock body %} diff --git a/templates/editPost.html b/templates/editPost.html index c7101bc9..7bddbf30 100644 --- a/templates/editPost.html +++ b/templates/editPost.html @@ -1,14 +1,13 @@ {% extends 'layout.html'%} {%block head%} Edit Post {% endblock head %} {%block body%} -
-
+
+ - {{form.postTitle(class_="input centeredHorizontally" , autocomplete="off")}} - {{form.postTags(class_="input centeredHorizontally" , autocomplete="off")}} + {{form.postTitle(autocomplete="off")}} {{form.postTags(autocomplete="off")}} (separete with comma) {{form.postContent(class_="editor", autocomplete="off")}} - +
{% endblock body %} diff --git a/templates/flash.html b/templates/flash.html index 7bb81566..e7e6ad5f 100644 --- a/templates/flash.html +++ b/templates/flash.html @@ -1,10 +1,6 @@ - -
+
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} -

{{ message }}

+

{{ message }}

{% endfor %} {% endif %} {% endwith %}
diff --git a/templates/index.html b/templates/index.html index 8894fdf5..6a049103 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,13 +1,9 @@ {% extends 'layout.html'%} {%block head%} flaskBlog - {% endblock head %} {%block body%} {% for post in posts %} -
- {{post[1]}} -
{{post[3]|safe}}
- read more +
+ {{post[1]}} +
{{post[3]|safe}}
+ read more
{% endfor %} {% endblock body %} diff --git a/templates/layout.html b/templates/layout.html index 18cda1a2..d535fd48 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -4,10 +4,6 @@ - + diff --git a/templates/login.html b/templates/login.html index 12283985..2978d692 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,15 +1,11 @@ {% extends 'layout.html'%} {%block head%} Login - {% endblock head %} {%block body%} -
-
+
+ - {{form.userName(class_="input",autocomplete="off")}}{{form.password(autocomplete="off",class_="input")}} - + {{form.userName(autocomplete="off")}}{{form.password(autocomplete="off")}} + Forgot password? diff --git a/templates/navbar.html b/templates/navbar.html index d0290b1d..6d1c226a 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -2,51 +2,44 @@ rel="stylesheet" href="{{ url_for('static', filename='css/navbar.css') }}" /> -

-
+
{{time}}
-
{{date}}
+
{{date}}
{% if author == session["userName"] %} -
+
-
- edit + edit
{% endif %} {% for comment in comments %} -
- -
- {{comment[3]}} : +
+ +
+ {{comment[3]}} :
-

{{comment[2]}}

+

{{comment[2]}}

{% if session["userName"] == comment[3] %}
@@ -60,10 +45,10 @@
{{date}}
{% endif %} {% endfor %}
-
+ - {% if session["userName"] %} {{form.comment(class_="comment")}} - + {% if session["userName"] %} {{form.comment()}} + {% else %} you need - login for + >you need login for comment {% endif %} diff --git a/templates/search.html b/templates/search.html index e3c5ad01..00739f25 100644 --- a/templates/search.html +++ b/templates/search.html @@ -1,29 +1,21 @@ {% extends 'layout.html'%} {%block head%} Search results for {{query}} - - {% endblock head %} {%block body%}

search results for -

"{{query}}"

+

"{{query}}"

{% if users %} {% for user in users %} {% for user in user %} -
+ {% endfor %} {% endfor %} {% endif %} {% if posts %} {% for post in posts %} {% for post in post %} -
- {{post[1]}} -
{{post[3]|safe}}
- read more +
+ {{post[1]}} +
{{post[3]|safe}}
+ read more
{% endfor %} {% endfor %} {% endif %} {% if empty%}

not found

diff --git a/templates/searchBar.html b/templates/searchBar.html index 9f9613b0..79c779e0 100644 --- a/templates/searchBar.html +++ b/templates/searchBar.html @@ -1,23 +1,14 @@ {% extends 'layout.html'%} {%block head%} Search - - {% endblock head %} {%block body%} -
-