-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
211 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from ext import nag, db | ||
from modelebi import Meme , User | ||
from modelebi import Meme , User , Comment | ||
|
||
with nag.app_context(): | ||
|
||
|
||
db.create_all() |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
|
||
from ext import nag, db | ||
from routes import index, register, login, logout, profile, profilelist, aboutme, create, edit, upvote, downvote, delete_meme | ||
from routes import index, register, login,users, logout, Comment, profile, profilelist, aboutme, create, edit, upvote, downvote, delete_meme | ||
|
||
|
||
nag.run(host="0.0.0.0", debug=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ Flask-WTF | |
email_validator | ||
Flask-SQLAlchemy | ||
Flask-Login | ||
gunicorn | ||
gunicorn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,31 @@ | ||
|
||
{% include "base.html" %} | ||
|
||
<body style="background-image: url('/static/prf.jpg'); background-size: cover; background-position: center;"> | ||
{% include "navbar.html" %} | ||
<div class="card d-flex align-items-center position-absolute top-50 start-50 translate-middle" | ||
style="width: 20rem; background-color: rgba(90, 75, 122, 0.8); border-radius: 15px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);"> | ||
<body style="background-image: url('/static/prf.jpg'); background-size: cover; background-position: center;"> | ||
{% include "navbar.html" %} | ||
|
||
<div class="d-flex flex-wrap justify-content-center gap-4 mt-5"> | ||
{% for user in users %} | ||
<div class="card d-flex align-items-center" style="width: 20rem; background-color: rgba(90, 75, 122, 0.8); border-radius: 15px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); margin-bottom: 20px;"> | ||
|
||
<div class="card-body text-center"> | ||
<img src="/static/{{ found_user['image'] }}" alt="Profile Picture" class="img-fluid rounded-circle mb-3" style="width: 120px; height: 120px; object-fit: cover; border: 2px solid #d1b3ff;" /> | ||
|
||
<img src="/static/{{ user['image'] }}" alt="Profile Picture" class="img-fluid rounded-circle mb-3" style="width: 120px; height: 120px; object-fit: cover; border: 2px solid #d1b3ff;" /> | ||
<h1 class="fs-3 text-light"> | ||
Name: {{ found_user['name'] }} | ||
{% if found_user['role'] == "Admin" %} | ||
Name: {{ user['name'] }} | ||
{% if user['role'] == "Admin" %} | ||
<span class="fs-6 badge rounded-pill text-bg-danger">Admin</span> | ||
{% elif found_user['role'] == "Moderator" %} | ||
{% elif user['role'] == "Moderator" %} | ||
<span class="badge rounded-pill text-bg-primary" style="font-size: 14px; padding: 2% 0.4rem;">Moderator</span> | ||
{% else %} | ||
<span class="badge rounded-pill text-bg-success">User</span> | ||
{% endif %} | ||
</h1> | ||
|
||
<p class="text-light">Gender: {{ found_user['gender'] }}</p> | ||
<p class="text-light">Age: {{ found_user['age'] }}</p> | ||
<p class="text-light">Gender: {{ user['gender'] }}</p> | ||
<p class="text-light">Age: {{ user['age'] }}</p> | ||
</div> | ||
</div> | ||
</body> | ||
{% endfor %} | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.