chore: formatting

This commit is contained in:
ThatOneCalculator 2023-05-22 17:00:50 -07:00
parent 2a87323242
commit 79fe1dcd61
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
5 changed files with 38 additions and 22 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "14.0.0-dev17", "version": "14.0.0-dev18",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -9,7 +9,9 @@ export function nyaize(text: string): string {
.replace(/(?<=n)a/gi, (x) => (x === "A" ? "YA" : "ya")) .replace(/(?<=n)a/gi, (x) => (x === "A" ? "YA" : "ya"))
.replace(/(?<=morn)ing/gi, (x) => (x === "ING" ? "YAN" : "yan")) .replace(/(?<=morn)ing/gi, (x) => (x === "ING" ? "YAN" : "yan"))
.replace(/(?<=every)one/gi, (x) => (x === "ONE" ? "NYAN" : "nyan")) .replace(/(?<=every)one/gi, (x) => (x === "ONE" ? "NYAN" : "nyan"))
.replace(/non(?=[bcdfghjklmnpqrstvwxyz])/gi, (x) => (x === "NON" ? "NYAN" : "nyan")) .replace(/non(?=[bcdfghjklmnpqrstvwxyz])/gi, (x) =>
x === "NON" ? "NYAN" : "nyan",
)
// ko-KR // ko-KR
.replace(/[나-낳]/g, (match) => .replace(/[나-낳]/g, (match) =>
String.fromCharCode( String.fromCharCode(

View File

@ -301,8 +301,12 @@ const props = withDefaults(
} }
@keyframes mfm-fade { @keyframes mfm-fade {
0% { opacity: 0; } 0% {
100% { opacity: 1; } opacity: 0;
}
100% {
opacity: 1;
}
} }
</style> </style>

View File

@ -69,7 +69,12 @@
</div> </div>
</div> </div>
<template v-if="metadata"> <template v-if="metadata">
<nav ref="tabsEl" v-if="hasTabs" class="tabs" :class="{collapse: hasTabs && tabs.length > 3}"> <nav
ref="tabsEl"
v-if="hasTabs"
class="tabs"
:class="{ collapse: hasTabs && tabs.length > 3 }"
>
<button <button
v-for="tab in tabs" v-for="tab in tabs"
:ref="(el) => (tabRefs[tab.key] = el)" :ref="(el) => (tabRefs[tab.key] = el)"
@ -300,14 +305,15 @@ onUnmounted(() => {
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
@media (max-width: 500px) { @media (max-width: 500px) {
padding-inline: 12p padding-inline: 12p;
} }
@media (max-width: 700px) { @media (max-width: 700px) {
> .left { > .left {
min-width: unset !important; min-width: unset !important;
max-width: 40%; max-width: 40%;
} }
> .left, > .right { > .left,
> .right {
flex: unset !important; flex: unset !important;
} }
&:not(.tabs) { &:not(.tabs) {
@ -342,7 +348,7 @@ onUnmounted(() => {
position: absolute; position: absolute;
inset: 0; inset: 0;
background: var(--bg); background: var(--bg);
opacity: .85; opacity: 0.85;
z-index: -2; z-index: -2;
} }
@ -427,7 +433,7 @@ onUnmounted(() => {
font-weight: bold; font-weight: bold;
flex-shrink: 0; flex-shrink: 0;
margin-right: 1rem; margin-right: 1rem;
> .avatar { > .avatar {
$size: 32px; $size: 32px;
display: inline-block; display: inline-block;
@ -437,20 +443,20 @@ onUnmounted(() => {
margin: 0 8px; margin: 0 8px;
pointer-events: none; pointer-events: none;
} }
> .icon { > .icon {
margin-right: 8px; margin-right: 8px;
width: 16px; width: 16px;
text-align: center; text-align: center;
} }
> .title { > .title {
min-width: 0; min-width: 0;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
line-height: 1.1; line-height: 1.1;
> .subtitle { > .subtitle {
opacity: 0.6; opacity: 0.6;
font-size: 0.8em; font-size: 0.8em;
@ -458,10 +464,10 @@ onUnmounted(() => {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
&.activeTab { &.activeTab {
text-align: center; text-align: center;
> .chevron { > .chevron {
display: inline-block; display: inline-block;
margin-left: 6px; margin-left: 6px;
@ -472,8 +478,8 @@ onUnmounted(() => {
} }
} }
> .left,
> .left, > .right { > .right {
flex-basis: 100%; flex-basis: 100%;
flex-shrink: 9999; flex-shrink: 9999;
overflow: hidden; overflow: hidden;
@ -534,7 +540,7 @@ onUnmounted(() => {
font-weight: normal; font-weight: normal;
opacity: 0.7; opacity: 0.7;
overflow: hidden; overflow: hidden;
transition: color 0.2s, opacity 0.2s, width 0.2s, min-width .2s; transition: color 0.2s, opacity 0.2s, width 0.2s, min-width 0.2s;
--width: max-content; --width: max-content;
&:hover { &:hover {

View File

@ -358,8 +358,10 @@
<div class="content"> <div class="content">
<p>{{ i18n.ts._mfm.fadeDescription }}</p> <p>{{ i18n.ts._mfm.fadeDescription }}</p>
<div class="preview"> <div class="preview">
<Mfm :text="preview_fade"/> <Mfm :text="preview_fade" />
<MkTextarea v-model="preview_fade"><span>MFM</span></MkTextarea> <MkTextarea v-model="preview_fade"
><span>MFM</span></MkTextarea
>
</div> </div>
</div> </div>
</div> </div>
@ -416,8 +418,10 @@
<div class="content"> <div class="content">
<p>{{ i18n.ts._mfm.plainDescription }}</p> <p>{{ i18n.ts._mfm.plainDescription }}</p>
<div class="preview"> <div class="preview">
<Mfm :text="preview_plain"/> <Mfm :text="preview_plain" />
<MkTextarea v-model="preview_plain"><span>MFM</span></MkTextarea> <MkTextarea v-model="preview_plain"
><span>MFM</span></MkTextarea
>
</div> </div>
</div> </div>
</div> </div>
@ -487,7 +491,7 @@ let preview_bg = $ref("$[bg.color=ff0000 Background color]");
let preview_plain = $ref( let preview_plain = $ref(
"<plain>**bold** @mention #hashtag `code` $[x2 🍮]</plain>" "<plain>**bold** @mention #hashtag `code` $[x2 🍮]</plain>"
); );
let preview_fade = $ref('$[fade 🍮] $[fade.out 🍮] $[fade.speed=5s 🍮]'); let preview_fade = $ref("$[fade 🍮] $[fade.out 🍮] $[fade.speed=5s 🍮]");
definePageMetadata({ definePageMetadata({
title: i18n.ts._mfm.cheatSheet, title: i18n.ts._mfm.cheatSheet,