浏览代码

refactor docs to use baseof

George Cushen 6 年之前
父节点
当前提交
9263fcd3c9

+ 3 - 2
layouts/_default/baseof.html

@@ -13,12 +13,13 @@
 
   {{ partial "site_js.html" . }}
 
+  {{ if ne .Type "docs" }}
   <div class="container">
     {{ partial "site_footer.html" . }}
   </div>
+  {{ end }}
 
   {{ partial "citation.html" . }}
 
 </body>
-
-</html>
+</html>

+ 3 - 19
layouts/docs/list.html

@@ -1,19 +1,3 @@
-<!DOCTYPE html>
-<html lang="{{ site.LanguageCode | default "en-us" }}">
-
-{{ partial "site_head.html" . }}
-
-<body id="top" data-spy="scroll" data-target="{{ if or .IsHome (eq .Type "widget_page") }}#navbar-main{{else}}#TableOfContents{{end}}" data-offset="71" {{ if not (.Scratch.Get "light") }}class="dark"{{end}}>
-
-  {{ partial "search" . }}
-
-  {{ partial "navbar.html" . }}
-
-  {{ partial "docs_layout.html" . }}
-
-  {{ partial "site_js.html" . }}
-
-</body>
-
-</html>
-
+{{- define "main" -}}
+{{ partial "docs_layout.html" . }}
+{{- end -}}

+ 3 - 19
layouts/docs/single.html

@@ -1,19 +1,3 @@
-<!DOCTYPE html>
-<html lang="{{ site.LanguageCode | default "en-us" }}">
-
-{{ partial "site_head.html" . }}
-
-<body id="top" data-spy="scroll" data-target="{{ if or .IsHome (eq .Type "widget_page") }}#navbar-main{{else}}#TableOfContents{{end}}" data-offset="71" {{ if not (.Scratch.Get "light") }}class="dark"{{end}}>
-
-  {{ partial "search" . }}
-
-  {{ partial "navbar.html" . }}
-
-  {{ partial "docs_layout.html" . }}
-
-  {{ partial "site_js.html" . }}
-
-</body>
-
-</html>
-
+{{- define "main" -}}
+{{ partial "docs_layout.html" . }}
+{{- end -}}

+ 1 - 3
layouts/index.html

@@ -1,9 +1,7 @@
-{{- define "main" -}}
-
 {{ if not (isset site.Params "color_theme") }}
   {{ errorf "Please complete the installation of Academic by following the steps at https://sourcethemes.com/academic/docs/install/" }}
 {{ end }}
 
+{{- define "main" -}}
 {{ partial "widget_page.html" . }}
-
 {{- end -}}

+ 0 - 1
layouts/partials/site_footer.html

@@ -23,4 +23,3 @@
     {{ end }}
   </p>
 </footer>
-

+ 0 - 2
layouts/widget_page/single.html

@@ -1,5 +1,3 @@
 {{- define "main" -}}
-
 {{ partial "widget_page.html" . }}
-
 {{- end -}}