From f61642c30b805cae7d0f93864df3a01866e2127d Mon Sep 17 00:00:00 2001 From: pancakes Date: Mon, 11 Nov 2024 11:41:03 +1000 Subject: [PATCH] [frontend/mfm] Implement jump fn node --- .../Components/MfmText.razor.css | 18 ++++++++++++++++++ .../Core/Miscellaneous/RenderMfm.cs | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Iceshrimp.Frontend/Components/MfmText.razor.css b/Iceshrimp.Frontend/Components/MfmText.razor.css index 081fe7ea..071651b8 100644 --- a/Iceshrimp.Frontend/Components/MfmText.razor.css +++ b/Iceshrimp.Frontend/Components/MfmText.razor.css @@ -194,6 +194,24 @@ } } +@keyframes fn-jump { + 0% { + transform:translateY(0) + } + 25% { + transform:translateY(-16px) + } + 50% { + transform:translateY(0) + } + 75% { + transform:translateY(-8px) + } + to { + transform:translateY(0) + } +} + ::deep { .fn-animation { display: inline-block; diff --git a/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs b/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs index 6dae5a1d..cad19871 100644 --- a/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs +++ b/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs @@ -262,7 +262,7 @@ public static partial class MfmRenderer "blur" => MfmFnBlur(document), "jelly" => MfmFnAnimation(node.Name, args, document), "tada" => MfmFnAnimation(node.Name, args, document), - "jump" => throw new NotImplementedException($"{node.Name}"), + "jump" => MfmFnAnimation(node.Name, args, document), "bounce" => throw new NotImplementedException($"{node.Name}"), "spin" => throw new NotImplementedException($"{node.Name}"), "shake" => throw new NotImplementedException($"{node.Name}"),