diff options
author | 2016-08-09 17:17:37 +0200 | |
---|---|---|
committer | 2016-08-09 17:18:16 +0200 | |
commit | d79366f479eb345eff07581987fee1bfbb34a9b2 (patch) | |
tree | 7b25b163418fcfbc4bc3ede70f0a909953d27049 | |
parent | 606e756bc12c51d70f23bcd11df88fe7311827a7 (diff) | |
download | rss-bridge-d79366f479eb345eff07581987fee1bfbb34a9b2.tar.gz rss-bridge-d79366f479eb345eff07581987fee1bfbb34a9b2.tar.zst rss-bridge-d79366f479eb345eff07581987fee1bfbb34a9b2.zip |
[HtmlFormat] Add button for MRSS feed
-rw-r--r-- | formats/HtmlFormat.php | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/formats/HtmlFormat.php b/formats/HtmlFormat.php index 6c75a8e7..19b7702d 100644 --- a/formats/HtmlFormat.php +++ b/formats/HtmlFormat.php @@ -13,6 +13,7 @@ class HtmlFormat extends FormatAbstract{ $title = htmlspecialchars($extraInfos['name']); $uri = htmlspecialchars($extraInfos['uri']); $atomquery = str_replace('format=HtmlFormat', 'format=AtomFormat', htmlentities($_SERVER['QUERY_STRING'])); + $mrssquery = str_replace('format=HtmlFormat', 'format=MrssFormat', htmlentities($_SERVER['QUERY_STRING'])); $entries = ''; foreach($this->getDatas() as $data){ @@ -24,10 +25,10 @@ class HtmlFormat extends FormatAbstract{ $entries .= <<<EOD <section class="feeditem"> - <h2><a class="itemtitle" href="{$entryUri}">{$entryTitle}</a></h2> - {$entryTimestamp} - {$entryAuthor} - {$entryContent} + <h2><a class="itemtitle" href="{$entryUri}">{$entryTitle}</a></h2> + {$entryTimestamp} + {$entryAuthor} + {$entryContent} </section> EOD; @@ -39,14 +40,18 @@ EOD; <!DOCTYPE html> <html> <head> - <meta charset="UTF-8"> - <title>{$title}</title> - <link href="css/HtmlFormat.css" rel="stylesheet"> - <meta name="robots" content="noindex, follow"> + <meta charset="UTF-8"> + <title>{$title}</title> + <link href="css/HtmlFormat.css" rel="stylesheet"> + <meta name="robots" content="noindex, follow"> </head> <body> - <h1 class="pagetitle"><a href="{$uri}" target="_blank">{$title}</a></h1> - <div class="buttons"><a href="./#bridge-{$_GET['bridge']}"><button class="backbutton">← back to rss-bridge</button></a><a href="./?{$atomquery}"><button class="rss-feed">RSS feed</button></a></div> + <h1 class="pagetitle"><a href="{$uri}" target="_blank">{$title}</a></h1> + <div class="buttons"> + <a href="./#bridge-{$_GET['bridge']}"><button class="backbutton">← back to rss-bridge</button></a> + <a href="./?{$atomquery}"><button class="rss-feed">RSS feed (ATOM)</button></a> + <a href="./?{$mrssquery}"><button class="rss-feed">RSS feed (MRSS)</button></a> + </div> {$entries} </body> </html> |