diff --git a/hdyc-svelte/src/lib/components/Calculator.svelte b/hdyc-svelte/src/lib/components/Calculator.svelte index 5e8ee77..8aff362 100644 --- a/hdyc-svelte/src/lib/components/Calculator.svelte +++ b/hdyc-svelte/src/lib/components/Calculator.svelte @@ -6,7 +6,6 @@ import QuickDefinitionCard from '$lib/components/QuickDefinitionCard.svelte'; import QuickConversionExample from '$lib/components/QuickConversionExample.svelte'; import QuickConversionTable from '$lib/components/QuickConversionTable.svelte'; - import ScientificNotationValue from '$lib/components/ScientificNotationValue.svelte'; export let config: CalculatorDef; export let showTitle = true; @@ -148,9 +147,7 @@ {#if config.factor && config.type === 'standard'} - 1 {config.labels.in1} = - - {config.offset ? ` + ${config.offset}` : ''} {config.labels.in2} + 1 {config.labels.in1} = {config.factor}{config.offset ? ` + ${config.offset}` : ''} {config.labels.in2} {/if} diff --git a/hdyc-svelte/src/lib/components/QuickConversionExample.svelte b/hdyc-svelte/src/lib/components/QuickConversionExample.svelte index c4de07e..e75ef49 100644 --- a/hdyc-svelte/src/lib/components/QuickConversionExample.svelte +++ b/hdyc-svelte/src/lib/components/QuickConversionExample.svelte @@ -1,7 +1,6 @@ - -{#if scientific} - - {scientific.base} - - ×10{scientific.exponent} - - -{:else} - - {formattedValue || fallback} - -{/if} - - diff --git a/hdyc-svelte/src/routes/[slug]/+page.svelte b/hdyc-svelte/src/routes/[slug]/+page.svelte index 46b42f1..1a83dd3 100644 --- a/hdyc-svelte/src/routes/[slug]/+page.svelte +++ b/hdyc-svelte/src/routes/[slug]/+page.svelte @@ -5,7 +5,6 @@ import { onMount } from 'svelte'; import type { PageData } from './$types'; import { buildSeoMeta, canonicalUrl, SITE_NAME, SITE_URL, toJsonLd } from '$lib/seo'; - import ScientificNotationValue from '$lib/components/ScientificNotationValue.svelte'; export let data: PageData; @@ -106,18 +105,14 @@

The conversion between {calc.labels.in1.toLowerCase()} and {calc.labels.in2.toLowerCase()} uses a fixed multiplication factor. One {calc.labels.in1.toLowerCase().replace(/s$/, '')} equals - - {calc.offset ? ` plus an offset of ${calc.offset}` : ''} {calc.labels.in2.toLowerCase()}. + {calc.factor}{calc.offset ? ` plus an offset of ${calc.offset}` : ''} {calc.labels.in2.toLowerCase()}. {#if calc.offset} This offset is common in temperature conversions, where scales differ not just in magnitude but also in their zero point. {/if}

- To convert, multiply the value in {calc.labels.in1.toLowerCase()} by - - {calc.offset ? `, then add ${calc.offset}` : ''}. - To convert in the opposite direction, {calc.offset ? `subtract ${calc.offset}, then ` : ''}divide by - . + To convert, multiply the value in {calc.labels.in1.toLowerCase()} by {calc.factor}{calc.offset ? `, then add ${calc.offset}` : ''}. + To convert in the opposite direction, {calc.offset ? `subtract ${calc.offset}, then ` : ''}divide by {calc.factor}.

{:else if calc.type === '3col' || calc.type === '3col-mul'}