]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Correctly fix sub menu
authorChocobozzz <me@florianbigard.com>
Mon, 10 Aug 2020 07:42:50 +0000 (09:42 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 10 Aug 2020 07:43:44 +0000 (09:43 +0200)
client/src/app/+about/about.component.html
client/src/app/+accounts/account-videos/account-videos.component.scss [deleted file]
client/src/app/+accounts/account-videos/account-videos.component.ts
client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.scss
client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.scss [deleted file]
client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html
client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
client/src/sass/application.scss

index da16b933d90d3e8008c2312a08868027fdc03a06..04a62240c7ab56bbffbdbad169588435d76159a8 100644 (file)
@@ -1,5 +1,5 @@
 <div class="row">
-  <div class="sub-menu">
+  <div class="sub-menu sub-menu-fixed">
 
     <div class="links">
       <a i18n routerLink="instance" routerLinkActive="active" class="title-page title-page-about">Instance</a>
diff --git a/client/src/app/+accounts/account-videos/account-videos.component.scss b/client/src/app/+accounts/account-videos/account-videos.component.scss
deleted file mode 100644 (file)
index 2ba85c0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-.title-page-single {
-  margin-top: 0;
-}
\ No newline at end of file
index dd47589c1030c8e478633aa427c018e503a7550f..5a9241f8ee1e94f4d1ed6b339759dcd0d6876866 100644 (file)
@@ -12,8 +12,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
   selector: 'my-account-videos',
   templateUrl: '../../shared/shared-video-miniature/abstract-video-list.html',
   styleUrls: [
-    '../../shared/shared-video-miniature/abstract-video-list.scss',
-    './account-videos.component.scss'
+    '../../shared/shared-video-miniature/abstract-video-list.scss'
   ]
 })
 export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
index cbd999fbd5cb2178c5ed7a37b7607b70da58d3ad..f2f42459fce850e1b20e9f26f3948a6454b68750 100644 (file)
@@ -46,10 +46,6 @@ input[type=text] {
         color: $grey-actor-name;
         margin-left: 5px;
       }
-
-      .video-channel-followers {
-
-      }
     }
   }
 
diff --git a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.scss b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.scss
deleted file mode 100644 (file)
index 2ba85c0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-.title-page-single {
-  margin-top: 0;
-}
\ No newline at end of file
index 267c328f2ab2fd0d27c7e3df30d2e3295ef7657b..599d38da9572c61851031d43a9bd933685e0fc9c 100644 (file)
@@ -12,8 +12,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
   selector: 'my-video-channel-videos',
   templateUrl: '../../shared/shared-video-miniature/abstract-video-list.html',
   styleUrls: [
-    '../../shared/shared-video-miniature/abstract-video-list.scss',
-    './video-channel-videos.component.scss'
+    '../../shared/shared-video-miniature/abstract-video-list.scss'
   ]
 })
 export class VideoChannelVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
index 02faa9bd5f4b4d4f23fcb60b7ba3a58961a5320c..e4bc39a58393dc90ba07659922516e7805282cd0 100644 (file)
@@ -1,4 +1,4 @@
-<div class="sub-menu" [ngClass]="{ 'no-scroll': isModalOpened }">
+<div class="sub-menu sub-menu-fixed" [ngClass]="{ 'no-scroll': isModalOpened }">
   <ng-container *ngFor="let menuEntry of menuEntries; index as id">
 
     <a *ngIf="menuEntry.routerLink && isDisplayed(menuEntry)" [routerLink]="menuEntry.routerLink" routerLinkActive="active" class="title-page title-page-settings">{{ menuEntry.label }}</a>
index c3cd22307768a2c04242c60b23f38829c0acacc1..43a9aa35209b055d02d2932c9536587bf238dfee 100644 (file)
@@ -1,5 +1,5 @@
 import { Subscription } from 'rxjs'
-import { filter, take } from 'rxjs/operators'
+import { filter } from 'rxjs/operators'
 import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'
 import { NavigationEnd, Router } from '@angular/router'
 import { MenuService, ScreenService } from '@app/core'
index f4e4d897718dd5fb7b7b507b6ce4fcb606ec3df8..1dbdd4064f14156d9fc77f2e6439943763d27c10 100644 (file)
@@ -145,16 +145,23 @@ label {
   .sub-menu {
     background-color: pvar(--submenuColor);
     width: 100%;
-    height: $sub-menu-height;
     display: flex;
     align-items: center;
     padding-left: $not-expanded-horizontal-margins;
     padding-right: $not-expanded-horizontal-margins;
-    position: fixed;
-    z-index: #{z('header') - 1};
 
     & + .margin-content {
-      padding-top: $sub-menu-height + $sub-menu-margin-bottom;
+      padding-top: $sub-menu-margin-bottom;
+    }
+
+    &.sub-menu-fixed {
+      height: $sub-menu-height;
+      position: fixed;
+      z-index: #{z('header') - 1};
+
+      & + .margin-content {
+        padding-top: $sub-menu-height + $sub-menu-margin-bottom;
+      }
     }
   }