Lambda-School-Labs/designhub-fe

View on GitHub
src/common/Nav/styles.scss

Summary

Maintainability
Test Coverage
@import '../SASS/palette';
@import '../SASS/mixins';

.top-bar-container {
  border-bottom: 1px solid #2a2b31;
  position: fixed;
  top: 0;
  z-index: 999999;
  width: 100%;
  background: $almost-black;

  @include themify($themes) {
    background: themed('bg2');
    border-bottom: themed('bg');
    color: themed('text');
  }

  .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 96%;
    margin: 0 auto;
  }

  .logo-container {
    width: auto;
    margin-left: 20px;

    svg {
      width: 2rem;
      height: 2rem;
    }
  }

  .search-bar-container {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    margin-left: 1.9%;
    svg {
      stroke: $text;
      @include themify($themes) {
        stroke: themed('text');
      }
    }
  }

  .top-bar-user-info {
    color: $white;
    font-size: 0.9rem;
    letter-spacing: 0.11rem;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;

    @include themify($themes) {
      color: themed('text');
    }
  }

  .profile-pic-thumb {
    width: 2rem;
    height: 2rem;
    border-radius: 100%;
    border: 2px solid $blue;
    margin: 0 15px;
    object-fit: cover;
    cursor: pointer;
  }

  .tooltip {
    @include themify($themes) {
      background: themed('bg2');
      color: themed('text');
    }
  }

  .dark-mode-switch {
    cursor: pointer;
    width: auto;
    height: auto;
    margin: 5px 0;
  }

  .search-bar-input {
    width: 369px;
    height: 2rem;
    color: $white;
    background: $field-bg;
    border-radius: 2px;
    border: none;
    margin-left: 26px;
    padding-left: 10px;
    letter-spacing: 0.11rem;
    outline: none;
    @include themify($themes) {
      background: themed('bg');
      color: themed('text');
    }
  }

  h3 {
    color: $white;
    @include themify($themes) {
      color: themed('header');
    }
  }

  .mobile-nav {
    display: none;
  }

  .mobile-navlinks {
    display: none;
  }
}

@media (max-width: 1024px) {
  .top-bar-container {
    width: 100%;
    display: flex;
    justify-content: center;

    .nav-content {
      display: none;
    }

    .mobile-nav {
      display: inline-flex;
      justify-content: space-between;
      align-items: center;
      width: 95%;
      margin: 0 auto;
      position: relative;
      z-index: 99999999;

      .mobile-logo {
        width: 2rem;
        margin: 10px 0;
      }

      .mobile-menu {
        width: 40px;
        cursor: pointer;
        transition: all 0.15s ease-in-out;
        stroke: white;
        @include themify($themes) {
          stroke: themed('link');
        }

        &:hover {
          transform: rotate(90deg);
        }
      }
    }

    .mobile-navlinks {
      display: flex;
      flex-direction: column;
      width: 100%;
      position: absolute;
      z-index: 99;
      margin-top: 70px;
      background: $almost-black;
      border-bottom: 1px solid #2a2b31;
      border-top: 1px solid #2a2b31;
      height: 500px;
      overflow: hidden;
      animation: slideDown 0.6s ease-in-out;
      @include themify($themes) {
        background: themed('bg');
        color: themed('text');
      }

      @keyframes slideDown {
        from {
          height: 0px;
        }
        to {
          height: 500px;
        }
      }

      .links {
        color: $dark-grey;
        text-decoration: none;
        text-align: center;
        margin: 2rem 0;

        &:hover {
          color: white;
        }
      }

      .active-links {
        color: $white;
        @include themify($themes) {
          color: themed('text');
        }
      }

      .mobile-search {
        margin: 2rem auto 0;
      }
    }

    .mobile-overlay {
      display: block;
      content: '';
      width: 100%;
      height: 100vh;
      background: rgba(0, 0, 0, 0.365);
      position: absolute;
      z-index: 1;
      margin-top: 70px;
      cursor: pointer;
    }

    .display-none {
      display: none;
    }

    .display-block {
      display: inline-flex;
    }
  }
}

.rpt-textbox-container {
  border: 1px solid $white;
  box-shadow: none;
}
.rpt-arrow {
  border: 1px solid $white;
  border-bottom: none;
  border-radius: 3px;
}
.tooltip-settings-link:hover {
  color: $almost-black;
}