From d674390f1aad98b6c0307d9db8c655b1440e4fe1 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 11 Aug 2023 15:40:14 +0300 Subject: [PATCH] rework tilt award --- files/assets/css/awards.css | 61 +++++++++++++++++++++++++++++----- files/classes/post.py | 5 --- files/helpers/config/awards.py | 2 +- files/templates/comments.html | 4 +-- files/templates/post.html | 4 +-- 5 files changed, 57 insertions(+), 19 deletions(-) diff --git a/files/assets/css/awards.css b/files/assets/css/awards.css index d31526617..c83356c72 100644 --- a/files/assets/css/awards.css +++ b/files/assets/css/awards.css @@ -144,17 +144,60 @@ 100% {transform: translateX(-15vw) rotate(180deg); top: 0; bottom: unset;} } -@keyframes tilt { - 0% {transform: rotate(0deg);} - 25% {transform: rotate(1deg);} - 75% {transform: rotate(-1deg);} - 100% {transform: rotate(0deg);} -} -.tilt { - animation-duration: 60s !important; + + +.tilt-post { + animation-duration: 200s !important; animation-iteration-count: infinite !important; animation-direction: alternate !important; animation-timing-function: linear !important; - animation-name: tilt; + animation-name: tilt-post; +} +@media (max-width: 768px) { + @keyframes tilt-post { + 0% {transform: rotate(0deg);} + 25% {transform: rotate(0.3deg);} + 75% {transform: rotate(-0.3deg);} + 100% {transform: rotate(0deg);} + } + +} + +@media (min-width: 768px) { + .tilt-post { + animation-duration: 500s !important; + } + @keyframes tilt-post { + 0% {transform: rotate(0deg);} + 25% {transform: rotate(0.8deg);} + 75% {transform: rotate(-0.8deg);} + 100% {transform: rotate(0deg);} + } +} + +.tilt-post > * { + padding-left: 3rem !important; + padding-right: 3rem !important; +} + + + + +@keyframes tilt-comment { + 0% {transform: rotate(0deg);} + 100% {transform: rotate(360deg);} +} + +.tilt-comment { + animation-duration: 3000s !important; + animation-iteration-count: infinite !important; + animation-timing-function: linear !important; + animation-name: tilt-comment; +} + +@media (max-width: 768px) { + .tilt-comment { + animation-duration: 6000s !important; + } } diff --git a/files/classes/post.py b/files/classes/post.py index ab5ede612..4f44484d7 100644 --- a/files/classes/post.py +++ b/files/classes/post.py @@ -248,11 +248,6 @@ class Post(Base): def award_count(self, kind, v): if v and v.poor: return 0 - elif self.distinguish_level: - if SITE_NAME == 'rDrama' and kind in {'glowie', 'tilt',}: - return 0 - elif SITE_NAME == 'WPD': - return 0 num = len([x for x in self.awards if x.kind == kind]) if num > 4 and kind not in {"shit", "fireflies", "gingerbread"}: diff --git a/files/helpers/config/awards.py b/files/helpers/config/awards.py index a01bb088f..d86ca46b7 100644 --- a/files/helpers/config/awards.py +++ b/files/helpers/config/awards.py @@ -438,7 +438,7 @@ AWARDS = { "description": "Tilts the post or comment", "icon": "fas fa-car-tilt", "color": "text-blue", - "price": 500, + "price": 300, "deflectable": False, "cosmetic": True, "ghost": True, diff --git a/files/templates/comments.html b/files/templates/comments.html index 7dfa7715f..0b9db4971 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -29,7 +29,7 @@
-
+