#22 Event Card

Preview

+ 146 going

HTML

SCSS


*, ::after, ::before {
  box-sizing: border-box;
}

/* css element */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap');

.event-card {
  font-family: 'Roboto', sans-serif;
  background-color: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 10px 20px 0 rgba(0, 2, 10, 0.1);

  .user-block {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-align: center;
    align-items: center;
    padding: 15px;
    
    .photo {
      width: 40px;
      height: 40px;
      overflow: hidden;
      border-radius: 100%;
      margin-right: 10px;
      
      img {
        width: 100%;
      }
    }
    
    .user-info {
      h3 {
        margin: 0 0 2px 0;
        font-size: 16px;
        color: #162B39;
        font-weight: 700;
        
        em {
          color: #8492A6;
          font-style: normal;
        }
      }
      
      .date {
        display: block;
        color: #8492A6;
        font-weight: 400;
        font-size: 13px;
      }
    }
  }

  article {
    figure {
      margin: 0;
      
      img {
        width: 100%;
      }
    }
    
    .article-info {
      position: relative;
      padding: 30px 15px 15px 15px;
      
      .date {
        background-color: #ffffff;
        border-radius: 6px;
        box-shadow: 0 10px 20px 0 rgba(0, 10, 14, 0.1);
        padding: 10px 15px;
        position: absolute;
        left: 15px;
        top: -40px;
        
        .day {
          display: block;
          color: #162B39;
          font-weight: 400;
          font-size: 20px;
          line-height: 20px;
          margin-bottom: 2px;
        }
        
        .month {
          display: block;
          color: #D73601;
          font-weight: 700;
          font-size: 14px;
        }
      }
      
      h2 {
        margin: 0 0 3px 0;
        color: #162B39;
        font-weight: 700;
        font-size: 18px;
      }
      
      .category {
        display: block;
        color: #8492A6;
        font-weight: 400;
        font-size: 13px;
      }
    }
    
    .users-event {
      position: relative;
      display: -ms-flexbox;
      display: flex;
      -ms-flex-wrap: wrap;
      flex-wrap: wrap;
      -ms-flex-align: center;
      align-items: center;
      padding: 0 15px 15px 15px;
      
      ul {
        list-style: none;
        margin: 0;
        padding: 0;
        
        li {
          display: inline-block;
          margin-left: -15px;
          width: 32px;
          height: 32px;
          overflow: hidden;
          border-radius: 100px;
          border: 3px solid #ffffff;
          
          &:first-child {
            margin-left: 0;
          }
          
          img {
            width: 100%;
          }
        }
      }
      
      span {
        color: #8492A6;
        font-weight: 400;
        font-size: 13px;
        margin-left: 10px;
      }
    }
  }

  .event-footer {
    border-top: 1px solid #efefef;
    margin: 0 15px;
    padding: 15px 0;
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-align: center;
    align-items: center;
    justify-content: space-between;
    
    button {
      width: 36px;
      height: 36px;
      border-radius: 100px;
      border: none;
      background-color: #ffffff;
      text-align: center;
      padding: 0;
      cursor: pointer;
      transition: all .3s ease-in-out;
      
      &:focus {
        outline: none;
      }
    }
    
    .reactions {
      position: relative;
      display: -ms-flexbox;
      display: flex;
      -ms-flex-wrap: wrap;
      flex-wrap: wrap;
      -ms-flex-align: center;
      align-items: center;
      
      .reaction {
        &:first-child {
          margin-right: 30px;
        }
        
        span {
          font-size: 13px;
          font-weight: 400;
          display: inline-block;
          margin-left: 7px;
        }
        
        button {
          svg {
            vertical-align: middle;
            width: 26px;
            transition: all .3s ease-in-out;
          }
        }
      }
      
      .reaction.like {
        button {
          background-color: #E8EAFF;
          
          svg {
            fill: #586CFF;
          }
          
          &:hover {
            background-color: #586CFF;
            
            svg {
              fill: #ffffff;
            }
          }
        }
        
        span {
          color: #586CFF;
        }
      }
      .reaction.comment {
        button {
          background-color: #FBEBFE;
          
          svg {
            fill: #C46FCC;
          }
          
          &:hover {
            background-color: #C46FCC;
            
            svg {
              fill: #ffffff;
            }
          }
        }
        
        span {
          color: #C46FCC;
        }
      }
    }
    
    .share {
      button {
        background-color: #ECF0F3;
        
        svg {
          vertical-align: middle;
          width: 26px;
          fill: #8492A6;
          transition: all .3s ease-in-out;
        }
        
        &:hover {
          background-color: #8492A6;
          
          svg {
            fill: #ffffff;
          }
        }
      }
    }
  }
}


Notes

In the code you can replace the images, icons and font. For icons and font you may have to change the size in the css.

Help the Project

Your help is important for the success of this project. We will make this project grow for everyone.