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
7 changes: 7 additions & 0 deletions Nikhil Karthik/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 Nikhil Karthik/hero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions Nikhil Karthik/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!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" />
<link
href="https://fonts.googleapis.com/css2?family=Heebo:wght@500;700&family=Lobster&display=swap"
rel="stylesheet"
/>
<title>Slide Animation</title>
</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 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.5.1/gsap.min.js"
integrity="sha512-IQLehpLoVS4fNzl7IfH8Iowfm5+RiMGtHykgZJl9AWMgqx0AmJ6cRWcB+GaGVtIsnC4voMfm8f2vwtY+6oPjpQ=="
crossorigin="anonymous"
></script>
<script src="./app.js"></script>
</body>
</html>
81 changes: 81 additions & 0 deletions Nikhil Karthik/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
* {
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;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.slider {
background: rgb(97, 105, 109);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform: translateY(100%);
}

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

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

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