Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added DOM Challenge Starting Files/.DS_Store
Binary file not shown.
27 changes: 27 additions & 0 deletions DOM Challenge Starting Files/Domchal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>My Website</title>
<link rel="stylesheet" href="styles.css">

</head>
<body>

<h1>Hello</h1>

<input type="checkbox">

<button style=":active color:red;">Click Me</button>

<ul>
<li class="list">
<a href="https://www.google.com">Google</a>
</li>
<li class="list">Second</li>
<li class="list">Third</li>
</ul>

</body>

</html>
24 changes: 24 additions & 0 deletions DOM Challenge Starting Files/asgnw2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Unit 2 Assigment</title>
<style>
img{
width: 30%;
}

</style>
</head>
<body>
<div>
<img src = "3910996.jpg" alt = "picture of favourite game">
</div>
<audio src ="" ></audio>
<div>
<b>I love JQuery!!!</b>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions DOM Challenge Starting Files/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.query
3 changes: 3 additions & 0 deletions DOM Challenge Starting Files/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
h1 {
color: red;
}
26 changes: 26 additions & 0 deletions DOM Challenge Starting Files/webtechxamprep.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DOM MANIPULATION</title>

</head>
<body>
<h1>My first page</h1>
<p id ="par1">Hello world :></p>
<div class="ex">I am the best coder no kappa</div>
<div class="ex">I am a king </div>
<div class="ex">Zammy is the best</div>
<button onclick="myfun()">Click me </button>
</body>
<script>
document.getElementById("par1").innerHTML = "Papitomunyanyo!!";
function myfun(){
var x = document.getElementsByClassName("ex");
x[1].innerHTML="Hola mommy!!!"
}

</script>
</html>
Binary file added Dicee Challenge - Starting Files/.DS_Store
Binary file not shown.
33 changes: 33 additions & 0 deletions Dicee Challenge - Starting Files/dicee.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Dicee</title>
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css?family=Indie+Flower|Lobster" rel="stylesheet">

</head>
<body>

<div class="container">
<h1>Refresh Me</h1>

<div class="dice">
<p>Player 1</p>
<img class="img1" src="images\dice6.png">
</div>

<div class="dice">
<p>Player 2</p>
<img class="img2" src="images\dice6.png">
</div>

</div>

<script src="indx.js"></script>
</body>

<footer>
THE 🎲 DICE 🎲 GAME
</footer>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Dicee Challenge - Starting Files/images/dice2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Dicee Challenge - Starting Files/images/dice3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Dicee Challenge - Starting Files/images/dice4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Dicee Challenge - Starting Files/images/dice5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Dicee Challenge - Starting Files/images/dice6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions Dicee Challenge - Starting Files/indx.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
var randomNumber1 = Math.floor(Math.random() * 6) + 1;//gives a random number between 1-6

var randomDiceImage = "dice" + randomNumber1 + ".png";//Gives a random dice from 1-6

var randomImageSource = "images/" + randomDiceImage;//image of the dice

var image1 = document.querySelectorAll("img")[0];

image1.setAttribute("src",randomImageSource);

var randomNumber2 = Math.floor(Math.random() * 6) + 1;

var randomDiceImage2 = "dice" + randomNumber2 + ".png";//Gives a random dice from 1-6

var randomImageSource2 = "images/" + randomDiceImage2;//image of the dice

var image2 = document.querySelectorAll("img")[1];

image2.setAttribute("src",randomImageSource2);

if(randomNumber1 > randomNumber2){
document.querySelector("h1").innerHTML="🚩Player 1 Wins!!";
}
else if(randomNumber2 > randomNumber1){
document.querySelector("h1").innerHTML="Player 2 Wins!!🚩"
}
else{
document.querySelector("h1").innerHTML="DRAW!"
}
41 changes: 41 additions & 0 deletions Dicee Challenge - Starting Files/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.container {
width: 70%;
margin: auto;
text-align: center;
}

.dice {
text-align: center;
display: inline-block;

}

body {
background-color: #393E46;
}

h1 {
margin: 30px;
font-family: 'Lobster', cursive;
text-shadow: 5px 0 #232931;
font-size: 8rem;
color: #4ECCA3;
}

p {
font-size: 2rem;
color: #4ECCA3;
font-family: 'Indie Flower', cursive;
}

img {
width: 80%;
}

footer {
margin-top: 5%;
color: #EEEEEE;
text-align: center;
font-family: 'Indie Flower', cursive;

}
Binary file added Drum Kit Starting Files/.DS_Store
Binary file not shown.
81 changes: 81 additions & 0 deletions Drum Kit Starting Files/drums.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
body {
text-align: center;
background-color: #283149;
}

h1 {
font-size: 5rem;
color: #DBEDF3;
font-family: "Arvo", cursive;
text-shadow: 3px 0 #DA0463;

}

footer {
color: #DBEDF3;
font-family: sans-serif;
}

.w {
background-image: url("images/tom1.png");
}

.a {
background-image:url( "images/tom2.png");
}

.s {
background-image: url("images/tom3.png");
}

.d {
background-image: url("images/tom4.png");
}

.j {
background-image: url("images/snare.png");
}

.k {
background-image: url("images/crash.png");
}

.l {
background-image: url("images/kick.png");
}

.set {
margin: 10% auto;
}

.game-over {
background-color: red;
opacity: 0.8;
}

.pressed {
box-shadow: 0 3px 4px 0 #DBEDF3;
opacity: 0.5;
}

.red {
color: red;
}

.drum {
outline: none;
border: 10px solid #404B69;
font-size: 5rem;
font-family: 'Arvo', cursive;
line-height: 2;
font-weight: 900;
color: #DA0463;
text-shadow: 3px 0 #DBEDF3;
border-radius: 15px;
display: inline-block;
width: 150px;
height: 150px;
text-align: center;
margin: 10px;
background-color: white;
}
31 changes: 31 additions & 0 deletions Drum Kit Starting Files/drums.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
<meta charset="utf-8">
<title>Drum Kit</title>
<link rel="stylesheet" href="drums.css">
<link href="https://fonts.googleapis.com/css?family=Arvo" rel="stylesheet">
</head>

<body>

<h1 id="title">Drum 🥁 Kit</h1>
<div class="set">
<button class="w drum">w</button>
<button class="a drum">a</button>
<button class="s drum">s</button>
<button class="d drum">d</button>
<button class="j drum">j</button>
<button class="k drum">k</button>
<button class="l drum">l</button>
</div>


<footer>
Made with ❤️ in India.
</footer>
<script src="drums.js"></script>
</body>

</html>
59 changes: 59 additions & 0 deletions Drum Kit Starting Files/drums.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
var numberOfDrumButtons = document.querySelectorAll(".drum").length;

for(var i=0; i < numberOfDrumButtons; i++){

document.querySelectorAll(".drum")[i].addEventListener("click",function(){

var buttonInerHtml = this.innerHTML;
switch(buttonInerHtml){
case"w":
var tom1 = new Audio("sounds/tom-1.mp3");
tom1.play();
break;

case"a":
var tom2 = new Audio("sounds/tom-2.mp3");
tom2.play();
break;

case"s":
var tom3 = new Audio("sounds/tom-3.mp3");
tom3.play();
break;

case"d":
var tom4 = new Audio("sounds/tom-4.mp3");
tom4.play();
break;

case"j":
var snare = new Audio("sounds/snare.mp3");
snare.play();
break;

case"k":
var crash = new Audio("sounds/crash.mp3");
crash.play();
break;

case"l":
var kick = new Audio("sounds/kick-bass.mp3");
kick.play();
break;



default: console.log(buttonInerHtml);
}

});

//if paranthesis is present then its like the function is being called so it'll execute it immidiately <= for regular function in eventlistener
//anonymous functions = functions without a name


}




Binary file added Drum Kit Starting Files/images/crash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Drum Kit Starting Files/images/kick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Drum Kit Starting Files/images/snare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Drum Kit Starting Files/images/tom1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Drum Kit Starting Files/images/tom2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Drum Kit Starting Files/images/tom3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Drum Kit Starting Files/images/tom4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Drum Kit Starting Files/sounds/crash.mp3
Binary file not shown.
Binary file added Drum Kit Starting Files/sounds/kick-bass.mp3
Binary file not shown.
Binary file added Drum Kit Starting Files/sounds/snare.mp3
Binary file not shown.
Binary file added Drum Kit Starting Files/sounds/tom-1.mp3
Binary file not shown.
Binary file added Drum Kit Starting Files/sounds/tom-2.mp3
Binary file not shown.
Binary file added Drum Kit Starting Files/sounds/tom-3.mp3
Binary file not shown.
Binary file added Drum Kit Starting Files/sounds/tom-4.mp3
Binary file not shown.
18 changes: 18 additions & 0 deletions HTML-Personal site/DOM/DOM.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="C:\Users\samarth\OneDrive\Desktop\webdevelopment\HTML-Personal site\DOM\DOMstyle.css">
<title>DOM Manipulation</title>
</head>
<body>

<h1 class="heading1">Hullo Warldo</h1>



<script src="DOM.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions HTML-Personal site/DOM/DOM.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.querySelector("h1").classList.add("Huge");
Loading