├── CONTRIBUTION.md ├── Calculator ├── c10.jpg ├── cal.css ├── cal.html ├── cal.js └── readme.md ├── Clock ├── clock.png ├── index.css ├── index.html ├── index.js └── readme.md ├── LICENSE ├── Password Generator ├── index.css ├── index.html └── index.js ├── README.md ├── TODO-LIST ├── .gitignore ├── package-lock.json ├── package.json ├── public │ └── index.html ├── readme.md └── src │ ├── App.css │ ├── App.js │ ├── components │ └── Todo.jsx │ ├── index.css │ ├── index.js │ └── pages │ └── Home.jsx ├── Temperature-Converter ├── CSS │ └── style.css ├── Img │ └── favicon.ico ├── Js │ └── script.js ├── README.md └── index.html └── textutils ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt └── src ├── App.css ├── App.js ├── App.test.js ├── components ├── Navbar.js └── Textforms.js ├── index.css ├── index.js ├── logo.svg ├── reportWebVitals.js └── setupTests.js /CONTRIBUTION.md: -------------------------------------------------------------------------------- 1 | # Contribution guidelines 2 | 3 | ## How to contribute ? 4 | 5 | You can contibute to this repository by following these steps: 6 | 7 | - Firstly, you open an issue with the changes you want to make 8 | - Wait until you get assigned to make these changes 9 | - Create a personal fork from the repository 10 | - Now, clone your forked repository to your local machine either by downloading the Zip file then extracting it or using the command `git clone` followed by the repository link 11 | - Create a new branch with the name of the feature you implemented 12 | - Add your changes or fix the bug you issued about 13 | - Commit your changes to the local branch 14 | - Push the branch to your forked repository on Github 15 | - Finally, you can open a pull request to merge your branch to the original repository 16 | 17 | After making the contribution, it's good to pull the changes from the original repository. 18 | -------------------------------------------------------------------------------- /Calculator/c10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axe-Pearl/Mini-Projects/42ffbc4e529787ba02452a8eaa8994c05564b917/Calculator/c10.jpg -------------------------------------------------------------------------------- /Calculator/cal.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image: url(c10.jpg); 3 | background-repeat: no-repeat; 4 | height: 100%; 5 | width: 100%; 6 | overflow: hidden; 7 | background-position: center; 8 | background-size: cover; 9 | } 10 | button{ 11 | width: 200px; 12 | height: 50px; 13 | margin: 2px 2px; 14 | background-color: blue; 15 | color: #fff4a7; 16 | border-radius: 20px; 17 | font-weight: bolder; 18 | font-style: italic; 19 | font-size: larger; 20 | } 21 | #outside{ 22 | color: white; 23 | border-radius: 5px; 24 | margin: auto; 25 | margin-top: 100px; 26 | width: 1000px; 27 | height: 600px; 28 | padding: 5px; 29 | } 30 | #heading{ 31 | margin: auto; 32 | width: 412px; 33 | font-size: xxx-large; 34 | } 35 | #btn{ 36 | margin: auto; 37 | margin-top: 20px; 38 | width: 815px; 39 | } 40 | .btn-inside{ 41 | width: 900px; 42 | } 43 | #val{ 44 | /* border: 2px solid red; */ 45 | height: 55px; 46 | width: 783px; 47 | margin-left: 100px; 48 | color: white; 49 | padding-left: 37px; 50 | padding-top: 20px; 51 | font-weight: bolder; 52 | } 53 | #res{ 54 | /* border: 2px solid red; */ 55 | height: 50px; 56 | width: 783px; 57 | margin-left: 100px; 58 | color: white; 59 | padding-left: 37px; 60 | padding-top: 25px; 61 | font-weight: bolder; 62 | font-size: x-large; 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Calculator/cal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Calculator 10 | 11 | 12 | 13 |
14 |

🖩CALCULATOR🖩

15 |
16 |
17 |

18 |
19 |
20 |

21 |
22 |
23 |
24 | 25 | 26 | 27 | 28 |
29 |
30 | 31 | 32 | 33 | 34 |
35 |
36 | 37 | 38 | 39 | 40 |
41 |
42 | 43 | 44 | 45 | 46 |
47 | 48 |
49 |
50 |
51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Calculator/cal.js: -------------------------------------------------------------------------------- 1 | let valEl = document.getElementById("val") 2 | let resEl = document.getElementById("res") 3 | function clearer(){ 4 | valEl.innerText = "" 5 | resEl.innerText = "" 6 | } 7 | function adder(k){ 8 | valEl.innerText += k 9 | if(k=='*' || k=='+' || k=='-' || k=='/'){ 10 | compute(0) 11 | } 12 | } 13 | function compute(is){ 14 | let temp = valEl.innerText, i 15 | let t = temp[temp.length-1]; 16 | for(i=0;i 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Password Generator/index.css: -------------------------------------------------------------------------------- 1 | body{ 2 | box-sizing: border-box; 3 | font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; 4 | background-color: #1F2937; 5 | } 6 | 7 | .container{ 8 | margin-left: 20%; 9 | margin-right: 10%; 10 | } 11 | 12 | #headline { 13 | color:#10B981; 14 | } 15 | 16 | #btn { 17 | background-color: #10B981; 18 | padding:.7em; 19 | color: white; 20 | font-size: medium; 21 | font-weight: 500; 22 | border: none; 23 | margin-bottom: 1em; 24 | margin-top: 1em; 25 | cursor: pointer; 26 | border-radius:.5rem; 27 | } 28 | 29 | hr{ 30 | color: #273549; 31 | position: absolute; 32 | 33 | width: 30rem; 34 | } 35 | 36 | #PassContainer{ 37 | border: 2px solid; 38 | margin-top: 1.5em; 39 | margin-right: 2em; 40 | padding-bottom: 2.5rem; 41 | width: 17em; 42 | height: 3em; 43 | line-height: normal; 44 | display: block; 45 | border-radius: .5rem; 46 | background-color: #273549; 47 | color:#000000; 48 | } 49 | .Password1{ 50 | color:#55F991; 51 | } 52 | .Password2{ 53 | color:#55F991; 54 | } 55 | 56 | #headline1{ 57 | margin-top: 2em; 58 | color: aliceblue; 59 | font-weight: 800; 60 | margin-bottom: 0; 61 | font-size: 2.5rem; 62 | } 63 | 64 | #headline2{ 65 | margin-top: 0em; 66 | margin-bottom: 0; 67 | font-size: 2.5em; 68 | color:#55F991; 69 | 70 | } 71 | #line{ 72 | color: #D5D4D8; 73 | } 74 | 75 | .password-container{ 76 | display: flex; 77 | 78 | } 79 | 80 | .switch{ 81 | margin-top: 1em; 82 | margin-left:.5em; 83 | position: relative; 84 | display: inline-block; 85 | width: 60px; 86 | height: 34px; 87 | } 88 | 89 | .switch input { 90 | opacity: 0; 91 | width: 0; 92 | height: 0; 93 | } 94 | 95 | .slider{ 96 | position: absolute; 97 | cursor: pointer; 98 | top: 0; 99 | left: 0; 100 | right: 0; 101 | bottom: 0; 102 | background-color: #273549; 103 | -webkit-transition:.4s; 104 | transition: .4s; 105 | } 106 | 107 | .slider:before { 108 | position: absolute; 109 | content: ""; 110 | height: 26px; 111 | width: 26px; 112 | left: 4px; 113 | bottom: 4px; 114 | background-color: white; 115 | -webkit-transition: .4s; 116 | transition: .4s; 117 | } 118 | 119 | input:checked + .slider{ 120 | background-color: #10B981; 121 | } 122 | 123 | 124 | input:checked + .slider:before { 125 | -webkit-transform: translateX(26px); 126 | -ms-transform: translateX(26px); 127 | transform: translateX(26px); 128 | } 129 | 130 | .slider.round { 131 | border-radius: 34px; 132 | } 133 | 134 | .slider.round:before{ 135 | border-radius: 50%; 136 | } -------------------------------------------------------------------------------- /Password Generator/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Password Generator 8 | 9 | 10 |
11 |

Generate a

12 |

random password

13 |

Never use an insecure password

14 | 15 |
16 |
17 |
22 | 26 | 27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Password Generator/index.js: -------------------------------------------------------------------------------- 1 | let mode = document.querySelector("#modeChanger"); 2 | let headline = document.getElementById("headline1"); 3 | let body = document.querySelector("body"); 4 | let line = document.querySelector("#line"); 5 | let hr = document.querySelector("hr"); 6 | let headline2 = document.querySelector("#headline2"); 7 | 8 | mode.addEventListener("change", () => { 9 | if (mode.checked) { 10 | headline.style.color = "#000000"; 11 | body.style.backgroundColor = "#ECFDF5" 12 | line.style.color = "#6B7280" 13 | hr.style.color = "#E8E7E9" 14 | headline2.style.color = "#10B981" 15 | 16 | 17 | } else { 18 | headline2.style.color = "#55F991" 19 | headline.style.color = "aliceblue"; 20 | body.style.backgroundColor = "#1F2937" 21 | hr.style.color = "#273549" 22 | } 23 | }); 24 | 25 | 26 | const lowercaseChars = "abcdefghijklmnopqrstuvwxyz"; 27 | const uppercaseChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 28 | const numberChars = "0123456789"; 29 | const specialChars = "!@#$%^&*"; 30 | 31 | const generatePassword = (length) => { 32 | const allChars = `${lowercaseChars}${uppercaseChars}${numberChars}${specialChars}`; 33 | let password = ""; 34 | 35 | for (let i = 0; i < length; i++) { 36 | const randomIndex = Math.floor(Math.random() * allChars.length); 37 | password += allChars.charAt(randomIndex); 38 | } 39 | return password; 40 | }; 41 | 42 | const displayPassword = () => { 43 | let dPassword1 = document.querySelector(".Password1"); 44 | dPassword1.textContent = generatePassword(13); 45 | let dPassword2 = document.querySelector(".Password2"); 46 | dPassword2.textContent = generatePassword(12); 47 | }; 48 | 49 | document.getElementById("btn").addEventListener("click", displayPassword); 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /TODO-LIST/.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 | -------------------------------------------------------------------------------- /TODO-LIST/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solution", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.16.5", 7 | "@testing-library/react": "^13.4.0", 8 | "@testing-library/user-event": "^13.5.0", 9 | "nanoid": "^4.0.0", 10 | "react": "^18.2.0", 11 | "react-dom": "^18.2.0", 12 | "react-scripts": "5.0.1", 13 | "web-vitals": "^2.1.4" 14 | }, 15 | "scripts": { 16 | "start": "react-scripts start", 17 | "build": "react-scripts build", 18 | "test": "react-scripts test", 19 | "eject": "react-scripts eject" 20 | }, 21 | "eslintConfig": { 22 | "extends": [ 23 | "react-app", 24 | "react-app/jest" 25 | ] 26 | }, 27 | "browserslist": { 28 | "production": [ 29 | ">0.2%", 30 | "not dead", 31 | "not op_mini all" 32 | ], 33 | "development": [ 34 | "last 1 chrome version", 35 | "last 1 firefox version", 36 | "last 1 safari version" 37 | ] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /TODO-LIST/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | React App 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /TODO-LIST/readme.md: -------------------------------------------------------------------------------- 1 | CREATE TODO LIKE THIS ONE - 2 | 3 | 4 | ![Todo](https://user-images.githubusercontent.com/66417880/193990733-7de8de40-0da9-4b50-98f6-2ac3221828eb.png) 5 | 6 | **Functionality** 7 | - Add the Item 8 | - Delete the Item 9 | - Change the Order of Items(Up and Down) 10 | 11 | **Optional-** It will be appreciated if on page reload order and data should be sustained. 12 | -------------------------------------------------------------------------------- /TODO-LIST/src/App.css: -------------------------------------------------------------------------------- 1 | .home { 2 | min-height: 100vh; 3 | background-color: white; 4 | } 5 | 6 | .container { 7 | display: flex; 8 | flex-direction: column; 9 | align-items: center; 10 | justify-content: center; 11 | text-align: center; 12 | padding: 15px; 13 | } 14 | 15 | .todo-form { 16 | display: flex; 17 | align-items: center; 18 | justify-content: space-between; 19 | width: 300px; 20 | padding: 10px; 21 | background-color: #E1F0F7; 22 | border-radius: 6px; 23 | gap: 5px; 24 | } 25 | 26 | input{ 27 | padding: 7px; 28 | width: 98%; 29 | border: none; 30 | border-radius: 6px; 31 | outline: none; 32 | } 33 | input:focus{ 34 | box-shadow: 0 0 0 2px #2cb0ee; 35 | } 36 | .btn-addTodo{ 37 | padding: 6px; 38 | border: none; 39 | border-radius: 4px; 40 | outline: none; 41 | background-color: #1DA1F2; 42 | cursor: pointer; 43 | color: white; 44 | font-weight: 700; 45 | font-size: 14px; 46 | width: 70px; 47 | } 48 | 49 | .todo { 50 | width: 300px; 51 | padding: 10px; 52 | background-color: #E1F0F7; 53 | border-radius: 6px; 54 | margin-top: 10px; 55 | display: flex; 56 | align-items: center; 57 | justify-content: space-between; 58 | } 59 | 60 | .text { 61 | font-size: 16px; 62 | font-weight: 700; 63 | margin-right: auto; 64 | overflow: hidden; 65 | overflow-wrap: break-word; 66 | } 67 | 68 | .utils{ 69 | display: flex; 70 | align-items: center; 71 | gap: 8px; 72 | } 73 | 74 | .go-up { 75 | width: 0; 76 | height: 0; 77 | border-left: 6px solid transparent; 78 | border-right: 6px solid transparent; 79 | border-bottom: 6px solid #1DA1F2; 80 | cursor: pointer; 81 | } 82 | 83 | .go-down{ 84 | width: 0; 85 | height: 0; 86 | border-left: 6px solid transparent; 87 | border-right: 6px solid transparent; 88 | border-top: 6px solid #1DA1F2; 89 | cursor: pointer; 90 | } 91 | 92 | .remove{ 93 | position: relative; 94 | width: 20px; 95 | height: 20px; 96 | cursor: pointer; 97 | } 98 | 99 | .remove::after { 100 | position: absolute; 101 | content:''; 102 | width: 100%; 103 | height: 2px; 104 | background-color: black; 105 | top:0; 106 | left:0; 107 | border-radius: 999px; 108 | transform: translateY(10px) rotate(-45deg); 109 | } 110 | 111 | .remove::before { 112 | position: absolute; 113 | content:''; 114 | width: 100%; 115 | height: 2px; 116 | background-color: black; 117 | top:100%; 118 | left:0; 119 | border-radius: 999px; 120 | transform: translateY(-10px) rotate(45deg); 121 | } -------------------------------------------------------------------------------- /TODO-LIST/src/App.js: -------------------------------------------------------------------------------- 1 | import './App.css'; 2 | import Home from './pages/Home'; 3 | 4 | function App() { 5 | return ( 6 |
7 | 8 |
9 | ); 10 | } 11 | 12 | export default App; 13 | -------------------------------------------------------------------------------- /TODO-LIST/src/components/Todo.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Todo = ({ todo,deleteTodo,moveUp,moveDown,total,index}) => { 4 | 5 | return ( 6 |
7 |

{todo.text}

8 |
9 |
moveUp(todo.id)}>
10 |
moveDown(todo.id)}>
11 |
deleteTodo(todo.id)}>
12 |
13 |
14 | ) 15 | } 16 | 17 | export default Todo 18 | -------------------------------------------------------------------------------- /TODO-LIST/src/index.css: -------------------------------------------------------------------------------- 1 | *,*::after,*::before { 2 | box-sizing: border-box; 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | body { 8 | margin: 0; 9 | font-family: 'open sans', sans-serif; 10 | } 11 | 12 | code { 13 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 14 | monospace; 15 | } 16 | 17 | html { 18 | -webkit-tap-highlight-color: transparent; 19 | scroll-behavior: smooth; 20 | } -------------------------------------------------------------------------------- /TODO-LIST/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); -------------------------------------------------------------------------------- /TODO-LIST/src/pages/Home.jsx: -------------------------------------------------------------------------------- 1 | import React,{useState,useEffect} from 'react' 2 | import {nanoid} from 'nanoid' 3 | import Todo from '../components/Todo' 4 | 5 | const getTodos = () => { 6 | let todos = localStorage.getItem('todos') 7 | if (todos) { 8 | return JSON.parse(todos) 9 | } 10 | return [] 11 | } 12 | 13 | const Home = () => { 14 | const [todos, setTodos] = useState(getTodos()) 15 | const [todo, setTodo] = useState('') 16 | 17 | const addTodo = (e) => { 18 | e.preventDefault() 19 | if (todo && todos.findIndex(t => t.text === todo) === -1) { 20 | setTodos(prev => [...prev, {id:nanoid(),text:todo}]) 21 | setTodo('') 22 | } 23 | } 24 | 25 | const deleteTodo = (id) => { 26 | setTodos(prev => prev.filter(t => t.id !== id)) 27 | } 28 | 29 | const moveUp = (id) => { 30 | let index = todos.findIndex(t => t.id === id) 31 | if (index > 0) { 32 | let temp = todos[index] 33 | todos[index] = todos[index - 1] 34 | todos[index - 1] = temp 35 | setTodos([...todos]) 36 | } 37 | } 38 | 39 | const moveDown = (id) => { 40 | let index = todos.findIndex(t => t.id === id) 41 | if (index < todos.length - 1) { 42 | let temp = todos[index] 43 | todos[index] = todos[index + 1] 44 | todos[index + 1] = temp 45 | setTodos([...todos]) 46 | } 47 | } 48 | useEffect(() => { 49 | localStorage.setItem('todos', JSON.stringify(todos)) 50 | },[todos]) 51 | 52 | return ( 53 |
54 |
55 |
56 | setTodo(e.target.value)}/> 57 | 58 |
59 | { 60 | todos.length? ( 61 |
62 | { 63 | todos.map((todo,index) => { 64 | return 65 | }) 66 | } 67 |
) :

No todo...

68 | 69 | } 70 |
71 |
72 | ) 73 | } 74 | 75 | export default Home -------------------------------------------------------------------------------- /Temperature-Converter/CSS/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Mulish:wght@300&display=swap'); 2 | 3 | *{ 4 | font-family: 'Mulish', sans-serif; 5 | } 6 | 7 | body{ 8 | width: 100%; 9 | height: 85vh; 10 | background-color: #eae2b7; 11 | display: grid; 12 | justify-content: center; 13 | align-items: center; 14 | place-items: center; 15 | } 16 | 17 | #fa{ 18 | font-size: 60px; 19 | } 20 | 21 | form{ 22 | background-color: #fab1a0; 23 | padding: 50px; 24 | display: flex; 25 | flex-direction: column; 26 | -webkit-box-shadow: 0 10px 6px -6px #777; 27 | -moz-box-shadow: 0 10px 6px -6px #777; 28 | box-shadow: 0 10px 6px -6px #777; 29 | border-radius: 10px; 30 | } 31 | 32 | #tempCalc label{ 33 | font-size: 30px; 34 | } 35 | 36 | /* [type="submit"]{ 37 | height: 35px; 38 | margin: 20px; 39 | width: 100px; 40 | font-size: 15px; 41 | border: none; 42 | border-radius: 4px; 43 | background-color: black; 44 | color: white; 45 | } */ 46 | 47 | #resultContainer{ 48 | font-size: 35px; 49 | } -------------------------------------------------------------------------------- /Temperature-Converter/Img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axe-Pearl/Mini-Projects/42ffbc4e529787ba02452a8eaa8994c05564b917/Temperature-Converter/Img/favicon.ico -------------------------------------------------------------------------------- /Temperature-Converter/Js/script.js: -------------------------------------------------------------------------------- 1 | console.log('Welcome to 🌡️ Temperature Converter'); 2 | 3 | const tempLoad = () => { 4 | let fa = document.getElementById('fa'); 5 | fa.innerHTML = ""; 6 | fa.style.color = "#ffa41b"; 7 | 8 | setTimeout(() => { 9 | fa.innerHTML = ""; 10 | fa.style.color = "#ffa41b"; 11 | }, 1000) 12 | 13 | setTimeout(() => { 14 | fa.innerHTML = ""; 15 | }, 2000) 16 | 17 | setTimeout(() => { 18 | fa.innerHTML = ""; 19 | }, 3000) 20 | 21 | setTimeout(() => { 22 | fa.innerHTML = ""; 23 | fa.style.color = "#ff5151"; 24 | }, 4000) 25 | } 26 | 27 | setInterval(() => { 28 | fa.style.color = "#ffa41b"; 29 | tempLoad(); 30 | }, 5000); 31 | 32 | 33 | tempLoad(); 34 | 35 | const calculateTemp = () => { 36 | const numberTemp = document.getElementById('temp').value; 37 | // console.log(numberTemp); 38 | 39 | const tempSelected = document.querySelector('#temp_diff'); 40 | const valeTemp = temp_diff.options[tempSelected.selectedIndex].value; 41 | // console.log(valeTemp); 42 | 43 | 44 | // Convert temperature from Celcius to Fahrenheit 45 | const celTOfah = (cel) => { 46 | let fahrenheit = (cel * (9 / 5) + 32); 47 | return fahrenheit; 48 | } 49 | 50 | // Convert temperature from Fahrenheit to Celsius 51 | const fahTOcel = (fehr) => { 52 | let celsius = ((fehr - 32) * 5 / 9); 53 | return celsius; 54 | } 55 | 56 | let result; 57 | if (valeTemp == "cel") { 58 | result = celTOfah(numberTemp); 59 | document.getElementById('resultContainer').innerHTML = `= ${result}°Fahrenheit`; 60 | } else { 61 | result = fahTOcel(numberTemp); 62 | document.getElementById('resultContainer').innerHTML = `= ${result}°Celsius`; 63 | } 64 | 65 | setTimeout(() => { 66 | window.location.reload(); 67 | }, 1500); 68 | } 69 | 70 | -------------------------------------------------------------------------------- /Temperature-Converter/README.md: -------------------------------------------------------------------------------- 1 |

🌡️ Temperature Converter Application

2 | 3 | ## About 4 | A temperature converter helps convert the temperature between Fahrenheit and Celsius scale. Temperature is measured using a thermometer. While Kelvin (K) is the SI unit of 5 | temperature, people generally use Centigrade or Celsius (°C) and Fahrenheit (°F) to measure temperature. 6 | 7 | ## Features 8 | In this application, you can convert the temperature from Celsius to Fahrenheit and vice-versa. 9 | 10 | ## Made with 11 | |HTML|CSS|Javascript| 12 | |---|---|---| 13 | 14 | ## Link 15 | https://thenewc0der-24.github.io/Temperature__Converter-Application/ 16 | 17 | --- 18 |

Hope this application helpful to you !!

19 | -------------------------------------------------------------------------------- /Temperature-Converter/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | Temperature Converter 26 | 27 | 28 | 29 | 30 |

Temperature Converter

31 | 32 |
33 | 34 |
35 |
36 | 37 |
38 |
39 | 43 |
44 |
45 | 46 | 47 | 48 |
49 | 50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /textutils/.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 | -------------------------------------------------------------------------------- /textutils/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 | -------------------------------------------------------------------------------- /textutils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "textutils", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.17.0", 7 | "@testing-library/react": "^13.4.0", 8 | "@testing-library/user-event": "^13.5.0", 9 | "react": "^18.2.0", 10 | "react-dom": "^18.2.0", 11 | "react-scripts": "5.0.1", 12 | "web-vitals": "^2.1.4" 13 | }, 14 | "scripts": { 15 | "start": "react-scripts start", 16 | "build": "react-scripts build", 17 | "test": "react-scripts test", 18 | "eject": "react-scripts eject" 19 | }, 20 | "eslintConfig": { 21 | "extends": [ 22 | "react-app", 23 | "react-app/jest" 24 | ] 25 | }, 26 | "browserslist": { 27 | "production": [ 28 | ">0.2%", 29 | "not dead", 30 | "not op_mini all" 31 | ], 32 | "development": [ 33 | "last 1 chrome version", 34 | "last 1 firefox version", 35 | "last 1 safari version" 36 | ] 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /textutils/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axe-Pearl/Mini-Projects/42ffbc4e529787ba02452a8eaa8994c05564b917/textutils/public/favicon.ico -------------------------------------------------------------------------------- /textutils/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | 28 | React App 29 | 30 | 31 | 32 |
33 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /textutils/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axe-Pearl/Mini-Projects/42ffbc4e529787ba02452a8eaa8994c05564b917/textutils/public/logo192.png -------------------------------------------------------------------------------- /textutils/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axe-Pearl/Mini-Projects/42ffbc4e529787ba02452a8eaa8994c05564b917/textutils/public/logo512.png -------------------------------------------------------------------------------- /textutils/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 | -------------------------------------------------------------------------------- /textutils/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /textutils/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /textutils/src/App.js: -------------------------------------------------------------------------------- 1 | import logo from './logo.svg'; 2 | import './App.css'; 3 | import Navbar from './components/Navbar'; 4 | import Textforms from './components/Textforms'; 5 | import { useState } from 'react'; 6 | 7 | function App() { 8 | const [Mode,setMode] = useState('light'); 9 | 10 | const toggleMode =()=>{ 11 | if(Mode=== 'light'){ 12 | setMode('dark'); 13 | document.body.style.backgroundColor='#352F44'; 14 | } 15 | else{ 16 | setMode('light'); 17 | document.body.style.backgroundColor='white'; 18 | } 19 | } 20 | return ( 21 | <> 22 | 23 |
24 | 25 |
26 | 27 | ); 28 | } 29 | 30 | export default App; 31 | -------------------------------------------------------------------------------- /textutils/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /textutils/src/components/Navbar.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import PropTypes from 'prop-types' 3 | 4 | export default function Navbar(props) { 5 | return ( 6 | 46 | ) 47 | } 48 | 49 | Navbar.propTypes = {title:PropTypes.string.isRequired , 50 | aboutText:PropTypes.string.isRequired } 51 | -------------------------------------------------------------------------------- /textutils/src/components/Textforms.js: -------------------------------------------------------------------------------- 1 | import React,{useState} from 'react' 2 | 3 | 4 | export default function Textforms(props) { 5 | const handleupClick = ()=>{ 6 | // console.log("upppercase was clicked"+ text); 7 | let newText= text.toUpperCase(); 8 | setText(newText) 9 | } 10 | const handlelowClick = ()=>{ 11 | // console.log("upppercase was clicked"+ text); 12 | let newText= text.toLowerCase(); 13 | setText(newText) 14 | } 15 | const handleClick = ()=>{ 16 | // console.log("upppercase was clicked"+ text); 17 | let newText= (""); 18 | setText(newText) 19 | } 20 | const handlecopyClick = ()=>{ 21 | var text = document.getElementById("mybox"); 22 | text.select(); 23 | navigator.clipboard.writeText(text.value); 24 | 25 | } 26 | // const handleinClick = ()=>{ 27 | // // console.log("upppercase was clicked"+ text); 28 | // let newText= if{ 29 | 30 | // }; 31 | // setText(newText) 32 | // } 33 | const handleOnChange = (event)=>{ 34 | // console.log("on change"); 35 | setText(event.target.value); 36 | } 37 | const[text,setText]= useState(''); 38 | 39 | return ( 40 | <>
41 |

{props.heading}

42 |
43 | 44 | 45 |
46 | 47 | 48 | 49 | 50 | {/* */} 51 |
52 |
53 |

Your text summary

54 |

55 | {text.length} characters and {text.split(" ").filter((element)=>{return element.length!==0}).length} words 56 |

57 | 58 |

preview

59 | {text} 60 |
61 | 62 | ) 63 | } 64 | -------------------------------------------------------------------------------- /textutils/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /textutils/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /textutils/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /textutils/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /textutils/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | --------------------------------------------------------------------------------