diff --git a/layouts/404.html b/layouts/404.html index bcd910f7..404df1b9 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,5 +1,5 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} +

{{ i18n "page_not_found" }}

@@ -27,5 +27,5 @@ {{ end }}
-{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} + +{{- end -}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 00000000..aae20ddc --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,24 @@ + + + +{{ partial "site_head.html" . }} + + + + {{ partial "search" . }} + + {{ partial "navbar.html" . }} + + {{ block "main" . }}{{ end }} + + {{ partial "site_js.html" . }} + +
+ {{ partial "site_footer.html" . }} +
+ + {{ partial "citation.html" . }} + + + + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a24bdb29..4a86e6a0 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,4 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} {{ partial "page_header.html" . }} @@ -26,5 +25,5 @@ {{ partial "pagination" . }} -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} + +{{- end -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 720f15ca..db72d11e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,5 +1,4 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}}
@@ -40,5 +39,4 @@
-{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} +{{- end -}} diff --git a/layouts/authors/list.html b/layouts/authors/list.html index 20343fbf..2176e094 100644 --- a/layouts/authors/list.html +++ b/layouts/authors/list.html @@ -1,7 +1,6 @@ {{/* Author profile page. */}} -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} {{/* If an account has not been created for this user, just display their name as the title. */}} {{ if not .File }} @@ -38,5 +37,4 @@ {{ end }} -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} +{{- end -}} diff --git a/layouts/authors/terms.html b/layouts/authors/terms.html index 42dc07b1..f896944b 100644 --- a/layouts/authors/terms.html +++ b/layouts/authors/terms.html @@ -1,7 +1,6 @@ {{/* List of all authors. */}} -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} {{ partial "page_header.html" . }} @@ -20,5 +19,5 @@ {{ partial "pagination" . }} -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} + +{{- end -}} diff --git a/layouts/docs/list.html b/layouts/docs/list.html index 6b6a6307..4236ab46 100644 --- a/layouts/docs/list.html +++ b/layouts/docs/list.html @@ -1 +1,19 @@ -{{ partial "docs_layout.html" . }} + + + +{{ partial "site_head.html" . }} + + + + {{ partial "search" . }} + + {{ partial "navbar.html" . }} + + {{ partial "docs_layout.html" . }} + + {{ partial "site_js.html" . }} + + + + + diff --git a/layouts/docs/single.html b/layouts/docs/single.html index 6b6a6307..4236ab46 100644 --- a/layouts/docs/single.html +++ b/layouts/docs/single.html @@ -1 +1,19 @@ -{{ partial "docs_layout.html" . }} + + + +{{ partial "site_head.html" . }} + + + + {{ partial "search" . }} + + {{ partial "navbar.html" . }} + + {{ partial "docs_layout.html" . }} + + {{ partial "site_js.html" . }} + + + + + diff --git a/layouts/index.html b/layouts/index.html index 61d90826..d79d8ced 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,4 +1,9 @@ +{{- 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 }} + {{ partial "widget_page.html" . }} + +{{- end -}} diff --git a/layouts/partials/footer_container.html b/layouts/partials/citation.html similarity index 92% rename from layouts/partials/footer_container.html rename to layouts/partials/citation.html index 0af7d800..01620ae7 100644 --- a/layouts/partials/footer_container.html +++ b/layouts/partials/citation.html @@ -1,7 +1,3 @@ -
- {{ partial "footer_section.html" . }} -
- - + \ No newline at end of file diff --git a/layouts/partials/custom_head.html b/layouts/partials/custom_head.html new file mode 100644 index 00000000..b256694e --- /dev/null +++ b/layouts/partials/custom_head.html @@ -0,0 +1,4 @@ +{{/* No changes should be made to this file. */}} +{{/* Instead, create or modify your sites layout/partials/custom_head.html. */}} + +{{/* This partial is included in themes/academic/layout/partials/site_head.html. */}} diff --git a/layouts/partials/custom_js.html b/layouts/partials/custom_js.html new file mode 100644 index 00000000..5214b744 --- /dev/null +++ b/layouts/partials/custom_js.html @@ -0,0 +1,4 @@ +{{/* No changes should be made to this file. */}} +{{/* Instead, create or modify your sites layout/partials/custom_js.html. */}} + +{{/* This partial is included in themes/academic/layout/partials/site_js.html. */}} diff --git a/layouts/partials/docs_layout.html b/layouts/partials/docs_layout.html index 721c2484..c8e04ea9 100644 --- a/layouts/partials/docs_layout.html +++ b/layouts/partials/docs_layout.html @@ -1,5 +1,3 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} {{ $current_page := . }}
@@ -46,10 +44,8 @@ - {{ partial "footer_section.html" . }} + {{ partial "site_footer.html" . }}
- -{{ partial "footer.html" . }} diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html deleted file mode 100644 index e69de29b..00000000 diff --git a/layouts/partials/footer_section.html b/layouts/partials/site_footer.html similarity index 99% rename from layouts/partials/footer_section.html rename to layouts/partials/site_footer.html index b4758a42..8290a0bc 100644 --- a/layouts/partials/footer_section.html +++ b/layouts/partials/site_footer.html @@ -23,3 +23,4 @@ {{ end }}

+ diff --git a/layouts/partials/header.html b/layouts/partials/site_head.html similarity index 96% rename from layouts/partials/header.html rename to layouts/partials/site_head.html index ac962639..4702e378 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/site_head.html @@ -1,5 +1,3 @@ - - @@ -183,10 +181,9 @@ {{ end }} {{ partial "cookie_consent" . }} - {{ partial "head_custom" . }} + + {{ partial "custom_head" . }} {{ if not .IsHome }}{{ .Title }} | {{ end }}{{ site.Title }} - - {{ partial "search" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/site_js.html similarity index 99% rename from layouts/partials/footer.html rename to layouts/partials/site_js.html index f1e4f02d..7558f435 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/site_js.html @@ -150,5 +150,4 @@ {{ $js_bundle := slice $js_bundle_head $js_bundle | resources.Concat "js/academic.min.js" | fingerprint "md5" }} - - + {{ partial "custom_js" . }} diff --git a/layouts/partials/widget_page.html b/layouts/partials/widget_page.html index dc19bc4e..809967fe 100644 --- a/layouts/partials/widget_page.html +++ b/layouts/partials/widget_page.html @@ -1,6 +1,3 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} - {{/* Notify JS that this is a widget page */}} @@ -75,6 +72,3 @@ {{if $use_container}}{{end}} {{ end }} - -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} diff --git a/layouts/project/single.html b/layouts/project/single.html index 48ba6f28..c74e9e9a 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -1,5 +1,4 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}}
@@ -73,5 +72,4 @@ {{ end }} -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} +{{- end -}} diff --git a/layouts/publication/single.html b/layouts/publication/single.html index ea77e0f9..b1550516 100644 --- a/layouts/publication/single.html +++ b/layouts/publication/single.html @@ -1,5 +1,5 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} +
{{ partial "page_header.html" . }} @@ -62,5 +62,4 @@
{{ end }} -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} +{{- end -}} diff --git a/layouts/section/docs.html b/layouts/section/docs.html index 15a730dc..bd65fc2e 100644 --- a/layouts/section/docs.html +++ b/layouts/section/docs.html @@ -1,5 +1,4 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} {{ partial "page_header.html" . }} @@ -16,5 +15,4 @@ -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} +{{- end -}} diff --git a/layouts/section/post.html b/layouts/section/post.html index da41003e..2f7df9f3 100644 --- a/layouts/section/post.html +++ b/layouts/section/post.html @@ -1,5 +1,4 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} {{ partial "page_header.html" . }} @@ -23,5 +22,5 @@ {{ partial "pagination" . }} -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} + +{{- end -}} diff --git a/layouts/section/publication.html b/layouts/section/publication.html index a1f3c97a..d6b3fb75 100644 --- a/layouts/section/publication.html +++ b/layouts/section/publication.html @@ -1,5 +1,4 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} {{ partial "page_header.html" . }} @@ -75,5 +74,5 @@ -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} + +{{- end -}} diff --git a/layouts/section/talk.html b/layouts/section/talk.html index 2983a806..ca2951ce 100644 --- a/layouts/section/talk.html +++ b/layouts/section/talk.html @@ -1,5 +1,4 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} {{ partial "page_header.html" . }} @@ -36,5 +35,5 @@ -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} + +{{- end -}} diff --git a/layouts/talk/single.html b/layouts/talk/single.html index 412014b9..a4262b13 100644 --- a/layouts/talk/single.html +++ b/layouts/talk/single.html @@ -1,5 +1,5 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} +{{- define "main" -}} +
{{ partial "page_header.html" . }} @@ -84,5 +84,4 @@
{{ end }} -{{ partial "footer_container.html" . }} -{{ partial "footer.html" . }} +{{- end -}} diff --git a/layouts/widget_page/single.html b/layouts/widget_page/single.html index e1d285b7..413b2926 100644 --- a/layouts/widget_page/single.html +++ b/layouts/widget_page/single.html @@ -1 +1,5 @@ +{{- define "main" -}} + {{ partial "widget_page.html" . }} + +{{- end -}}