diff --git a/src/App.vue b/src/App.vue index 896b51d..172d043 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,7 +14,8 @@ - + + @@ -22,12 +23,14 @@ import { ref } from 'vue' import BottomNav from './components/BottomNav.vue' import InfoPanel from './components/InfoPanel.vue' +import DocsPanel from './components/DocsPanel.vue' import MealPlanner from './pages/MealPlanner.vue' import Converter from './pages/Converter.vue' import ShoppingList from './pages/ShoppingList.vue' -const page = ref('meal') +const page = ref('meal') const showInfo = ref(false) +const showDocs = ref(false) diff --git a/src/components/InfoPanel.vue b/src/components/InfoPanel.vue index 3edd08d..e1d9331 100644 --- a/src/components/InfoPanel.vue +++ b/src/components/InfoPanel.vue @@ -32,16 +32,15 @@ Licenza EUPL v1.2 - + + @@ -52,7 +51,7 @@ import pkg from '../../package.json' import appIcon from '../../assets/icon-only.png' defineProps({ modelValue: Boolean }) -defineEmits(['update:modelValue']) +defineEmits(['update:modelValue', 'open-docs']) const version = pkg.version @@ -150,6 +149,16 @@ const version = pkg.version .info-row:last-child { border-bottom: none; } +/* riga cliccabile: reset button, mantiene layout identico alle righe statiche */ +.info-row--btn { + width: 100%; + min-height: unset; + border-radius: 0; + background: var(--color-surface); + text-align: left; +} +.info-row--btn:active { background: var(--color-bg); opacity: 1; } + .info-label { font-size: 0.9rem; color: var(--color-text); diff --git a/src/pages/Converter.vue b/src/pages/Converter.vue index d164131..573d6bc 100644 --- a/src/pages/Converter.vue +++ b/src/pages/Converter.vue @@ -27,7 +27,7 @@ class="result-item" @click="selectItem(r)" > - {{ r.food }} + {{ capFirst(r.food) }} {{ capFirst(r.method) }} @@ -37,7 +37,7 @@
- {{ selected.food }} + {{ capFirst(selected.food) }} · {{ capFirst(selected.method) }}
@@ -64,7 +64,7 @@
- -
+
{{ direction === 'rawToCooked' ? 'cotto' : 'crudo' }}
{{ result }} - g + g
@@ -206,7 +206,7 @@ function swapDirection() { .result-item:last-child { border-bottom: none; } .result-item:active { background: var(--color-bg); } -.result-food { font-weight: 600; text-transform: capitalize; } +.result-food { font-weight: 600; } .result-method { font-size: 0.85rem; color: var(--color-muted); } /* ── converter card ───────────────────────────────── */ @@ -231,12 +231,11 @@ function swapDirection() { gap: 6px; } -.food-name { font-weight: 700; font-size: 1rem; text-transform: capitalize; } +.food-name { font-weight: 700; font-size: 1rem; } .food-sep { color: var(--color-border); font-size: 1.1rem; } .food-method { font-size: 0.9rem; color: var(--color-muted); } .btn-reset { - background: none; color: var(--color-primary); font-size: 0.85rem; font-weight: 600; @@ -284,7 +283,7 @@ function swapDirection() { /* override globale per input dentro la card */ .calc-input { - font-size: 1.5rem; + font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; border: none; @@ -308,6 +307,8 @@ function swapDirection() { font-size: 1rem; font-weight: 600; color: var(--color-muted); + align-self: flex-end; + padding-bottom: 6px; } /* bottone swap centrale */ @@ -332,33 +333,31 @@ function swapDirection() { opacity: 1; } -/* colonna output */ -.output-side .calc-output { +/* colonna output: underline visivo per simmetria con il lato input */ +.calc-output { display: flex; - align-items: baseline; + align-items: center; gap: 4px; min-height: 44px; - align-items: center; + border-bottom: 2px solid var(--color-border); + padding-bottom: 4px; } .output-value { - font-size: 2rem; + font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--color-primary); + line-height: 1; } .output-placeholder { - font-size: 2rem; + font-size: 1.6rem; font-weight: 300; color: var(--color-border); + line-height: 1; } -/* nasconde "g" finché non c'è un risultato */ -.calc-unit { visibility: hidden; } -.calc-input-wrap .calc-unit, -.has-result .calc-unit { visibility: visible; } - /* ── footer card ─────────────────────────────────── */ .card-footer { padding: 10px 16px 14px;