Changing the docs template partials to be able to be used to render a section

This commit is contained in:
spf13 2014-08-19 21:28:37 -04:00
parent aae1ff3c92
commit 864f91d90e
3 changed files with 8 additions and 2 deletions

View file

@ -3,11 +3,13 @@
</section> </section>
</div> </div>
<div class="col-md-1"> <div class="col-md-1">
{{ if .IsPage }}
{{ with .GetParam "next" }} {{ with .GetParam "next" }}
<a class="navigation next" href="{{.}}"> <a class="navigation next" href="{{.}}">
<i class="fa fa-angle-right"> </i> <i class="fa fa-angle-right"> </i>
</a> </a>
{{ end }} {{ end }}
{{ end }}
</div> </div>
</div> </div>
<!-- page start--> <!-- page start-->

View file

@ -48,7 +48,7 @@
</header> </header>
<!--header end--> <!--header end-->
{{ template "partials/menu.html" . }} {{ partial "menu.html" . }}
<!--main content start--> <!--main content start-->
<section id="main-content"> <section id="main-content">
@ -68,11 +68,13 @@
<div class="row"> <div class="row">
<div class="col-md-1"> <div class="col-md-1">
{{ if .IsPage }}
{{ with .GetParam "prev" }} {{ with .GetParam "prev" }}
<a class="navigation prev" href="{{.}}"> <a class="navigation prev" href="{{.}}">
<i class="fa fa-angle-left"></i> <i class="fa fa-angle-left"></i>
</a> </a>
{{ end }} {{ end }}
{{ end }}
</div> </div>
<div class="col-md-10"> <div class="col-md-10">
<section class="panel"> <section class="panel">

View file

@ -30,7 +30,9 @@
</li> </li>
{{end}} {{end}}
<li> <a href="https://github.com/spf13/hugo/issues" target="blank"><i class='fa fa-life-ring'></i>Issues & Help</a> </li> <li> <a href="https://github.com/spf13/hugo/issues" target="blank"><i class='fa fa-life-ring'></i>Issues & Help</a> </li>
{{ $File := .File }} {{with .File.FileName }}<li><a href="https://github.com/spf13/hugo/edit/master/docs/content/{{ $File.Dir }}{{ $File.FileName }}" target="blank"><i class='fa fa-edit'></i> Refine this Page</a> </li>{{end}} {{ if .IsPage }}
{{ $File := .File }} {{with $File.FileName }}<li><a href="https://github.com/spf13/hugo/edit/master/docs/content/{{ $File.Dir }}{{ $File.FileName }}" target="blank"><i class='fa fa-edit'></i> Refine this Page</a> </li>{{end}}
{{ end }}
</ul> </ul>
<!-- sidebar menu end--> <!-- sidebar menu end-->
</div> </div>