Commit 5821ad4e authored by Christopher Guindon's avatar Christopher Guindon
Browse files

blog list + mustache_js shortchode

parent c73f26a5
This diff is collapsed.
---
title: "RSS List Widget"
date: 2019-04-17T15:52:27-04:00
description: ""
title: Solstice RSS Blog List
date: 2019-04-17T19:52:27.000Z
description: ''
categories: []
keywords: []
slug: ""
slug: ''
aliases: []
toc: false
draft: false
lastmod: '2021-12-08T16:44:54.441Z'
---
Displays an RSS feed on the page,
{{< rss_display "/components/atom.xml" >}}
## Default
No limit:
{{< solstice_rss_blog_list urls="components/index.xml,https://planeteclipse.org/planet/ecdtools.xml,https://jakartablogs.ee/rss20.xml,https://planeteclipse.org/planet/rss20.xml" limit="2" >}}
{{< rss_display "/components/atom.xml" -1 >}}
## When using a custom mustache template
{{< solstice_rss_blog_list urls="components/index.xml,https://planeteclipse.org/planet/ecdtools.xml,https://jakartablogs.ee/rss20.xml,https://planeteclipse.org/planet/rss20.xml" limit="2" template-id="mustache-tpl-custom-news-list-item">}}
{{< mustache_js template-id="mustache-tpl-custom-news-list-item" path="/js/templates/tpl-custom-news-list-item.mustache">}}
{{#items}}
<p class="whats-new-date">{{#formatDate}}{{date}}{{/formatDate}}</p>
<h4 class="whats-new-title"><a href="{{ link }}">{{ title }}</a></h4>
<p class="whats-new-description">{{summary}}</p>
{{/items}}
\ No newline at end of file
{{if and (.Get "template-id") (.Get "path")}}
<script id="{{- .Get "template-id" -}}" type="x-tmpl-mustache">
{{ readFile (.Get "path") | safeHTML }}
</script>
{{ end }}
<div id="{{ now.UnixNano }}-rss" class="solstice-rss-feed" data-limit="{{ .Get 1 | default 5 }}" data-src="{{ .Get 0 }}">
<p class="solstice-loading">
<i class="fa fa-spinner fa-pulse"></i>
</p>
<ul hidden></ul>
<div class="template" hidden="hidden">
<li class="margin-bottom-15">
<p class="margin-bottom-0">
<strong><a target="_blank"></a></strong>
</p>
<p>
<small></small>
</p>
</li>
</div>
</div>
\ No newline at end of file
<div class="solstice-rss-blog-list{{ with .Get "classes" }} {{ . }}{{ end }}" {{- with .Get "template-id" }} data-template-id="{{ . }}"{{ end }} {{- with .Get "urls" }} data-urls="{{ . }}"{{ end }} {{- with .Get "limit" }} data-limit="{{ . }}"{{ end }}>
<p class="solstice-loading">
<i class="fa fa-spinner fa-pulse"></i>
</p>
</div>
\ No newline at end of file
......@@ -24,7 +24,7 @@
"readmeFilename": "README.md",
"dependencies": {
"axios": "^0.21.1",
"eclipsefdn-solstice-assets": "0.0.178",
"eclipsefdn-solstice-assets": "0.0.179",
"json2yaml": "^1.1.0",
"parse-link-header": "^1.0.1",
"toml": "^3.0.0"
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment