Compare commits
No commits in common. "6ff1c40d3c7654fb855024aa38feb88654926d5e" and "2fd4e104b89bb8dcab8a37f3a1907fd0f58dccd1" have entirely different histories.
6ff1c40d3c
...
2fd4e104b8
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 928 B |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB |
@ -16,6 +16,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (window.location.hash !== "") {
|
if (window.location.hash !== "") {
|
||||||
|
debugger;
|
||||||
cards = JSON.parse(LZString.decompressFromEncodedURIComponent(window.location.hash.substring(1)));
|
cards = JSON.parse(LZString.decompressFromEncodedURIComponent(window.location.hash.substring(1)));
|
||||||
} else {
|
} else {
|
||||||
cards = [{id: 0, ...mhp}];
|
cards = [{id: 0, ...mhp}];
|
||||||
|
@ -1,16 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
export let name:string, type, tags = [], attributes:string, description:string;
|
export let name:string, type, tags = [], attributes:string, description:string;
|
||||||
|
|
||||||
function pf_filter(text) {
|
|
||||||
// Actions
|
|
||||||
text = text.replace(/\(A\)/gi, '<img class="activity" src="/imgs/one.webp" alt="One action">')
|
|
||||||
.replace(/\(AA\)/gi, '<img class="activity" src="/imgs/two.webp" alt="Two actions">')
|
|
||||||
.replace(/\(AAA\)/gi, '<img class="activity" src="/imgs/three.webp" alt="Three action">')
|
|
||||||
.replace(/\(R\)/gi, '<img class="activity" src="/imgs/reaction.webp" alt="Reaction">')
|
|
||||||
.replace(/\(F\)/gi, '<img class="activity" src="/imgs/free.webp" alt="Free action">');
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@ -49,15 +39,6 @@
|
|||||||
padding: 0.5pt 1pt;
|
padding: 0.5pt 1pt;
|
||||||
border: 1pt solid #d9c484;
|
border: 1pt solid #d9c484;
|
||||||
}
|
}
|
||||||
.uncommon {
|
|
||||||
background-color: #98513d;
|
|
||||||
}
|
|
||||||
.rare {
|
|
||||||
background-color: #002664;
|
|
||||||
}
|
|
||||||
.unique {
|
|
||||||
background-color: #54166e;
|
|
||||||
}
|
|
||||||
.content {
|
.content {
|
||||||
margin: 1pt;
|
margin: 1pt;
|
||||||
}
|
}
|
||||||
@ -69,9 +50,6 @@
|
|||||||
border-top: 1pt solid black;
|
border-top: 1pt solid black;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
:global(img.activity) {
|
|
||||||
max-height: 8pt;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@ -82,23 +60,15 @@
|
|||||||
</section>
|
</section>
|
||||||
<section class="tags">
|
<section class="tags">
|
||||||
{#each tags as tag}
|
{#each tags as tag}
|
||||||
{#if tag.toLowerCase() == "uncommon" }
|
|
||||||
<div class="tag uncommon">{tag}</div>
|
|
||||||
{:else if tag.toLowerCase() == "rare" }
|
|
||||||
<div class="tag rare">{tag}</div>
|
|
||||||
{:else if tag.toLowerCase() == "unique" }
|
|
||||||
<div class="tag unique">{tag}</div>
|
|
||||||
{:else}
|
|
||||||
<div class="tag">{tag}</div>
|
<div class="tag">{tag}</div>
|
||||||
{/if}
|
|
||||||
{/each}
|
{/each}
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<p class="attributes">
|
<p class="attributes">
|
||||||
{@html pf_filter(DOMPurify.sanitize(attributes))}
|
{@html DOMPurify.sanitize(attributes)}
|
||||||
</p>
|
</p>
|
||||||
<p class="description">
|
<p class="description">
|
||||||
{@html pf_filter(DOMPurify.sanitize(description))}
|
{@html DOMPurify.sanitize(description)}
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user