Răsfoiți Sursa

HUE-8888 [docs] Fixed right TOC layout on mobile

Enrico Berti 6 ani în urmă
părinte
comite
ef7fd6ebdd

+ 1 - 1
docs/docs-site/content/_index.md

@@ -7,7 +7,7 @@ pre = "<b>1. </b>"
 +++
 ![Hue Logo Back-end](/images/hue_logo.png)
 
-<span style="font-size:52px; text-align:center; display: block">Documentation</span>
+<h1>Documentation</h1>
 
 Hue is a mature open source SQL Assistant for querying, visualizing and sharing data in Databases & Data Warehouses: [gethue.com](http://gethue.com).
 

+ 26 - 6
docs/docs-site/static/css/theme-hue.css

@@ -35,6 +35,10 @@ textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[typ
     box-shadow: none;
 }
 
+h1 {
+  font-size: 2.5rem;
+}
+
 h2, h3, h4, h5 {
     color: var(--MAIN-TITLES-TEXT-color) !important;
 }
@@ -103,11 +107,9 @@ a:hover {
 }
 
 .toc {
-  position: fixed;
-  top: 100px;
-  right: 0;
+  position: unset;
   width: auto;
-  border-left: thin solid #ccc;
+  border-left: none;
 }
 .toc .wrapper{
   margin-left: 20px;
@@ -133,5 +135,23 @@ a:hover {
 }
 
 #body-inner {
-  width: calc(100% - 300px);
-}
+  width: 100%;
+}
+
+@media (min-width: 992px) {
+  h1 {
+    font-size: 3.25rem;
+  }
+  
+  #body-inner {
+    width: calc(100% - 300px);
+  }
+
+  .toc {
+    position: fixed;
+    top: 100px;
+    right: 0;
+    border-left: thin solid #ccc;
+  }
+}
+

+ 2 - 2
docs/docs-site/themes/hugo-theme-learn/layouts/index.html

@@ -1,7 +1,7 @@
 {{ partial "header.html" . }}
-<span id="sidebar-toggle-span">
+<!-- <span id="sidebar-toggle-span">
 <a href="#" id="sidebar-toggle" data-sidebar-toggle=""><i class="fas fa-bars"></i> navigation</a>
-</span>
+</span> -->
 
 {{if .Site.Home.Content }} 
 {{.Site.Home.Content}}	

+ 0 - 2
docs/docs-site/themes/hugo-theme-learn/layouts/partials/header.html

@@ -40,7 +40,6 @@
         <section id="body">
         <div id="overlay"></div>
         <div class="padding highlightable">
-              {{if not .IsHome}}
               <div>
                 <div id="top-bar">
                 {{ if and (or .IsPage .IsSection) .Site.Params.editURL }}
@@ -72,7 +71,6 @@
                 </div>
               </div>
             </div>
-            {{ end }}
 
         {{ if .Params.chapter }}
           <div id="chapter">

+ 3 - 1
docs/docs-site/themes/hugo-theme-learn/layouts/partials/toc.html

@@ -1,3 +1,4 @@
+{{ if .TableOfContents }}
 <aside class="toc">
   <div class="wrapper">
     <header>
@@ -5,4 +6,5 @@
     </header>
     {{.TableOfContents}}
   </div>
-</aside>
+</aside>
+{{ end }}