-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Text to case converter app added (#556)
## Related Issue [Cite any related issue(s) this pull request addresses. If none, simply state "None”] write issue no. here ## Description Fixes: #537 @dhairyagothi I have added the text converter app white convert the text into upper case ,lower case , capitalize case , remove all the extra space with sark and light mode theme and alerts I have also added the text summary where you can see the words, characters and time of reading [Please include a brief description of the changes or features added] ## Type of PR - [ ] Bug fix - [ ] Feature enhancement - [ ] Documentation update - [ ] Security enhancement - [ ] Other (specify): _______________ check in issue by entering [X] in boxes ## Screenshots / Videos (if applicable) https://github.com/user-attachments/assets/283174f9-d98c-48e4-8f9d-1c0e78a7cf28 [Attach any relevant screenshots or videos demonstrating the changes] ## Checklist - [ ] I have performed a self-review of my code. - [ ] I have read and followed the Contribution Guidelines. - [ ] I have tested the changes thoroughly before submitting this pull request. - [ ] I have provided relevant issue numbers, screenshots, and videos after making the changes. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have followed the code style guidelines of this project. - [ ] I have checked for any existing open issues that my pull request may address. - [ ] I have ensured that my changes do not break any existing functionality. - [ ] Each contributor is allowed to create a maximum of 4 issues per day. This helps us manage and address issues efficiently. - [ ] I have read the resources for guidance listed below. - [ ] I have followed security best practices in my code changes. check in issue by entering [X] in boxes ## Additional Context [Include any additional information or context that might be helpful for reviewers.] ## Contribution Guidelines Thank you for considering contributing to our project! To ensure smooth collaboration and effective contribution management, please adhere to the following guidelines: ### Issue Creation 1. **Limit on Issues:** - Each contributor is allowed to create a maximum of **4 issues per day**. This helps us manage and address issues efficiently. ### Contribution Levels 2. **Basic Contributions:** - This project is primarily focused on documentation. Most of the setup has been completed, so contributors will generally need to work on basic code tasks, such as writing tests. - For these tasks, issues will be assigned the **Easy** label. 3. **Acknowledging Hard Work:** - If a contributor puts in significant effort on a task, the issue will be upgraded to **Medium**. This is our way of recognizing and appreciating extra effort. 4. **Feature Additions and Component Work:** - Contributors working on new features or components using JSX/TSX will be assigned a level based on the complexity and quality of their work. - The more complex and valuable the contribution, the higher the level assigned. ### Level Definitions - **Easy:** - Tasks are straightforward, such as fixing minor bugs, writing tests, or making simple documentation updates. - **Medium:** - Tasks require more effort, such as addressing complex bugs, improving existing features, or making substantial documentation improvements. - **Hard:** - Tasks are highly complex and involve significant new feature development, major refactoring, or extensive contributions to the project’s core components. We look forward to your contributions and appreciate your effort in helping us improve the project!
- Loading branch information
Showing
40 changed files
with
18,116 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Slide puzzle Game</title> | ||
<link rel="stylesheet" href="puzzle.css"> | ||
<script src="puzzle.js"></script> | ||
</head> | ||
<body> | ||
<img id="title" src="./img/logo.png" alt=""> | ||
<div id="board"></div> | ||
<h1><span id="turns">0</span></h1> | ||
<h1 id="time">Time Left: 05:00</h1> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
body{ | ||
font-family:Arial, Helvetica, sans-serif; | ||
text-align: center; | ||
color: #0c67a6; | ||
} | ||
|
||
#title{ | ||
height: 150px; | ||
width: 400px; | ||
} | ||
|
||
#board{ | ||
width: 360px; | ||
height: 360px; | ||
background-color: lightblue; | ||
margin: 0 auto; | ||
border: 10px solid #0c67a6; | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
#board img{ | ||
width: 118px; | ||
height: 118px; | ||
border:1px solid #0c67a6; | ||
|
||
} | ||
|
||
#time { | ||
/* margin: -31rem; */ | ||
margin-top: -34rem; | ||
margin-left: 50rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
var rows = 3; | ||
var column = 3; | ||
|
||
var currTile; | ||
var otherTile; // blank tile | ||
|
||
var turns = 0; | ||
|
||
var imgOrder = ["4", "2", "8", "5", "1", "6", "7", "9", "3"]; | ||
var winOrder = ["1.jpg", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg", "7.jpg", "8.jpg", "9.jpg"]; | ||
|
||
window.onload = function() { | ||
for (let r = 0; r < rows; r++) { | ||
for (let c = 0; c < column; c++) { | ||
let tile = document.createElement("img"); | ||
tile.id = r.toString() + "-" + c.toString(); | ||
tile.src = imgOrder.shift() + ".jpg"; | ||
|
||
// DRAG FUNCTIONALITY | ||
tile.addEventListener("dragstart", dragStart); // click an image | ||
tile.addEventListener("dragover", dragOver); // moving image around | ||
tile.addEventListener("dragenter", dragEnter); // dragging image onto another one | ||
tile.addEventListener("dragleave", dragLeave); // dragged image leaving another image | ||
tile.addEventListener("drop", dragDrop); // dropping the image | ||
tile.addEventListener("dragend", dragEnd); // swap the two tiles | ||
|
||
document.getElementById("board").append(tile); | ||
} | ||
} | ||
|
||
// Set a timer for 5 minutes (300,000 milliseconds) and display the countdown | ||
startTimer(5 * 60); | ||
}; | ||
|
||
function startTimer(duration) { | ||
var timer = duration, minutes, seconds; | ||
var interval = setInterval(function () { | ||
minutes = parseInt(timer / 60, 10); | ||
seconds = parseInt(timer % 60, 10); | ||
|
||
minutes = minutes < 10 ? "0" + minutes : minutes; | ||
seconds = seconds < 10 ? "0" + seconds : seconds; | ||
|
||
document.getElementById("time").innerText = "Time Left: " + minutes + ":" + seconds; | ||
|
||
if (--timer < 0) { | ||
clearInterval(interval); | ||
alert("Time's up! 5 minutes have passed."); | ||
} | ||
}, 1000); | ||
} | ||
|
||
function dragStart() { | ||
currTile = this; | ||
console.log("Drag Start: " + currTile.id); | ||
} | ||
|
||
function dragOver(e) { | ||
e.preventDefault(); | ||
} | ||
|
||
function dragEnter(e) { | ||
e.preventDefault(); | ||
} | ||
|
||
function dragLeave() {} | ||
|
||
function dragDrop() { | ||
otherTile = this; | ||
console.log("Drag Drop: " + otherTile.id); | ||
} | ||
|
||
function dragEnd() { | ||
if (!otherTile.src.includes("3.jpg")) { | ||
console.log("Not a valid move. Tile is not blank."); | ||
return; | ||
} | ||
console.log("Drag End: " + currTile.id + " -> " + otherTile.id); | ||
|
||
let currCoords = currTile.id.split("-"); | ||
let r = parseInt(currCoords[0]); | ||
let c = parseInt(currCoords[1]); | ||
|
||
let otherCoords = otherTile.id.split("-"); | ||
let r2 = parseInt(otherCoords[0]); | ||
let c2 = parseInt(otherCoords[1]); | ||
|
||
let moveLeft = r == r2 && c2 == c - 1; | ||
let moveRight = r == r2 && c2 == c + 1; | ||
let moveUp = c == c2 && r2 == r - 1; | ||
let moveDown = c == c2 && r2 == r + 1; | ||
|
||
let isAdjacent = moveLeft || moveRight || moveUp || moveDown; | ||
console.log("Is Adjacent: " + isAdjacent); | ||
|
||
if (isAdjacent) { | ||
let currImg = currTile.src; | ||
let otherImg = otherTile.src; | ||
|
||
currTile.src = otherImg; | ||
otherTile.src = currImg; | ||
|
||
turns++; | ||
document.getElementById("turns").innerText = "Turns: " + turns; | ||
console.log("Turns: " + turns); | ||
|
||
// Check if the player has won | ||
if (checkWin()) { | ||
alert("Congratulations! You've solved the puzzle!"); | ||
} | ||
} | ||
} | ||
|
||
function checkWin() { | ||
let tiles = document.getElementsByTagName("img"); | ||
for (let i = 0; i < tiles.length; i++) { | ||
if (tiles[i].src.includes(winOrder[i]) === false) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
Oops, something went wrong.