Skip to content

Commit

Permalink
Refactor to base/block method
Browse files Browse the repository at this point in the history
Fixes #35
  • Loading branch information
mattstratton committed Oct 12, 2016
1 parent d28b233 commit 3e83996
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
7 changes: 7 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ partial "header.html" . }}
<div class="container middle_container">
{{ block "main" . }}
<!-- The part of the page that begins to differ between templates -->
{{ end }}
</div> <!-- end middle_container -->
{{ partial "footer.html" . }}
7 changes: 3 additions & 4 deletions layouts/about/single.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ partial "header.html" . }}
<div class="container middle_container">
{{ define "main" }}

<div class = "row">
<div class = "col-md-12">
<h1>About {{ .Site.Title }}</h1>
Expand Down Expand Up @@ -62,5 +62,4 @@ <h3>{{ $p.name }}</h3>
{{ end }}
</div>
</div>
</div>
{{ partial "footer.html" . }}
{{ end }}
7 changes: 3 additions & 4 deletions layouts/episode/single.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ partial "header.html" . }}
<div class="container middle_container">
{{ define "main" }}

<div class = "row">
<div class = "col-md-12">
<h1>{{ title .Title }}</h1>
Expand Down Expand Up @@ -106,5 +106,4 @@ <h2>{{ $p.full_name }}</h2>
</nav>
</div>
</div><!-- pager end -->
</div> <!-- end main container -->
{{ partial "footer.html" . }}
{{ end }}
6 changes: 2 additions & 4 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{ partial "header.html" . }}
<div class="container middle_container">
{{ define "main" }}

<div class="row hero_container">
<div class="col-md-12">
Expand Down Expand Up @@ -74,5 +73,4 @@ <h2>
{{ template "_internal/pagination.html" . }}
</div>
</div>
</div> <!-- end middle_container -->
{{ partial "footer.html" . }}
{{ end }}

0 comments on commit 3e83996

Please sign in to comment.