Changing the docs template partials to be able to be used to render a section
authorspf13 <steve.francia@gmail.com>
Wed, 20 Aug 2014 01:28:37 +0000 (21:28 -0400)
committerspf13 <steve.francia@gmail.com>
Wed, 20 Aug 2014 01:28:37 +0000 (21:28 -0400)
docs/layouts/partials/footer.html
docs/layouts/partials/header.html
docs/layouts/partials/menu.html

index 961638d8cf7c4358315e597b3f3e064a983855f3..e6a4fc8cf43001b23bc089e002555b1c2e2af5ed 100644 (file)
@@ -3,11 +3,13 @@
                     </section>
                 </div>
                 <div class="col-md-1">
+                    {{ if .IsPage }}
                     {{ with .GetParam "next" }}
                     <a class="navigation next" href="{{.}}">
                         <i class="fa fa-angle-right"> </i>
                     </a>
                     {{ end }}
+                    {{ end }}
                 </div>
               </div>
               <!-- page start-->
index f6fc360ca7046cb241344059ee3eb2c6f810b389..f47ba2b18583aac2754a38293eaf1ebb85ba0a71 100644 (file)
@@ -48,7 +48,7 @@
       </header>
       <!--header end-->
 
-{{ template "partials/menu.html" . }}
+{{ partial "menu.html" . }}
 
       <!--main content start-->
       <section id="main-content">
 
               <div class="row">
                   <div class="col-md-1">
+                      {{ if .IsPage }}
                       {{ with .GetParam "prev" }}
                       <a class="navigation prev" href="{{.}}">
                       <i class="fa fa-angle-left"></i>
                       </a>
                       {{ end }}
+                      {{ end }}
                   </div>
                 <div class="col-md-10">
                     <section class="panel">
index cac8233d088472969f1d2ac75601645aa0c6aba2..8e5e4004d9d49b08d16437b46fd819ef45fa061f 100644 (file)
@@ -30,7 +30,9 @@
               </li>
           {{end}}
             <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>
         <!-- sidebar menu end-->
     </div>