From e672330614ee53293dd062261699b774d176e1f8 Mon Sep 17 00:00:00 2001
From: geese-suck <16601315+geese-suck@users.noreply.github.com>
Date: Tue, 8 Nov 2022 21:39:05 -0800
Subject: [PATCH] simplify awards (#434)
---
files/assets/css/awards.css | 129 ++++++++
files/assets/css/main.css | 21 --
files/templates/awards.html | 158 +++++++++
files/templates/awards_PCM.html | 209 ++++++++++++
files/templates/submission.html | 557 +-------------------------------
5 files changed, 498 insertions(+), 576 deletions(-)
create mode 100644 files/templates/awards.html
create mode 100644 files/templates/awards_PCM.html
diff --git a/files/assets/css/awards.css b/files/assets/css/awards.css
index 33d25e52c..56e7b4a45 100644
--- a/files/assets/css/awards.css
+++ b/files/assets/css/awards.css
@@ -62,11 +62,13 @@
top:80%;
left:50%;
animation: ricardo2 1.7s linear infinite !important;
+ max-height:200px;
}
#ricardo3 {
top:85%;
animation: ricardo3 10s linear infinite !important;
+ max-height:150px;
}
@keyframes ricardo2 {
@@ -88,3 +90,130 @@
100% {transform: translate(-70vw,-86vh) rotate(180deg);}
}
}
+
+/*glow*/
+.glow .post-title, .glow a, .glow .post-meta *, .glow .user-info *, .glow .comment-text, .glow .comment-actions *, .glow {
+ color:lightgreen !important;
+ text-shadow:1px 1px 1px darkgreen, 0 0 5px green;
+}
+
+.glow .score-up, .glow .active.arrow-up::before, .glow .arrow-up::after, .glow .arrow-up:hover::before {
+ color: lime !important;
+}
+
+.glow .score-down, .glow .active.arrow-down::before, .glow .arrow-down::after, .glow .arrow-down:hover::before {
+ color: lime !important;
+}
+
+.glow .arrow-up::before, .glow .arrow-down::before, .glow .score {
+ color: lightgreen;
+}
+
+.glow .post-body a, .glow .comment-text a {
+ text-decoration: underline;
+}
+
+/*train*/
+.train {
+ position:fixed;
+ z-index:9999;
+ pointer-events: none;
+}
+
+.trainimg {
+ width: 100px !important;
+ height: 51px !important;
+}
+
+@media (max-width: 992px) {
+ .trainimg {
+ width: 40px !important;
+ height: 20px !important;
+ }
+}
+
+.train1 {
+ top: 10%
+}
+
+.train2 {
+ top: 35%
+}
+
+.train3 {
+ top: 60%
+}
+
+.train4 {
+ top: 85%
+}
+
+/*scooter*/
+.scooterimg {
+ width: 100px !important;
+ height: 135px !important;
+}
+@media (max-width: 992px) {
+ .scooterimg {
+ width: 40px !important;
+ height: 54px !important;
+ }
+}
+
+/*seal*/
+.seal {
+ position:fixed;
+ z-index:9999;
+ pointer-events: none;
+ width: 100% !important;
+ height: 100% !important;
+}
+
+.sealimg {
+ width: 100px !important;
+ height: 89.5px !important;
+}
+@media (max-width: 992px) {
+ .sealimg {
+ width: 30px !important;
+ height: 27px !important;
+ }
+}
+
+@keyframes moveX {
+ from {} to {transform: translateX(98vw)}
+}
+
+@keyframes moveY {
+ from {} to {transform: translateY(90vh)}
+}
+
+.seal1 {
+ animation: moveX 4s linear 0s infinite alternate !important;
+}
+
+.seal1 > img {
+ animation: moveY 6.8s linear 0s infinite alternate !important;
+}
+
+.seal2 {
+ animation: moveX 5s linear 0s infinite alternate-reverse !important;
+}
+
+.seal2 > img {
+ animation: moveY 8s linear 0s infinite alternate-reverse !important;
+}
+
+.seal3 {
+ animation: moveX 4s linear 0s infinite alternate !important;
+}
+.seal3 > img {
+ animation: moveY 5s linear 0s infinite alternate-reverse !important;
+}
+
+.seal4 {
+ animation: moveX 5s linear 0s infinite alternate-reverse !important;
+}
+.seal4 > img {
+ animation: moveY 6.8s linear 0s infinite alternate !important;
+}
diff --git a/files/assets/css/main.css b/files/assets/css/main.css
index 316295d17..c9e5363ff 100644
--- a/files/assets/css/main.css
+++ b/files/assets/css/main.css
@@ -5299,27 +5299,6 @@ th, td {
}
}
-.glow .post-title, .glow a, .glow .post-meta *, .glow .user-info *, .glow .comment-text, .glow .comment-actions *, .glow {
- color:lightgreen !important;
- text-shadow:1px 1px 1px darkgreen, 0 0 5px green;
-}
-
-.glow .score-up, .glow .active.arrow-up::before, .glow .arrow-up::after, .glow .arrow-up:hover::before {
- color: lime !important;
-}
-
-.glow .score-down, .glow .active.arrow-down::before, .glow .arrow-down::after, .glow .arrow-down:hover::before {
- color: lime !important;
-}
-
-.glow .arrow-up::before, .glow .arrow-down::before, .glow .score {
- color: lightgreen;
-}
-
-.glow .post-body a, .glow .comment-text a {
- text-decoration: underline;
-}
-
.text-green {
color: green !important;
}
diff --git a/files/templates/awards.html b/files/templates/awards.html
new file mode 100644
index 000000000..d016bf7dc
--- /dev/null
+++ b/files/templates/awards.html
@@ -0,0 +1,158 @@
+{% if SITE_NAME == 'PCM' %}
+ {% set wholesome = '/i/wholesome.webp' %}
+{% else %}
+ {% set wholesome = '/e/marseywholesome.webp' %}
+{% endif %}
+
+{% if p.award_count("wholesome", v) %}
+ {% if g.inferior_browser %}
+ {% for i in range(4) %}
+ {% if p.award_count("wholesome", v) > i %}
+
+
+
+ {% endif %}
+ {% endfor %}
+ {% else %}
+
+
+ {% if p.award_count("wholesome", v) > 1 %}
+
+
+
+
+
+ {% endif %}
+
+ {% if p.award_count("wholesome", v) > 2 %}
+
+
+
+
+
+ {% endif %}
+
+ {% if p.award_count("wholesome", v) > 3 %}
+
+
+
+
+
+ {% endif %}
+ {% endif %}
+{% endif %}
+
+{% if p.award_count("train", v) %}
+
+
+
+
+ {% if p.award_count("train", v) > 1 %}
+
+
+
+ {% endif %}
+
+ {% if p.award_count("train", v) > 2 %}
+
+
+
+ {% endif %}
+
+ {% if p.award_count("train", v) > 3 %}
+
+
+
+ {% endif %}
+{% endif %}
+
+{% if p.award_count("scooter", v) %}
+
+
+
+
+ {% if p.award_count("scooter", v) > 1 %}
+
+
+
+ {% endif %}
+
+ {% if p.award_count("scooter", v) > 2 %}
+
+
+
+ {% endif %}
+
+ {% if p.award_count("scooter", v) > 3 %}
+
+
+
+ {% endif %}
+{% endif %}
+
+{% if p.award_count("tilt", v) %}
+
+{% endif %}
+
+{% if p.award_count("confetti", v) %}
+
+{% endif %}
+
+{% if p.award_count("firework", v) %}
+
+ {% for i in range(4) %}
+ {% if p.award_count("firework", v) > i %}
+
+
+
+ {% endif %}
+ {% endfor %}
+{% endif %}
+
+{% if p.award_count("ricardo", v) %}
+
+ {% for i in range(3) %}
+ {% if p.award_count("ricardo", v) > i %}
+
+
+
+ {% endif %}
+ {% endfor %}
+{% endif %}
+
+{% if p.award_count("shit", v) %}
+
+
+{% endif %}
+
+{% if p.award_count("fireflies", v) %}
+
+
+{% endif %}
+
diff --git a/files/templates/awards_PCM.html b/files/templates/awards_PCM.html
new file mode 100644
index 000000000..0593e53cb
--- /dev/null
+++ b/files/templates/awards_PCM.html
@@ -0,0 +1,209 @@
+{% if p.award_count("croag", v) %}
+
+
+
+
+
+
+ {% if p.award_count("croag", v) > 1 %}
+
+
+
+ {% endif %}
+
+ {% if p.award_count("croag", v) > 2 %}
+
+
+
+ {% endif %}
+
+ {% if p.award_count("croag", v) > 3 %}
+
+
+
+ {% endif %}
+{% endif %}
+
+{% if p.award_count("toe", v) %}
+ {% if g.inferior_browser %}
+
+
+
+
+
+ {% if p.award_count("toe", v) > 1 %}
+
+
+
+
+ {% endif %}
+
+ {% if p.award_count("toe", v) > 2 %}
+
+
+
+
+ {% endif %}
+
+ {% if p.award_count("toe", v) > 3 %}
+
+
+
+
+ {% endif %}
+ {% else %}
+
+
+
+
+
+
+
+
+
+ {% if p.award_count("toe", v) > 1 %}
+
+
+
+
+
+ {% endif %}
+
+ {% if p.award_count("toe", v) > 2 %}
+
+
+
+
+
+ {% endif %}
+
+ {% if p.award_count("toe", v) > 3 %}
+
+
+
+
+
+ {% endif %}
+ {% endif %}
+{% endif %}
+{% if p.award_count("crab", v) %}
+
+{% endif %}
diff --git a/files/templates/submission.html b/files/templates/submission.html
index 53c2f799b..8a41444b8 100644
--- a/files/templates/submission.html
+++ b/files/templates/submission.html
@@ -22,488 +22,11 @@
}
+{% include "awards.html" %}
{% if SITE_NAME == 'PCM' %}
- {% set wholesome = '/i/wholesome.webp' %}
-{% else %}
- {% set wholesome = '/e/marseywholesome.webp' %}
+ {% include "awards_PCM.html" %}
{% endif %}
-{% if p.award_count("confetti", v) %}
-
-{% endif %}
-
-{% if g.inferior_browser %}
- {% if p.award_count("wholesome", v) %}
-
-
-
-
-
- {% if p.award_count("wholesome", v) > 1 %}
-
-
-
-
- {% endif %}
-
- {% if p.award_count("wholesome", v) > 2 %}
-
-
-
-
- {% endif %}
-
- {% if p.award_count("wholesome", v) > 3 %}
-
-
-
-
- {% endif %}
- {% endif %}
-
- {% if SITE_NAME == 'PCM' and p.award_count("toe", v) %}
-
-
-
-
-
- {% if p.award_count("toe", v) > 1 %}
-
-
-
-
- {% endif %}
-
- {% if p.award_count("toe", v) > 2 %}
-
-
-
-
- {% endif %}
-
- {% if p.award_count("toe", v) > 3 %}
-
-
-
-
- {% endif %}
- {% endif %}
-{% else %}
- {% if p.award_count("wholesome", v) %}
-
-
-
-
-
-
-
-
-
- {% if p.award_count("wholesome", v) > 1 %}
-
-
-
-
-
- {% endif %}
-
- {% if p.award_count("wholesome", v) > 2 %}
-
-
-
-
-
- {% endif %}
-
- {% if p.award_count("wholesome", v) > 3 %}
-
-
-
-
-
- {% endif %}
- {% endif %}
-
- {% if SITE_NAME == 'PCM' and p.award_count("toe", v) %}
-
-
-
-
-
-
-
-
-
- {% if p.award_count("toe", v) > 1 %}
-
-
-
-
-
- {% endif %}
-
- {% if p.award_count("toe", v) > 2 %}
-
-
-
-
-
- {% endif %}
-
- {% if p.award_count("toe", v) > 3 %}
-
-
-
-
-
- {% endif %}
- {% endif %}
-{% endif %}
-
-
-
-
-
-{% if p.award_count("train", v) or p.award_count("scooter", v) %}
-
-{% endif %}
-
-{% if p.award_count("train", v) %}
-
-
-
-
-
-
- {% if p.award_count("train", v) > 1 %}
-
-
-
- {% endif %}
-
- {% if p.award_count("train", v) > 2 %}
-
-
-
- {% endif %}
-
- {% if p.award_count("train", v) > 3 %}
-
-
-
- {% endif %}
-{% endif %}
-
-
-{% if SITE_NAME == 'PCM' and p.award_count("croag", v) %}
-
-
-
-
-
-
- {% if p.award_count("croag", v) > 1 %}
-
-
-
- {% endif %}
-
- {% if p.award_count("croag", v) > 2 %}
-
-
-
- {% endif %}
-
- {% if p.award_count("croag", v) > 3 %}
-
-
-
- {% endif %}
-{% endif %}
-
-
-{% if p.award_count("scooter", v) %}
-
-
-
-
-
- {% if p.award_count("scooter", v) > 1 %}
-
-
-
- {% endif %}
-
- {% if p.award_count("scooter", v) > 2 %}
-
-
-
- {% endif %}
-
- {% if p.award_count("scooter", v) > 3 %}
-
-
-
- {% endif %}
-{% endif %}
-
-
-
-{% if p.award_count("tilt", v) %}
-
-{% endif %}
-
-
@@ -1101,18 +624,6 @@
{% include "comments.html" %}
{% endif %}
-{% if p.award_count("shit", v) %}
-
-
-{% endif %}
-
-
-{% if p.award_count("fireflies", v) %}
-
-
-{% endif %}
-
-
{% endif %}
-
-{% if p.award_count("crab", v) %}
-
-{% endif %}
-
{% if fart and not (v and v.has_badge(128)) %}
{% endif %}
-
-{% if p.award_count("confetti", v) %}
-
-{% endif %}
-
-{% if p.award_count("firework", v) %}
-
-
-
-
-
- {% if p.award_count("firework", v) > 1 %}
-
-
-
- {% endif %}
-
- {% if p.award_count("firework", v) > 2 %}
-
-
-
- {% endif %}
-
- {% if p.award_count("firework", v) > 3 %}
-
-
-
- {% endif %}
-{% endif %}
-
-{% if p.award_count("ricardo", v) %}
-
-
-
-
-
- {% if p.award_count("ricardo", v) > 1 %}
-
-
-
- {% endif %}
-
- {% if p.award_count("ricardo", v) > 2 %}
-
-
-
- {% endif %}
-{% endif %}
-
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% endif %}