diff --git a/reValuate/currency.txt b/reValuate/currency.txt
deleted file mode 100644
index 7c022aed..00000000
--- a/reValuate/currency.txt
+++ /dev/null
@@ -1 +0,0 @@
-232
diff --git a/reValuate/db.sqlite3 b/reValuate/db.sqlite3
index 31a46dce..1eed7205 100644
Binary files a/reValuate/db.sqlite3 and b/reValuate/db.sqlite3 differ
diff --git a/reValuate/home/static/home/css/style.css b/reValuate/home/static/home/css/style.css
index 13f700f5..b9ccda92 100644
--- a/reValuate/home/static/home/css/style.css
+++ b/reValuate/home/static/home/css/style.css
@@ -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;
+}
\ No newline at end of file
diff --git a/reValuate/home/static/home/img/loading.png b/reValuate/home/static/home/img/loading.png
index a1ce1155..928ca7ac 100644
Binary files a/reValuate/home/static/home/img/loading.png and b/reValuate/home/static/home/img/loading.png differ
diff --git a/reValuate/home/static/home/img/question.png b/reValuate/home/static/home/img/question.png
new file mode 100644
index 00000000..f9fcab63
Binary files /dev/null and b/reValuate/home/static/home/img/question.png differ
diff --git a/reValuate/home/views.py b/reValuate/home/views.py
index 8e2c33f8..4b8aba2a 100644
--- a/reValuate/home/views.py
+++ b/reValuate/home/views.py
@@ -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")
\ No newline at end of file
diff --git a/reValuate/media/1/0RhOu.png b/reValuate/media/1/0RhOu.png
deleted file mode 100644
index 6866b225..00000000
Binary files a/reValuate/media/1/0RhOu.png and /dev/null differ
diff --git a/reValuate/media/1/2.jpg b/reValuate/media/1/2.jpg
deleted file mode 100644
index 0eb7cfab..00000000
Binary files a/reValuate/media/1/2.jpg and /dev/null differ
diff --git a/reValuate/media/1/20210105_160522.jpg b/reValuate/media/1/20210105_160522.jpg
deleted file mode 100644
index fcd4b81e..00000000
Binary files a/reValuate/media/1/20210105_160522.jpg and /dev/null differ
diff --git a/reValuate/media/1/2_yOCc0qG.jpg b/reValuate/media/1/2_yOCc0qG.jpg
deleted file mode 100644
index 0eb7cfab..00000000
Binary files a/reValuate/media/1/2_yOCc0qG.jpg and /dev/null differ
diff --git a/reValuate/media/1/PngItem_1280311.png b/reValuate/media/1/PngItem_1280311.png
deleted file mode 100644
index c6f113a5..00000000
Binary files a/reValuate/media/1/PngItem_1280311.png and /dev/null differ
diff --git a/reValuate/media/1/RiceGum_-_Nae_Nae_Nigga_Official_FULL_Music_Video.mp4 b/reValuate/media/1/RiceGum_-_Nae_Nae_Nigga_Official_FULL_Music_Video.mp4
deleted file mode 100644
index 1eabf40a..00000000
Binary files a/reValuate/media/1/RiceGum_-_Nae_Nae_Nigga_Official_FULL_Music_Video.mp4 and /dev/null differ
diff --git a/reValuate/media/2/140215832_447943516342611_5859484094486812456_n.jpg b/reValuate/media/2/140215832_447943516342611_5859484094486812456_n.jpg
deleted file mode 100644
index 50286092..00000000
Binary files a/reValuate/media/2/140215832_447943516342611_5859484094486812456_n.jpg and /dev/null differ
diff --git a/reValuate/sent_emails/20210209-001944-140059386095208.log b/reValuate/sent_emails/20210209-001944-140059386095208.log
deleted file mode 100644
index e20b3c8a..00000000
--- a/reValuate/sent_emails/20210209-001944-140059386095208.log
+++ /dev/null
@@ -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 you’ve forgotten: bobi
-
-Thanks for using our site!
-
-The 127.0.0.1:8000 team
-
-
-
--------------------------------------------------------------------------------
diff --git a/reValuate/sent_emails/20210209-002007-139656085868384.log b/reValuate/sent_emails/20210209-002007-139656085868384.log
deleted file mode 100644
index ef08d1c2..00000000
--- a/reValuate/sent_emails/20210209-002007-139656085868384.log
+++ /dev/null
@@ -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 you’ve forgotten: bobi
-
-Thanks for using our site!
-
-The 127.0.0.1:8000 team
-
-
-
--------------------------------------------------------------------------------
diff --git a/reValuate/static/home/css/gallery.css b/reValuate/static/home/css/gallery.css
index 6949c614..51a4b050 100644
--- a/reValuate/static/home/css/gallery.css
+++ b/reValuate/static/home/css/gallery.css
@@ -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; }
diff --git a/reValuate/static/home/css/style.css b/reValuate/static/home/css/style.css
index 05f0c614..5f115df4 100644
--- a/reValuate/static/home/css/style.css
+++ b/reValuate/static/home/css/style.css
@@ -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;
+}
\ No newline at end of file
diff --git a/reValuate/static/home/img/approved.png b/reValuate/static/home/img/approved.png
new file mode 100644
index 00000000..8e6c6306
Binary files /dev/null and b/reValuate/static/home/img/approved.png differ
diff --git a/reValuate/static/home/img/cross.png b/reValuate/static/home/img/cross.png
new file mode 100644
index 00000000..1c3034b1
Binary files /dev/null and b/reValuate/static/home/img/cross.png differ
diff --git a/reValuate/static/home/img/loading.png b/reValuate/static/home/img/loading.png
index eaf50169..928ca7ac 100644
Binary files a/reValuate/static/home/img/loading.png and b/reValuate/static/home/img/loading.png differ
diff --git a/reValuate/static/home/img/question.png b/reValuate/static/home/img/question.png
new file mode 100644
index 00000000..f9fcab63
Binary files /dev/null and b/reValuate/static/home/img/question.png differ
diff --git a/reValuate/templates/about.html b/reValuate/templates/about.html
new file mode 100644
index 00000000..767783ff
--- /dev/null
+++ b/reValuate/templates/about.html
@@ -0,0 +1,138 @@
+{% extends 'base.html' %}
+{% load static %}
+
+{% block optionalParams %}
+
+{% endblock %}
+{% block content %}
+
+
+ Нашата цел и основни дейности
+
+ Основната цел на проекта е запознаване с ползите от рециклирането на учениците и подтикването им да започнат да събират разделно боклук.
+ Това е сайт, в който може да се качват видеа и снимки как ученици изхвърлят разделно боклуци. За всеки материал получават конкретен брой точки (ел.валута), която обменят в училище за награди.
+ За една снимка получават 2 точки, а за едно видео 3 точки.
+
+
+
+
Защо да участвам?
+
+
+ Награден фонд за участие в проекта.
+ Наградите се разпределят спрямо натрупаните точки в сайта.
+ Сертификат за участие в извънкласни дейности от името на училището при натрупани минимум 30 точки.
+
+
+
+
+
+
+
+
+
+
+Frontend, backend and planning:
+
+ {% endblock %}
\ No newline at end of file
diff --git a/reValuate/templates/base.html b/reValuate/templates/base.html
index 39cec7e1..9bfdbf75 100644
--- a/reValuate/templates/base.html
+++ b/reValuate/templates/base.html
@@ -11,6 +11,18 @@
{% block optionalParams %}{% endblock %}
+
{% block aboveNav %}{% endblock %}
@@ -25,7 +37,7 @@
{% endif %}
Класация
- За нас
+ За нас
{% if isProcessor %}
diff --git a/reValuate/templates/home.html b/reValuate/templates/home.html
index 92585fe8..e037c903 100644
--- a/reValuate/templates/home.html
+++ b/reValuate/templates/home.html
@@ -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%;
+ }
+ }
{% endblock %}
{% block content %}
-
-
reValuate
-
Остават ни още: {{ fullbalance }} reCoins
+
+
reValuate
+
Остават ни още:{{ fullbalance }} reCoins
{% if user.is_authenticated %}
-
Ти притежаваш {{ userBalance }} от тях.
+ {% if userBalance %}
+
Ти притежаваш {{ userBalance }} от тях.
-
Твоят QR код:
-
{% qr_from_text userQR size="M" %}
{% endif %}
-
-
-
-
Нашата цел и основни дейности
-
- Основната цел на проекта е запознаване с ползите от рециклирането на учениците и подтикването им да започнат да събират разделно боклук.
- Това е сайт, в който може да се качват видеа и снимки как ученици изхвърлят разделно боклуци. За всеки материал получават конкретен брой точки (ел.валута), която обменят в училище за награди.
- За една снимка получават 2 точки, а за едно видео 3 точки.
-
-
-
Защо да участвам?
-
-
- Награден фонд за участие в проекта.
- Наградите се разпределят спрямо натрупаните точки в сайта.
- Сертификат за участие в извънкласни дейности от името на училището при натрупани минимум 30 точки.
-
-
-
-
-
-
-
-
-
Имате въпроси?Свържете се с нас!
-
-
-
-
-
+
Твоят QR код:
+
{% qr_from_text userQR size="M" %}
+ {% endif %}
-
Frontend, backend and planning:
{% endblock %}
diff --git a/reValuate/templates/leaderboard.html b/reValuate/templates/leaderboard.html
index 8d7ac326..1651982e 100644
--- a/reValuate/templates/leaderboard.html
+++ b/reValuate/templates/leaderboard.html
@@ -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;
+ }
+
+
{% endblock %}
{% block content %}
-
-
reCoins Класация
-
+ reCoins Класация
{% for i, z in leaderboard.items %}
{% if forloop.counter == 1 %}
- {{ forloop.counter }}. {{ i }} има {{ z }}
+ {{ forloop.counter }}. {{ i }} има {{ z }}
{% elif forloop.counter == 2 %}
- {{ forloop.counter }}. {{ i }} има {{ z }}
+ {{ forloop.counter }}. {{ i }} има {{ z }}
{% elif forloop.counter == 3 %}
- {{ forloop.counter }}. {{ i }} has {{ z }}
+ {{ forloop.counter }}. {{ i }} has {{ z }}
{% else %}
- {{ forloop.counter }}. {{ i }} has {{ z }}
+ {{ forloop.counter }}. {{ i }} has {{ z }}
{% endif %}
{% endfor %}
diff --git a/reValuate/templates/showAllImage.html b/reValuate/templates/showAllImage.html
index de75f73d..37219e9f 100644
--- a/reValuate/templates/showAllImage.html
+++ b/reValuate/templates/showAllImage.html
@@ -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;
+ }
{% endblock %}
+
{% block content %}
{% if user.is_authenticated %}
-
+
+
{% if approved %}
@@ -54,7 +87,7 @@ html{
{% if processing %}
-
Имаш {{ processing }} медия, очакваща одобрение!
+
Имаш медия, очакваща одобрение!
{% endif %}
@@ -62,9 +95,17 @@ html{
Имаш {{ declined }} отказана медия, ако мислиш, че това е грешка, свържи се с нас !
+
{% endif %}
-
-
+
+ {% if no_media %}
+
+
+
+
+
+ {% endif %}
+
{% else %}
You are not logged in
Log In
diff --git a/reValuate/templates/uploadImage.html b/reValuate/templates/uploadImage.html
index e450439b..ca1f69e4 100644
--- a/reValuate/templates/uploadImage.html
+++ b/reValuate/templates/uploadImage.html
@@ -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;
+ }
@@ -112,7 +144,7 @@
{% endif %}
-
+
{% if user.is_authenticated %}
{% if img_obj %}
Снимката ти е качена успешно!
diff --git a/reValuate/upload/views.py b/reValuate/upload/views.py
index c9f2d0d4..fd70312d 100644
--- a/reValuate/upload/views.py
+++ b/reValuate/upload/views.py
@@ -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)
diff --git a/reValuate/website/urls.py b/reValuate/website/urls.py
index 763f3281..51e9a715 100644
--- a/reValuate/website/urls.py
+++ b/reValuate/website/urls.py
@@ -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,