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
17 changes: 17 additions & 0 deletions Public/bgGenerator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="../assets/css/bgGenerator.css">
</head>
<body id="gradient">
<h1>BACKGROUND GENERATOR</h1>
<input oninput="setGradient()" class="color1" type="color" name="color1" value="#0019ff">
<input oninput="setGradient()" class="color2" type="color" name="color2" value="#ff0000">
<h2>Current CSS Background</h2>
<h3></h3>
<script src="../assets/js/bgGenerator.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ git push -u origin <your_branch_name>
| 169. | [Tearable Cloth](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/tearable-cloth.html)| 170. | [Rain Effects](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/RainEffects.html)| 171. | [Camera Web App](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/camera_app.html)
| 172. | [Dynamic Picture Frame](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/picture-frame.html)| 173. | [FAQ Collapse](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/FAQcollapse.html)| 174. | [Multiplication Table Generator](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/multiplication-table-generator.html)
| 175. | [Expense Tracker Calculator](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/trackerExpense/index.html)| 176. | [Check my IP](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/check-my-ip/check-my-ip.html) | 177. | [SocialTray](https://rococo-praline-28f4e4.netlify.app/)
| 178. | [SimplyRecipes](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/SimplyRecipes/) | 179. | [Employee DataBase](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/employeeDatabase.html)
| 178. | [SimplyRecipes](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/SimplyRecipes/) | 179. | [Employee DataBase](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/employeeDatabase.html) | 180. | [Background Generator](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/bgGenerator.html)
<br>

<div id="Maintainer"></div>
Expand Down
Binary file added assets/Images/bgGenerator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions assets/Js/bgGenerator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var css = document.querySelector("h3");
var color1 = document.querySelector(".color1");
var color2 = document.querySelector(".color2");
var body = document.getElementById("gradient");


function setGradient(){
body.style.background =
"linear-gradient(to right,"
+ color1.value
+ ","
+ color2.value
+")";

css.textContent = body.style.background + ";";

}
// color1.addEventListener("input",setGradient);

// color2.addEventListener("input",setGradient);
28 changes: 28 additions & 0 deletions assets/css/bgGenerator.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
body{
font: 'Raleway', sans-serif;
color: rgba(0, 0, 0, .5);
text-align: center;
text-transform: uppercase;
letter-spacing: .5em;
top: 15%;
background: linear-gradient(to right,red,blue);



}
h1{
font: 600 3.5em 'Raleway', sans-serif;
color: rgba(0, 0, 0, .5);
text-align: center;
text-transform: uppercase;
letter-spacing: .5em;
width: 100%;

}
h3{
font: 900 1em 'Raleway', sans-serif;
color: rgba(0, 0, 0, .5);
text-align: center;
text-transform: none;
letter-spacing: 0.01em;
}