Hot fix: Multi dimensionnal array was static. Changed favicon.

This commit is contained in:
Yohan Boujon 2024-02-12 00:54:43 +01:00
parent dc3fb116d1
commit 2c67917f72
2 changed files with 21 additions and 18 deletions

View file

@ -81,8 +81,11 @@
// More pill handler // More pill handler
let pillShowMore = []; let pillShowMore = [];
let pillInstances = [[], []]; let pillInstances = new Array();
$: pillActualIndex=0; for (let i = 0; i < cv.skills.length; i++) {
pillInstances[i] = new Array();
}
async function moreHandler(id) { async function moreHandler(id) {
if (pillShowMore[id] === true) { if (pillShowMore[id] === true) {
// show Less // show Less
@ -99,11 +102,9 @@
} }
} }
function needMore(skill) function needMore(skill) {
{ for (const s of skill) {
for(const s of skill) if (!s.is_shown) return true;
{
if(!s.is_shown) return true;
} }
return false; return false;
} }
@ -220,17 +221,19 @@
{/if} {/if}
{/each} {/each}
{#if needMore(skill)} {#if needMore(skill)}
<button <button
class="pill-container pill-more" class="pill-container pill-more"
on:click={() => moreHandler(index)} on:click={() => moreHandler(index)}
> >
<SvgIcon <SvgIcon
type="mdi" type="mdi"
path={pillShowMore[index] === true ? mdiArrowDown : mdiArrowUp} path={pillShowMore[index] === true
size="20" ? mdiArrowDown
/> : mdiArrowUp}
<p>{text.more}</p> size="20"
</button> />
<p>{text.more}</p>
</button>
{/if} {/if}
</div> </div>
<div class={pillShowMore[index] === true ? "subsection" : "none"}> <div class={pillShowMore[index] === true ? "subsection" : "none"}>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB