فهرست منبع

Add featurette/blurb widget

Example use: https://raw.githubusercontent.com/sourcethemes/academic-www/master/content/home/features.md

Close #424
George Cushen 7 سال پیش
والد
کامیت
0514bbd48d
2فایلهای تغییر یافته به همراه44 افزوده شده و 0 حذف شده
  1. 31 0
      layouts/partials/css/academic.css
  2. 13 0
      layouts/partials/widgets/featurette.html

+ 31 - 0
layouts/partials/css/academic.css

@@ -320,6 +320,37 @@ small,
   font-size: 1.1rem;
 }
 
+/*************************************************
+ *  Featurette Widget
+ **************************************************/
+
+.featurette {
+  font-size: 0.8rem;
+  line-height: 1.5;
+  color: #555;
+  text-align: center;
+}
+
+.featurette h3 {
+  margin-top: 0;
+  margin-bottom: 5px;
+  font-weight: 400;
+  color: #333;
+}
+
+.dark .featurette,
+.dark .featurette h3 {
+  color: #fff;
+}
+
+.featurette-icon {
+  display: block;
+  width: 100%;
+  color: {{ .Get "primary" }};
+  font-size: 3rem;
+  text-align: center;
+}
+
 /*************************************************
  *  Biography
  **************************************************/

+ 13 - 0
layouts/partials/widgets/featurette.html

@@ -0,0 +1,13 @@
+{{ $ := .root }}
+{{ $page := .page }}
+
+<div class="row featurette">
+  {{ range $page.Params.feature }}
+  {{ $pack := or .icon_pack "fa" }}
+  <div class="col-sm-4">
+    {{ with .icon }}<div class="featurette-icon"><i class="{{ $pack }} {{ $pack }}-{{ . }}"></i></div>{{ end }}
+    <h3>{{ .name | markdownify | emojify }}</h3>
+    {{ with .description }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
+  </div>
+  {{ end }}
+</div>