-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,892 additions
and
1,745 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
$(document).ready(function () { | ||
//gif | ||
const gif = document.getElementById('autoplayGif'); | ||
|
||
$('.menu').click(function() { | ||
$('.overlay').toggleClass('anim'); | ||
$(this).addClass('open') | ||
const options = { | ||
root: null, | ||
rootMargin: '0px', | ||
threshold: 0.5, | ||
}; | ||
|
||
const handleIntersection = (entries, observer) => { | ||
entries.forEach((entry) => { | ||
if (entry.isIntersecting) { | ||
gif.src = gif.src; | ||
} else { | ||
gif.src = gif.src; | ||
} | ||
}); | ||
}; | ||
|
||
const observer = new IntersectionObserver(handleIntersection, options); | ||
|
||
$('.open').click(function(){ | ||
$('.overlay').toggleClass('reverse-animation'); | ||
}) | ||
}); | ||
observer.observe(gif); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Image and Text Layout</title> | ||
<style> | ||
/* styles.css */ | ||
body, html { | ||
margin: 0; | ||
padding: 0; | ||
height: 100%; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
height: 100%; | ||
} | ||
|
||
.image { | ||
flex: 2; /* Takes up 2/3 of the available width */ | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
background: #f0f0f0; /* Background color or image for the image side */ | ||
} | ||
|
||
.image img { | ||
max-width: 100%; /* Ensure the image doesn't exceed its container */ | ||
max-height: 100%; | ||
height: auto; | ||
} | ||
|
||
.text { | ||
flex: 1; /* Takes up 1/3 of the available width */ | ||
padding: 20px; | ||
background: #fff; /* Background color for the text side */ | ||
} | ||
|
||
.text h1 { | ||
font-size: 24px; | ||
margin: 0; | ||
} | ||
|
||
.text p { | ||
font-size: 16px; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="image"> | ||
<img src="your-image.jpg" alt="Image"> | ||
</div> | ||
<div class="text"> | ||
<h1>Title</h1> | ||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae turpis purus.</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |