mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 20:24:18 -04:00
lint
This commit is contained in:
parent
f559f6778f
commit
adff6efe7a
@ -2,7 +2,7 @@
|
||||
<span
|
||||
v-if="v && svgs[v as string] !== undefined"
|
||||
v-html="svgs[v as string]"
|
||||
/>
|
||||
></span>
|
||||
<img
|
||||
v-else-if="iconSource"
|
||||
:src="iconSource"
|
||||
@ -17,11 +17,12 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import type { PropType } from 'vue';
|
||||
|
||||
import BlueSky from '~/public/img/bluesky.svg';
|
||||
|
||||
const svgDataToHtml = (svgDataString: string): string => decodeURI(svgDataString).replace(/^.*<svg /, '<svg class="icon" ')
|
||||
const svgDataToHtml = (svgDataString: string): string => decodeURI(svgDataString).replace(/^.*<svg /, '<svg class="icon" ');
|
||||
|
||||
const buildQueue = (v: string | (string | undefined)[] | null): { value: string; fallbacks: string[], svgs: Record<string, any> } => {
|
||||
const buildQueue = (v: string | (string | undefined)[] | null): { value: string; fallbacks: string[]; svgs: Record<string, any> } => {
|
||||
const rawValues = Array.isArray(v) ? v : [v];
|
||||
let values = rawValues.filter((x) => !!x) as string[];
|
||||
|
||||
@ -33,8 +34,8 @@ const buildQueue = (v: string | (string | undefined)[] | null): { value: string;
|
||||
value: values.shift()!,
|
||||
fallbacks: values,
|
||||
svgs: {
|
||||
'bluesky': svgDataToHtml(BlueSky),
|
||||
}
|
||||
bluesky: svgDataToHtml(BlueSky),
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
<li>Realizacja redesignu: <nuxt-link to="/@andrea">@andrea</nuxt-link></li>
|
||||
<li>Flaga osób niebinarych <a href="https://commons.wikimedia.org/wiki/File:Nonbinary_flag.svg" target="_blank" rel="noopener">Kye Rowan</a> (public domain)</li>
|
||||
<li>Wektor łosia: <a href="https://commons.wikimedia.org/wiki/File:Coat_of_arms_of_Ontario,_Canada.svg" target="_blank" rel="noopener">Herb Ontario</a> (public domain)</li>
|
||||
<li>Wektor łoma: <a href=https://www.vecteezy.com/free-vector/crowbar target="_blank" rel="noopener">Vecteezy</a></li>
|
||||
<li>Wektor łoma: <a href="https://www.vecteezy.com/free-vector/crowbar" target="_blank" rel="noopener">Vecteezy</a></li>
|
||||
</ul>
|
||||
</details>
|
||||
</figure>
|
||||
|
Loading…
x
Reference in New Issue
Block a user