diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-05-17 14:16:32 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | c4d5be53c2ae503c00da3cfe6b28d0ce9d2ca7f5 (patch) | |
tree | 2aa6b156d45da7a1bb3cfe0b6e8622030fddb990 /tpl | |
parent | e3d28be9673a9f8404ff907b8191209729ad690c (diff) | |
download | Shaarli-c4d5be53c2ae503c00da3cfe6b28d0ce9d2ca7f5.tar.gz Shaarli-c4d5be53c2ae503c00da3cfe6b28d0ce9d2ca7f5.tar.zst Shaarli-c4d5be53c2ae503c00da3cfe6b28d0ce9d2ca7f5.zip |
Process Daily RSS feed through Slim controller
The daily RSS template has been entirely rewritten to handle the whole feed through the template engine.
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/default/daily.html | 2 | ||||
-rw-r--r-- | tpl/default/dailyrss.html | 48 | ||||
-rw-r--r-- | tpl/vintage/daily.html | 2 | ||||
-rw-r--r-- | tpl/vintage/dailyrss.html | 46 |
4 files changed, 65 insertions, 33 deletions
diff --git a/tpl/default/daily.html b/tpl/default/daily.html index f07c0a8b..9ccd1e61 100644 --- a/tpl/default/daily.html +++ b/tpl/default/daily.html | |||
@@ -11,7 +11,7 @@ | |||
11 | <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor" id="daily"> | 11 | <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor" id="daily"> |
12 | <h2 class="window-title"> | 12 | <h2 class="window-title"> |
13 | {'The Daily Shaarli'|t} | 13 | {'The Daily Shaarli'|t} |
14 | <a href="./?do=dailyrss" title="{'1 RSS entry per day'|t}"><i class="fa fa-rss"></i></a> | 14 | <a href="./daily-rss" title="{'1 RSS entry per day'|t}"><i class="fa fa-rss"></i></a> |
15 | </h2> | 15 | </h2> |
16 | 16 | ||
17 | <div id="plugin_zone_start_daily" class="plugin_zone"> | 17 | <div id="plugin_zone_start_daily" class="plugin_zone"> |
diff --git a/tpl/default/dailyrss.html b/tpl/default/dailyrss.html index f589b06e..d40d9496 100644 --- a/tpl/default/dailyrss.html +++ b/tpl/default/dailyrss.html | |||
@@ -1,16 +1,32 @@ | |||
1 | <item> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <title>{$title} - {function="strftime('%A %e %B %Y', $daydate)"}</title> | 2 | <rss version="2.0"> |
3 | <guid>{$absurl}</guid> | 3 | <channel> |
4 | <link>{$absurl}</link> | 4 | <title>Daily - {$title}</title> |
5 | <pubDate>{$rssdate}</pubDate> | 5 | <link>{$index_url}</link> |
6 | <description><![CDATA[ | 6 | <description>Daily shaared bookmarks</description> |
7 | {loop="links"} | 7 | <language>{$language}</language> |
8 | <h3><a href="{$value.url}">{$value.title}</a></h3> | 8 | <copyright>{$index_url}</copyright> |
9 | <small>{if="!$hide_timestamps"}{function="strftime('%c', $value.timestamp)"} - {/if}{if="$value.tags"}{$value.tags}{/if}<br> | 9 | <generator>Shaarli</generator> |
10 | {$value.url}</small><br> | 10 | |
11 | {if="$value.thumbnail"}<img src="{$index_url}{$value.thumbnail}#" alt="thumbnail" />{/if}<br> | 11 | {loop="$days"} |
12 | {if="$value.description"}{$value.formatedDescription}{/if} | 12 | <item> |
13 | <br><br><hr> | 13 | <title>{$value.date_human} - {$title}</title> |
14 | {/loop} | 14 | <guid>{$value.absolute_url}</guid> |
15 | ]]></description> | 15 | <link>{$value.absolute_url}</link> |
16 | </item> | 16 | <pubDate>{$value.date_rss}</pubDate> |
17 | <description><![CDATA[ | ||
18 | {loop="$value.links"} | ||
19 | <h3><a href="{$value.url}">{$value.title}</a></h3> | ||
20 | <small> | ||
21 | {if="!$hide_timestamps"}{$value.created|format_date} - {/if}{if="$value.tags"}{$value.tags}{/if}<br> | ||
22 | {$value.url} | ||
23 | </small><br> | ||
24 | {if="$value.thumbnail"}<img src="{$index_url}{$value.thumbnail}#" alt="thumbnail" />{/if}<br> | ||
25 | {if="$value.description"}{$value.description}{/if} | ||
26 | <br><br><hr> | ||
27 | {/loop} | ||
28 | ]]></description> | ||
29 | </item> | ||
30 | {/loop} | ||
31 | </channel> | ||
32 | </rss><!-- Cached version of {$page_url} --> | ||
diff --git a/tpl/vintage/daily.html b/tpl/vintage/daily.html index 4892e0e1..adcdf6ab 100644 --- a/tpl/vintage/daily.html +++ b/tpl/vintage/daily.html | |||
@@ -24,7 +24,7 @@ | |||
24 | {/loop} | 24 | {/loop} |
25 | 25 | ||
26 | <br> | 26 | <br> |
27 | <a href="./?do=dailyrss" title="1 RSS entry per day"><img src="img/feed-icon-14x14.png" alt="rss_feed">Daily RSS Feed</a> | 27 | <a href="./daily-rss" title="1 RSS entry per day"><img src="img/feed-icon-14x14.png" alt="rss_feed">Daily RSS Feed</a> |
28 | </div> | 28 | </div> |
29 | 29 | ||
30 | <div class="dailyTitle"> | 30 | <div class="dailyTitle"> |
diff --git a/tpl/vintage/dailyrss.html b/tpl/vintage/dailyrss.html index f589b06e..ff19bbfb 100644 --- a/tpl/vintage/dailyrss.html +++ b/tpl/vintage/dailyrss.html | |||
@@ -1,16 +1,32 @@ | |||
1 | <item> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <title>{$title} - {function="strftime('%A %e %B %Y', $daydate)"}</title> | 2 | <rss version="2.0"> |
3 | <guid>{$absurl}</guid> | 3 | <channel> |
4 | <link>{$absurl}</link> | 4 | <title>Daily - {$title}</title> |
5 | <pubDate>{$rssdate}</pubDate> | 5 | <link>{$index_url}</link> |
6 | <description><![CDATA[ | 6 | <description>Daily shaared bookmarks</description> |
7 | {loop="links"} | 7 | <language>{$language}</language> |
8 | <h3><a href="{$value.url}">{$value.title}</a></h3> | 8 | <copyright>{$index_url}</copyright> |
9 | <small>{if="!$hide_timestamps"}{function="strftime('%c', $value.timestamp)"} - {/if}{if="$value.tags"}{$value.tags}{/if}<br> | 9 | <generator>Shaarli</generator> |
10 | {$value.url}</small><br> | 10 | |
11 | {if="$value.thumbnail"}<img src="{$index_url}{$value.thumbnail}#" alt="thumbnail" />{/if}<br> | 11 | {loop="$days"} |
12 | {if="$value.description"}{$value.formatedDescription}{/if} | 12 | <item> |
13 | <br><br><hr> | 13 | <title>{$value.date_human} - {$title}</title> |
14 | <guid>{$value.absolute_url}</guid> | ||
15 | <link>{$value.absolute_url}</link> | ||
16 | <pubDate>{$value.date_rss}</pubDate> | ||
17 | <description><![CDATA[ | ||
18 | {loop="$value.links"} | ||
19 | <h3><a href="{$value.url}">{$value.title}</a></h3> | ||
20 | <small> | ||
21 | {if="!$hide_timestamps"}{$value.created|format_date} - {/if}{if="$value.tags"}{$value.tags}{/if}<br> | ||
22 | {$value.url} | ||
23 | </small><br> | ||
24 | {if="$value.thumbnail"}<img src="{$index_url}{$value.thumbnail}#" alt="thumbnail" />{/if}<br> | ||
25 | {if="$value.description"}{$value.description}{/if} | ||
26 | <br><br><hr> | ||
14 | {/loop} | 27 | {/loop} |
15 | ]]></description> | 28 | ]]></description> |
16 | </item> | 29 | </item> |
30 | {/loop} | ||
31 | </channel> | ||
32 | </rss><!-- Cached version of {$page_url} --> | ||