mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
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:
parent
4167651b58
commit
0514bbd48d
2 changed files with 44 additions and 0 deletions
|
@ -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
layouts/partials/widgets/featurette.html
Normal file
13
layouts/partials/widgets/featurette.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue