From 7f0c4e23184de60634fb545b49ff77262933e6f1 Mon Sep 17 00:00:00 2001 From: 0hee0 Date: Sun, 4 Dec 2022 16:04:06 +0900 Subject: [PATCH] [#9] feat: update ui - make solution card horizontal scrollable - make button size consistent --- bowwowcare/dist/output.css | 353 ++++++++++++------ bowwowcare/src/components/Modal/Modal.js | 4 +- .../YoutubeEmbed/YoutubeEmbed.js | 0 .../{Solution => }/YoutubeEmbed/youtube.css | 0 .../SolutionPage/Sections}/Solution.js | 16 +- .../src/views/SolutionPage/SolutionPage.js | 44 ++- 6 files changed, 285 insertions(+), 132 deletions(-) rename bowwowcare/src/components/{Solution => }/YoutubeEmbed/YoutubeEmbed.js (100%) rename bowwowcare/src/components/{Solution => }/YoutubeEmbed/youtube.css (100%) rename bowwowcare/src/{components/Solution => views/SolutionPage/Sections}/Solution.js (66%) diff --git a/bowwowcare/dist/output.css b/bowwowcare/dist/output.css index f7bb3ea..929c6ee 100644 --- a/bowwowcare/dist/output.css +++ b/bowwowcare/dist/output.css @@ -22,7 +22,7 @@ ::before, ::after { - --tw-content: ""; + --tw-content: ''; } /* @@ -41,12 +41,10 @@ html { /* 3 */ tab-size: 4; /* 3 */ - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, - "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, - "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ -webkit-font-feature-settings: normal; - font-feature-settings: normal; + font-feature-settings: normal; /* 5 */ } @@ -83,7 +81,7 @@ Add the correct text decoration in Chrome, Edge, and Safari. abbr:where([title]) { -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; + text-decoration: underline dotted; } /* @@ -127,8 +125,7 @@ code, kbd, samp, pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, - "Liberation Mono", "Courier New", monospace; + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ font-size: 1em; /* 2 */ @@ -219,9 +216,9 @@ select { */ button, -[type="button"], -[type="reset"], -[type="submit"] { +[type='button'], +[type='reset'], +[type='submit'] { -webkit-appearance: button; /* 1 */ background-color: transparent; @@ -268,7 +265,7 @@ Correct the cursor style of increment and decrement buttons in Safari. 2. Correct the outline style in Safari. */ -[type="search"] { +[type='search'] { -webkit-appearance: textfield; /* 1 */ outline-offset: -2px; @@ -353,8 +350,7 @@ textarea { 2. Set the default placeholder color to the user's configured gray 400 color. */ -input::-webkit-input-placeholder, -textarea::-webkit-input-placeholder { +input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { opacity: 1; /* 1 */ color: #9ca3af; @@ -422,9 +418,7 @@ video { display: none; } -*, -::before, -::after { +*, ::before, ::after { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; @@ -434,16 +428,16 @@ video { --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); @@ -451,24 +445,24 @@ video { --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; } ::-webkit-backdrop { @@ -481,16 +475,16 @@ video { --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); @@ -498,24 +492,24 @@ video { --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; } ::backdrop { @@ -528,16 +522,16 @@ video { --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); @@ -545,24 +539,24 @@ video { --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; } .container { @@ -611,6 +605,10 @@ video { position: absolute; } +.relative { + position: relative; +} + .bottom-10 { bottom: 2.5rem; } @@ -627,6 +625,10 @@ video { right: 0px; } +.top-0 { + top: 0px; +} + .m-auto { margin: auto; } @@ -669,6 +671,21 @@ video { margin-bottom: 2.5rem; } +.mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; +} + +.mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; +} + +.mx-3 { + margin-left: 0.75rem; + margin-right: 0.75rem; +} + .mt-20 { margin-top: 5rem; } @@ -729,6 +746,22 @@ video { margin-top: 7rem; } +.mb-10 { + margin-bottom: 2.5rem; +} + +.mr-6 { + margin-right: 1.5rem; +} + +.ml-1 { + margin-left: 0.25rem; +} + +.mr-5 { + margin-right: 1.25rem; +} + .flex { display: flex; } @@ -785,6 +818,18 @@ video { height: 24rem; } +.h-4\/6 { + height: 66.666667%; +} + +.min-h-screen { + min-height: 100vh; +} + +.min-h-full { + min-height: 100%; +} + .w-full { width: 100%; } @@ -813,6 +858,26 @@ video { width: 100vw; } +.w-11\/12 { + width: 91.666667%; +} + +.w-5\/6 { + width: 83.333333%; +} + +.w-64 { + width: 16rem; +} + +.w-80 { + width: 20rem; +} + +.flex-1 { + flex: 1 1 0%; +} + .basis-2\/4 { flex-basis: 50%; } @@ -861,6 +926,10 @@ video { align-self: flex-end; } +.overflow-x-auto { + overflow-x: auto; +} + .rounded-md { border-radius: 0.375rem; } @@ -896,6 +965,15 @@ video { background-color: transparent; } +.bg-neutral-500\/50 { + background-color: rgb(115 115 115 / 0.5); +} + +.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + .p-4 { padding: 1rem; } @@ -934,6 +1012,36 @@ video { padding-right: 2rem; } +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +.py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; +} + +.py-12 { + padding-top: 3rem; + padding-bottom: 3rem; +} + +.py-10 { + padding-top: 2.5rem; + padding-bottom: 2.5rem; +} + +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} + +.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} + .pl-4 { padding-left: 1rem; } @@ -950,6 +1058,34 @@ video { padding-top: 0.5rem; } +.pt-4 { + padding-top: 1rem; +} + +.pb-4 { + padding-bottom: 1rem; +} + +.pb-8 { + padding-bottom: 2rem; +} + +.pb-12 { + padding-bottom: 3rem; +} + +.pb-2 { + padding-bottom: 0.5rem; +} + +.pt-12 { + padding-top: 3rem; +} + +.pt-16 { + padding-top: 4rem; +} + .text-left { text-align: left; } @@ -1001,19 +1137,26 @@ video { } .accent-main-color { - accent-color: #38a8ac; + accent-color: #38A8AC; } .shadow-lg { - --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), - 0 4px 6px -4px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), - 0 4px 6px -4px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .hover\:border-main-color:hover { --tw-border-opacity: 1; border-color: rgb(56 168 172 / var(--tw-border-opacity)); } + +.hover\:bg-main-color:hover { + --tw-bg-opacity: 1; + background-color: rgb(56 168 172 / var(--tw-bg-opacity)); +} + +.hover\:text-white:hover { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} \ No newline at end of file diff --git a/bowwowcare/src/components/Modal/Modal.js b/bowwowcare/src/components/Modal/Modal.js index 7bafa19..cd7f8c5 100644 --- a/bowwowcare/src/components/Modal/Modal.js +++ b/bowwowcare/src/components/Modal/Modal.js @@ -5,9 +5,9 @@ function Modal(props) { return props.trigger ? (
-
+
{props.solution}
-
diff --git a/bowwowcare/src/components/Solution/YoutubeEmbed/YoutubeEmbed.js b/bowwowcare/src/components/YoutubeEmbed/YoutubeEmbed.js similarity index 100% rename from bowwowcare/src/components/Solution/YoutubeEmbed/YoutubeEmbed.js rename to bowwowcare/src/components/YoutubeEmbed/YoutubeEmbed.js diff --git a/bowwowcare/src/components/Solution/YoutubeEmbed/youtube.css b/bowwowcare/src/components/YoutubeEmbed/youtube.css similarity index 100% rename from bowwowcare/src/components/Solution/YoutubeEmbed/youtube.css rename to bowwowcare/src/components/YoutubeEmbed/youtube.css diff --git a/bowwowcare/src/components/Solution/Solution.js b/bowwowcare/src/views/SolutionPage/Sections/Solution.js similarity index 66% rename from bowwowcare/src/components/Solution/Solution.js rename to bowwowcare/src/views/SolutionPage/Sections/Solution.js index 4bed96b..7a7066e 100644 --- a/bowwowcare/src/components/Solution/Solution.js +++ b/bowwowcare/src/views/SolutionPage/Sections/Solution.js @@ -1,10 +1,10 @@ import React, { useState } from "react"; -import Modal from "../Modal/Modal"; -import YoutubeEmbed from "./YoutubeEmbed/YoutubeEmbed"; -import { solutions } from "../../utils/Dictionary"; +import Modal from "../../../components/Modal/Modal"; +import YoutubeEmbed from "../../../components/YoutubeEmbed/YoutubeEmbed"; +import { solutions } from "../../../utils/Dictionary"; -import "./YoutubeEmbed/youtube.css"; +import "../../../components/YoutubeEmbed/youtube.css"; function Solution({ answer, emotion }) { const [popup, setPopup] = useState(false); @@ -20,10 +20,12 @@ function Solution({ answer, emotion }) { return (
-
{x.question}
-
{x.solution}
+
+
{x.question}
+
{x.solution}
+
+
);