diff --git a/assets/main.scss b/assets/main.scss index 4a0a29c..695e581 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -180,10 +180,11 @@ a[href^="#"] { &_calc { @apply py-0 relative; - > .container:first-child { - @apply relative h-[50vh] min-h-[600px] justify-between; - > * { - @apply z-10 + >.container:first-child { + @apply relative min-h-[650px] justify-between; + + >* { + @apply z-10 } } @@ -280,13 +281,32 @@ label { } input { - @apply bg-neutral-200 border border-gray-300 text-gray-900 rounded focus:ring-blue-500 focus:border-blue-500 text-lg p-2.5 disabled:cursor-not-allowed disabled:text-black; + @apply bg-white border border-gray-300 text-gray-900 text-lg p-2.5 rounded focus:ring-blue-500 focus:border-blue-500 focus-visible:border-blue-500 disabled:cursor-not-allowed disabled:text-black disabled:bg-neutral-300; } input[type=checkbox] { @apply w-4 h-4; } +input[type=range] { + @apply bg-neutral-300 appearance-none h-1; + + // [&::-webkit-slider-runnable-track]:h-1 + // [&::-moz-range-track]:h-1 + // [&::-webkit-slider-thumb]:bg-[#61C4FF] [&::-webkit-slider-thumb]:w-8 + // [&::-moz-range-thumb]:bg-[#61C4FF] + // ; + &::-moz-range-track, + &::-webkit-slider-runnable-track { + @apply h-1 bg-red-500; + } + + &::-moz-range-thumb, + &::-webkit-slider-thumb { + @apply bg-[#61C4FF] shadow-red-700; + } +} + textarea { @apply block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 max-w-full min-h-10 max-h-40; } @@ -323,11 +343,17 @@ button { } &_checkbox { - @apply w-full xl:w-auto flex-row xl:flex-initial flex-nowrap gap-4 + @apply w-full xl:w-auto flex-row xl:flex-initial flex-nowrap gap-4; + } + &_color { + @apply w-full; + .color_picker { + @apply ml-4; + } } input[type=range] { - @apply min-w-[calc(100%-8rem)] xl:min-w-min; + @apply min-w-[calc(100%-8rem)] xl:min-w-min py-0 -translate-y-1/2; } } } @@ -344,7 +370,7 @@ button { } &-changer { - @apply absolute w-80 z-10 p-4 border rounded bg-white flex gap-0 right-0 lg:right-auto; + @apply absolute w-80 z-20 p-4 border rounded bg-white flex gap-0 right-0; } } @@ -377,7 +403,7 @@ button { } .calc_table { - @apply flex flex-col gap-2 mb-4; + @apply flex flex-col gap-2 self-end; >.grid { @apply gap-2 items-center; diff --git a/components/calcModels.vue b/components/calcModels.vue index 8e9b45d..a929ec9 100644 --- a/components/calcModels.vue +++ b/components/calcModels.vue @@ -5,8 +5,8 @@ import { degToRad } from 'three/src/math/MathUtils.js'; const section_count = use_section_count() const extra_section = use_extra_section() -const lamelles_count = use_lamelles_count() -const lamelle_height = use_lamelle_height() +const fence_section = use_fence_section() + const defDistance = 3 const controlsState = reactive({ distance: section_count.value, @@ -26,8 +26,8 @@ const cameraStat = reactive({ const camera = ref("camera") -watch([section_count, extra_section], () => { - let v = (section_count.value + ~~(!!extra_section.value)); +watch(fence_section, ()=>{ + let v = fence_section.value * 2; if (v <= defDistance) v = defDistance controlsState.minDistance = v; controlsState.maxDistance = v; diff --git a/components/calcValues.vue b/components/calcValues.vue index 80a0ec1..390a84f 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -155,23 +155,33 @@ const goal = (target: string, params: object) => {
+ Выбранный размер забора слишком мал для расчета стоимости. Пожалуйста, выберите больший + размер, чтобы продолжить. +
++ Внимание! Дополнительная секция приводит к увеличению стоимости. + Рекомендуем вам изменить длину забора или длину секции! +
- Выбранный размер забора слишком мал для расчета стоимости. Пожалуйста, выберите больший - размер, чтобы продолжить. -
-- Внимание! Дополнительная секция приводит к увеличению стоимости. - Рекомендуем вам изменить длину забора или длину секции! -
-