new selfhosted version

This commit is contained in:
antonio
2025-11-28 14:11:51 +01:00
parent afda29997d
commit 951860f67e
1046 changed files with 72586 additions and 574750 deletions

View File

@@ -0,0 +1,19 @@
<script lang="ts" setup>
const props = defineProps<{ items: { value: number, color: string }[] }>();
function getPercent(index: number) {
const total = props.items.reduce((a, e) => a + e.value, 0);
const percent = 100 / total * props.items[index].value;
return Math.ceil(percent);
}
</script>
<template>
<div class="flex rounded-md overflow-hidden">
<div :style="`width: ${getPercent(index)}%; background-color: ${props.items[index].color};`"
v-for="(item, index) of props.items">
</div>
</div>
</template>