planiverse

A minimalist, no-JS front-end for Mastodon.
git clone https://git.stjo.hn/planiverse
Log | Files | Refs | README | LICENSE

status_content.blade.php (1357B)


      1 @if ($status['reblog'] === null)
      2     <p>{!! $status['content'] !!}</p>
      3     @foreach ($status['media_attachments'] as $attachment)
      4         @if ($attachment['type'] === 'image')
      5             <figure>
      6                 <a href="{{
      7                     $attachment['remote_url'] === null
      8                         ? $attachment['url']
      9                         : $attachment['remote_url']
     10                     }}"
     11                     target="_blank"
     12                 >
     13                     <img
     14                         src="{{ $attachment['preview_url'] }}"
     15                         alt="{{ 
     16                             $attachment['description'] === null
     17                                 ? $attachment['url']
     18                                 : $attachment['description'] 
     19                         }}"
     20                     />
     21                 </a>
     22             </figure>
     23         @elseif ($attachment['type'] === 'video' || $attachment['type'] === 'gifv')
     24             <video controls>
     25                 <source src="{{
     26                     $attachment['remote_url'] === null
     27                         ? $attachment['url']
     28                         : $attachment['remote_url']
     29                     }}"
     30                 />
     31             </video>
     32         @endif
     33     @endforeach
     34 @else
     35     <ul>
     36         @component('status', ['status' => $status['reblog']])
     37         @endcomponent
     38     </ul>
     39 @endif