Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Abstract Background #837

Merged
merged 3 commits into from
May 30, 2024
Merged
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
15 changes: 15 additions & 0 deletions Components/Backgrounds/Abstract-Background/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!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="style.css">
<title>Abstract Background</title>
</head>

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

</html>
15 changes: 15 additions & 0 deletions Components/Backgrounds/Abstract-Background/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
document.addEventListener("DOMContentLoaded", () => {
let xPos = 0;
let yPos = 0;
const speed = 0.5; // Adjust the speed of the animation

function animateBackground() {
xPos -= speed;
yPos -= speed;

document.body.style.backgroundPosition = `${xPos}px ${yPos}px`;
requestAnimationFrame(animateBackground);
}

animateBackground();
});
28 changes: 28 additions & 0 deletions Components/Backgrounds/Abstract-Background/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
body {
background:
/*shape*/
linear-gradient(115deg, transparent 89%, #e29eb0 0) -128px -96px,
linear-gradient(-115deg, transparent 89%, #fe9e9e 0) 22px -96px,
linear-gradient(-115deg, #e83ec6 11%, transparent 0) -128px 54px,
linear-gradient(115deg, #771764 11%, transparent 0) 22px 54px,

/*shape*/
linear-gradient(-25deg, #a75797 11%, transparent 0) -128px -22px,
linear-gradient(25deg, transparent 89%, #cdb380 0) -128px 128px,
linear-gradient(25deg, #a13259 11%, transparent 0) 22px -22px,
linear-gradient(-25deg, transparent 89%, #390349 0) 22px 128px,
/*shape*/
linear-gradient(-25deg, #e8ddcb 11%, transparent 0) -53px -96px,
linear-gradient(25deg, transparent 89%, #cdb380 0) -53px 54px,
linear-gradient(25deg, #b33f75 11%, transparent 0) 97px -96px,
linear-gradient(-25deg, transparent 89%, #aa89a9 0) 97px 54px,
/*shape*/
linear-gradient(115deg, transparent 89%, #e8ddcb 0) -53px -21px,
linear-gradient(-115deg, #9a6ca1 11%, transparent 0) -53px 129px,
linear-gradient(-115deg, transparent 89%, #823e7d 0) 97px -21px,
linear-gradient(115deg, #7e175c 11%, transparent 0) 97px 129px;

background-color: #fff;
background-size: 150px 150px;
background-repeat: repeat;
}
15 changes: 14 additions & 1 deletion assets/html_files/backgrounds.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ <h1>3D Boxes Background</h1>
</a>
</div>
</div>
<div class="box">
<h1>Abstract Background</h1>
<div class="preview">
<a href="../../Components/Backgrounds/Abstract-Background/index.html" title="Live Preview" target="_blank">
<img src="../images/link.png">
</a>
</div>
<div class="source">
<a href="https://github.com/Rakesh9100/Beautiify/tree/main/Components/Backgrounds/Abstract-Background" title="Source Code" target="_blank">
<img src="../images/github.png">
</a>
</div>
</div>
<div class="box">
<h1>Abstract Particle Swarm Background</h1>
<div class="preview">
Expand Down Expand Up @@ -463,4 +476,4 @@ <h1>Waves Background</h1>

</body>

</html>
</html>