fuck this dumbass site

This commit is contained in:
Yamozha 2021-09-10 19:28:50 +03:00
parent d36405c0a8
commit fe7d2101e2
29 changed files with 652 additions and 269 deletions

View File

@ -1 +0,0 @@
232

Binary file not shown.

View File

@ -2,6 +2,7 @@
box-sizing: border-box;
margin: 0;
padding: 0;
scroll-behavior: smooth;
}
#page-wrap {
@ -130,7 +131,7 @@ header {
}
}
@media only screen and (max-width: 800px) {
@media only screen and (max-width: 1024px) {
.nav__links,
.cta {
display: none;
@ -257,3 +258,66 @@ footer{
margin: 4px 2px;
cursor: pointer;
}
@-webkit-keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
@keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
.tracking-in-expand {
-webkit-animation: tracking-in-expand 0.7s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation: tracking-in-expand 0.7s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation-delay: .3s;
}
@-webkit-keyframes fade-in-bck {
0% {
-webkit-transform: translateZ(80px);
transform: translateZ(80px);
opacity: 0;
}
100% {
-webkit-transform: translateZ(0);
transform: translateZ(0);
opacity: 1;
}
}
@keyframes fade-in-bck {
0% {
-webkit-transform: translateZ(80px);
transform: translateZ(80px);
opacity: 0;
}
100% {
-webkit-transform: translateZ(0);
transform: translateZ(0);
opacity: 1;
}
}
.fade-in-bck {
-webkit-animation: fade-in-bck 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
animation: fade-in-bck 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -33,10 +33,13 @@ def homePage(request):
else:
userQR=None
for user in a:
all_balance.append(user.balanceValue)
print(f"{all_balance}")
limited_coins = settings.ALL_COINS - sum(all_balance)
# Use aggregation that can be calculated in database (fast)
all_balance = Balance.objects.all().aggregate(s=Sum("balanceValue"))['s']
# print(f"{all_balance}")
try:
limited_coins = settings.ALL_COINS - all_balance
except TypeError:
limited_coins = settings.ALL_COINS
github = requests.get("https://api.github.com/user/36108495").json()
@ -45,9 +48,9 @@ def homePage(request):
"isProcessor": Processor,
"userQR":userQR,
"fullbalance": limited_coins,
"currencyTotal": sum(all_balance),
"currencyTotal": all_balance,
"userBalance": userBalance,
"github": f"https://github.com/{github['login']}",
"github": f"https://github.com/podput",
}
@ -87,7 +90,6 @@ def leaderboard(request):
user_media = dict(sorted(user_media.items(), key=operator.itemgetter(0)))
user_media = dict(reversed(list(user_media.items())))
print(user_media)
users = {}
for i in user_media.keys():
iter_user = User.objects.get(username=i)
@ -97,7 +99,6 @@ def leaderboard(request):
"Images":len(iter_user_media.filter(is_video=False))}}
else:
user_data = {i:{"Images":len(iter_user_media.filter(is_video=False))}}
print(user_data)
while len(user_media) > 5:
user_media.pop()
@ -120,3 +121,7 @@ def leaderboard(request):
return render(request, 'leaderboard.html', context)
def about(request):
return render(request, "about.html")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View File

@ -1,25 +0,0 @@
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Password reset on 127.0.0.1:8000
From: webmaster@localhost
To: pederas@pederasov.pl
Date: Mon, 08 Feb 2021 22:19:44 -0000
Message-ID: <161282278468.9046.5088568393660450551@Spudnik>
You're receiving this email because you requested a password reset for your user account at 127.0.0.1:8000.
Please go to the following page and choose a new password:
http://127.0.0.1:8000/users/reset/Mg/ahs0ww-f913be8dd50f0a6adf4815cf32e8183a/
Your username, in case youve forgotten: bobi
Thanks for using our site!
The 127.0.0.1:8000 team
-------------------------------------------------------------------------------

View File

@ -1,25 +0,0 @@
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Password reset on 127.0.0.1:8000
From: webmaster@localhost
To: pederas@pederasov.pl
Date: Mon, 08 Feb 2021 22:20:07 -0000
Message-ID: <161282280735.9109.220494091957288379@Spudnik>
You're receiving this email because you requested a password reset for your user account at 127.0.0.1:8000.
Please go to the following page and choose a new password:
http://127.0.0.1:8000/users/reset/Mg/ahs0xj-30b0b07164a6b8b220b0e9cbbb048aa0/
Your username, in case youve forgotten: bobi
Thanks for using our site!
The 127.0.0.1:8000 team
-------------------------------------------------------------------------------

View File

@ -1,134 +1,127 @@
.popup{
width: 900px;
margin: auto;
text-align: center
.popup {
width: 900px;
margin: auto;
text-align: center;
}
.popup img{
width: 200px;
height: 200px;
cursor: pointer
.popup img {
width: 200px;
height: 200px;
cursor: pointer;
}
.show{
z-index: 999;
display: none;
.show {
z-index: 999;
display: none;
}
.show .overlay{
width: 100%;
height: 100%;
background: rgba(0,0,0,.66);
position: absolute;
top: 0;
left: 0;
.show .overlay {
width: 100%;
height: 100%;
background: rgba(0,0,0,.66);
position: absolute;
top: 0;
left: 0;
}
.show .img-show{
width: 600px;
height: 400px;
background: #FFF;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
overflow: hidden
.show .img-show {
width: 600px;
height: 400px;
background: #FFF;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
overflow: hidden;
}
.img-show span{
position: absolute;
top: 10px;
right: 10px;
z-index: 99;
cursor: pointer;
.img-show span {
position: absolute;
top: 10px;
right: 10px;
z-index: 99;
cursor: pointer;
}
.img-show img{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
.img-show img {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Raleway;
background-color: #202125;
}
.heading {
text-align: center;
font-size: 2.0em;
letter-spacing: 1px;
padding: 40px;
color: white;
}
.gallery-image {
padding: 20px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.gallery-image img {
height: 250px;
width: 350px;
transform: scale(1.0);
transition: transform 0.4s ease;
}
.img-box {
box-sizing: content-box;
margin: 10px;
height: 250px;
width: 350px;
overflow: hidden;
display: inline-block;
color: white;
position: relative;
background-color: white;
}
.caption {
position: absolute;
bottom: 5px;
left: 20px;
opacity: 0.0;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.transparent-box {
height: 250px;
width: 350px;
background-color:rgba(0, 0, 0, 0);
position: absolute;
top: 0;
left: 0;
transition: background-color 0.3s ease;
}
.img-box:hover img {
transform: scale(1.1);
}
.img-box:hover .transparent-box {
background-color:rgba(0, 0, 0, 0.5);
}
.img-box:hover .caption {
transform: translateY(-20px);
opacity: 1.0;
}
.img-box:hover {
cursor: pointer;
}
.caption > p:nth-child(2) {
font-size: 0.8em;
}
.opacity-low {
opacity: 0.5;
}
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Raleway;
background-color: #202125;
}
.heading {
text-align: center;
font-size: 2.0em;
letter-spacing: 1px;
padding: 40px;
color: white;
}
.gallery-image {
padding: 20px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.gallery-image img {
height: 250px;
width: 350px;
transform: scale(1.0);
transition: transform 0.4s ease;
}
.img-box {
box-sizing: content-box;
margin: 10px;
height: 250px;
width: 350px;
overflow: hidden;
display: inline-block;
color: white;
position: relative;
background-color: white;
}
.caption {
position: absolute;
bottom: 5px;
left: 20px;
opacity: 0.0;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.transparent-box {
height: 250px;
width: 350px;
background-color: rgba(0, 0, 0, 0);
position: absolute;
top: 0;
left: 0;
transition: background-color 0.3s ease;
}
.img-box:hover img { transform: scale(1.1); }
.img-box:hover .transparent-box { background-color: rgba(0, 0, 0, 0.5); }
.img-box:hover .caption {
transform: translateY(-20px);
opacity: 1.0;
}
.img-box:hover { cursor: pointer; }
.caption > p:nth-child(2) { font-size: 0.8em; }
.opacity-low { opacity: 0.5; }

View File

@ -2,6 +2,7 @@
box-sizing: border-box;
margin: 0;
padding: 0;
scroll-behavior: smooth;
}
#page-wrap {
@ -11,10 +12,10 @@
background: white;
-moz-box-shadow: 0 0 20px #469330;
-webkit-box-shadow: 0 0 20px #469330;
box-shadow: 0 0 20px #469330;
box-shadow: 0 0 20px #469330;
text-align: center;
border-radius: 25px;
}
}
header {
display: flex;
justify-content: space-between;
@ -138,21 +139,16 @@ header {
.menu {
display: initial;
}
}
html{
font-family: Arial, Helvetica, sans-serif;
}
p {
font-family: Arial, Helvetica, sans-serif;
margin: 0 0 30px 0;
margin: 0 0 30px 0;
}
h1.heading{
@ -167,7 +163,7 @@ ul.emoji{
.question{
color: gray;
font-size:20px;
font-size: 20px;
}
ul.nothing{
@ -178,7 +174,7 @@ a.footer{
/* background:radial-gradient(circle, rgba(0,159,12,1) 0%, rgba(8,96,0,1) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent; */
color:lightgreen;
color: lightgreen;
}
footer{
font-size: small;
@ -187,7 +183,7 @@ footer{
}
.centered{
display: flex;
display:flex;
}
@-webkit-keyframes text-shadow-pop-right {
@ -262,3 +258,66 @@ footer{
margin: 4px 2px;
cursor: pointer;
}
@-webkit-keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
@keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
.tracking-in-expand {
-webkit-animation: tracking-in-expand 0.7s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation: tracking-in-expand 0.7s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation-delay: .3s;
}
@-webkit-keyframes fade-in-bck {
0% {
-webkit-transform: translateZ(80px);
transform: translateZ(80px);
opacity: 0;
}
100% {
-webkit-transform: translateZ(0);
transform: translateZ(0);
opacity: 1;
}
}
@keyframes fade-in-bck {
0% {
-webkit-transform: translateZ(80px);
transform: translateZ(80px);
opacity: 0;
}
100% {
-webkit-transform: translateZ(0);
transform: translateZ(0);
opacity: 1;
}
}
.fade-in-bck {
-webkit-animation: fade-in-bck 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
animation: fade-in-bck 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -0,0 +1,138 @@
{% extends 'base.html' %}
{% load static %}
{% block optionalParams %}
<style>
html{
background: linear-gradient(180deg, rgba(70,147,48,1) 33%, rgba(109,126,107,1) 100%) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
font-family: Arial, Helvetica, sans-serif;
}
#page-wrap{
padding: 10vh;
}
@media only screen and (max-width: 600px) {
#page-wrap{
display: block;
}
}
h1{
font-size: xx-large;
}
p{
text-align: left;
}
@-webkit-keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
@keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
.tracking-in-expand {
-webkit-animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation-delay: .3s;
}
@-webkit-keyframes fade-in-bck {
0% {
-webkit-transform: translateZ(80px);
transform: translateZ(80px);
opacity: 0;
}
100% {
-webkit-transform: translateZ(0);
transform: translateZ(0);
opacity: 1;
}
}
@keyframes fade-in-bck {
0% {
-webkit-transform: translateZ(80px);
transform: translateZ(80px);
opacity: 0;
}
100% {
-webkit-transform: translateZ(0);
transform: translateZ(0);
opacity: 1;
}
}
.fade-in-bck {
-webkit-animation: fade-in-bck 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
animation: fade-in-bck 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}
</style>
{% endblock %}
{% block content %}
<div id="page-wrap" >
<section>
<h1 class="tracking-in-expand">Нашата цел и основни дейности</h1><br><br>
<p class="fade-in-bck" style="animation-delay: 0.6s;">
Основната цел на проекта е запознаване с ползите от рециклирането на учениците и подтикването им да започнат да събират разделно боклук.
Това е сайт, в който може да се качват видеа и снимки как ученици изхвърлят разделно боклуци.<br><br> За всеки материал получават конкретен брой точки (ел.валута), която обменят в училище за награди.
За една снимка получават 2 точки, а за едно видео 3 точки.
</p>
</section>
<hr><br>
<h1 class="tracking-in-expand" style="animation-delay: 0.6s;">Защо да участвам?</h1>
<p>
<ul class="tracking-in-expand" class="emoji" style="text-align: left; padding-left: 5%; margin: auto; animation-delay: 0.9s;">
<li class="tracking-in-expand" style="animation-delay: 1s"> Награден фонд за участие в проекта.</li><br>
<li class="tracking-in-expand" style="animation-delay: 1.1s"> Наградите се разпределят спрямо натрупаните точки в сайта.</li><br>
<li class="tracking-in-expand" style="animation-delay: 1.2s;"> Сертификат за участие в извънкласни дейности от името на училището при натрупани минимум 30 точки.</li><br>
</p>
</ul>
<!-- <br>
<hr>
<br>
<h1>Често задавани въпроси</h1><br>
<ul class="nothing" style="text-align: left; padding-left: 5%; margin: auto;">
<li class="question"></li>
<p>test</p>
</ul> -->
<br>
<hr>
<br>
<section id="contact" class="fade-in-bck" style="animation-delay: 1.5s;">
<h1>Имате въпроси?<br><h2>Свържете се с нас!</h2></h1><br>
<a href="https://discord.gg/twDtbKeVXV"><img src="{% static 'home/img/Discord-Logo.png' %}" style="max-width:100px;"></a>
<a href="mailto://boyan+revaluate@bobokara.com"><img src="{% static 'home/img/mail.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>
</section>
</div>
<footer style="bottom: 0; font-size: medium;">Frontend, backend and planning:<br> <a class="footer" href="{{ github }}" style="color:darkgreen">Boyan</a></footer>
{% endblock %}

View File

@ -11,6 +11,18 @@
<link rel="stylesheet" href="{% static 'home/css/style.css' %}">
<link rel="shortcut icon" type="image/png" href="{% static 'home/img/logo.png' %}"/>
{% block optionalParams %}{% endblock %}
<style>
@media only screen and (max-width: 1024px) {
.nav__links,
.cta {
display: none;
}
.menu {
display: initial;
}
}
</style>
</head>
<body>
{% block aboveNav %}{% endblock %}
@ -25,7 +37,7 @@
{% endif %}
<li><a href="{% url 'leaderboard' %}"><u>Класация</u></a></li>
<li><a href="#"><u>За нас</u></a></li>
<li><a href="{% url 'About' %}"><u>За нас</u></a></li>
{% if isProcessor %}

View File

@ -12,58 +12,95 @@
-o-background-size: cover;
background-size: cover;
font-family: Arial, Helvetica, sans-serif;
scroll-behavior: smooth;
}
@-webkit-keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
@keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
.tracking-in-expand {
-webkit-animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation-delay: .3s;
}
@-webkit-keyframes fade-in-bck {
0% {
-webkit-transform: translateZ(80px);
transform: translateZ(80px);
opacity: 0;
}
100% {
-webkit-transform: translateZ(0);
transform: translateZ(0);
opacity: 1;
}
}
@keyframes fade-in-bck {
0% {
-webkit-transform: translateZ(80px);
transform: translateZ(80px);
opacity: 0;
}
100% {
-webkit-transform: translateZ(0);
transform: translateZ(0);
opacity: 1;
}
}
.fade-in-bck {
-webkit-animation: fade-in-bck 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
animation: fade-in-bck 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}
#page-wrap{
padding: 10vh;
width: 25%;
}
@media only screen and (max-width: 1400px) {
#page-wrap{
width:100%;
}
}
</style>
{% endblock %}
{% block content %}
<div id="page-wrap">
<h1 class="heading">reValuate</h1>
<h3>Остават ни още:<br>{{ fullbalance }} reCoins</h3><br>
<div id="page-wrap" style="display: flex; flex-direction: column; align-items: center;">
<h1 class="heading tracking-in-expand">reValuate</h1>
<h3 class="tracking-in-expand" style="animation-delay: .6s;">Остават ни още:<br><span class="tracking-in-expand" style="animation-delay: .9s;">{{ fullbalance }} reCoins</span></h3><br>
{% if user.is_authenticated %}
<h3> Ти притежаваш <u>{{ userBalance }}</u> от тях.</h3>
{% if userBalance %}
<h3 class="tracking-in-expand" style="animation-delay: 1s;"> Ти притежаваш <u>{{ userBalance }}</u> от тях.</h3>
<br>
<h3>Твоят QR код:</h3>
<div id="qr" >{% qr_from_text userQR size="M" %} </div>
{% endif %}
<br>
<hr>
<br>
<h1>Нашата цел и основни дейности</h1><br>
<p>
Основната цел на проекта е запознаване с ползите от рециклирането на учениците и подтикването им да започнат да събират разделно боклук.
Това е сайт, в който може да се качват видеа и снимки как ученици изхвърлят разделно боклуци.<br><br> За всеки материал получават конкретен брой точки (ел.валута), която обменят в училище за награди.
За една снимка получават 2 точки, а за едно видео 3 точки.
</p>
<hr><br>
<h1>Защо да участвам?</h1>
<p>
<ul class="emoji" style="text-align: left; padding-left: 5%; margin: auto;">
<li> Награден фонд за участие в проекта.</li><br>
<li> Наградите се разпределят спрямо натрупаните точки в сайта.</li><br>
<li> Сертификат за участие в извънкласни дейности от името на училището при натрупани минимум 30 точки.</li><br>
</p>
</ul>
<!-- <br>
<hr>
<br>
<h1>Често задавани въпроси</h1><br>
<ul class="nothing" style="text-align: left; padding-left: 5%; margin: auto;">
<li class="question"></li>
<p>test</p>
</ul> -->
<br>
<hr>
<br>
<h1>Имате въпроси?<br><h2>Свържете се с нас!</h2></h1><br>
<p id="contact">
<a href="https://discord.gg/twDtbKeVXV"><img src="{% static 'home/img/Discord-Logo.png' %}" style="max-width:100px;"></a>
<a href="mailto://boyan+revaluate@bobokara.com"><img src="{% static 'home/img/mail.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>
<h3 class="tracking-in-expand" style="animation-delay: 1.2s;">Твоят QR код:</h3>
<div id="qr" class="fade-in-bck" style="animation-delay: 1.5s; " >{% qr_from_text userQR size="M" %} </div>
{% endif %}
</div>
<footer style="padding-bottom: 20px; font-size: medium;">Frontend, backend and planning:<br> <a class="footer" href="{{ github }}">Boyan</a></footer>
{% endblock %}

View File

@ -42,31 +42,75 @@ html{
ul{
list-style-type:none;
}
#text{
padding:20vh;
}
@-webkit-keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
@keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
.tracking-in-expand {
-webkit-animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation-delay: .3s;
}
.content{
border: cyan 5px solid;
}
@media screen and (max-width: 120px) {
#text{
overflow: hidden;
}
}
#page-wrap{
padding: 20vh;
}
</style>
{% endblock %}
{% block content %}
<div class="content">
<div id="page-wrap">
<div id="text">
<h1 style="font-size: 84px">reCoins Класация</h1><hr><br>
<ul>
<h1 style="vertical-align: top;" class="tracking-in-expand">reCoins Класация</h1><hr><br>
{% for i, z in leaderboard.items %}
{% if forloop.counter == 1 %}
<li id="one" class="scale-in-center">{{ forloop.counter }}. {{ i }} има {{ z }} </li><br>
<li id="one" class="tracking-in-expand" style="animation-delay: .6s;">{{ forloop.counter }}. {{ i }} има {{ z }} </li><br>
{% elif forloop.counter == 2 %}
<li id="two" class="scale-in-center">{{ forloop.counter }}. {{ i }} има {{ z }} </li><br>
<li id="two" class="tracking-in-expand" style="animation-delay: .9s;">{{ forloop.counter }}. {{ i }} има {{ z }} </li><br>
{% elif forloop.counter == 3 %}
<li id="three" class="scale-in-center">{{ forloop.counter }}. {{ i }} has {{ z }} </li> <br>
<li id="three" class="tracking-in-expand" style="animation-delay: 1.2s;">{{ forloop.counter }}. {{ i }} has {{ z }} </li> <br>
{% else %}
<li class="place">{{ forloop.counter }}. {{ i }} has {{ z }} </li> <br>
<li class="place tracking-in-expand" style="animation-delay: 1.5s;">{{ forloop.counter }}. {{ i }} has {{ z }} </li> <br>
</ul>
{% endif %}
{% endfor %}

View File

@ -35,13 +35,46 @@ html{
display: block;
}
}
@-webkit-keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
@keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
.tracking-in-expand {
-webkit-animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation-delay: .3s;
}
</style>
{% endblock %}
{% block content %}
{% if user.is_authenticated %}
<div id="page-wrap">
<div id="page-wrap" class="tracking-in-expand">
{% if approved %}
<div id="approved">
@ -54,7 +87,7 @@ html{
{% if processing %}
<div id="processing">
<img src="{% static 'home/img/loading.png' %}" width="128px"><br><br><br>
<h2>Имаш <span style="color:yellow">{{ processing }}</span> медия, очакваща одобрение!</h2><br><br>
<h2 >Имаш медия, очакваща одобрение!</h2><br><br>
</div>
{% endif %}
@ -62,9 +95,17 @@ html{
<div id="declined">
<img src="{% static 'home/img/cross.png' %}" width="128px"><br><br><br>
<h2 >Имаш <span style="color:red">{{ declined }}</span> отказана медия, ако мислиш, че това е грешка, <a href="/#contact"> свържи се с нас</a>!</h2>
</div>
{% endif %}
</div>
</div>
{% if no_media %}
<div style = "flex:1;">
<img src="{% static 'home/img/question.png' %}" width="128px"><br><br><br>
<h2>Нямаш качена медия! <a href="{% url 'Image' %}">Започни тук!</a></h2>
</div>
{% endif %}
</div>
{% else %}
<p>You are not logged in</p>
<a href="{% url 'login' %}">Log In</a>

View File

@ -97,8 +97,40 @@
}
#page-wrap{
padding: 20vh;
padding:10vh;
width: 25%;
}
@-webkit-keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
@keyframes tracking-in-expand {
0% {
letter-spacing: -0.5em;
opacity: 0;
}
40% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
.tracking-in-expand {
-webkit-animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation: tracking-in-expand 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
animation-delay: .3s;
}
</style>
@ -112,7 +144,7 @@
{% endif %}
<div class="centered" id="page-wrap" style="text-align: center;">
<div class="centered tracking-in-expand" id="page-wrap" style="text-align: center;">
{% if user.is_authenticated %}
{% if img_obj %}
<h1 style="color:#7ac142;">Снимката ти е качена успешно!</h1>

View File

@ -30,10 +30,13 @@ def imageUpload(request):
else:
warning = False
media = Media.objects.filter(user_id=request.user.id).last()
print(media.tokenized)
if media.tokenized is None:
return render(request, "wait.html")
try:
media = Media.objects.filter(user_id=request.user.id).last()
print(media.tokenized)
if media.tokenized is None:
return render(request, "wait.html")
except AttributeError:
pass
print(request.user.id)
if request.method == 'POST':
@ -87,19 +90,25 @@ def viewMedia(request):
approved = []
declined = []
processing = []
no_media=True
for i in get_status:
if i.tokenized:
approved.append(i)
if not i.tokenized:
declined.append(i)
if i.tokenized is None:
processing.append(i)
no_media = False
if i.tokenized is False:
declined.append(i)
no_media = False
if i.tokenized is None:
no_media = False
processing.append(i)
context={
"approved":len(approved),
"declined":len(declined),
"processing":len(processing),
"no_media":no_media,
}
return render (request, 'showAllImage.html', context)

View File

@ -15,7 +15,7 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path, include
from home.views import homePage, leaderboard
from home.views import homePage, leaderboard, about
from rest_framework import routers, urls
from api.views import BalanceView, ImageView, AllBalance
from django.conf import settings
@ -25,7 +25,6 @@ from django.views.generic.base import TemplateView
from upload.views import uploadContent, imageUpload, viewMedia
from users.views import getBalance, addToBalance, adminView, removeBalance
router = routers.DefaultRouter()
router.register("balance", BalanceView, basename="balance")
router.register("images", ImageView, basename="image")
@ -45,7 +44,8 @@ urlpatterns = [
path("admin/", adminView, name="admin"),
path('administrator/', admin.site.urls),
path('api/', include(router.urls)),
path("leaderboard/", leaderboard, name="leaderboard")
path("leaderboard/", leaderboard, name="leaderboard"),
path("about/", about, name="About")
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL,