sparkletown/sparkle

View on GitHub
src/pages/Admin/Venue/Venue.scss

Summary

Maintainability
Test Coverage
@import "scss/constants";

$top-margin: 20px;
$vertical-padding: 20px;
$side-padding: 30px;
$border-radius: 28px;
$preview-margin: 30px;

.page {
  display: flex;
  height: 100%;
  flex-direction: row;
  justify-content: center;
  max-height: calc(100vh - #{$navbar-height});

  &--admin {
    max-height: unset;
    overflow-y: scroll;
  }
}

.page-side {
  display: flex;
  flex: 1;
  flex-direction: column;

  .full-height-container {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
  }

  .page-container-left {
    background-color: $content--under;
    padding-top: $navbar-height;
    overflow-y: auto;
    height: 100%;

    .page-container-left-content {
      max-width: 560px;
      margin-right: 20px;
      margin-left: auto;
      padding-left: 10px;
      max-height: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;

      .scrollable-content {
        overflow-y: auto;
        padding-left: 10px;
        padding-right: 20px;
        height: 100%;
      }
    }

    .page-container-left-bottombar {
      padding: 10px 14px;
      display: flex;
      justify-content: space-between;
      background-color: $content--under;
      border-top: 1px solid var(--accent--over-20a);

      .btn {
        float: right;
        margin-left: 10px;
      }
    }
  }

  &.preview {
    background-color: $content--under;
    overflow: auto;
    flex-direction: column;
    margin-top: $navbar-height;

    .playa {
      border-radius: 20px;
      overflow: scroll;
      margin: 0 $preview-margin;
    }
  }

  .venue-preview {
    flex: 1;
    margin: $preview-margin;
    background-color: $content--under;
    border-radius: 20px;
    overflow: auto;
    border: 2px solid gray;
  }

  &--admin {
    flex: unset;

    .full-height-container {
      overflow-y: unset;
      height: unset;
    }

    .page-container-left {
      overflow-y: unset;

      .page-container-left-content {
        width: 40%;
        max-width: unset;
        margin: 0 auto;

        .scrollable-content {
          overflow-y: unset;
          height: unset;
          padding-bottom: 2rem;
        }
      }
    }
  }
}

.venue-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pickspace-component-container {
  width: 100%;
  padding: 18px;
  border-radius: $border-radius;
  background-color: $secondary--live;
  cursor: pointer;
  min-height: 156px;
  margin-bottom: 1rem;
  transition: all 400ms $transition-function;

  &:hover {
    box-shadow: 0 0 0 4px opaque-white(0.62);
    background-color: lighten($secondary--live, 4%);
  }

  &.selected {
    box-shadow: 0 0 0 4px $accent--under;
    background-color: lighten($secondary--live, 4%);

    .pickspace-thumbnail {
      background-image: $gradient;
    }
  }

  .pickspace-thumbnail {
    position: relative;
    float: left;
    width: 120px;
    height: 120px;
    margin-right: 20px;
    background-color: $content--under;
    border-radius: $border-radius;
    display: flex;
    align-items: center;
    justify-content: center;

    &:after {
      content: "";
      position: absolute;
      width: 80px;
      height: 80px;
      left: 20px;
      top: 20px;
      margin: auto;
    }

    img {
      max-width: 70%;
      max-height: 70%;
    }
  }

  ul {
    text-indent: 20px;
  }
}

.wizard-buttons-container {
  margin-top: 20px;
}

.form-container {
  padding: $vertical-padding $side-padding;
  flex: 1;
}

.title-adornment {
  color: $yellow;
}

.form {
  margin-top: 10px;
  max-width: 600px;
  margin: auto;
}

.input-container {
  margin-top: 20px;
  position: relative;
}

.dynamic-input__button-wrapper {
  display: flex;
  margin: 1rem 0;
  justify-content: space-between;
}

.dynamic-input-wrapper {
  padding: 0.5em;
  margin-top: 1.5rem;

  border: 1px solid var(--accent--over-20a);

  input:disabled {
    cursor: not-allowed;
  }

  .btn {
    margin: 1rem 0;
  }
}

.checkbox {
  display: block;
  text-align: left;
  margin-bottom: 1rem;
  cursor: pointer;
  padding: 6px 0 6px 40px;

  &:before {
    content: "";
    position: absolute;
    margin-left: -40px;
    margin-top: -6px;
    height: 30px;
    width: 30px;
    border-radius: 15px;
    background-color: opaque-white(0.12);
    box-shadow: 0 0 0 2px opaque-white(0.4);
  }

  &:hover {
    &:before {
      box-shadow: 0 0 0 2px opaque-white(1);
    }
  }

  &.checkbox-checked {
    &:before {
      background-color: $primary--over;
      box-shadow: 0 0 0 2px opaque-white(0);
      background-image: url(/assets/icons/checkbox-checked.png);
      background-size: 30px 30px;
    }
  }
}

.input-subtext {
  margin-left: 10px;
  font-size: 0.8rem;
}

.input-square-container {
  width: 150px;
  height: 150px;
}

.input-square-image {
  height: 100%;
  object-fit: cover;
}

.templates-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.template-card {
  flex: 1;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 5px;
  border-color: gray;
  background-color: darkgray;
  box-shadow: 0 1px 3px 0 darkgray;
}

.template-card:hover {
  cursor: pointer;
}

.template-card.selected {
  box-shadow: 0 0 0 5px lightblue;
}

.template-card .title {
  text-align: center;
  color: $yellow;
}

ul.template-card-list {
  list-style-position: inside;
}

ul.template-card-list li {
  left: 0;
}

.wizard-nav-button {
  margin-right: 20px;
}

.btn.nav-btn {
  padding-top: 12px;
  padding-bottom: 12px;
}

.advanced-container {
  background-color: #424242;
  padding: 5px 20px 10px 20px;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.advanced-toggle {
  margin-top: 20px;
  padding: 5px;
  border: 2px solid darkgray;
  background-color: gray;
  border-radius: 5px;
}

.advanced-toggle:hover {
  cursor: pointer;
}

.toggle-title {
  flex: 1;
  margin-left: 10px;
}

.input-header {
  font-size: 20px;
}

.delete-btn {
  margin-left: 10px;
  background-color: var(--danger--under) !important;
}

li.question {
  margin-top: 10px;
  list-style: none;
}

.question-inputs-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border: 1px solid gray;
  background-color: gray;
  padding: 5px;
  border-radius: 10px;
}

.question-inputs-container input {
  background-color: #3e3e3e;
}

.question-name-input {
  max-width: 50%;
}

.question-text-input {
  margin-top: 10px;
}