Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #42 from phecho/fix-xml-indentation
Browse files Browse the repository at this point in the history
Fixes #41
  • Loading branch information
Roumen Damianoff authored and Roumen Damianoff committed Dec 1, 2015
2 parents ff21e32 + 454e118 commit f2087a5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
12 changes: 6 additions & 6 deletions src/views/atom.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<id>{{ $channel['link'] }}</id>
<link rel="alternate" type="text/html" href="{{ Request::url() }}" ></link>
<link rel="self" type="application/atom+xml" href="{{ $channel['link'] }}" ></link>
@if (!empty($channel['logo']))
@if (!empty($channel['logo']))
<logo>{{ $channel['logo'] }}</logo>
@endif
@if (!empty($channel['icon']))
@endif
@if (!empty($channel['icon']))
<icon>{{ $channel['icon'] }}</icon>
@endif
@endif
<updated>{{ $channel['pubdate'] }}</updated>
@foreach($items as $item)
@foreach($items as $item)
<entry>
<author>
<name><![CDATA[{!! $item['author'] !!}]]></name>
Expand All @@ -25,5 +25,5 @@
<content type="html"><![CDATA[{!! $item['content'] !!}]]></content>
<updated>{{ $item['pubdate'] }}</updated>
</entry>
@endforeach
@endforeach
</feed>
56 changes: 28 additions & 28 deletions src/views/rss.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,63 @@
<link>{{ Request::url() }}</link>
<description>{{ $channel['description'] }}</description>
<atom:link href="{{ $channel['link'] }}" rel="self"></atom:link>
@if (!empty($channel['logo']))
@if (!empty($channel['logo']))
<image>
<url>{{ $channel['logo'] }}</url>
<title>{{ $channel['title'] }}</title>
<link>{{ Request::url() }}</link>
</image>
@endif
@endif
<language>{{ $channel['lang'] }}</language>
<lastBuildDate>{{ $channel['pubdate'] }}</lastBuildDate>
@foreach($items as $item)
@foreach($items as $item)
<item>
<title>{!! $item['title'] !!}</title>
<link>{{ $item['link'] }}</link>
<guid isPermaLink="true">{{ $item['link'] }}</guid>
<description><![CDATA[{!! $item['description'] !!}]]></description>
@if (!empty($item['content']))
@if (!empty($item['content']))
<content:encoded><![CDATA[{!! $item['content'] !!}]]></content:encoded>
@endif
@endif
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">{{ $item['author'] }}</dc:creator>
<pubDate>{{ $item['pubdate'] }}</pubDate>
@if (!empty($item['enclosure']))
@if (!empty($item['enclosure']))
<enclosure
@foreach ($item['enclosure'] as $k => $v)
@foreach ($item['enclosure'] as $k => $v)
{!! $k.'="'.$v.'" ' !!}
@endforeach
@endforeach
/>
@endif
@if (!empty($item['media:content']))
@endif
@if (!empty($item['media:content']))
<media:content
@foreach ($item['media:content'] as $k => $v)
@foreach ($item['media:content'] as $k => $v)
{!! $k.'="'.$v.'" ' !!}
@endforeach
@endforeach
/>
@endif
@if (!empty($item['media:thumbnail']))
@endif
@if (!empty($item['media:thumbnail']))
<media:thumbnail
@foreach ($item['media:thumbnail'] as $k => $v)
@foreach ($item['media:thumbnail'] as $k => $v)
{!! $k.'="'.$v.'" ' !!}
@endforeach
@endforeach
/>
@endif
@if (!empty($item['media:title']))
@endif
@if (!empty($item['media:title']))
<media:title type="plain">{{ $item['media:title'] }}</media:title>
@endif
@if (!empty($item['media:description']))
@endif
@if (!empty($item['media:description']))
<media:description type="plain">{{ $item['media:description'] }}</media:description>
@endif
@if (!empty($item['media:keywords']))
@endif
@if (!empty($item['media:keywords']))
<media:keywords>{{ $item['media:title'] }}</media:keywords>
@endif
@if (!empty($item['media:rating']))
@endif
@if (!empty($item['media:rating']))
<media:rating>{{ $item['media:rating'] }}</media:rating>
@endif
@if (!empty($item['creativeCommons:license']))
@endif
@if (!empty($item['creativeCommons:license']))
<creativeCommons:license>{{ $item['creativeCommons:license'] }}</creativeCommons:license>
@endif
@endif
</item>
@endforeach
@endforeach
</channel>
</rss>

0 comments on commit f2087a5

Please sign in to comment.