diff --git a/formats/AtomFormat.php b/formats/AtomFormat.php index 6ebdf77..9bd08bd 100644 --- a/formats/AtomFormat.php +++ b/formats/AtomFormat.php @@ -40,6 +40,16 @@ class AtomFormat extends FormatAbstract{ } } + $entryCategories = ''; + if(isset($item['categories'])) { + foreach($item['categories'] as $category) { + $entryCategories .= '' + . PHP_EOL; + } + } + $entries .= << @@ -52,6 +62,7 @@ class AtomFormat extends FormatAbstract{ {$entryTimestamp} {$entryContent} {$entryEnclosures} + {$entryCategories} EOD; diff --git a/formats/HtmlFormat.php b/formats/HtmlFormat.php index fc4adcc..c4c5012 100644 --- a/formats/HtmlFormat.php +++ b/formats/HtmlFormat.php @@ -47,6 +47,20 @@ class HtmlFormat extends FormatAbstract { $entryEnclosures .= ''; } + $entryCategories = ''; + if(isset($item['categories'])) { + $entryCategories = '

Categories:

'; + + foreach($item['categories'] as $category) { + + $entryCategories .= '
  • ' + . $this->sanitizeHtml($category) + . '
  • '; + } + + $entryCategories .= '
    '; + } + $entries .= << @@ -55,6 +69,7 @@ class HtmlFormat extends FormatAbstract { {$entryAuthor} {$entryContent} {$entryEnclosures} + {$entryCategories} EOD; diff --git a/formats/MrssFormat.php b/formats/MrssFormat.php index 8f54ef0..6d07928 100644 --- a/formats/MrssFormat.php +++ b/formats/MrssFormat.php @@ -51,6 +51,16 @@ Some media files might not be shown to you. Consider using the ATOM format inste } } + $entryCategories = ''; + if(isset($item['categories'])) { + + foreach($item['categories'] as $category) { + $entryCategories .= '' + . $category . '' + . PHP_EOL; + } + } + $items .= << @@ -61,6 +71,7 @@ Some media files might not be shown to you. Consider using the ATOM format inste {$itemContent}{$entryEnclosuresWarning} {$itemAuthor} {$entryEnclosures} + {$entryCategories} EOD; diff --git a/static/HtmlFormat.css b/static/HtmlFormat.css index 9e0ee13..195a9b0 100644 --- a/static/HtmlFormat.css +++ b/static/HtmlFormat.css @@ -69,12 +69,14 @@ a.backlink, a.backlink:link, a.backlink:visited, a.itemtitle, a.itemtitle:link, } +section > div.content, section > div.categories, section > div.content, section > div.attachments { padding: 10px; } +section > div.categories > li.category, section > div.attachments > li.enclosure { list-style-type: circle; @@ -114,4 +116,4 @@ img { max-width: 100%; -} \ No newline at end of file +}