├── src ├── grad.jpg ├── shade.png ├── plum-grad.png ├── AstronomeBg.png ├── fairy-grad.png ├── nightingale.png ├── starsRepeat.png ├── starsRepeat.webp ├── grad-plus-stars.jpg ├── index.js ├── Pages │ ├── Home.js │ ├── Result.js │ └── Quiz.js ├── Astronome.js └── Style.css ├── public ├── favicon.ico ├── logo192.png ├── logo512.png ├── robots.txt ├── manifest.json └── index.html ├── .gitignore ├── package.json └── README.md /src/grad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/src/grad.jpg -------------------------------------------------------------------------------- /src/shade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/src/shade.png -------------------------------------------------------------------------------- /src/plum-grad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/src/plum-grad.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/public/logo512.png -------------------------------------------------------------------------------- /src/AstronomeBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/src/AstronomeBg.png -------------------------------------------------------------------------------- /src/fairy-grad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/src/fairy-grad.png -------------------------------------------------------------------------------- /src/nightingale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/src/nightingale.png -------------------------------------------------------------------------------- /src/starsRepeat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/src/starsRepeat.png -------------------------------------------------------------------------------- /src/starsRepeat.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/src/starsRepeat.webp -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/grad-plus-stars.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmrs/astronome/master/src/grad-plus-stars.jpg -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { HashRouter } from 'react-router-dom'; 4 | import Astronome from './Astronome'; 5 | import "./Style.css"; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /src/Pages/Home.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {useNavigate} from "react-router-dom"; 3 | import 'bootstrap/dist/css/bootstrap.min.css'; 4 | import {Container,Row,Col} from 'react-bootstrap'; 5 | import "../Style.css"; 6 | 7 | function Home () { 8 | let navigate = useNavigate(); 9 | return ( 10 |
11 |

Welcome to AstronoMe,

12 |

where we connect YOU with the stars. 13 |

Please use this application to learn your astrological sign! 14 |

15 | 16 | 17 |
18 | ); 19 | } 20 | export default Home; -------------------------------------------------------------------------------- /src/Astronome.js: -------------------------------------------------------------------------------- 1 | import {HashRouter as Router, Routes, Route} from "react-router-dom"; 2 | import Home from "./Pages/Home"; 3 | import Quiz from "./Pages/Quiz"; 4 | import Result from "./Pages/Result" 5 | import "./Style.css"; 6 | 7 | function Astronome() 8 | { 9 | return ( 10 | 11 |

AstronoMe

12 |

connecting you with the stars

13 |
14 | 15 | }/> 16 | }/> 17 | }/> 18 | 19 |
20 | ); 21 | } 22 | 23 | export default Astronome; 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "homepage": "https://melsrepo.github.io/astronome", 3 | "name": "astronome", 4 | "version": "0.1.0", 5 | "private": true, 6 | "dependencies": { 7 | "@testing-library/jest-dom": "^5.16.1", 8 | "@testing-library/react": "^12.1.2", 9 | "@testing-library/user-event": "^13.5.0", 10 | "bootstrap": "^5.1.3", 11 | "material-components-web": "^13.0.0", 12 | "mdb-react-ui-kit": "^2.2.0", 13 | "react": "^17.0.2", 14 | "react-bootstrap": "^2.1.0", 15 | "react-dom": "^17.0.2", 16 | "react-native-gradient-buttons": "^2.0.2", 17 | "react-router-dom": "^6.2.1", 18 | "react-scripts": "5.0.0", 19 | "web-vitals": "^2.1.2" 20 | }, 21 | "scripts": { 22 | "start": "react-scripts start", 23 | "predeploy": "npm run build", 24 | "deploy": "gh-pages -d build", 25 | "build": "react-scripts build", 26 | "test": "react-scripts test", 27 | "eject": "react-scripts eject" 28 | }, 29 | "eslintConfig": { 30 | "extends": [ 31 | "react-app", 32 | "react-app/jest" 33 | ] 34 | }, 35 | "browserslist": { 36 | "production": [ 37 | ">0.2%", 38 | "not dead", 39 | "not op_mini all" 40 | ], 41 | "development": [ 42 | "last 1 chrome version", 43 | "last 1 firefox version", 44 | "last 1 safari version" 45 | ] 46 | }, 47 | "devDependencies": { 48 | "gh-pages": "^4.0.0" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Style.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: white; 3 | background-image: url("./grad-plus-stars.jpg"); 4 | background-size: cover; 5 | /*background-repeat: no-repeat; */ 6 | 7 | } 8 | #topHead { 9 | margin-bottom: 50px; 10 | /*background-image: url("./starsRepeat.png"); */ 11 | padding-bottom: 20px; 12 | } 13 | h1 { 14 | padding-top: 24px; 15 | } 16 | 17 | h1,h2,h3,p,label 18 | { 19 | text-align: center; 20 | } 21 | 22 | h1 { 23 | font-size: 4rem;/*48px;*/ 24 | } 25 | h2 { 26 | font-size: 2.25rem; /*36px;*/ 27 | } 28 | #header2Top{ 29 | font-size: 1.5rem;/*24px;*/ 30 | } 31 | 32 | #welcomeMsgHead { 33 | margin-bottom: 20px; 34 | } 35 | 36 | #welcomeMsg { 37 | margin-bottom: 30px; 38 | } 39 | 40 | p,label { 41 | font-size: 1.5rem; /*24px; */ 42 | } 43 | 44 | .modSelect { 45 | max-width: 230px; 46 | background-color: black; 47 | color: white; 48 | border-color: #B2D7F3; 49 | border-width: 3px; 50 | border-radius: 5px; 51 | margin-bottom: 38px; 52 | } 53 | 54 | label{ 55 | margin-bottom: 40px; 56 | } 57 | 58 | button{ 59 | box-shadow: none; 60 | background-image: url("./shade.png"); 61 | background-size: cover; 62 | border: none; 63 | /*border-color: #B2D7F3; 64 | border-width: 3px; */ 65 | color: white; 66 | border-radius: 16px; 67 | padding: 20px; 68 | display: block; 69 | width: 30%; 70 | font-size: 1.5rem; /*24px; */ 71 | /* transition-duration: 0.4s; */ 72 | } 73 | 74 | button:hover { 75 | background-image: url("./plum-grad.png"); 76 | background-size: cover; 77 | } 78 | 79 | #quizBtn, #homeBtn, #resultBtn { 80 | margin-left: 190px; 81 | } 82 | 83 | 84 | #monthSlct { 85 | margin-left: 450px; 86 | } 87 | 88 | #daySlct { 89 | margin-left: 15px; 90 | } 91 | 92 | 93 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/Pages/Result.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useLocation } from 'react-router-dom'; 3 | import {useNavigate} from "react-router-dom"; 4 | import {Row,Col, Form} from 'react-bootstrap'; 5 | 6 | function Cardinal () 7 | { 8 | return ( 9 |

Your mode is Cardinal.

10 | Traits that may describe you are strong leader and self-starter. 11 |

Focus on completing tasks

); 12 | } 13 | function Fixed () 14 | { 15 | return ( 16 |

Your mode is Fixed. 17 |

Traits that may describe you are hard-working and reliable. 18 |

Focus on being flexible

19 | ); 20 | } 21 | function Mutable () { 22 | return ( 23 |

Your mode is Mutable. 24 |

Traits that may describe you are flexible and adaptable. 25 |

Focus on standing by conviction

26 | ); 27 | } 28 | 29 | function Err () { 30 | let navigate = useNavigate(); 31 | return ( 32 |
33 |

Please make sure to select a birth month and birth day

34 | 44 |
); 45 | } 46 | 47 | function Result() { 48 | const { state } = useLocation(); 49 | let signMode = ''; 50 | let traitMsg = ''; 51 | 52 | const calcMode = (s) => { 53 | if (s.signState == 'Aries' || s.signState == 'Cancer' || s.signState == 'Libra' || s.signState == 'Capricorn' ) { 54 | signMode = 'Cardinal'; 55 | traitMsg = 56 | 57 | } 58 | else if (s.signState == 'Taurus'|| s.signState == 'Leo'|| s.signState == 'Scorpio' || s.signState == 'Aquarius') { 59 | signMode = 'Fixed'; 60 | traitMsg = 61 | 62 | } 63 | else if (s.signState == 'Gemini'|| s.signState == 'Virgo'|| s.signState == 'Sagitarius' || s.signState == 'Pisces') { 64 | signMode = 'Mutable'; 65 | traitMsg = 66 | 67 | } 68 | else if (s.signState == ''){ 69 | signMode = ''; 70 | traitMsg = ; 71 | } 72 | } 73 | 74 | const renderResult = (s) => { 75 | if (s.signState != '') { 76 | return

Your result is

; 77 | } 78 | } 79 | 80 | return ( 81 | 82 |
83 | {calcMode(state)} 84 | 85 |
86 | {renderResult(state)} 87 |

{state.signState}

88 | {traitMsg} 89 |
90 |
91 | ); 92 | } 93 | export default Result; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /src/Pages/Quiz.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {useState, useEffect} from 'react'; 3 | import {useNavigate} from "react-router-dom"; 4 | import 'bootstrap/dist/css/bootstrap.min.css'; 5 | import {Container,Row,Col, Form} from 'react-bootstrap'; 6 | import "../Style.css"; 7 | 8 | function Quiz () { 9 | const [monthState, setMonth] = useState(""); 10 | const [dayState, setDay] = useState('default'); 11 | const [signState, setSign] = useState("not"); 12 | 13 | useEffect(() => { 14 | if((monthState == 'mar' && dayState > 20) || (monthState == 'apr' && dayState <= 19)) 15 | { 16 | setSign("Aries"); 17 | } 18 | else if((monthState == 'apr' && dayState > 19)|| (monthState == 'may' && dayState <= 20)) 19 | { 20 | setSign("Taurus"); 21 | 22 | } 23 | else if((monthState == 'may' && dayState > 20)|| (monthState == 'jun' && dayState <= 20)) 24 | { 25 | setSign("Gemini"); 26 | 27 | } 28 | else if((monthState == 'jun' && dayState > 20)|| (monthState == 'jul' && dayState <= 22)) 29 | { 30 | setSign("Cancer"); 31 | } 32 | else if((monthState == 'jul' && dayState > 22)|| (monthState == 'aug' && dayState <= 22)) 33 | { 34 | setSign("Leo"); 35 | } 36 | else if((monthState == 'aug' && dayState > 22)|| (monthState == 'sep' && dayState <= 22)) 37 | { 38 | setSign("Virgo"); 39 | } 40 | else if((monthState == 'sep' && dayState > 22)|| (monthState == 'oct' && dayState <= 22)) 41 | { 42 | setSign("Libra"); 43 | } 44 | else if((monthState == 'oct' && dayState > 22)|| (monthState == 'nov' && dayState <= 21)) 45 | { 46 | setSign("Scorpio"); 47 | } 48 | else if((monthState == 'nov' && dayState > 21)|| (monthState == 'dec' && dayState <= 21)) 49 | { 50 | setSign("Sagitarius"); 51 | } 52 | else if((monthState == 'dec' && dayState > 21) || (monthState == 'jan' && dayState <= 19)) 53 | { 54 | setSign("Capricorn"); 55 | } 56 | else if((monthState == 'jan' && dayState > 19)|| (monthState == 'feb' && dayState <= 18)) 57 | { 58 | setSign("Aquarius"); 59 | } 60 | else if((monthState == 'feb' && dayState > 18)|| (monthState == 'mar' && dayState <= 20)) 61 | { 62 | setSign("Pisces"); 63 | } 64 | else 65 | {setSign(""); 66 | } 67 | }); 68 | 69 | let navigate = useNavigate(); 70 | 71 | return ( 72 |
73 | 74 | 75 | {const selectedMonth = e.target.value; 76 | setMonth(selectedMonth);}}> 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | {const selectedDay = e.target.value; 95 | setDay(selectedDay);}}> 96 | 97 | {Array.from({length: 31 }, (_, i) => i + 1).map(day => )} 98 | 99 | 100 | 111 |
112 | ); 113 | } 114 | export default Quiz; --------------------------------------------------------------------------------