From 89e8fef2b33f707226834d83d2fbf16fbe668443 Mon Sep 17 00:00:00 2001 From: Miodec Date: Tue, 26 Sep 2023 14:36:51 +0100 Subject: [PATCH] feat(funbox): add backwards funbox closes #4661 --- backend/src/constants/funbox-list.ts | 7 +++++++ frontend/src/ts/test/funbox/funbox-list.ts | 6 ++++++ frontend/static/funbox/_list.json | 5 +++++ frontend/static/funbox/backwards.css | 7 +++++++ 4 files changed, 25 insertions(+) create mode 100644 frontend/static/funbox/backwards.css diff --git a/backend/src/constants/funbox-list.ts b/backend/src/constants/funbox-list.ts index 95201d755..3cf80a1e2 100644 --- a/backend/src/constants/funbox-list.ts +++ b/backend/src/constants/funbox-list.ts @@ -320,6 +320,13 @@ const FunboxList: MonkeyTypes.FunboxMetadata[] = [ properties: ["noLigatures"], name: "crt", }, + { + name: "backwards", + properties: ["noLigatures", "conflictsWithSymmetricChars"], + frontendFunctions: ["applyCSS"], + canGetPb: true, + difficultyLevel: 3, + }, ]; export default FunboxList; diff --git a/frontend/src/ts/test/funbox/funbox-list.ts b/frontend/src/ts/test/funbox/funbox-list.ts index 5b42a3805..af949cbbd 100644 --- a/frontend/src/ts/test/funbox/funbox-list.ts +++ b/frontend/src/ts/test/funbox/funbox-list.ts @@ -246,6 +246,12 @@ const list: MonkeyTypes.FunboxMetadata[] = [ info: "Go back to the 1980s", properties: ["noLigatures"], }, + { + name: "backwards", + info: "...sdrawkcab epyt ot yrt woN", + properties: ["noLigatures", "conflictsWithSymmetricChars"], + hasCSS: true, + }, ]; export function getAll(): MonkeyTypes.FunboxMetadata[] { diff --git a/frontend/static/funbox/_list.json b/frontend/static/funbox/_list.json index 92a3f25ab..dc6f914b8 100644 --- a/frontend/static/funbox/_list.json +++ b/frontend/static/funbox/_list.json @@ -175,5 +175,10 @@ "name": "crt", "info": "Go back to the 1980s", "canGetPb": true + }, + { + "name": "backwards", + "info": "...sdrawkcab epyt ot yrt woN", + "canGetPb": true } ] diff --git a/frontend/static/funbox/backwards.css b/frontend/static/funbox/backwards.css new file mode 100644 index 000000000..2485d2af3 --- /dev/null +++ b/frontend/static/funbox/backwards.css @@ -0,0 +1,7 @@ +#words { + direction: rtl; +} + +#words.rightToLeftTest { + direction: rtl; +}