diff --git a/app.vue b/app.vue index be1f046..9a6dafc 100644 --- a/app.vue +++ b/app.vue @@ -34,16 +34,13 @@ const roubleSign = new Intl.NumberFormat('ru-RU', { const aboutText = computed(() => marked.parse(about?.content || '')) const deliveryText = computed(() => delivery?.content.split('[col]').map(el => marked.parse(el || ''))) -const advantagesText = computed(() => - advantages?.content.split('[col]').map(el => { - let c = el || '' - Object.entries(calculatorData.value || {}).map(item => { - c = c.replaceAll(`[${item[0]}]`, roubleSign.format(item[1])) - }) - return marked.parse(c) - } - ) -) +const advantagesText = computed(() => { + let c = advantages?.content || '' + Object.entries(calculatorData.value || {}).map(item => { + c = c.replaceAll(`[${item[0]}]`, roubleSign.format(item[1])) + }) + return marked.parse(c) +}) const { data: footerData } = await useFetch(`${apiBase}/footer/?ordering=small_text`) const { data: social_networkData } = await useFetch(`${apiBase}/social_network/`) @@ -117,15 +114,12 @@ const { scrollToAnchor, scrollToTop } = useAnchorScroll({
- -
-
-
-
- +
+
+
-
- +
+
diff --git a/components/expDiagram.vue b/components/expDiagram.vue index fd4aee3..cfd568e 100644 --- a/components/expDiagram.vue +++ b/components/expDiagram.vue @@ -9,19 +9,6 @@ const controlsState = reactive({ // enableZoom: false, maxPolarAngle: (Math.PI / 2) - 0.2, }) -const container = ref() -const koef = ref() -const scrollBlock = (e: Event) => { - const { top, bottom, height } = container.value.getBoundingClientRect(); - const { innerHeight } = window; - const partiallyVisible = (top > 0 && top < innerHeight) || - (bottom > 0 && bottom < innerHeight) - const visibleHeight = innerHeight - top - const h = height * 1.5 - if (partiallyVisible && visibleHeight < h) { - koef.value = visibleHeight / h - } -} const targetExplosion = useState('targetExplosion', () => { const k = 1.5 return { @@ -35,15 +22,9 @@ const targetExplosion = useState('targetExplosion', () => { })