Add featurette/blurb widget

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

Close #424
This commit is contained in:
George Cushen 2018-01-05 19:42:10 +00:00
commit 0514bbd48d
2 changed files with 44 additions and 0 deletions

View file

@ -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
**************************************************/

View file

@ -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>