{{ $ts._mfm.rotateDescription }}
+diff --git a/locales/en-US.yml b/locales/en-US.yml index 37da6fdc95..c5c8afb50f 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -931,6 +931,8 @@ _mfm: rainbowDescription: "Makes the content appear in rainbow colors." sparkle: "Sparkle" sparkleDescription: "Gives content a sparkling particle effect." + rotate: "Rotate" + rotateDescription: "Rotates the content by 90 degrees" _reversi: reversi: "Reversi" gameSettings: "Game settings" diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index d41cf6fc2b..d1da365d9a 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -184,6 +184,11 @@ export default defineComponent({ count, speed, }, genEl(token.children)); } + case 'rotate': { + const degrees = parseInt(token.props.args.deg) || '90'; + style = `transform: rotate(${degrees}deg); transform-origin: center center;`; + break; + } } if (style == null) { return h('span', {}, ['$[', token.props.name, ' ', ...genEl(token.children), ']']); diff --git a/packages/client/src/pages/mfm-cheat-sheet.vue b/packages/client/src/pages/mfm-cheat-sheet.vue index e9a3b6debc..ee9d807e71 100644 --- a/packages/client/src/pages/mfm-cheat-sheet.vue +++ b/packages/client/src/pages/mfm-cheat-sheet.vue @@ -281,6 +281,16 @@ +
{{ $ts._mfm.rotateDescription }}
+