From aa9c936f80a30e152a2af59223859b65f5a669fe Mon Sep 17 00:00:00 2001 From: webfussel Date: Thu, 13 Feb 2025 21:21:56 +0100 Subject: [PATCH] add: design, icons, calculation Implemented new design for PriceCards, added some icons for visuals, added calculation per price card --- app/assets/styles/button.css | 20 +++++++++++ app/assets/styles/formInput.css | 2 -- app/assets/styles/general.css | 27 ++++++++++++++- app/assets/styles/header.css | 2 -- app/assets/styles/priceCard.css | 47 +++++++++++++++++++++---- app/components/Pp/Button.vue | 9 +++++ app/components/Pp/FormInput.vue | 22 ++++++++++-- app/components/Pp/Header.vue | 4 +-- app/components/Pp/PriceCard.vue | 61 ++++++++++++++++++++++++++++----- app/pages/index.vue | 11 ++++-- nuxt.config.ts | 1 + 11 files changed, 180 insertions(+), 26 deletions(-) create mode 100644 app/assets/styles/button.css create mode 100644 app/components/Pp/Button.vue diff --git a/app/assets/styles/button.css b/app/assets/styles/button.css new file mode 100644 index 0000000..83b8a24 --- /dev/null +++ b/app/assets/styles/button.css @@ -0,0 +1,20 @@ +.Button { + all: unset; + display: flex; + justify-content: center; + align-items: center; + gap: 1rem; + + &.cta { + background: var(--color-main); + color: var(--color-white); + padding: .5rem 1.5rem; + border-radius: var(--radius-default); + box-shadow: var(--box-shadow-z2); + transition: var(--transition-default); + + &:hover { + background: var(--color-main-dark); + } + } +} \ No newline at end of file diff --git a/app/assets/styles/formInput.css b/app/assets/styles/formInput.css index 94677c5..44d228d 100644 --- a/app/assets/styles/formInput.css +++ b/app/assets/styles/formInput.css @@ -1,7 +1,5 @@ .Input { position: relative; - display: flex; - flex-direction: column; flex: 25% 1 0; border: 2px solid var(--color-blue); border-radius: var(--radius-default); diff --git a/app/assets/styles/general.css b/app/assets/styles/general.css index 48a8a2f..db67a02 100644 --- a/app/assets/styles/general.css +++ b/app/assets/styles/general.css @@ -5,11 +5,14 @@ --color-white: white; --color-red: #cc0001; - --color-blue-dark: #341f97; + --color-blue-light: #61a7fd; --color-blue: #2e86de; + --color-blue-dark: #1b4b7f; --color-grey: #c7c7c7; --color-main: var(--color-blue); + --color-main-light: var(--color-blue-light); + --color-main-dark: var(--color-blue-dark); --box-shadow-z2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); } @@ -24,4 +27,26 @@ html, body { height: 100%; overflow-x: hidden; + font-family: sans-serif; +} + +.card { + overflow: hidden; + border-radius: var(--radius-default); + border: 1px solid var(--color-main); + box-shadow: var(--box-shadow-z2); +} + +.content { + padding: 1rem; +} + +.pc-wrapper { + gap: 1rem; + margin-bottom: 1rem; +} + +.flex-col { + display: flex; + flex-direction: column; } \ No newline at end of file diff --git a/app/assets/styles/header.css b/app/assets/styles/header.css index af06e98..ad61b10 100644 --- a/app/assets/styles/header.css +++ b/app/assets/styles/header.css @@ -22,8 +22,6 @@ & nav, & ul { - display: flex; - flex-direction: column; gap: 1em; } diff --git a/app/assets/styles/priceCard.css b/app/assets/styles/priceCard.css index a227d1b..9831c48 100644 --- a/app/assets/styles/priceCard.css +++ b/app/assets/styles/priceCard.css @@ -1,16 +1,49 @@ .PriceCard { - padding: var(--padding-default); - display: flex; - flex-direction: column; - gap: 1rem; width: 100%; - background: var(--color-blue); - border-bottom: 1px solid var(--color-white); - & > .wrapper { + & > .padding { + gap: 1rem; + padding: var(--padding-default); + } + + & > .bg-blue { + background: var(--color-blue); + } + + & > .bg-white { + background: var(--color-white); + } + + & .wrapper { display: flex; + flex-direction: row; width: 100%; gap: 1rem; justify-content: space-between; + + & > * { + flex-basis: 30%; + flex-grow: 1; + } + + & > .info { + align-items: center; + + & > .icon { + color: var(--color-blue-light); + font-size: 2rem; + padding: .2rem; + } + + & > .price { + font-size: 1.2rem; + } + + & > .pro { + font-size: .8rem; + font-weight: bold; + color: var(--color-main-light); + } + } } } \ No newline at end of file diff --git a/app/components/Pp/Button.vue b/app/components/Pp/Button.vue new file mode 100644 index 0000000..f632bb4 --- /dev/null +++ b/app/components/Pp/Button.vue @@ -0,0 +1,9 @@ + + + diff --git a/app/components/Pp/FormInput.vue b/app/components/Pp/FormInput.vue index 20b6244..cc7743f 100644 --- a/app/components/Pp/FormInput.vue +++ b/app/components/Pp/FormInput.vue @@ -1,6 +1,16 @@ @@ -10,6 +20,8 @@ type Props = { type ?: 'text' | 'number' max ?: number min ?: number + step ?: number + required ?: boolean label : string id : string uid : number @@ -17,6 +29,8 @@ type Props = { const { type = 'text', + required = false, + step = 0.01, min = 1, max, label, @@ -24,5 +38,9 @@ const { uid, } = defineProps() +const emit = defineEmits(['blur']) + +const text = defineModel() + const makeId = () => `${id}_${uid}` diff --git a/app/components/Pp/Header.vue b/app/components/Pp/Header.vue index aeddbcf..51dfeb6 100644 --- a/app/components/Pp/Header.vue +++ b/app/components/Pp/Header.vue @@ -5,11 +5,11 @@ -