add theme
This commit is contained in:
38
themes/academic/layouts/partials/widgets/posts.html
Normal file
38
themes/academic/layouts/partials/widgets/posts.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{{ $ := .root }}
|
||||
{{ $page := .page }}
|
||||
{{ $posts_len := len (where (where $.Data.Pages "Type" "post") ".Params.notonhomepage" nil) }}
|
||||
|
||||
<!-- Blog Posts widget -->
|
||||
<div class="row">
|
||||
<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 }}
|
||||
{{ if gt $posts_len $page.Params.count }}
|
||||
<p class="view-all">
|
||||
<a href="{{ "/post/" | relLangURL }}">
|
||||
{{ i18n "more_posts" | markdownify }}
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-8">
|
||||
|
||||
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
|
||||
|
||||
{{ if $page.Params.tags }}
|
||||
{{ range first $page.Params.count (where (where (where $.Data.Pages "Type" "post") ".Params.tags" "intersect" $page.Params.tags) ".Params.notonhomepage" nil) }}
|
||||
{{ $params := dict "post" . "page" $page }}
|
||||
{{ partial "post_li" $params }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range first $page.Params.count (where (where $.Data.Pages "Type" "post") ".Params.notonhomepage" nil) }}
|
||||
{{ $params := dict "post" . "page" $page }}
|
||||
{{ partial "post_li" $params }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user