Skip to content

Commit

Permalink
Added Background Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Somil-Shukla committed Oct 16, 2023
1 parent ed3bd82 commit 73bf0c5
Show file tree
Hide file tree
Showing 23 changed files with 8,860 additions and 0 deletions.
Empty file.
5 changes: 5 additions & 0 deletions BackgroundGenerator/Somil-Shukla/css/all.min.css

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions BackgroundGenerator/Somil-Shukla/css/bootstrap.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions BackgroundGenerator/Somil-Shukla/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
button {
margin-top: 50vh
}
35 changes: 35 additions & 0 deletions BackgroundGenerator/Somil-Shukla/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<!--bootstrap-->
<link rel="stylesheet" href="./css/bootstrap.min.css">
<!--main-->
<link rel="stylesheet" href="./css/style.css">
<!--google fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Courgette">
<!-- font awesome-->
<!-- for local copies of font awesome, ensure webfont folder is also in local root directory-->
<link rel="stylesheet" href="./css/all.min.css">
</head>
<body>
<div class="container">
<div class="row max-height align-items-center text-center">
<div class="col">
<button class="btn btn-outline-secondary">Click Me!</button>
</div>

</div>

</div>

<!--jQuery-->
<script src="./js/jquery-3.4.1.min.js"></script>
<!--bootstrap-->
<script src="./js/bootstrap.bundle.min.js"></script>
<script src="./js/script.js"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions BackgroundGenerator/Somil-Shukla/js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions BackgroundGenerator/Somil-Shukla/js/jquery-3.4.1.min.js

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions BackgroundGenerator/Somil-Shukla/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//Choose a random color
const button = document.querySelector('button')
const body = document.querySelector('body')
const colors = ['red', 'green', 'blue', 'yellow', 'pink', 'purple']

body.style.backgroundColor = 'violet'
button.addEventListener('click', changeBackground)

function changeBackground(){
const colorIndex= parseInt(Math.random()*colors.length+1)
body.style.backgroundColor = colors[colorIndex]
}
Binary file not shown.
3,459 changes: 3,459 additions & 0 deletions BackgroundGenerator/Somil-Shukla/webfonts/fa-brands-400.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
803 changes: 803 additions & 0 deletions BackgroundGenerator/Somil-Shukla/webfonts/fa-regular-400.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4,527 changes: 4,527 additions & 0 deletions BackgroundGenerator/Somil-Shukla/webfonts/fa-solid-900.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 73bf0c5

Please sign in to comment.