Skip to content

Commit

Permalink
Merge pull request #218 from fleizean/spa
Browse files Browse the repository at this point in the history
Spa
  • Loading branch information
yeaktas committed Apr 17, 2024
2 parents e4eef59 + 06cacc4 commit 0a8148c
Show file tree
Hide file tree
Showing 18 changed files with 539 additions and 472 deletions.
39 changes: 19 additions & 20 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@ services:
restart: always
ports:
- 8000:8000
# depends_on:
# - db
# env_file:
# - .env
# networks:
# - indianpongnet

# db:
# container_name: db
# image: db
# build:
# context: ./
# dockerfile: docker.dockerfile
# restart: always
# networks:
# - indianpongnet
#
#networks:
# indianpongnet:
# driver: bridge
depends_on:
- db
env_file:
- .env
networks:
- indianpongnet
db:
container_name: db
image: db
build:
context: ./
dockerfile: docker.dockerfile
restart: always
networks:
- indianpongnet

networks:
indianpongnet:
driver: bridge
8 changes: 4 additions & 4 deletions indianpong/indianpong/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@

# Database
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases

"""
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
} """


""" DATABASES = {
DATABASES = {
'default': {
'ENGINE': os.getenv('DB_ENGINE', default='django.db.backends.postgresql'),
'NAME': os.getenv('DB_NAME', default='pong'),
Expand All @@ -119,7 +119,7 @@
'HOST': 'db', # Değişiklik burada
'PORT': os.getenv('DB_PORT', default='5432'),
}
} """
}

# For production, you should use a more robust caching backend like Memcached or Redis.
CACHES = {
Expand Down
24 changes: 24 additions & 0 deletions indianpong/pong/langs.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ def get_lang_en():
"setPasswordInputConfirmPasswordText": "Confirm New Password",
"setPasswordButtonText": "Set ✓",

#ActivationFailed
"activationFailedPageTittle": "Activation Failed",
"activationFailedHeaderText": "Activation Failed",
"activationFailedSubHeaderText": "Your activation is failed!",
"activationFailedButtonText": "GO HOME",

#Dashboard
"dashboardPageTittle": "Dashboard",
"dashboardText1": "Welcome, ",
Expand Down Expand Up @@ -449,6 +455,12 @@ def get_lang_tr():
"setPasswordInputConfirmPasswordText": "Yeni Şifreyi Onayla",
"setPasswordButtonText": "Belirle ✓",

#ActivationFailed
"activationFailedPageTittle": "Aktivasyon Başarısız",
"activationFailedHeaderText": "Aktivasyon Basarisiz",
"activationFailedSubHeaderText": "Aktivasyonunuz başarısız oldu!",
"activationFailedButtonText": "ANA SAYFA'YA DÖN",

#Dashboard
"dashboardPageTittle": "Ana Sayfa",
"dashboardText1": "HOŞ GELDİNİZ, ",
Expand Down Expand Up @@ -816,6 +828,12 @@ def get_lang_pt():
"setPasswordInputConfirmPasswordText": "Confirme a Nova Senha",
"setPasswordButtonText": "Definir ✓",

#ActivationFailed
"activationFailedPageTittle": "Ativação Falhou",
"activationFailedHeaderText": "Ativacao Falhou",
"activationFailedSubHeaderText": "Sua ativação falhou!",
"activationFailedButtonText": "VOLTAR AO LOGIN",

#Dashboard
"dashboardPageTittle": "Painel",
"dashboardText1": "Bem-vindo, ",
Expand Down Expand Up @@ -1177,6 +1195,12 @@ def get_lang_hi():
"setPasswordInputConfirmPasswordText": "नया पासवर्ड की पुष्टि करें",
"setPasswordButtonText": "सेट करें ✓",

#ActivationFailed
"activationFailedPageTittle": "सक्रियण विफल",
"activationFailedHeaderText": "सक्रियण विफल",
"activationFailedSubHeaderText": "आपका सक्रियण विफल हुआ!",
"activationFailedButtonText": "वापस लॉगिन",

#Dashboard
"dashboardPageTittle": "डैशबोर्ड",
"dashboardText1": "स्वागत, ",
Expand Down
3 changes: 1 addition & 2 deletions indianpong/pong/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ def get_rank_name(self):
if rank_range[0] <= self.elo_point <= rank_range[1]:
return rank_name
return "Reinald"



class UserItem(models.Model):
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
item = models.ForeignKey(StoreItem, on_delete=models.CASCADE)
Expand Down
10 changes: 5 additions & 5 deletions indianpong/pong/templates/aboutus.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="profile_card c4">
<div class="profile_card__inner">
<div class="profile_card__front">
<img src="https://i.hizliresim.com/mu0ink4.jpg" alt="Avatar" class="profile-img">
<img src="{% static 'assets/profile/sciftci.jpeg' %}" alt="Avatar" class="profile-img">
<div class="profile_card__detail">
<br>
<p class="profile__title">Samet Çiftçi</p>
Expand All @@ -32,7 +32,7 @@
<div class="profile_card c4">
<div class="profile_card__inner">
<div class="profile_card__front">
<img src="https://i.hizliresim.com/ij9ktl2.jpeg" alt="Avatar" class="profile-img">
<img src="{% static 'assets/profile/fyurtsev.jpeg' %}" alt="Avatar" class="profile-img">
<div class="profile_card__detail">
<p class="profile__title">Furkan Yurtseven</p>
</div>
Expand All @@ -47,7 +47,7 @@
<div class="profile_card c4">
<div class="profile_card__inner">
<div class="profile_card__front">
<img src="https://avatars.githubusercontent.com/u/96894640?v=4" alt="Avatar" class="profile-img">
<img src="{% static 'assets/profile/yeaktas.jpeg' %}" alt="Avatar" class="profile-img">
<div class="profile_card__detail">
<p class="profile__title">Yunus Emre Aktaş</p>
</div>
Expand All @@ -62,7 +62,7 @@
<div class="profile_card c4">
<div class="profile_card__inner">
<div class="profile_card__front">
<img src="https://avatars.githubusercontent.com/u/66090171?v=4" alt="Avatar" class="profile-img">
<img src="{% static 'assets/profile/eyagiz.jpeg' %}" alt="Avatar" class="profile-img">
<div class="profile_card__detail">
<br>
<p class="profile__title">Enes Yağız</p>
Expand All @@ -78,7 +78,7 @@
<div class="profile_card c4">
<div class="profile_card__inner">
<div class="profile_card__front">
<img src="https://avatars.githubusercontent.com/u/94763376?v=4" alt="Avatar" class="profile-img">
<img src="{% static 'assets/profile/ataskin.jpeg' %}" alt="Avatar" class="profile-img">
<div class="profile_card__detail">
<br>
<p class="profile__title">A. Can Taşkın</p>
Expand Down
9 changes: 9 additions & 0 deletions indianpong/pong/templates/activate_account_email.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@
style="display: block; height: auto; border: 0;"
title="yaktas" width="32" /></a>
</td>

<td style="padding:0 5px 0 5px;"><a
href="https://github.com/cantaskin"
target="_blank"><img alt="cantaskin"
height="32"
src="https://avatars.githubusercontent.com/u/94763376?v=4"
style="display: block; height: auto; border: 0;"
title="cantaskin" width="32" /></a>
</td>
</tr>
</table>
</div>
Expand Down
19 changes: 16 additions & 3 deletions indianpong/pong/templates/activation_fail.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
{% extends "base.html" %}

{% block title %}Activation Failed{% endblock %}
{% block title %}{{context.activationFailedPageTittle}}{% endblock %}

{% block app %}
<div class="HeaderArea" id="HeaderArea">
<div class="big-text">Activation Failed</div>
<div class="small-text">Your activation is failed!</div>
<div class="big-text">{{context.activationFailedHeaderText}}</div>
<div class="small-text">{{context.activationFailedSubHeaderText}}</div>
<div class="gohome-button-container">
<a onclick="swapApp('/login')"><button class="gohome-button" type="button">
<strong><i class="bi bi-box-arrow-in-right"></i> {{context.activationFailedButtonText}}</strong>
<div id="container-stars">
<div id="stars"></div>
</div>

<div id="glow">
<div class="circle"></div>
<div class="circle"></div>
</div>
</button></a>
</div>
</div>
{% endblock app %}
8 changes: 8 additions & 0 deletions indianpong/pong/templates/password_reset_email.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@
style="display: block; height: auto; border: 0;"
title="yaktas" width="32" /></a>
</td>
<td style="padding:0 5px 0 5px;"><a
href="https://github.com/cantaskin"
target="_blank"><img alt="cantaskin"
height="32"
src="https://avatars.githubusercontent.com/u/94763376?v=4"
style="display: block; height: auto; border: 0;"
title="cantaskin" width="32" /></a>
</td>
</tr>
</table>
</div>
Expand Down
4 changes: 3 additions & 1 deletion indianpong/pong/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ def signup(request):

@never_cache
def activate_account(request, token):
lang = request.COOKIES.get('selectedLanguage', 'en')
context = langs.get_langs(lang)
try:
token = VerifyToken.objects.get(token=token)
except VerifyToken.DoesNotExist:
return render(request, "activation_fail.html")
return render(request, "activation_fail.html", {"context": context})
token.user.is_verified = True
token.user.save()
token.delete()
Expand Down
2 changes: 1 addition & 1 deletion indianpong/renewdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ rm -rf media/*
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py initdata
#python3 manage.py populate 10
python3 manage.py populate 10
#python3 manage.py populate
exec "$@"
Binary file added indianpong/static/assets/profile/ataskin.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added indianpong/static/assets/profile/eyagiz.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added indianpong/static/assets/profile/fyurtsev.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added indianpong/static/assets/profile/sciftci.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added indianpong/static/assets/profile/yeaktas.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions indianpong/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ body {
margin-bottom: 5px;
}


.big-text-activation {
animation: backInDown 1s ease;
font-size: 6em;
color: aliceblue;
font-family: "VT323", monospace;
margin-bottom: 5px;
}

.big-text-email {
animation: backInDown 1s ease;
font-size: 6em;
Expand Down

0 comments on commit 0a8148c

Please sign in to comment.