fixed up some minor details
This commit is contained in:
parent
0ed9c2daed
commit
8d928873a6
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ reValuate/db.sqlite3
|
|||||||
*.sqlite3
|
*.sqlite3
|
||||||
*/media/*
|
*/media/*
|
||||||
*.pyc
|
*.pyc
|
||||||
|
*.sqlite3
|
||||||
|
@ -5,6 +5,7 @@ from django.conf import settings
|
|||||||
from users.models import User
|
from users.models import User
|
||||||
import operator
|
import operator
|
||||||
from upload.models import Media
|
from upload.models import Media
|
||||||
|
import requests
|
||||||
|
|
||||||
def homePage(request):
|
def homePage(request):
|
||||||
iter_var = 0
|
iter_var = 0
|
||||||
@ -35,13 +36,17 @@ def homePage(request):
|
|||||||
all_balance.append(user.balanceValue)
|
all_balance.append(user.balanceValue)
|
||||||
print(f"{all_balance}")
|
print(f"{all_balance}")
|
||||||
limited_coins = settings.ALL_COINS - sum(all_balance)
|
limited_coins = settings.ALL_COINS - sum(all_balance)
|
||||||
|
|
||||||
|
github = requests.get("https://api.github.com/user/36108495").json()
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"isCashier": Cashier,
|
"isCashier": Cashier,
|
||||||
"isProcessor": Processor,
|
"isProcessor": Processor,
|
||||||
"userQR":userQR,
|
"userQR":userQR,
|
||||||
"fullbalance": limited_coins,
|
"fullbalance": limited_coins,
|
||||||
"currencyTotal": sum(all_balance),
|
"currencyTotal": sum(all_balance),
|
||||||
"userBalance": userBalance
|
"userBalance": userBalance,
|
||||||
|
"github": f"https://github.com/{github['login']}",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,20 +21,22 @@
|
|||||||
<a class="logo" href="/"><img src="{% static 'home/img/logo.png' %}" style="max-height: 100px;" alt="logo"></a>
|
<a class="logo" href="/"><img src="{% static 'home/img/logo.png' %}" style="max-height: 100px;" alt="logo"></a>
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="nav__links">
|
<ul class="nav__links">
|
||||||
<li><a href="{% url 'leaderboard' %}"><u>Класация</u></a></li>
|
|
||||||
<li><a href="#"><u>За нас</u></a></li>
|
|
||||||
|
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<li><a href="{% url 'Image' %}"><u>Качи</u></a></li>
|
<li><a href="{% url 'Image' %}"><u>Качи</u></a></li>
|
||||||
<li><a href="{% url 'Media' %}"><u>Прогрес</u></a></li>
|
<li><a href="{% url 'Media' %}"><u>{{ request.user.balance.balanceValue }} reCoins </u></a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<li><a href="{% url 'leaderboard' %}"><u>Класация</u></a></li>
|
||||||
|
<li><a href="#"><u>За нас</u></a></li>
|
||||||
|
|
||||||
|
|
||||||
{% if isProcessor %}
|
{% if isProcessor %}
|
||||||
<li><a href="{% url 'admin' %}"><u>Админ</u></a></li>
|
<li><a href="{% url 'admin' %}"><u>Админ</u></a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if isCashier %}
|
{% if isCashier %}
|
||||||
<li><a href="{% url 'cashier' %}"><u>Качи</u></a></li>
|
<li><a href="{% url 'cashier' %}"><u>Каса</u></a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -61,6 +61,6 @@
|
|||||||
<a href="https://www.youtube.com/channel/UCIWblGtjXAxwbTMUbhZ_PDQ"><img src="{% static 'home/img/youtube.png' %}" style="max-width:100px;" ></a>
|
<a href="https://www.youtube.com/channel/UCIWblGtjXAxwbTMUbhZ_PDQ"><img src="{% static 'home/img/youtube.png' %}" style="max-width:100px;" ></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<footer>Frontend, backend and planning:<br> <a class="footer" href="https://yamozha.xyz">Boyan</a></footer>
|
<footer style="padding-bottom: 20px; font-size: medium;">Frontend, backend and planning:<br> <a class="footer" href="{{ github }}">Boyan</a></footer>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -14,39 +14,36 @@ html{
|
|||||||
|
|
||||||
}
|
}
|
||||||
.content{
|
.content{
|
||||||
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
#one{
|
#one{
|
||||||
font-size: 64px;
|
font-size: 64px;
|
||||||
color:#D7FFC2;
|
color:rgba(70,147,48,1);
|
||||||
-webkit-text-stroke-width: 2px;
|
|
||||||
-webkit-text-stroke-color: black;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#two{
|
#two{
|
||||||
font-size: 48px;
|
font-size: 48px;
|
||||||
color:#D7FFC2;
|
color:rgba(70,147,48,1);
|
||||||
-webkit-text-stroke-width: 2px;
|
|
||||||
-webkit-text-stroke-color: black;
|
|
||||||
}
|
}
|
||||||
#three{
|
#three{
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
color:#D7FFC2;
|
color:rgba(70,147,48,1);
|
||||||
-webkit-text-stroke-width: 1px;
|
|
||||||
-webkit-text-stroke-color: black;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.place{
|
.place{
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
color:#D7FFC2;
|
color:rgba(70,147,48,1);
|
||||||
-webkit-text-stroke-width: 1px;
|
|
||||||
-webkit-text-stroke-color: black;
|
|
||||||
}
|
}
|
||||||
ul{
|
ul{
|
||||||
list-style-type:none;
|
list-style-type:none;
|
||||||
}
|
}
|
||||||
|
#text{
|
||||||
|
padding:20vh;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -54,7 +51,8 @@ ul{
|
|||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div id="page-wrap">
|
<div id="page-wrap">
|
||||||
<h1>reCoins Класация</h1><hr><br>
|
<div id="text">
|
||||||
|
<h1 style="font-size: 84px">reCoins Класация</h1><hr><br>
|
||||||
<ul>
|
<ul>
|
||||||
{% for i, z in leaderboard.items %}
|
{% for i, z in leaderboard.items %}
|
||||||
{% if forloop.counter == 1 %}
|
{% if forloop.counter == 1 %}
|
||||||
@ -71,6 +69,7 @@ ul{
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -116,7 +116,7 @@
|
|||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
{% if img_obj %}
|
{% if img_obj %}
|
||||||
<h1 style="color:#7ac142;">Снимката ти е качена успешно!</h1>
|
<h1 style="color:#7ac142;">Снимката ти е качена успешно!</h1>
|
||||||
Кликни <a style="color:#7ac142;"href="/view_media/">тук</a>, ако искаш да я видиш!
|
Кликни <a style="color:#7ac142;"href="/view_media/">тук</a>, ако искаш видиш прогреса си!
|
||||||
<svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
|
<svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
|
||||||
<circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/>
|
<circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/>
|
||||||
<path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
|
<path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
|
||||||
|
Reference in New Issue
Block a user