Giter VIP home page Giter VIP logo

card-nft's Introduction

Overview

Screenshot

Card NFT

Light-mode

Card NFT-light

Links

Meu processo

Construido com

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • Gsap lib to the window on load animation

O que eu aprendi

  • CSS
.buy-post .buy img{ /*Animation for the Ethereum icon*/

  animation: bownce 1s infinite alternate ease-in-out ;

}

  @keyframes bownce{
    
    from{
    transform: translateY(-2px);
  }
  to{
    transform: translateY(2px);
  } 
}
  • JS
//LIB Gspa
    TweenMax.staggerFrom('.card', 2,{ //animation to the card
      delay: 0.2, 
      opacity: 0,
      y: 50,
      ease: Expo.easeInOut

    });
    TweenMax.staggerFrom('.attribution', 1.6,{ //animation to the footer
      delay: 1,
      opacity: 0,
      x: 50,
      ease: Expo.easeInOut

    });

Light mode

const icon = document.querySelector("#icon")
const body = document.querySelector("body") //select tag body

function add(){
  body.classList.toggle("lightmode") //add class to body

  //this help to toggle the img recognizing the current mode
  //isso ajuda a trocar a img reconhecendo o modo atual
  if(body.className == "lightmode"){ //if that class alredy exist, toggle the img (se a classe já existir, trocar img)
    icon.src ='images/moon-outline.svg'

  } else {
    icon.src ='images/sunny-outline.svg' //else, toggle de img (se não existir, trocar a img também)
  }
}

Toggle colors CSS

Todas as cores estão num escopo :root no css, daí basta acrescentar a classe "lightmode" dentro do body, com as cores reorganiadas para o modo claro, ja que por padrâo o site é escuro

:root{

  --bg-color: hsl(217, 54%, 11%);
  --bg-card-color: hsl(216, 50%, 16%);
  --fildset:hsl(215, 32%, 27%);

  --white: hsl(0, 0%, 100%);

  --cyan: hsl(178, 100%, 50%);

  --icon-color: hsl(0, 0%, 100%);

  --font-color: hsla(0, 0%, 100%, 0.575);
  
}
.lightmode{
  
  transition: background .3s ease, color .3s ease;

  --bg-color: hsl(210, 40%, 92%);
  --bg-card-color: hsl(0, 0%, 93%);
  --fildset:hsl(218, 6%, 63%);

  --white: hsl(0, 0%, 24%);

  --cyan: hsl(178, 100%, 36%);

  --icon-color: hsl(0, 0%, 38%);

  --font-color: rgba(20, 20, 20, 0.719);

}

Autor

card-nft's People

Contributors

maxwell-santos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.