From 21c014281e11b4d563f76349204c6885c2022422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B5=D0=BB=D0=B5=D0=BD=D1=81=D0=BA=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=BD=D0=B0?= Date: Tue, 23 Jul 2024 10:41:42 +0300 Subject: [PATCH 01/26] main --- assets/main.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/main.scss b/assets/main.scss index 31c8153..85fcbc6 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -72,7 +72,7 @@ body { } &.toggle_visible { - @apply max-xl:flex max-xl:flex-col max-xl:text-center; + @apply max-xl:flex max-xl:flex-col max-xl:text-left; a { @apply max-xl:mb-2; -- 2.40.1 From 3445acbcdfe493899801e8d92c8edea7c2e8bebe Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 23 Jul 2024 10:52:27 +0300 Subject: [PATCH 02/26] table --- components/calcValues.vue | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index b8abffd..e317ab0 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -151,13 +151,13 @@ const goal = (target: string, params: object) => {
-
-
@@ -208,30 +208,30 @@ const goal = (target: string, params: object) => {
Секции
{{ section_count }}
-
+
Ламели, RAL {{ lamelle_color }}, {{ getColorNameFromRal(lamelle_color)?.toLowerCase() }}
-
{{ section_count * lamelles_count }}
-
+
{{ section_count * lamelles_count }}
+
{{ `${parseFloat(form_state.length.toString()).toFixed(2)}\xa0мм` }}
-- 2.40.1 From 603fbb24b712c361edae3b9c7adab829f509db27 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 23 Jul 2024 11:00:44 +0300 Subject: [PATCH 03/26] range --- assets/main.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/main.scss b/assets/main.scss index 85fcbc6..b76f327 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -216,7 +216,7 @@ a[href^="#"] { } &-title { - @apply col-span-4 font-bold text-lg text-end mt-4; + @apply col-span-4 font-bold text-lg text-end xl:mt-4 mb-4 xl:mb-0; } } @@ -302,6 +302,10 @@ button { &_checkbox { @apply w-full xl:w-auto flex-row xl:flex-initial flex-nowrap } + + input[type=range] { + @apply min-w-[calc(100%-8rem)] xl:min-w-min; + } } } -- 2.40.1 From 04758bf4ee4de734ca0577843b42596fbbd54888 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 23 Jul 2024 11:06:26 +0300 Subject: [PATCH 04/26] justify calc --- assets/main.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/main.scss b/assets/main.scss index b76f327..2923943 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -285,7 +285,7 @@ button { } &-item { - @apply flex flex-row gap-4 items-center justify-center flex-wrap xl:flex-nowrap; + @apply flex flex-row gap-4 items-center justify-start xl:justify-center flex-wrap xl:flex-nowrap; label { @apply w-full xl:w-auto; -- 2.40.1 From 8d79769d627aaf31c27994e315a0f462e4323dd3 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 23 Jul 2024 11:09:28 +0300 Subject: [PATCH 05/26] logo --- assets/main.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/main.scss b/assets/main.scss index 2923943..40a2c3e 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -42,7 +42,7 @@ body { } svg { - @apply text-ioprim inline-block m-0 w-10 h-10; + @apply text-ioprim inline-block m-0 w-10 h-10 min-w-10; } } @@ -196,7 +196,7 @@ a[href^="#"] { } &-title { - @apply col-span-full text-4xl xl:text-6xl font-black font-h1 leading-[0.85] tracking-tight mb-[3.15rem] + @apply col-span-full text-4xl xl:text-6xl font-black font-h1 xl:leading-[0.85] tracking-tight mb-[3.15rem] } &-image { -- 2.40.1 From 33353475ac01734c41b04231a9bde675d05d0bed Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 23 Jul 2024 12:17:16 +0300 Subject: [PATCH 06/26] table --- assets/main.scss | 12 ++++++++---- components/calcValues.vue | 18 +++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/assets/main.scss b/assets/main.scss index 40a2c3e..a8e3690 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -31,7 +31,7 @@ body { } .logo { - @apply w-full py-4 col-span-4 xl:col-span-2; + @apply w-full py-4 col-span-8 xl:col-span-2; a { @apply flex items-center gap-2; @@ -86,7 +86,7 @@ body { } &-toggle { - @apply flex xl:hidden col-span-8 justify-end; + @apply flex xl:hidden col-span-4 justify-end; >span { @apply cursor-pointer text-zinc-600 hover:text-ioprim-900 transition-colors; @@ -208,11 +208,15 @@ a[href^="#"] { @apply col-span-12 md:col-span-6 xl:col-span-4 grid grid-cols-4 items-center px-4; &-image { - @apply rounded-full size-20 bg-slate-300 overflow-hidden col-span-1; + @apply max-w-full max-h-full aspect-square overflow-hidden col-span-1 pr-4; + + img{ + @apply rounded-full bg-slate-300 + } } &-content { - @apply col-span-3 text-end italic; + @apply col-span-3 text-end italic text-sm lg:text-base; } &-title { diff --git a/components/calcValues.vue b/components/calcValues.vue index e317ab0..7187661 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -208,30 +208,30 @@ const goal = (target: string, params: object) => {
Секции
{{ section_count }}
-
+
Ламели, RAL {{ lamelle_color }}, {{ getColorNameFromRal(lamelle_color)?.toLowerCase() }}
-
{{ section_count * lamelles_count }}
-
+
{{ section_count * lamelles_count }}
+
{{ `${parseFloat(form_state.length.toString()).toFixed(2)}\xa0мм` }}
-- 2.40.1 From 6f7788689b96436159f6eef46993d59b45495a96 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 23 Jul 2024 13:00:43 +0300 Subject: [PATCH 07/26] some text fix --- components/calcValues.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index 7187661..ff1ed06 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -146,7 +146,7 @@ const goal = (target: string, params: object) => { - + diff --git a/components/calcValues.vue b/components/calcValues.vue index ff1ed06..7ea9c6e 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -43,6 +43,7 @@ const form_state = reactive({ auto_length: true, remove_pillar: false }) +let copy_form_state = Object.assign({}, form_state) const form_refs = { length: ref(), height: ref(), @@ -50,9 +51,13 @@ const form_refs = { } const changeParametres = () => { - if (form_state.total_length * 1000 < parametric.length.min) { + // console.log(form_state.total_length * 1000, copy_form_state.total_length * 1000) + + if ((form_state.total_length * 1000) <= (parametric.length.min + parametric.height.step)) { + form_state.total_length = (parametric.length.min + parametric.height.step) / 1000 return } + const lamelles = Math.floor(form_state.height / parametric.height.step) for (const key in form_state) { @@ -68,7 +73,7 @@ const changeParametres = () => { } if (form_state.total_length_mm < form_state.length) { - form_state.length = form_state.total_length_mm + // form_state.length = form_state.total_length_mm } form_state.total_length_mm = form_state.total_length * 1000 @@ -109,6 +114,8 @@ const changeParametres = () => { form_state.length = length form_state.fence_length = fence_length + copy_form_state = Object.assign({}, form_state) + total_length.value = form_state.total_length lamelles_count.value = lamelles fence_section.value = form_state.length * 0.001 @@ -125,17 +132,12 @@ const setLamelleColor = (color: ralTypes) => { const setPillarColor = (color: ralTypes) => { pillar_color.value = color } -watch(form_state, changeParametres, { deep: true }) +watch(() => form_state, changeParametres, { deep: true }) const isModalOpen = useState('modal_open', () => false) const toggleModal = () => { isModalOpen.value = !isModalOpen.value } -const plurals = { - lamelle: { one: 'ламель', few: 'ламели', many: 'ламелей' }, - fence: { one: 'cтолб', few: 'столба', many: 'столбов' }, - section: { one: 'секция', few: 'секции', many: 'секций' }, -} const goal = (target: string, params: object) => { const nuxtApp = useNuxtApp() if (nuxtApp.$metrika) { diff --git a/components/expDiagram.vue b/components/expDiagram.vue index f6fc334..9f12a2f 100644 --- a/components/expDiagram.vue +++ b/components/expDiagram.vue @@ -63,7 +63,7 @@ onMounted(() => { Загрузка 3D модели
- + diff --git a/components/model/parametric.vue b/components/model/parametric.vue index 6e6cb6b..9f5fb1f 100644 --- a/components/model/parametric.vue +++ b/components/model/parametric.vue @@ -15,7 +15,7 @@ const section_count = use_section_count() const extra_section = use_extra_section() const max_size = use_max_size() -const { scene, renderer } = useTresContext() +const { scene, renderer, camera } = useTresContext() renderer.value.toneMapping = CineonToneMapping renderer.value.toneMappingExposure = 0.5 // renderer.value.gammaOutput = true @@ -72,6 +72,7 @@ onMounted(async () => { 'hdrmaps/hdr-gainmap.webp', 'hdrmaps/hdr.json', ]) + renderer.value.render(scene.value, camera.value) scene.value.environment = result.renderTarget.texture scene.value.background = result.renderTarget.texture scene.value.background.mapping = EquirectangularReflectionMapping -- 2.40.1 From 1075c0d443fb13d8e64d5299db97f30679a0d128 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 23 Jul 2024 16:04:21 +0300 Subject: [PATCH 11/26] canvas on demand --- components/calcModels.vue | 2 +- components/expDiagram.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/calcModels.vue b/components/calcModels.vue index 30b8192..220cb23 100644 --- a/components/calcModels.vue +++ b/components/calcModels.vue @@ -62,7 +62,7 @@ watch([section_count, extra_section], () => {
- + diff --git a/components/expDiagram.vue b/components/expDiagram.vue index 9f12a2f..f6fc334 100644 --- a/components/expDiagram.vue +++ b/components/expDiagram.vue @@ -63,7 +63,7 @@ onMounted(() => { Загрузка 3D модели
- + -- 2.40.1 From 8271b880e5e3510e832b3d7d243b99fa25e09b9a Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 23 Jul 2024 16:44:48 +0300 Subject: [PATCH 12/26] calc min --- components/calcValues.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index 7ea9c6e..f183d24 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -51,7 +51,7 @@ const form_refs = { } const changeParametres = () => { - // console.log(form_state.total_length * 1000, copy_form_state.total_length * 1000) + console.log(form_state.total_length * 1000, copy_form_state.total_length * 1000) if ((form_state.total_length * 1000) <= (parametric.length.min + parametric.height.step)) { form_state.total_length = (parametric.length.min + parametric.height.step) / 1000 @@ -72,8 +72,8 @@ const changeParametres = () => { } } - if (form_state.total_length_mm < form_state.length) { - // form_state.length = form_state.total_length_mm + if (!form_state.auto_length && (form_state.length > form_state.total_length_mm)) { + form_state.length = form_state.total_length_mm } form_state.total_length_mm = form_state.total_length * 1000 @@ -83,7 +83,7 @@ const changeParametres = () => { if (auto_length) { let w = parametric.length.min const max_sections = Math.floor((total_length_mm - fence_length) / (parametric.length.min + fence_length)) - const min_sections = Math.floor((total_length_mm - fence_length) / (parametric.length.max + fence_length)) + const min_sections = Math.floor((total_length_mm - fence_length) / (parametric.length.max + fence_length)) || 1 for (let index = min_sections; index <= max_sections; index++) { full_sections = index -- 2.40.1 From e342aa306cecbe9bf294432f9d0e2e318e6de55e Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 23 Jul 2024 16:54:20 +0300 Subject: [PATCH 13/26] calc min --- components/calcValues.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index f183d24..d7af960 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -55,7 +55,7 @@ const changeParametres = () => { if ((form_state.total_length * 1000) <= (parametric.length.min + parametric.height.step)) { form_state.total_length = (parametric.length.min + parametric.height.step) / 1000 - return + // return } const lamelles = Math.floor(form_state.height / parametric.height.step) -- 2.40.1 From 1e627afe2e904c157d1675a511d6053e7f5439c0 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Wed, 24 Jul 2024 09:33:19 +0300 Subject: [PATCH 14/26] min length --- components/calcValues.vue | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index d7af960..782368d 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -51,12 +51,7 @@ const form_refs = { } const changeParametres = () => { - console.log(form_state.total_length * 1000, copy_form_state.total_length * 1000) - - if ((form_state.total_length * 1000) <= (parametric.length.min + parametric.height.step)) { - form_state.total_length = (parametric.length.min + parametric.height.step) / 1000 - // return - } + // console.log(form_state.total_length * 1000, copy_form_state.total_length * 1000) const lamelles = Math.floor(form_state.height / parametric.height.step) @@ -79,6 +74,7 @@ const changeParametres = () => { let { fence_length, total_length_mm, auto_length, length, full_sections } = form_state length = parseFloat(length.toString()) + if (total_length_mm < parametric.length.min) total_length_mm = parametric.length.min if (auto_length) { let w = parametric.length.min @@ -152,13 +148,13 @@ const goal = (target: string, params: object) => {
- +
- +
@@ -188,6 +184,9 @@ const goal = (target: string, params: object) => { v-model="form_state.total_length" :ref="form_refs.total_length" />
+

+ Длина забора слишком мала +

Внимание! Дополнительная секция приводит к увеличению стоимости. Рекомендуем вам изменить длину забора или длину секции! -- 2.40.1 From 8a5ea6420d46063bf83f59679a159eb3cece3e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B5=D0=BB=D0=B5=D0=BD=D1=81=D0=BA=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=BD=D0=B0?= Date: Wed, 24 Jul 2024 09:42:31 +0300 Subject: [PATCH 15/26] text --- components/calcValues.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index 782368d..08053bf 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -185,7 +185,7 @@ const goal = (target: string, params: object) => {

- Длина забора слишком мала + Выбранный размер забора слишком мал для расчета стоимости. Пожалуйста, выберите больший размер, чтобы продолжить.

Внимание! Дополнительная секция приводит к увеличению стоимости. -- 2.40.1 From 0cbcac951d4244296dd14cc4fc8935f370c16e6b Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Wed, 24 Jul 2024 09:45:37 +0300 Subject: [PATCH 16/26] overflow modal --- assets/main.scss | 9 ++++++++- components/calcValues.vue | 5 +++++ components/modal.vue | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/assets/main.scss b/assets/main.scss index e365143..6c23270 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -12,6 +12,9 @@ html { body { @apply select-none min-w-80 font-sans; + &.modal-opened { + @apply overflow-hidden; + } } .container { @@ -210,7 +213,7 @@ a[href^="#"] { &-image { @apply max-w-full max-h-full aspect-square overflow-hidden col-span-1 pr-4; - img{ + img { @apply rounded-full bg-slate-300 } } @@ -247,6 +250,10 @@ a[href^="#"] { } } + &-content { + @apply max-h-[66vh] overflow-auto; + } + h2 { @apply px-6 text-2xl text-center; } diff --git a/components/calcValues.vue b/components/calcValues.vue index 782368d..fd160e8 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -133,6 +133,11 @@ watch(() => form_state, changeParametres, { deep: true }) const isModalOpen = useState('modal_open', () => false) const toggleModal = () => { isModalOpen.value = !isModalOpen.value + if(isModalOpen.value == true) { + document.body.classList.add('modal-opened') + } else { + document.body.classList.remove('modal-opened') + } } const goal = (target: string, params: object) => { const nuxtApp = useNuxtApp() diff --git a/components/modal.vue b/components/modal.vue index 76e2c70..c362e87 100644 --- a/components/modal.vue +++ b/components/modal.vue @@ -208,7 +208,7 @@ const policy = () => {

- + -- 2.40.1 From 12220e753a247da47f3dd992c1d08fec21540fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B5=D0=BB=D0=B5=D0=BD=D1=81=D0=BA=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=BD=D0=B0?= Date: Wed, 24 Jul 2024 10:56:12 +0300 Subject: [PATCH 25/26] policy --- components/modal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/modal.vue b/components/modal.vue index b1da015..a43fd0b 100644 --- a/components/modal.vue +++ b/components/modal.vue @@ -36,7 +36,7 @@ const modal_data = reactive({ email: undefined, phone: undefined, name: undefined, - policy: true + policy: false }) const modal_form = reactive({ -- 2.40.1 From 6eb78539bf2fd81abc85e93013de20ed649bb0e5 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Wed, 24 Jul 2024 11:27:19 +0300 Subject: [PATCH 26/26] max v to 30 --- components/model/fence.vue | 1 + composables/useCalc.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/model/fence.vue b/components/model/fence.vue index 44a200f..222c2fd 100644 --- a/components/model/fence.vue +++ b/components/model/fence.vue @@ -53,6 +53,7 @@ const instanced_lamelle_material = props.models.lamelle.children[0].material const instanced_lamelle_count = 24 const instanced_v = [instanced_lamelle_geometry, instanced_lamelle_material, instanced_lamelle_count] watch([instanced_lamelle, fence_section, extra_section, lamelles_count, extra], () => { + // console.log(props.index, instanced_v, instanced_lamelle.value) for (let i = 0; i < instanced_lamelle_count; i++) { if (instanced_lamelle.value) { const scale_x = (((extra.value as number) || fence_section.value) * 10) diff --git a/composables/useCalc.ts b/composables/useCalc.ts index c11aef2..b164771 100644 --- a/composables/useCalc.ts +++ b/composables/useCalc.ts @@ -16,5 +16,5 @@ export const use_section_count = () => useState('section_count', () => n) export const use_extra_section = () => useState('extra_section', () => 0) export const use_total_length = () => useState('total_length', () => (((min + 104) * n) + 104) * 0.001) export const use_min_length = () => useState('min_length', () => 700) -export const use_max_size = () => useState('max_size', () => 40) +export const use_max_size = () => useState('max_size', () => 20) export const use_explosion_state = () => useState('explosion_state', () => false) \ No newline at end of file -- 2.40.1