瀏覽代碼

custom widget: Support full width no-title mode

George Cushen 7 年之前
父節點
當前提交
2605164743
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      layouts/partials/widgets/custom.html

+ 6 - 0
layouts/partials/widgets/custom.html

@@ -2,6 +2,7 @@
 
 <!-- Custom widget -->
 <div class="row">
+  {{ if $page.Title }}
   <div class="col-xs-12 col-md-4 section-heading">
     <h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
     {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
@@ -9,4 +10,9 @@
   <div class="col-xs-12 col-md-8">
     {{ $page.Content }}
   </div>
+  {{ else }}
+  <div class="col-md-12">
+    {{ $page.Content }}
+  </div>
+  {{ end }}
 </div>