diff --git a/front-end/src/components/PreferenceBox.css b/front-end/src/components/PreferenceBox.css new file mode 100644 index 0000000..dae28b7 --- /dev/null +++ b/front-end/src/components/PreferenceBox.css @@ -0,0 +1,24 @@ +.PreferenceBox { + background-color: lightgray; + padding: 40px 10px; + margin: 10px 20px; + border-radius: 20px; + border: 1px black solid; + flex: 33%; +} + +.active-box { + box-shadow: 5px 3px 5px grey; +} + +@media screen and (max-width: 650px) { + .PreferenceBox { + margin: 10px; + } +} + +@media screen and (max-width: 480px) { + .PreferenceBox { + margin: 5px; + } +} diff --git a/front-end/src/components/PreferenceBox.jsx b/front-end/src/components/PreferenceBox.jsx new file mode 100644 index 0000000..563c6d3 --- /dev/null +++ b/front-end/src/components/PreferenceBox.jsx @@ -0,0 +1,14 @@ +import './PreferenceBox.css'; + +import React from 'react'; + +function PreferenceBox(props) { + + return ( +
{props.sendToParent(props.value)}} key={props.value}> +

Preference #{props.value}

+
+ ); +} + +export default PreferenceBox; \ No newline at end of file diff --git a/front-end/src/components/SkipButton.css b/front-end/src/components/SkipButton.css index d4d9407..622ec2c 100644 --- a/front-end/src/components/SkipButton.css +++ b/front-end/src/components/SkipButton.css @@ -1,4 +1,7 @@ +<<<<<<< HEAD +======= +>>>>>>> created skip button and submit button components. began creating the dietary preferences page, still need to implement functions for when a preference is clicked (box border changes color to green) .SkipButton { } diff --git a/front-end/src/components/SkipButton.jsx b/front-end/src/components/SkipButton.jsx index 47425e5..00319ed 100644 --- a/front-end/src/components/SkipButton.jsx +++ b/front-end/src/components/SkipButton.jsx @@ -2,6 +2,7 @@ import './SkipButton.css'; import React from 'react'; + function SkipButton() { return (
diff --git a/front-end/src/components/SubmitButton.css b/front-end/src/components/SubmitButton.css new file mode 100644 index 0000000..ee653b2 --- /dev/null +++ b/front-end/src/components/SubmitButton.css @@ -0,0 +1,11 @@ +.SubmitButton { +} + +#submit-button{ + color:white; + padding: 16px 140px; + background-color: #3F3F3F; + font-weight: bold; + margin-top: 50px; + font-size: 16px; +} \ No newline at end of file diff --git a/front-end/src/components/SubmitButton.jsx b/front-end/src/components/SubmitButton.jsx new file mode 100644 index 0000000..df2e864 --- /dev/null +++ b/front-end/src/components/SubmitButton.jsx @@ -0,0 +1,13 @@ +import './SubmitButton.css'; + +import React from 'react'; + +function SubmitButton() { + return ( +
+ +
+ ); +} + +export default SubmitButton; \ No newline at end of file diff --git a/front-end/src/pages/App.jsx b/front-end/src/pages/App.jsx index 94a94fb..fa69f36 100644 --- a/front-end/src/pages/App.jsx +++ b/front-end/src/pages/App.jsx @@ -11,13 +11,13 @@ import CuisineVote from './CuisineVote'; import ChooseCuisine from './ChooseCuisine'; import RandomCuisine from './RandomCuisine'; import WinningCuisine from './WinningCuisine'; +import DietaryPreferences from './DietaryPreferences'; import ResultsPage from "./ResultsPage"; import RestaurauntDetails from "../pages/RestaurantDetails"; import Wait from './Wait'; import Footer from "../components/Footer"; import Header from "../components/Header"; - function App() { return (
@@ -40,6 +40,7 @@ function App() { +
diff --git a/front-end/src/pages/DietaryPreferences.css b/front-end/src/pages/DietaryPreferences.css new file mode 100644 index 0000000..cadf60e --- /dev/null +++ b/front-end/src/pages/DietaryPreferences.css @@ -0,0 +1,38 @@ +.DietaryPreferences #submit-button{ + margin: 50px 10px; +} + +#preferences-container { + display: flex; + flex-direction: column; + align-items: center; +} + +#dp-select-text{ + margin-top: 50px; + margin-bottom: 50px; +} + +.pref-container{ + display: flex; + justify-content: center; + width: 40%; +} + +@media screen and (max-width: 1200px) { + .pref-container { + width: 60%; + } +} + +@media screen and (max-width: 900px) { + .pref-container { + width: 80%; + } +} + +@media screen and (max-width: 650px) { + .pref-container { + width: 100%; + } +} diff --git a/front-end/src/pages/DietaryPreferences.jsx b/front-end/src/pages/DietaryPreferences.jsx new file mode 100644 index 0000000..3099e8f --- /dev/null +++ b/front-end/src/pages/DietaryPreferences.jsx @@ -0,0 +1,42 @@ +import './DietaryPreferences.css'; + +import SkipButton from '../components/SkipButton'; +import PreferenceBox from '../components/PreferenceBox'; +import SubmitButton from '../components/SubmitButton'; + +import React from 'react'; + +function DietaryPreferences() { + const [active, setActive] = React.useState(-1); + + const sendToParent = (index) => { + setActive(index); + } + + return ( +
+ +
Select any dietary preferences
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+ ); +} + +export default DietaryPreferences; \ No newline at end of file diff --git a/front-end/src/pages/InviteCode.jsx b/front-end/src/pages/InviteCode.jsx index 114c85c..820ca93 100644 --- a/front-end/src/pages/InviteCode.jsx +++ b/front-end/src/pages/InviteCode.jsx @@ -26,8 +26,10 @@ function InviteCode() {
- - + + ); diff --git a/front-end/src/pages/JoinRoom.jsx b/front-end/src/pages/JoinRoom.jsx index fafee03..84fd7e1 100644 --- a/front-end/src/pages/JoinRoom.jsx +++ b/front-end/src/pages/JoinRoom.jsx @@ -14,7 +14,7 @@ function JoinRoom() { - + diff --git a/front-end/src/pages/RandomCuisine.jsx b/front-end/src/pages/RandomCuisine.jsx index e9a8a81..029cd69 100644 --- a/front-end/src/pages/RandomCuisine.jsx +++ b/front-end/src/pages/RandomCuisine.jsx @@ -16,6 +16,6 @@ function RandomCuisine() { ); -}; +} export default RandomCuisine; \ No newline at end of file