Explorar el Código

feat(docs): Styling docs top bar

Michael Bromley hace 7 años
padre
commit
0c869283b9

+ 22 - 7
docs/assets/styles/_top-bar.scss

@@ -2,8 +2,8 @@
 
 .top-bar {
     position: fixed;
-    padding: 12px;
-    background-color: hsla(224, 14%, 15%, 0.0);
+    padding: 12px 24px;
+    background-color: #1e1e1e;
     width: 100%;
     top: 0;
     height: $top-bar-height;
@@ -11,10 +11,15 @@
     align-items: center;
     transition: background-color 0.7s;
 
-    &.floating {
-        background-color: hsla(163, 100%, 100%, 0.9);
+    &.landing-page {
+        background-color: transparent;
+
+        &.floating {
+            background-color: #1e1e1e;
+        }
     }
 
+
     .flex-spacer {
         flex: 1;
     }
@@ -22,15 +27,25 @@
     .logo {
         img {
             max-width: 32px;
+            margin-right: 12px;
         }
+        color: $brand-color;
+        font-size: 18px;
+        font-size: 24px;
+        letter-spacing: 0px;
+        font-weight: 600;
     }
 
     .right {
         a {
             margin-left: 12px;
-            &:hover {
-                text-decoration: underline;
-            }
+        }
+        a:link, a:visited {
+            color: $gray-400;
+        }
+        a:hover {
+            color: $gray-100;
+            text-decoration: none;
         }
     }
 }

+ 3 - 0
docs/assets/styles/main.scss

@@ -203,4 +203,7 @@ aside nav,
     .book-toc nav {
         padding: $padding-16 * 2 $padding-16;
     }
+    .book-menu nav {
+        padding-top: $padding-16;
+    }
 }

+ 0 - 1
docs/layouts/docs/baseof.html

@@ -13,7 +13,6 @@
 
     <aside class="book-menu fixed">
       <nav role="navigation">
-        {{ partial "docs/brand" . }}
         {{ partial "docs/inject/menu-before" . }}
 
         {{ if .Site.Params.BookMenuBundle }}

+ 1 - 1
docs/layouts/index.en.html

@@ -9,7 +9,7 @@
     <script src="{{ "clr-icons.min.js" | absURL }}"></script>
 </head>
 <body>
-{{ partial "top-bar" . }}
+{{ partial "top-bar" (dict "isLandingPage" true) }}
 <div class="hero">
     <div class="logo">
         <img src="{{ "logo.png" | absURL }}" />

+ 1 - 1
docs/layouts/partials/docs/inject/body.html

@@ -1 +1 @@
-{{ partial "top-bar" . }}
+{{ partial "top-bar" (dict "isLandingPage" false) }}

+ 2 - 1
docs/layouts/partials/top-bar.html

@@ -1,7 +1,8 @@
-<div class="top-bar">
+<div class="top-bar {{ if .isLandingPage }}landing-page{{ end }}" >
     <div class="left">
         <a class="logo" href="/">
             <img src="{{ "logo.png" | absURL }}" />
+            {{ if not .isLandingPage }}vendure{{ end }}
         </a>
     </div>
     <div class="flex-spacer"></div>