feat: bmi

This commit is contained in:
skytek_xinliang
2026-09-18 09:58:52 +08:00
parent ea8793e34c
commit 0f3e7b8a56
15 changed files with 534 additions and 26 deletions
@@ -0,0 +1,56 @@
<script setup lang="ts">
withDefaults(
defineProps<{
title: string;
backTo?: string;
}>(),
{
backTo: "/",
},
);
</script>
<template>
<header class="page-heading d-flex align-center mb-2">
<v-btn
aria-label="返回首頁"
class="flex-shrink-0"
color="primary"
prepend-icon="mdi-arrow-left"
rounded="pill"
:to="backTo"
variant="outlined"
>
返回
</v-btn>
<h1 class="page-title text-primary">{{ title }}</h1>
</header>
</template>
<style scoped>
.page-heading {
position: relative;
min-height: 44px;
}
.page-title {
position: absolute;
left: 50%;
width: min(60%, 320px);
margin: 0;
font-size: clamp(1.25rem, 5vw, 1.75rem);
font-weight: 900;
line-height: 1.2;
text-align: center;
transform: translateX(-50%);
}
@media (max-width: 420px) {
.page-title {
position: static;
width: auto;
margin-left: 12px;
transform: none;
}
}
</style>