1
0
mirror of https://github.com/one-among-us/data.git synced 2024-11-25 20:47:37 +08:00

[F] Fix emoji (back) on ios & ipados

requested by @Twinsherry
This commit is contained in:
Elihuso Quigley 2024-04-04 22:16:21 +08:00
parent 847cf56ee4
commit 9b6e2da953
2 changed files with 5 additions and 3 deletions

View File

@ -8,7 +8,7 @@ import metadataParser from 'markdown-yaml-metadata-parser';
import { renderMdx } from "./mdx.js";
import moment from "moment";
import { Icon } from "./icon.js";
import { Icon, backSVG } from "./icon.js";
const PUBLIC_DIR = "public";
@ -171,7 +171,7 @@ function handleFootnote(md: string) {
// Replace footnote references with HTML superscript tags
return md.replace(/\[\^(\d+)\](?::\s*(.*))?/g, (match, id, text) => text ?
// Footnote definition
`<li id="footnote-${id}">${text}<a href="#footnote-ref-${id}"></a></li>` :
`<li id="footnote-${id}">${text}<a href="#footnote-ref-${id}">${backSVG}</a></li>` :
// Footnote reference
`<sup><a href="#footnote-${id}" id="footnote-ref-${id}">${id}</a></sup>`
)

View File

@ -9,3 +9,5 @@ export const Icon = {
TransFlag: `<svg style="display: inline-block; overflow: visible !important; vertical-align: sub; margin-right: 10px;" viewBox="0 0 32 32" width="16" height="16" aria-hidden="true"><path fill="#5BCEFA" d="M0 27c0 2.209 1.791 4 4 4h28c2.209 0 4-1.791 4-4v-1.3H0V27z"/><path fill="#F5A9B8" d="M.026 20.5L0 25.8h36v-5.3z"/><path fill="#EEE" d="M0 15.3h36v5.3H0z"/><path fill="#F5A9B8" d="M0 9.902h36V15.4H0z"/><path fill="#5BCEFA" d="M36 9c0-2.209-1.791-4-4-4H4C1.791 5 0 6.791 0 9v1.2h36V9z"/></svg>`,
Pride: `<svg style="display: inline-block; overflow: visible !important; vertical-align: sub; margin-right: 10px;" viewBox="0 0 32 32" width="16" height="16" aria-hidden="true"><path fill="#880082" d="M0 27a4 4 0 0 0 4 4h28a4 4 0 0 0 4-4v-.5H0v.5z"/><path fill="#3558A0" d="M0 22.07h36v4.6H0z"/><path fill="#138F3E" d="M0 17.83h36v4.5H0z"/><path fill="#FAD220" d="M0 13.5h36V18H0z"/><path fill="#FF7300" d="M0 9.17h36v4.5H0z"/><path fill="#FF000E" d="M32 5H4a4 4 0 0 0-4 4v.33h36V9a4 4 0 0 0-4-4z"/></svg>`,
};
export const backSVG = `<svg width="16" height="16"viewBox="0 0 16 16" version="1.1" id="svg1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <defs id="defs1" /> <path style="opacity:1;fill:#fff9f9;fill-opacity:0.0199483;stroke:#ff8373;stroke-width:0.839;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" d="m 10,4.0031 c 0,0 4.003714,0.3021906 4.001025,4.1458036 C 13.998336,11.992517 10,12.004973 10,12.004973 l -8,-0.0267" id="path1" /> <path style="opacity:1;fill:#fff9f9;fill-opacity:0.0199483;stroke:#ff8373;stroke-width:0.839;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" d="M 3.3112984,10.696288 2,11.978273 3.2812828,13.265655" id="path2" /></svg>`