Browse Source

refactor(baseof): moved all templates to use a main block

Russell J. Hewett 6 years ago
parent
commit
d0043daa72

+ 4 - 4
layouts/404.html

@@ -1,5 +1,5 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
+
 <div class="universal-wrapper pt-3">
 
   <h1>{{ i18n "page_not_found" }}</h1>
@@ -27,5 +27,5 @@
   {{ end }}
 
 </div>
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+
+{{- end -}}

+ 3 - 4
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" . }}
 </div>
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+
+{{- end -}}

+ 2 - 4
layouts/_default/single.html

@@ -1,5 +1,4 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
 
 <article class="article" itemscope itemtype="http://schema.org/Article">
 
@@ -40,5 +39,4 @@
   </div>
 </article>
 
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+{{- end -}}

+ 2 - 4
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 }}
 </section>
 
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+{{- end -}}

+ 3 - 4
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" . }}
 </div>
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+
+{{- end -}}

+ 4 - 4
layouts/partials/docs_layout.html

@@ -1,5 +1,5 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
+
 {{ $current_page := . }}
 
 <div class="container-fluid docs">
@@ -46,10 +46,10 @@
 
       </article>
 
-      {{ partial "footer_section.html" . }}
+      {{ partial "site_footer.html" . }}
 
     </main>
   </div>
 </div>
 
-{{ partial "footer.html" . }}
+{{- end -}}

+ 2 - 4
layouts/partials/widget_page.html

@@ -1,5 +1,4 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
 
 {{/* Notify JS that this is a widget page */}}
 <span class="js-widget-page d-none"></span>
@@ -76,5 +75,4 @@
   </section>
 {{ end }}
 
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+{{- end -}}

+ 2 - 4
layouts/project/single.html

@@ -1,5 +1,4 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
 
 <article class="article article-project" itemscope itemtype="http://schema.org/Article">
 
@@ -73,5 +72,4 @@
 </div>
 {{ end }}
 
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+{{- end -}}

+ 3 - 4
layouts/publication/single.html

@@ -1,5 +1,5 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
+
 <div class="pub" itemscope itemtype="http://schema.org/CreativeWork">
 
   {{ partial "page_header.html" . }}
@@ -62,5 +62,4 @@
 </div>
 {{ end }}
 
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+{{- end -}}

+ 2 - 4
layouts/section/docs.html

@@ -1,5 +1,4 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
 
 {{ partial "page_header.html" . }}
 
@@ -16,5 +15,4 @@
   </ul>
 </div>
 
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+{{- end -}}

+ 3 - 4
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" . }}
 
 </div>
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+
+{{- end -}}

+ 3 - 4
layouts/section/publication.html

@@ -1,5 +1,4 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
 
 {{ partial "page_header.html" . }}
 
@@ -75,5 +74,5 @@
     </div>
   </div>
 </div>
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+
+{{- end -}}

+ 3 - 4
layouts/section/talk.html

@@ -1,5 +1,4 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
 
 {{ partial "page_header.html" . }}
 
@@ -36,5 +35,5 @@
   </div>
 
 </div>
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+
+{{- end -}}

+ 3 - 4
layouts/talk/single.html

@@ -1,5 +1,5 @@
-{{ partial "header.html" . }}
-{{ partial "navbar.html" . }}
+{{- define "main" -}}
+
 <div class="pub" itemscope itemtype="http://schema.org/Event">
 
   {{ partial "page_header.html" . }}
@@ -84,5 +84,4 @@
 </div>
 {{ end }}
 
-{{ partial "footer_container.html" . }}
-{{ partial "footer.html" . }}
+{{- end -}}