From 9263fcd3c9974a577c5d5492afb6dbeeff17fbb0 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 1 Jun 2019 15:15:19 +0100 Subject: [PATCH] refactor docs to use baseof --- layouts/_default/baseof.html | 5 +++-- layouts/docs/list.html | 22 +++------------------- layouts/docs/single.html | 22 +++------------------- layouts/index.html | 4 +--- layouts/partials/site_footer.html | 1 - layouts/widget_page/single.html | 2 -- 6 files changed, 10 insertions(+), 46 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index aae20ddc..c8d06775 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -13,12 +13,13 @@ {{ partial "site_js.html" . }} + {{ if ne .Type "docs" }}
{{ partial "site_footer.html" . }}
+ {{ end }} {{ partial "citation.html" . }} - - \ No newline at end of file + diff --git a/layouts/docs/list.html b/layouts/docs/list.html index 4236ab46..34d123db 100644 --- a/layouts/docs/list.html +++ b/layouts/docs/list.html @@ -1,19 +1,3 @@ - - - -{{ partial "site_head.html" . }} - - - - {{ partial "search" . }} - - {{ partial "navbar.html" . }} - - {{ partial "docs_layout.html" . }} - - {{ partial "site_js.html" . }} - - - - - +{{- define "main" -}} +{{ partial "docs_layout.html" . }} +{{- end -}} diff --git a/layouts/docs/single.html b/layouts/docs/single.html index 4236ab46..34d123db 100644 --- a/layouts/docs/single.html +++ b/layouts/docs/single.html @@ -1,19 +1,3 @@ - - - -{{ partial "site_head.html" . }} - - - - {{ partial "search" . }} - - {{ partial "navbar.html" . }} - - {{ partial "docs_layout.html" . }} - - {{ partial "site_js.html" . }} - - - - - +{{- define "main" -}} +{{ partial "docs_layout.html" . }} +{{- end -}} diff --git a/layouts/index.html b/layouts/index.html index d79d8ced..be2a87d8 100644 --- a/layouts/index.html +++ b/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 -}} diff --git a/layouts/partials/site_footer.html b/layouts/partials/site_footer.html index 8290a0bc..b4758a42 100644 --- a/layouts/partials/site_footer.html +++ b/layouts/partials/site_footer.html @@ -23,4 +23,3 @@ {{ end }}

- diff --git a/layouts/widget_page/single.html b/layouts/widget_page/single.html index 413b2926..842aa893 100644 --- a/layouts/widget_page/single.html +++ b/layouts/widget_page/single.html @@ -1,5 +1,3 @@ {{- define "main" -}} - {{ partial "widget_page.html" . }} - {{- end -}}