feat: Modification du design
This commit is contained in:
parent
f32f4a019d
commit
ac6ff78934
|
@ -52,8 +52,8 @@ function validatePopup() {
|
||||||
).checked = true;
|
).checked = true;
|
||||||
showHidePopup();
|
showHidePopup();
|
||||||
}
|
}
|
||||||
const h = ref(1);
|
const h = ref(0);
|
||||||
const d = ref(1);
|
const d = ref(0);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -134,7 +134,8 @@ const d = ref(1);
|
||||||
<input v-model="h" type="number" name="H" />
|
<input v-model="h" type="number" name="H" />
|
||||||
<label for="D">D (cm)</label>
|
<label for="D">D (cm)</label>
|
||||||
<input v-model="d" type="number" name="D" />
|
<input v-model="d" type="number" name="D" />
|
||||||
<p>({{ h }} * 100) / {{ d }} ≃ {{ Math.round((h * 100) / d) }}</p>
|
<p v-if="d != 0">≃ {{ Math.round((h * 100) / d) }}</p>
|
||||||
|
<p v-if="d == 0" class="no-visible"> </p>
|
||||||
<button class="btn equal" @click="validatePopup">
|
<button class="btn equal" @click="validatePopup">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
|
||||||
<path
|
<path
|
||||||
|
@ -174,6 +175,10 @@ const d = ref(1);
|
||||||
padding: 1rem
|
padding: 1rem
|
||||||
margin: 1rem
|
margin: 1rem
|
||||||
border: 1px solid var(--color-highlight-text)
|
border: 1px solid var(--color-highlight-text)
|
||||||
|
font-size: 2rem
|
||||||
|
|
||||||
|
&.no-visible
|
||||||
|
border: 1px solid transparent
|
||||||
|
|
||||||
svg path
|
svg path
|
||||||
fill: var(--color-highlight-background)
|
fill: var(--color-highlight-background)
|
||||||
|
|
|
@ -148,7 +148,8 @@ async function share() {
|
||||||
body.classList.add("print");
|
body.classList.add("print");
|
||||||
const dataUrl = await toPng(body, { filter: filter });
|
const dataUrl = await toPng(body, { filter: filter });
|
||||||
body.classList.remove("print");
|
body.classList.remove("print");
|
||||||
saveAs(dataUrl, "my-node.png");
|
const fileName = new Date().toISOString().replace(/T/, '_').replace(/\..+/, '').replaceAll(':', '-')
|
||||||
|
saveAs(dataUrl, `Ceiba-score-${fileName}.png`);
|
||||||
sharing.value = false;
|
sharing.value = false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue