]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+video-channels/video-channels.component.scss
Move to sass @use
[github/Chocobozzz/PeerTube.git] / client / src / app / +video-channels / video-channels.component.scss
index aa26a7e7b7fc4b977e3d09a8b46131b349c46f5b..7a1ddafc801d03cd4e9147353b575869fa81133d 100644 (file)
-@import '_variables';
-@import '_mixins';
+@use '_variables';
+@use '_mixins';
+@use '_actor';
+@use '_miniature';
 
-.sub-menu {
-  @include sub-menu-with-actor;
+.root {
+  --myGlobalTopPadding: 60px;
+  --myChannelImgMargin: 30px;
+  --myFontSize: 16px;
+  --myGreyChannelFontSize: 16px;
+  --myGreyOwnerFontSize: 14px;
+}
 
-  .actor, .actor-info {
-    width: 100%;
+.banner {
+  @include block-ratio('img', $banner-inverted-ratio);
+}
+
+.section-label {
+  @include section-label-responsive;
+}
+
+.links {
+  @include grid-videos-miniature-margins;
+}
+
+.actor-info {
+  min-width: 1px;
+  width: 100%;
+
+  > h4,
+  > .actor-handle {
+    @include ellipsis;
+  }
+}
+
+.channel-info {
+  @include grid-videos-miniature-margins(false, 15px);
+
+  display: grid;
+  grid-template-columns: 1fr auto;
+  grid-template-rows: auto auto;
+
+  background-color: pvar(--channelBackgroundColor);
+  margin-bottom: 45px;
+  padding-top: var(--myGlobalTopPadding);
+  font-size: var(--myFontSize);
+}
+
+.channel-avatar-row {
+  @include avatar-row-responsive(var(--myChannelImgMargin), var(--myGreyChannelFontSize));
+}
+
+.support-button {
+  @include button-with-icon(21px, 0, -1px);
+}
+
+.channel-description {
+  grid-column: 1;
+  word-break: break-word;
+  padding-bottom: var(--myGlobalTopPadding);
+}
+
+.show-more {
+  @include show-more-description;
+
+  display: none;
+}
+
+.channel-buttons {
+  display: flex;
+  flex-wrap: wrap;
+
+  > *:not(:last-child) {
+    @include margin-right(15px);
   }
+}
+
+.channel-buttons.right {
+  @include margin-left(45px);
+}
+
+// Only used by mobile
+.channel-buttons.bottom {
+  display: none;
+}
+
+.owner-card {
+  @include margin-left(105px);
+  grid-column: 2;
+  // Takes all the column
+  grid-row: 1 / 3;
+  place-self: end;
+}
+
+// Only used on mobile
+.bottom-owner {
+  display: none;
+}
+
+.owner-block {
+  background-color: pvar(--mainBackgroundColor);
+  padding: 30px;
+  width: 300px;
+  font-size: var(--myFontSize);
+
+  .avatar-row {
+    display: flex;
+    margin-bottom: 15px;
+
+    .account-avatar {
+      @include actor-avatar-size(48px);
+    }
+
+    .actor-info {
+      @include margin-left(15px);
+    }
 
-  .actor-info {
-    display: grid !important;
-    grid-template-columns: 1fr auto;
-    grid-template-rows: 1fr auto / 1fr auto;
-    grid-template-areas: "name buttons"
-                         "lower buttons";
+    h4 {
+      font-size: 18px;
+      margin: 0;
 
-    @media screen and (max-width: #{map-get($grid-breakpoints, lg)}) {
-      grid-template-areas: "name name"
-                           "lower buttons";
+      a {
+        color: pvar(--mainForegroundColor);
+      }
     }
+
+    .actor-handle {
+      font-size: var(--myGreyOwnerFontSize);
+      color: pvar(--greyForegroundColor);
+    }
+  }
+
+  .owner-description {
+    @include fade-text(120px, pvar(--mainBackgroundColor));
+
+    max-height: 140px;
+    word-break: break-word;
+  }
+}
+
+.view-account.short {
+  @include peertube-button-link;
+  @include orange-button-inverted;
+
+  margin-top: 30px;
+}
+
+.view-account.complete {
+  display: none;
+}
+
+.copy-button {
+  border: 0;
+}
+
+@media screen and (max-width: 1400px) {
+  // Takes all the row width
+  .channel-avatar-row {
+    grid-column: 1 / 3;
+  }
+
+  .owner-card {
+    @include margin-left(60px);
+
+    grid-row: 2;
+  }
+}
+
+@media screen and (max-width: 1100px) {
+  .root {
+    --myGlobalTopPadding: 45px;
+    --myChannelImgMargin: 15px;
+  }
+
+  .channel-info {
+    display: flex;
+    flex-direction: column;
+    margin-bottom: 0;
   }
 
-  .actor-names {
-    grid-area: name;
+  .channel-description:not(.expanded) {
+    @include fade-text(30px, pvar(--channelBackgroundColor));
+
+    max-height: 70px;
+  }
+
+  .show-more {
+    display: inline-block;
+  }
+
+  .channel-buttons.bottom {
+    display: flex;
+    justify-content: center;
+    margin-bottom: 30px;
+  }
+
+  .channel-buttons.right {
+    display: none;
   }
 
-  .actor-name {
-    flex-grow: 1;
+  .owner-card {
+    display: none;
+  }
+
+  .bottom-owner {
+    display: block;
+    width: 100%;
+    border-bottom: 2px solid $separator-border-color;
+    padding: var(--myGlobalTopPadding) 45px;
+    margin-bottom: 60px;
+  }
+
+  .owner-block {
+    display: grid;
+    width: 100%;
+    padding: 0;
+
+    .avatar-row {
+      @include margin-right(30px);
+
+      grid-column: 1;
+    }
+
+    .owner-description {
+      @include fade-text(30px, pvar(--mainBackgroundColor));
 
-    .copy-button {
-      border: none;
-      padding: 5px;
-      margin-top: -2px;
+      grid-column: 2;
+      max-height: 70px;
+    }
+
+    .view-account {
+      grid-column: 2;
     }
   }
+
+  .view-account.complete {
+    display: block;
+    text-align: end;
+    margin-top: 10px;
+    color: pvar(--mainColor);
+  }
+
+  .view-account.short {
+    display: none;
+  }
 }
 
-.right-buttons {
-  display: flex;
-  height: max-content;
-  margin-left: auto;
-  margin-top: 20px;
+@media screen and (max-width: $mobile-view) {
+  .root {
+    --myGlobalTopPadding: 15px;
+    --myFontSize: 14px;
+    --myGreyChannelFontSize: 13px;
+    --myGreyOwnerFontSize: 13px;
+  }
+
+  .links {
+    margin: auto !important;
+    width: min-content;
+  }
+
+  .show-more {
+    margin-bottom: 30px;
+  }
 
-  grid-row: buttons-start / span buttons-end;
-  grid-column: buttons-start;
+  .bottom-owner {
+    padding: 15px;
+    margin-bottom: 30px;
 
-  a {
-    @include peertube-button-outline;
-    line-height: 1.8;
+    .section-label {
+      display: none;
+    }
   }
 
-  my-subscribe-button {
-    height: min-content;
+  .owner-block {
+    display: block;
+
+    .avatar-row {
+      display: flex;
+      flex-direction: row-reverse;
+      margin: 0;
+
+      h4 {
+        font-size: 16px;
+      }
+
+      .actor-info {
+        display: flex;
+        flex-direction: column;
+        align-items: flex-end;
+        justify-content: flex-end;
+        margin-top: -5px;
+      }
+
+      .account-avatar {
+        @include actor-avatar-size(64px);
+
+        margin: -30px 0 0 15px;
+      }
+    }
+
+    .owner-description {
+      display: none;
+    }
   }
-}
\ No newline at end of file
+}