Media queries to use variables when possible
[oweals/peertube.git] / client / src / app / app.component.scss
index 627187bd05e2d3802ecc8aae35c6a289793e1362..a7be8e1afa6af7ca9239e148fb6cce4f839282c9 100644 (file)
@@ -1,56 +1,93 @@
-.title-menu-left {
-  height: calc(100vh - #{$header-height});
-  padding-right: 0;
+@import '_variables';
+@import '_mixins';
 
-  .title-menu-left-block {
-    margin-left: -15px;
+.main-row {
+  min-height: calc(100vh - #{$header-height} - #{$footer-height} - #{$footer-margin});
+}
 
-    &.menu {
-      height: 100%;
-    }
-  }
+.sub-header-container {
+  margin-top: $header-height;
+  background-color: var(--mainBackgroundColor);
+}
 
-  #peertube-title {
-    background-color: #fff;
-    border-right: 1px solid $header-border-color;
-    font-size: 25px;
-    line-height: $header-height;
-    text-align: center;
-    margin-top: 0;
-    margin-bottom: 0;
+.header {
+  height: $header-height;
+  position: fixed;
+  top: 0;
+  width: 100%;
+  background-color: var(--mainBackgroundColor);
+  z-index: z(header);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
+  display: flex;
 
+  .top-left-block {
+    z-index: z(headerLeft);
+    height: $header-height;
     display: flex;
-    flex-direction: column;
-    justify-content: center;
-    text-align: center;
+    align-items: center;
+    min-width: 0;
+
+    .icon {
+      @include icon(24px);
 
-    a {
+      &.icon-menu {
+        background-color: var(--mainForegroundColor);
+        mask-image: url('../assets/images/header/menu.svg');
+        margin: 0 18px 0 20px;
+      }
+    }
+
+    .peertube-title {
+      @include disable-default-a-behaviour;
+
+      font-size: 20px;
+      font-weight: $font-bold;
       color: inherit !important;
-      display: block;
-      background: url(/client/assets/logo.png) no-repeat;
-      background-size: contain;
-      width: 180px;
-      height: 22px;
-      margin: auto;
-
-      &:hover {
-        color: inherit !important;
-        text-decoration: none !important;
+      display: flex;
+      align-items: center;
+      overflow: hidden;
+
+      .instance-name {
+        @include ellipsis;
+
+        width: 100%;
+      }
+
+      .icon.icon-logo {
+        display: inline-block;
+        background: url('../assets/images/logo.svg') no-repeat;
+        width: 23px;
+        height: 24px;
+      }
+    }
+
+    @media screen and (max-width: $mobile-view) {
+      width: 70px;
+
+      .peertube-title {
+        display: none;
       }
     }
+
+    @media screen and (max-width: 350px) {
+      flex: auto;
+    }
   }
-}
 
-my-search {
-  // Fix col-md-* padding
-  padding: 0;
+  .header-right {
+    height: $header-height;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    white-space: nowrap;
+    flex: 1;
+  }
 }
 
 footer {
-  border-top: 1px solid $footer-border-color;
   padding: 10px 0;
-  text-align: center;
   font-size: 11px;
   margin-top: $footer-margin;
   height: $footer-height;
+  justify-content: center;
 }