From 0b422a9cbd73e0c6681bcee6135663f08d16ba5b Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Fri, 7 Jun 2024 13:05:12 +0300 Subject: [PATCH] color picker --- assets/main.scss | 15 ++++++++++++++- components/calcValues.vue | 20 ++++---------------- components/colorPicker.vue | 30 ++++++++++++++++++++++++++++++ components/model/parametric.vue | 2 +- 4 files changed, 49 insertions(+), 18 deletions(-) create mode 100644 components/colorPicker.vue diff --git a/assets/main.scss b/assets/main.scss index 123ae5e..6f1b24d 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -117,7 +117,7 @@ a[href^="#"] { } label { - @apply inline-block mb-2 text-sm font-medium text-gray-900 dark:text-white; + @apply inline-block text-sm font-medium text-gray-900 dark:text-white; } input { @@ -137,4 +137,17 @@ button { &-row { @apply flex flex-row gap-4; } + &-item { + @apply flex flex-row gap-4 items-center justify-center; + } +} + +.color_picker { + @apply leading-none; + &-selected { + @apply size-10 rounded border-gray-300 inline-block leading-none; + } + &-changer { + @apply absolute w-80 z-10 bg-white flex gap-0; + } } \ No newline at end of file diff --git a/components/calcValues.vue b/components/calcValues.vue index fc6335e..a361020 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -2,8 +2,8 @@ import converter from 'ral-hex-converter' const lamelles_count = useState('lamelles_count', () => 8) const fence_section = useState('fence_section', () => 2000 * 0.001) -const pillar_color = useState('pillar_color', () => 'gray') -const lamelle_color = useState('lamelle_color', () => 'violet') +const pillar_color = useState('pillar_color', () => '#828282') +const lamelle_color = useState('lamelle_color', () => '#C2B078') const parametric = { length: { @@ -66,26 +66,14 @@ watch(form_state, changeParametres, { deep: true })
-
-
- +
-
-
- +
diff --git a/components/colorPicker.vue b/components/colorPicker.vue new file mode 100644 index 0000000..c317760 --- /dev/null +++ b/components/colorPicker.vue @@ -0,0 +1,30 @@ + + \ No newline at end of file diff --git a/components/model/parametric.vue b/components/model/parametric.vue index 60482ec..0170ce5 100644 --- a/components/model/parametric.vue +++ b/components/model/parametric.vue @@ -11,7 +11,7 @@ const lSize = 0.115 const bSize = 0.0235 const pillar_size = 80 * 0.001 -const {renderer} = useTresContext() +const { renderer } = useTresContext() renderer.value.toneMapping = NeutralToneMapping