Skip to content

Commit

Permalink
notification changed to language selector. steps have been taken for …
Browse files Browse the repository at this point in the history
…multi-language support module, the value holding the selected language has been added to the user module area.
  • Loading branch information
fleizean committed Feb 19, 2024
1 parent 2cf3482 commit 1dc3479
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions indianpong/pong/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class UserProfile(AbstractUser):
is_verified = models.BooleanField(default=False)
is_42student = models.BooleanField(default=False)
is_indianai = models.BooleanField(default=False)
preffered_lang = models.CharField(max_length=100, blank=True, null=True)
store_items = models.ManyToManyField(StoreItem, through='UserItem', blank=True)
game_stats = models.OneToOneField('UserGameStat', on_delete=models.SET_NULL, null=True, blank=True)
indian_wallet = models.IntegerField(blank=True, null=True, default=0, validators=[MinValueValidator(0), MaxValueValidator(9999)])
Expand Down
20 changes: 16 additions & 4 deletions indianpong/pong/templates/_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,24 @@
<li><a href="/search" data-link><i class="bi bi-binoculars-fill"></i>Search</a></li>
<li><a href="/about-us" data-link><i class="bi bi-person-raised-hand"></i>About Us</a></li>
<li class="notification-menu">
<div class="notification-icon">
<i class="bi bi-bell-fill"></i>

<div class="notification-icon" style="margin-top: 5px; color: rgb(255, 140, 0);">
<i class="bi bi-flag-fill"></i>
</div>
<div class="notification-submenu">
<a href="/test" data-link><i class="bi bi-person-fill"></i>Arda followed you!</a>
<a href="/test" data-link>
<img style="margin-right: 5px;" src="{% static "assets/flags/turkey.png" %}" alt="Türkçe">
<span style="margin-top: 3px;">Türkce</span>
</a>

<a href="/test" data-link>
<img style="margin-right: 5px;" src="{% static "assets/flags/english.png" %}" alt="English">
<span style="margin-top: 3px;">English</span>
</a>

<a href="/test" data-link>
<img style="margin-right: 5px;" src="{% static "assets/flags/portugal.png" %}" alt="Português">
<span style="margin-top: 3px;">Português</span>
</a>
</div>
</li>
<li class="profile-menu">
Expand Down
Binary file added indianpong/static/assets/flags/english.png
Loading
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/flags/portugal.png
Loading
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/flags/turkey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1dc3479

Please sign in to comment.