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
10 changes: 10 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const tl = gsap.timeline({defaults: {ease:'power1.out'}});

tl.to('.text', {y: '0%', duration: 1, stagger: 0.25});

tl.to('.slider', {y: "-100%", duration: 1.5, delay: 0.5});

tl.to('.intro', {y: "-100%", duration: 1}, "-=1");

tl.fromTo('nav', {opacity: 0}, {opacity: 1, duration: 1});
tl.fromTo('.big_text', {opacity: 0}, {opacity: 1, duration: 1}, '-=1');
Binary file added img.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions index.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Afloat</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@500&family=Montserrat:wght@100&display=swap" rel="stylesheet">
</head>
<body>
<main>
<section class="landing">
<nav>
<h1 id="logo">Afloat</h1>
<ul class="nav_links">
<li>Home</li>
<li>Contact</li>
<li>About</li>
</ul>
</nav>
<h2 class="big_text">Stay Afloat</h2>
</section>
</main>
<div class="intro">
<div class="intro_text">
<h1 class="hide">
<span class="text">Creating Innovation</span>
</h1>
<h1 class="hide">
<span class="text">For Everyday</span>
</h1>
<h1 class="hide">
<span class="text">People.</span>
</h1>

</div>
</div>
<div class="slider"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/gsap.min.js" integrity="sha512-gmwBmiTVER57N3jYS3LinA9eb8aHrJua5iQD7yqYCKa5x6Jjc7VDVaEA0je0Lu0bP9j7tEjV3+1qUm6loO99Kw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script src="app.js"></script>
</body>
</html>
89 changes: 89 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}

main{
font-family: 'Times New Roman', Times, serif;
}
.landing{
min-height: 100vh;
background: url('./img.jpg');
background-size: cover;
padding: 0rem 5rem;
}

nav{
display: flex;
align-items: center;
justify-content: space-between;
min-height: 10vh;
}

.nav_links{
display: flex;
list-style: none;

}

.nav_links li{
padding-left: 10rem;
font-size: 1.2rem;

}

#logo{
font-family: 'Dancing Script', cursive; font-weight: lighter;
font-size: 2rem;
}

.big_text{
position: absolute;
top: 30%;
left: 50%;
font-size: 5rem;
font-family: 'Dancing Script', cursive;
color: rgb(61,61,61);
transform: translate(-150px, -30px);
}

.intro{
background: black;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;

}
.slider{
background: rgb(226, 183, 239);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform: translateY(100%);


}

.intro_text{
color: rgb(234, 174, 235);
font-family: 'Montserrat', sans-serif;
font-size: 2.4rem;
}

.hide{
background: black;
overflow: hidden;

}
.hide span{
display: inline-block;
transform: translateY(100%);
}