Add files via upload
This commit is contained in:
parent
05c25c71cc
commit
95a8fcbde7
382
100_projects/69-design-airpods/assets/css/styles.css
Normal file
382
100_projects/69-design-airpods/assets/css/styles.css
Normal file
@ -0,0 +1,382 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap");
|
||||
:root {
|
||||
--first-color: #FFF;
|
||||
--second-color: #0071E3;
|
||||
--white-color: #1D1D1F;
|
||||
}
|
||||
:root {
|
||||
--body-font: 'Roboto', sans-serif;
|
||||
--biggest-font-size: 3.5rem;
|
||||
--bigger-font-size: 2.25rem;
|
||||
--big-font-size: 1.625rem;
|
||||
--normal-font-size: 0.813rem;
|
||||
--smaller-font-size: 0.75rem;
|
||||
}
|
||||
@media screen and (min-width: 768px) {
|
||||
:root {
|
||||
--biggest-font-size: 8rem;
|
||||
--bigger-font-size: 4.5rem;
|
||||
--big-font-size: 2.5rem;
|
||||
--normal-font-size: 1rem;
|
||||
--smaller-font-size: 0.938rem;
|
||||
}
|
||||
}
|
||||
/*z index*/
|
||||
:root {
|
||||
--z-back: -10;
|
||||
--z-normal: 1;
|
||||
--z-tooltip: 10;
|
||||
--z-fixed: 100;
|
||||
--z-modal: 1000;
|
||||
}
|
||||
*, ::before, ::after {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
body {
|
||||
margin: 3rem 0 0 0;
|
||||
font-family: var(--body-font);
|
||||
background-color: var(--white-color);
|
||||
color: var(--first-color);
|
||||
}
|
||||
h1, h2, h3, p {
|
||||
margin: 0;
|
||||
}
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.bd-grid {
|
||||
max-width: 1200px;
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
.l-header {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: var(--z-fixed);
|
||||
background-color: var(--white-color);
|
||||
}
|
||||
.nav {
|
||||
height: 3rem;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
@media screen and (max-width: 768px) {
|
||||
.nav__menu {
|
||||
position: fixed;
|
||||
top: -100%;
|
||||
left: 0;
|
||||
background-color: var(--white-color);
|
||||
width: 100%;
|
||||
height: 20%;
|
||||
padding: 2rem 1rem;
|
||||
z-index: var(--z-fixed);
|
||||
border-bottom: 1px solid gray;
|
||||
-webkit-transition: .5s;
|
||||
transition: .5s;
|
||||
}
|
||||
}
|
||||
.nav__actions {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
.nav__item {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.nav__link {
|
||||
color: var(--first-color);
|
||||
}
|
||||
.nav__link:hover {
|
||||
color: var(--second-color);
|
||||
}
|
||||
.nav__logo {
|
||||
color: var(--first-color);
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
.nav__toggle {
|
||||
display: inline;
|
||||
cursor: pointer;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
.nav__toggle img {
|
||||
width: 1.8rem;
|
||||
}
|
||||
.nav__btn {
|
||||
background-color: var(--second-color);
|
||||
color: var(--white-color);
|
||||
padding: 0.375rem 1rem;
|
||||
border-radius: 2rem;
|
||||
}
|
||||
.show {
|
||||
top: 3rem;
|
||||
}
|
||||
.home {
|
||||
height: calc(100vh - 3rem);
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
-ms-grid-rows: 1.5fr 1fr 1fr;
|
||||
grid-template-rows: 1.5fr 1fr 1fr;
|
||||
grid-template-areas: "data" "img" "scroll";
|
||||
row-gap: 1.5rem;
|
||||
}
|
||||
.home__data {
|
||||
-ms-grid-row: 1;
|
||||
-ms-grid-column: 1;
|
||||
grid-area: data;
|
||||
text-align: center;
|
||||
padding-top: 3.5rem;
|
||||
}
|
||||
.home__title {
|
||||
font-size: var(--biggest-font-size);
|
||||
font-weight: 400;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.home__description {
|
||||
font-size: var(--normal-font-size);
|
||||
padding: 0 1rem;
|
||||
}
|
||||
.home__img {
|
||||
-ms-grid-row: 2;
|
||||
-ms-grid-column: 1;
|
||||
grid-area: img;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.home__img img {
|
||||
width: 81px;
|
||||
height: 177px;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
.home__scroll {
|
||||
-ms-grid-row: 3;
|
||||
-ms-grid-column: 1;
|
||||
grid-area: scroll;
|
||||
text-align: center;
|
||||
-ms-flex-item-align: center;
|
||||
-ms-grid-row-align: center;
|
||||
align-self: center;
|
||||
}
|
||||
.home__scroll-text {
|
||||
display: block;
|
||||
font-size: 0.75rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.home__scroll-icon {
|
||||
width: 2rem;
|
||||
}
|
||||
.airpod1 {
|
||||
-webkit-animation: airpod1 3s infinite;
|
||||
animation: airpod1 3s infinite;
|
||||
}
|
||||
@-webkit-keyframes airpod1 {
|
||||
50% {
|
||||
-webkit-transform: translatey(-6%);
|
||||
transform: translatey(-6%);
|
||||
}
|
||||
}
|
||||
@keyframes airpod1 {
|
||||
50% {
|
||||
-webkit-transform: translatey(-6%);
|
||||
transform: translatey(-6%);
|
||||
}
|
||||
}
|
||||
.airpod2 {
|
||||
-webkit-animation: airpod2 3s infinite;
|
||||
animation: airpod2 3s infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes airpod2 {
|
||||
50% {
|
||||
-webkit-transform: translatey(6%);
|
||||
transform: translatey(6%);
|
||||
}
|
||||
}
|
||||
@keyframes airpod2 {
|
||||
50% {
|
||||
-webkit-transform: translatey(6%);
|
||||
transform: translatey(6%);
|
||||
}
|
||||
}
|
||||
.details {
|
||||
height: calc(100vh - 3rem);
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
-ms-grid-columns: max-content max-content;
|
||||
grid-template-columns: -webkit-max-content -webkit-max-content;
|
||||
grid-template-columns: max-content max-content;
|
||||
-ms-flex-line-pack: center;
|
||||
align-content: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.details__box {
|
||||
margin-bottom: 2.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
.details__initial {
|
||||
font-size: var(--smaller-font-size);
|
||||
}
|
||||
.details__title {
|
||||
font-size: var(--bigger-font-size);
|
||||
font-weight: 400;
|
||||
}
|
||||
.details__title span {
|
||||
font-size: var(--big-font-size);
|
||||
}
|
||||
.details__description {
|
||||
font-size: var(--normal-font-size);
|
||||
}
|
||||
.details__img {
|
||||
width: -webkit-max-content;
|
||||
width: -moz-max-content;
|
||||
width: max-content;
|
||||
-ms-flex-item-align: center;
|
||||
-ms-grid-row-align: center;
|
||||
align-self: center;
|
||||
}
|
||||
.details__img img {
|
||||
width: 218px;
|
||||
}
|
||||
.airpods {
|
||||
-webkit-animation: airpods 3s infinite;
|
||||
animation: airpods 3s infinite;
|
||||
}
|
||||
@-webkit-keyframes airpods {
|
||||
50% {
|
||||
-webkit-transform: translatey(-6%);
|
||||
transform: translatey(-6%);
|
||||
}
|
||||
}
|
||||
@keyframes airpods {
|
||||
50% {
|
||||
-webkit-transform: translatey(-6%);
|
||||
transform: translatey(-6%);
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 768px) {
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
.nav {
|
||||
height: 4rem;
|
||||
}
|
||||
.nav__menu {
|
||||
margin-left: auto;
|
||||
}
|
||||
.nav__list {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.nav__item {
|
||||
margin-right: 1.5rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.nav__toggle {
|
||||
display: none;
|
||||
}
|
||||
.home {
|
||||
height: 100vh;
|
||||
-ms-grid-columns: min-content;
|
||||
grid-template-columns: -webkit-min-content;
|
||||
grid-template-columns: min-content;
|
||||
-ms-grid-rows: 80% 10%;
|
||||
grid-template-rows: 80% 10%;
|
||||
grid-template-areas: "data img"
|
||||
"scroll scroll";
|
||||
-ms-flex-line-pack: end;
|
||||
align-content: flex-end;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-column-gap: 4rem;
|
||||
column-gap: 4rem;
|
||||
}
|
||||
.home__data {
|
||||
-ms-grid-row: 1;
|
||||
-ms-grid-column: 1;
|
||||
grid-area: data;
|
||||
padding: 0;
|
||||
-ms-flex-item-align: center;
|
||||
-ms-grid-row-align: center;
|
||||
align-self: center;
|
||||
text-align: initial;
|
||||
}
|
||||
.home__description {
|
||||
padding: 0 5rem 0 0;
|
||||
}
|
||||
.home__img {
|
||||
-ms-grid-row: 1;
|
||||
-ms-grid-column: 2;
|
||||
grid-area: img;
|
||||
-ms-flex-item-align: center;
|
||||
-ms-grid-row-align: center;
|
||||
align-self: center;
|
||||
}
|
||||
.home__img img {
|
||||
width: 114px;
|
||||
height: 248px;
|
||||
}
|
||||
.home__scroll {
|
||||
-ms-grid-row: 2;
|
||||
-ms-grid-column: 1;
|
||||
-ms-grid-column-span: 2;
|
||||
grid-area: scroll;
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
.details {
|
||||
-webkit-column-gap: 4rem;
|
||||
column-gap: 4rem;
|
||||
}
|
||||
.details__box {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.details__img {
|
||||
-ms-flex-item-align: center;
|
||||
-ms-grid-row-align: center;
|
||||
align-self: center;
|
||||
}
|
||||
.details__img img {
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1200px) {
|
||||
.bd-grid {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M16.293 9.293L12 13.586 7.707 9.293 6.293 10.707 12 16.414 17.707 10.707z"/></svg>
|
After Width: | Height: | Size: 174 B |
1
100_projects/69-design-airpods/assets/icons/bx-mouse.svg
Normal file
1
100_projects/69-design-airpods/assets/icons/bx-mouse.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M11.975,22H12c3.859,0,7-3.14,7-7V9c0-3.841-3.127-6.974-6.981-7C12.013,2,12.006,2,12,2c-0.002,0-0.016,0-0.018,0 c-0.009,0-0.016,0-0.023,0C8.119,2.022,5,5.157,5,9v6C5,18.86,8.129,22,11.975,22z M7,9c0-2.751,2.238-4.994,4.985-5 C14.75,4.006,17,6.249,17,9v6c0,2.757-2.243,5-5,5h-0.025C9.186,20,7,17.804,7,15V9z"/><path d="M11 6H13V12H11z"/></svg>
|
After Width: | Height: | Size: 433 B |
BIN
100_projects/69-design-airpods/assets/img/airpod1.png
Normal file
BIN
100_projects/69-design-airpods/assets/img/airpod1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 165 KiB |
BIN
100_projects/69-design-airpods/assets/img/airpod2.png
Normal file
BIN
100_projects/69-design-airpods/assets/img/airpod2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 177 KiB |
BIN
100_projects/69-design-airpods/assets/img/airpods.png
Normal file
BIN
100_projects/69-design-airpods/assets/img/airpods.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
52
100_projects/69-design-airpods/assets/js/main.js
Normal file
52
100_projects/69-design-airpods/assets/js/main.js
Normal file
@ -0,0 +1,52 @@
|
||||
const showMenu = (toggleId, navId) =>{
|
||||
const toggle = document.getElementById(toggleId),
|
||||
nav = document.getElementById(navId)
|
||||
|
||||
if(toggle && nav){
|
||||
toggle.addEventListener('click', ()=>{
|
||||
nav.classList.toggle('show')
|
||||
})
|
||||
}
|
||||
}
|
||||
showMenu('nav-toggle','nav-menu')
|
||||
|
||||
/*-- ANIMATE GSAP --*/
|
||||
|
||||
/*TEXT*/
|
||||
gsap.from('.home__title', {opacity: 0, duration: 1.5, delay: .5, y: 50})
|
||||
gsap.from('.home__description', {opacity: 0, duration: 1.5, delay: .8, y: 50})
|
||||
|
||||
/*IMG AIRPOD*/
|
||||
gsap.from('.airpod1', {opacity: 0, duration: 2, delay: 1.2, y: -40})
|
||||
gsap.from('.airpod2', {opacity: 0, duration: 2, delay: 1.4, y: 40})
|
||||
|
||||
/*NAV*/
|
||||
gsap.from('.nav__logo', {opacity:0, duration: 2.5, delay: 1.5, y: 25});
|
||||
gsap.from('.nav__toggle', {opacity:0, duration: 2.5, delay: 1.7, y: 25});
|
||||
gsap.from('.nav__item', {opacity: 0, duration: 2.5, delay: 1.9, y: 25, ease:'expo.out', stagger: .3})
|
||||
gsap.from('.nav__btn', {opacity:0, duration: 2.5, delay: 2, y: 25});
|
||||
|
||||
|
||||
/*SCROLL*/
|
||||
gsap.from('.home__scroll', {opacity: 0, duration: 1.5, delay: 2.3, y: 30})
|
||||
|
||||
|
||||
/*-- ANIMATE SCROLLMAGIC --*/
|
||||
var animate = new TimelineMax({onUpdate:updatePercentage})
|
||||
var controller = new ScrollMagic.Controller()
|
||||
|
||||
/*DETAILS*/
|
||||
animate
|
||||
.from('.details__img', {opacity: 0, y: 25})
|
||||
.from('.details__box', {opacity: 0, y: 25, duration: 1, ease:'expo.out', stagger: .4})
|
||||
|
||||
var scene = new ScrollMagic.Scene({
|
||||
triggerElement: ".details__box",
|
||||
})
|
||||
|
||||
.setTween(animate)
|
||||
.addTo(controller)
|
||||
|
||||
function updatePercentage(){
|
||||
animate.progress()
|
||||
}
|
82
100_projects/69-design-airpods/index.html
Normal file
82
100_projects/69-design-airpods/index.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!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="assets/css/styles.css">
|
||||
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
|
||||
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- HEADER -->
|
||||
<header class="l-header">
|
||||
<nav class="nav bd-grid">
|
||||
<a href="#" class="nav__logo"><ion-icon name="aperture-outline"></ion-icon>AirPods</a>
|
||||
<div class="nav__menu" id="nav-menu">
|
||||
<ul class="nav__list">
|
||||
<li class="nav__item"><a href="#" class="nav__link">Descripcion</a></li>
|
||||
<li class="nav__item"><a href="#l-section" class="nav__link">Special</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav__actions">
|
||||
<div class="nav__toggle" id="nav-toggle">
|
||||
<img src="assets/icons/bx-chevron-down.svg" alt="">
|
||||
</div>
|
||||
<a href="#" class="nav__btn">Buy</a>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- HOME -->
|
||||
<main class="l-main bd-grid">
|
||||
<section class="home">
|
||||
<div class="home__data">
|
||||
<h1 class="home__title">AirPods</h1>
|
||||
<p class="home__description">They give you an unmatched wireless experience,
|
||||
now they offer you more hours to talk and come with a new charging case. <br><!-- GSAP -->wireless.</p>
|
||||
</div>
|
||||
<div class="home__img">
|
||||
<img src="assets/img/airpod1.png" alt="" class="airpod1">
|
||||
<img src="assets/img/airpod2.png" alt="" class="airpod2">
|
||||
</div>
|
||||
<div class="home__scroll">
|
||||
<span class="home__scroll-text">Scroll down for more</span>
|
||||
<a href="#l-section"><img src="assets/icons/bx-mouse.svg" alt="" class="home__scroll-icon"></a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="l-section" id="l-section">
|
||||
<div class="details">
|
||||
<div class="details__content">
|
||||
<div class="details__box">
|
||||
<span class="details__initial">More of</span>
|
||||
<h3 class="details__title">24<span> h</span></h3>
|
||||
<p class="details__description">battery with <br> the charging case</p>
|
||||
</div>
|
||||
<div class="details__box">
|
||||
<span class="details__initial">Until</span>
|
||||
<h3 class="details__title">5<span> h</span></h3>
|
||||
<p class="details__description">battery on<br> a single charge</p>
|
||||
</div>
|
||||
<div class="details__box">
|
||||
<span class="details__initial">Only</span>
|
||||
<h3 class="details__title">15<span> min</span></h3>
|
||||
<p class="details__description">charge equals<br> up to 3 hours of<br> audio</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="details__img">
|
||||
<img src="assets/img/airpods.png" alt="" class="airpods">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<!-- GSAP -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.4/gsap.min.js"></script>
|
||||
<!-- TIMELINE MAX -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TimelineMax.min.js"></script>
|
||||
<!-- SCROLLMAGIC -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.7/ScrollMagic.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.6/plugins/animation.gsap.min.js"></script>
|
||||
<!-- MAIN -->
|
||||
<script src="assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user