Skip to content

Commit

Permalink
(CI) format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Zero to Mastery committed Oct 24, 2023
1 parent 86dd3f2 commit c6a793c
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 119 deletions.
28 changes: 13 additions & 15 deletions Art/CodeDrinks270/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Light Bulb Animation</title>
</head>

<body>
<div class="box">
<span></span>
</div>
</body>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Light Bulb Animation</title>
</head>

</html>
<body>
<div class="box">
<span></span>
</div>
</body>
</html>
93 changes: 46 additions & 47 deletions Art/CodeDrinks270/style.css
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
* {
padding: 0;
margin: 0;
box-sizing: border-box;
padding: 0;
margin: 0;
box-sizing: border-box;
}

body {
display: flex;
justify-content: center;
align-items: center;
background: #333;
min-height: 100vh;
overflow: hidden;
}

.box {
position: relative;
width: 500px;
height: 500px;
}

.box span {
position: absolute;
inset: 0;
}

.box span::before {
content: '';
position: absolute;
width: 350px;
height: 400px;
left: 15%;
background: url('https://i.ibb.co/C1S9Vwn/bulb-off.jpg');
background-size: cover;
background-position: center;
transform: scale(0.8);
animation: animate 2s linear infinite;
border-bottom: 10px ridge #fff;
}

@keyframes animate {
0%,
100% {
background: url('https://i.ibb.co/C1S9Vwn/bulb-off.jpg');
}

body {
display: flex;
justify-content: center;
align-items: center;
background: #333;
min-height: 100vh;
overflow: hidden;
50% {
background: url('https://i.ibb.co/SXmm4cd/bulb-on.jpg');
}

.box {
position: relative;
width: 500px;
height: 500px;
}

.box span {
position: absolute;
inset: 0;
}

.box span::before {
content: "";
position: absolute;
width: 350px;
height: 400px;
left: 15%;
background: url("https://i.ibb.co/C1S9Vwn/bulb-off.jpg");
background-size: cover;
background-position: center;
transform: scale(0.8);
animation: animate 2s linear infinite;
border-bottom: 10px ridge #fff;
}

@keyframes animate {
0%,
100% {
background: url("https://i.ibb.co/C1S9Vwn/bulb-off.jpg");
}
50% {
background: url("https://i.ibb.co/SXmm4cd/bulb-on.jpg");
}
}

}
16 changes: 9 additions & 7 deletions Art/Comder101/solar_system.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ stars {
opacity: 0.5;
animation: twinkle 1s infinite;
background: url('star.png') no-repeat center center/contain;

}

@keyframes twinkle {
0% { opacity: 1; }
50% { opacity: 0; }
100% { opacity: 1; }
0% {
opacity: 1;
}
50% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.solar-system {
position: absolute;
Expand Down Expand Up @@ -85,7 +90,6 @@ stars {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);

}

.mercury-orbit {
Expand All @@ -112,8 +116,6 @@ stars {
animation: orbit-rotation 20s infinite linear;
}



@keyframes planet-revolution {
from {
transform: rotate(0deg);
Expand Down
78 changes: 39 additions & 39 deletions Art/Comder101/solar_system.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="solar_system.css">
</head>
<body>
<div class="solar-system">
<div class="sun"></div>
<div class="orbit mercury-orbit">
<div class="planet mercury"></div>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="solar_system.css" />
</head>
<body>
<div class="solar-system">
<div class="sun"></div>
<div class="orbit mercury-orbit">
<div class="planet mercury"></div>
</div>
<div class="orbit venus-orbit">
<div class="planet venus"></div>
</div>
<div class="orbit earth-orbit">
<div class="planet earth"></div>
</div>
<div class="orbit mars-orbit">
<div class="planet mars"></div>
</div>
</div>
<div class="orbit venus-orbit">
<div class="planet venus"></div>
</div>
<div class="orbit earth-orbit">
<div class="planet earth"></div>
</div>
<div class="orbit mars-orbit">
<div class="planet mars"></div>
</div>
</div>
<div class="stars"></div>
<script>
function createRandomStars() {
const numberOfStars = 100;
const starsContainer = document.querySelector('.stars');
<div class="stars"></div>
<script>
function createRandomStars() {
const numberOfStars = 100;
const starsContainer = document.querySelector('.stars');

for (let i = 0; i < numberOfStars; i++) {
const star = document.createElement('div');
star.className = 'star';
star.style.left = `${Math.random() * 100}vw`;
star.style.top = `${Math.random() * 100}vh`;
star.style.width = `${Math.random() * 80}px`;
star.style.height = star.style.width;
const twinklingTime = Math.random() * 5 + 0.5;
star.style.animation = `twinkle ${twinklingTime}s infinite`;
starsContainer.appendChild(star);
for (let i = 0; i < numberOfStars; i++) {
const star = document.createElement('div');
star.className = 'star';
star.style.left = `${Math.random() * 100}vw`;
star.style.top = `${Math.random() * 100}vh`;
star.style.width = `${Math.random() * 80}px`;
star.style.height = star.style.width;
const twinklingTime = Math.random() * 5 + 0.5;
star.style.animation = `twinkle ${twinklingTime}s infinite`;
starsContainer.appendChild(star);
}
}
}
createRandomStars();
</script>
</body>
createRandomStars();
</script>
</body>
</html>
14 changes: 8 additions & 6 deletions Art/nharjes/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<head>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<div class="colorful-background">
<div class="animated-text">This is a colorful background animation in CSS</div>
<div class="animated-text">
This is a colorful background animation in CSS
</div>
</div>
</body>
</body>
</html>
6 changes: 2 additions & 4 deletions Art/nharjes/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ body {
filter: brightness(0.8);
}



.animated-text {
font-size: 80px;
text-align: center;
Expand All @@ -28,9 +26,9 @@ body {

@keyframes animateBackground {
0% {
background-position: 0% 50%;
background-position: 0% 50%;
}
100% {
background-position: 100% 50%;
background-position: 100% 50%;
}
}
2 changes: 1 addition & 1 deletion include.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let cards = [
githubLink: 'https://github.com/ahmedalhamad7'
},
{
artName: "Solar system-Art",
artName: 'Solar system-Art',
pageLink: './Art/Comder101/solar_system.html',
imageLink: './Art/Comder101/solar_system.gif',
author: 'Comder101',
Expand Down

0 comments on commit c6a793c

Please sign in to comment.