Chocobozzz/PeerTube

View on GitHub
client/src/app/shared/shared-video-miniature/videos-list.component.scss

Summary

Maintainability
Test Coverage
@use '_bootstrap-variables';
@use '_variables' as *;
@use '_mixins' as *;
@use '_miniature' as *;

// Cannot set margin top to videos-header because of the main header fixed position
$margin-top: 2rem;

.videos-header {
  display: grid;
  grid-template-columns: auto 1fr auto;

  .title,
  .title-subscription {
    grid-column: 1;
  }

  .title {
    font-size: 18px;
    color: pvar(--mainForegroundColor);
    display: inline-block;
    font-weight: $font-semibold;
  }

  .title-subscription {
    grid-row: 2;
    font-size: 14px;
    color: pvar(--greyForegroundColor);

    &.no-title {
      margin-top: 10px;
    }
  }

  .action-block {
    grid-column: 3;
    grid-row: 1/3;
  }

  my-feed {
    display: inline-block;
    width: 16px;
    color: pvar(--mainColor);
    position: relative;
    top: -2px;

    @include margin-left(5px);
  }
}

.date-title {
  font-weight: $font-semibold;
  margin-bottom: 20px;
  font-size: 1rem;

  // Make the element span a full grid row within .videos grid
  grid-column: 1 / -1;

  &:not(:first-child) {
    margin-top: .5rem;
    padding-top: 20px;
    border-top: 1px solid $separator-border-color;
  }
}

.margin-content {
  @include grid-videos-miniature-layout-with-margins;
}

.display-as-row.videos {
  @include margin-left(pvar(--horizontalMarginContent));
  @include margin-right(pvar(--horizontalMarginContent));

  .video-wrapper {
    margin-bottom: 1rem;
  }
}

my-global-icon[iconname=live] {
  position: relative;
  top: -1px;
}

@media screen and (max-width: $mobile-view) {
  my-video-filters-header {
    display: inline-block;

    @include margin-left(1rem);
    @include margin-right(1rem);
  }

  .date-title {
    text-align: center;
  }

  .videos-header {
    text-align: center;
    width: 100%;
    margin-bottom: 1rem;
    display: block;
  }
}