user.blade.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?= '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?>
  2. <feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
  3. <id>{{$permalink}}</id>
  4. <title>{{$profile['username']}} on {{config('pixelfed.domain.app', 'Pixelfed')}}</title>
  5. <subtitle type="html">{{strip_tags($profile['note'])}}</subtitle>
  6. @if($items && count($items))
  7. <updated>{{$items[0]['created_at']}}</updated>
  8. @endif
  9. <author>
  10. <name>{{$profile['username']}}</name>
  11. <uri>{{$profile['url']}}</uri>
  12. </author>
  13. <icon>{{$profile['avatar']}}</icon>
  14. <logo>{{$profile['avatar']}}</logo>
  15. <link rel="alternate" type="text/html" href="{{$profile['url']}}" />
  16. <link rel="self" type="application/atom+xml" href="{{$permalink}}" />
  17. @if($items && count($items))
  18. @foreach($items as $item)
  19. <entry>
  20. <id>{{ $item['url'] }}</id>
  21. <title>{{ $item['content_text'] ? $item['content_text'] : "No caption" }}</title>
  22. <updated>{{ $item['created_at'] }}</updated>
  23. <author>
  24. <name>{{$profile['username']}}</name>
  25. <uri>{{$profile['url']}}</uri>
  26. </author>
  27. <content type="html">
  28. <![CDATA[
  29. <div class="media-gallery">
  30. @foreach($item['media_attachments'] as $media)
  31. <img class="media-item" src="{{ $media['url'] }}" alt="{{ $media['description'] ?? '' }}">
  32. @endforeach
  33. </div>
  34. <p style="padding:10px;">{!! $item['content'] !!}</p>
  35. ]]>
  36. </content>
  37. <link rel="alternate" href="{{ $item['url'] }}" />
  38. @if($item['content'] && strlen($item['content']))
  39. <summary type="html">{{ $item['content'] }}</summary>
  40. @endif
  41. @foreach($item['media_attachments'] as $media)
  42. <media:content
  43. url="{{ $media['url'] }}"
  44. type="{{ $media['mime'] }}"
  45. medium="image"
  46. />
  47. @endforeach
  48. </entry>
  49. @endforeach
  50. @endif
  51. </feed>