Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

6.7 KB
Raw Blame
@use 'scss/variables' as *;

.photoInformationHolder {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  flex-flow: column-reverse;
  display: flex;

  &:hover {
    .photoInformation {
      height: auto;
      align-items: flex-start;
      flex-flow: column;

      .buttons {
        padding: 30px 0 0;
        display: flex;
      }

      .extra-content {
        margin-top: 10px;
        display: grid;
        grid-template-columns: auto auto;
        gap: 10px;
        transition: 0.8s;
      }

      .stats {
        display: flex;
        padding-top: 5px;
        gap: 20px;

        @include themed {
          color: t($subColor);
        }

        div {
          display: flex;
          align-items: center;
          align-content: center;
          flex-direction: row;
          gap: 5px;

          svg {
            font-size: 1em;
          }
        }
      }

      .copyright {
        display: flex;
        margin-top: 10px;
        gap: 10px;

        a {
          text-decoration: none;

          @include themed {
            color: t($subColor);
          }
        }
      }

      .photoInformation-content {
        padding: 20px 20px 20px 0;
      }

      .map-concept {
        width: 100%;
      }
    }
  }
}

.mapOn {
  width: 100%;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;

  img {
    flex-shrink: 0;
    min-width: 100%;
    min-height: 100%;
  }

  svg {
    display: none;
  }
}

.photoInformation-legacy {
  font-size: 1.36em;
  text-shadow: 0 0 10px rgb(0 0 0 / 30%);
  color: #fff;
  z-index: 99;
  user-select: none;
  cursor: initial;
  font-weight: bolder;

  svg {
    font-size: 1.36em;
  }

  &:hover .infoCard {
    display: block !important;
  }

  display: flex;
  align-items: center;
  gap: 15px;

  svg:hover + .infoCard {
    display: block;
  }

  a {
    color: white;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }

  + .photoInformation {
    animation: none !important;
  }
}

.infoCard {
  display: none;
  background: var(--background);
  box-shadow: 0 0 10px rgb(0 0 0 / 30%);
  color: var(--modal-text);
  position: fixed;
  bottom: 2.9rem;
  left: 0.7em;
  padding: 1rem;
  border-radius: 24px 24px 24px 0;
  width: 300px !important;
  text-align: left;
  text-shadow: none;

  svg {
    margin-right: 0.5rem;
    vertical-align: middle;
    display: inline-flex;
    padding: 2px;
  }

  .locationMap {
    height: 100px;
    object-fit: cover;
    width: 100%;
    background-position: center center;
    background-repeat: no-repeat;
  }

  .mapboxLogo {
    height: 20px;
    width: auto;
  }

  span,
  svg {
    font-size: 2em;
  }

  span {
    user-select: text;
  }

  h1,
  .MuiSvgIcon-root {
    user-select: none;
    cursor: initial;
  }

  h1,
  .infoIcon {
    font-size: 3em;
  }

  .infoIcon {
    padding: 4px;
  }

  hr {
    height: 3px;
    background: var(--photo-info);
    outline: none;
    border: none;
  }

  &:hover,
  span {
    display: block !important;
  }

  .download {
    text-decoration: underline;
    cursor: pointer;

    &:hover {
      opacity: 0.8;
    }
  }

  .mapCopyright {
    font-size: 0.9em;
  }
}

.photoInformation {
  @extend %basic;

  animation: fadeIn 2s;
  min-width: 300px;
  font-size: 0.8em;
  font-weight: 300;
  z-index: 99;
  display: flex;
  flex-flow: row;
  align-items: center;
  transition: 0.8s cubic-bezier(0.075, 0.82, 0.165, 1);

  //   width: 300px;
  padding: 10px;

  .link {
    text-decoration: none;
    cursor: pointer;

    @include themed {
      color: t($link);
    }

    &:hover {
      opacity: 0.8;
    }
  }

  &:hover {
    padding: 20px;
    height: auto;
    align-items: flex-start;
    flex-flow: column;

    .buttons {
      padding: 30px 0 0;
      display: flex;
    }

    .extra-content {
      display: flex;
      flex-flow: column;
      gap: 10px;
      transition: 0.8s;
    }

    .stats {
      display: flex;
      gap: 15px;

      @include themed {
        color: t($subColor);
      }

      div {
        display: flex;
        align-items: center;
        align-content: center;
        flex-direction: row;
        gap: 10px;

        svg {
          font-size: 1em;
        }
      }
    }

    .copyright {
      display: flex;
      margin-top: 10px;
      gap: 10px;

      a {
        text-decoration: none;

        @include themed {
          color: t($subColor);
        }
      }
    }

    .photoInformation-content {
      padding-left: 0;
    }

    .map-concept {
      width: 100%;
    }
  }

  .map-concept {
    @extend %basic;

    height: 50px;
    width: 50px;
    flex-grow: 0;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;

    svg {
      font-size: 24px;
    }

    img {
      width: 100%;
      height: 100%;
      background-repeat: no-repeat;
      background-size: cover;
      object-fit: cover;
      border-radius: 12px;
    }
  }

  .location {
    font-size: 1.9em;
  }

  .credit {
    font-size: 1.4em;

    @include themed {
      color: t($subColor);
    }

    a {
      @include themed {
        color: t($subColor);
      }

      &:nth-child(2) {
        color: var(--modal-link);
      }
    }
  }
}

.photoInformation-content {
  line-height: 2em;
  padding-right: 10px;
  display: flex;
  flex-flow: row;
  align-items: center;
  gap: 20px;
  padding-left: 20px;
  width: 100%;
  justify-content: space-between;

  a {
    @include themed {
      color: t($link);
    }

    text-decoration: none;

    &:hover {
      opacity: 0.9;
    }
  }
}

.extra-content {
  display: none;
  flex-flow: column;
  width: 100%;
  transition: 1s;

  .row {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;

    svg {
      @include themed {
        color: t($subColor);
        font-size: 18px;
      }
    }
  }
}

.copyright {
  display: none;
}

.buttons {
  align-items: center;
  gap: 20px;
  padding: 20px 20px 0 0;
  display: none;

  svg {
    @include basicIconButton(11px, 1.3rem, ui);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.photoMap {
  img {
    height: 50px !important;
    width: 50px !important;
  }

  a {
    height: 50px;
  }
}

.photoInformation:hover,
.photoInformation-legacy + .photoInformation {
  .photoMap {
    height: auto !important;

    img {
      height: auto !important;
      width: auto !important;
    }

    a {
      height: auto !important;
    }
  }
}

.unsplashStats {
  display: flex;
  flex-flow: column;
  justify-content: space-between;

  div {
    display: flex;
    flex-flow: row;
    gap: 10px;
    align-items: center;
  }
}

.photoInformation-text {
  display: flex;
  flex-flow: column;
}