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

Ashith Commit #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
7 changes: 7 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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 hero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!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>Document</title>

<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=Heebo:wght@500&family=Lobster&display=swap" rel="stylesheet">

<link rel="stylesheet" href="./style.css">

</head>

<body>
<main>
<section class="landing">
<nav>
<h1 id="logo">
OnFloat
</h1>
<ul class="nav-links">
<li>Home</li>
<li>Contact</li>
<li>About</li>
</ul>
</nav>
<h2 class="big-text">Stay OnFloat</h2>
</section>
</main>
<div class="intro">
<div class="intro-text">
<h1 class="hide">
<span class="text">Creating inovation</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>
90 changes: 90 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
*{
margin:0;
padding:0;
box-sizing:border-box;
}

main{
font-family:"Heebo",sans-serif;
}

.landing{
min-height: 100vh;
background:url("./hero.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: "lobster",cursive;
font-weight: lighter;
font-size: 2rem;
}

.big-text{
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%,-30%);
font-size: 5rem;
font-family: "lobster",cursive;
color:rgb(61,61,61);
}

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

.slider{
background: rgb(97,105,109);
position: fixed;
top:0;
left:0;
height: 100%;
width: 100%;
transform: translateY(100%);

}



.intro-text{
color:rgb(223,223,223);
font-family:"Heebo",sans-serif;
font-size: 3rem;
}

.hide{
background: black;
overflow: hidden;
}

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