planiverse

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

search.blade.php (1867B)


      1 <!doctype html>
      2 <html lang="{{ app()->getLocale() }}">
      3     <head>
      4         <meta charset="utf-8">
      5         <meta http-equiv="X-UA-Compatible" content="IE=edge">
      6         <meta name="viewport" content="width=device-width, initial-scale=1">
      7 
      8         <title>{{ $mastodon_domain }} | Search</title>
      9 
     10         <link rel="stylesheet" href="{{ url('css/styles.css') }}" />
     11     </head>
     12     <body>
     13         <h1>{{ $mastodon_domain }} | Search</h1>
     14 
     15         @component('navigation')
     16         @endcomponent
     17 
     18         <form method="post" action="{{ route('search') }}">
     19             <input type="text" name="search_term" placeholder="Search accounts and statuses" required autofocus />
     20             <input type="submit" value="Search" />
     21             {{ csrf_field() }}
     22         </form>
     23 
     24         @if ($results !== null)
     25             <ul>
     26                 @foreach ($results['accounts'] as $account)
     27                     <li>
     28                         <span class="account" title="{{ $account['acct'] }}">
     29                             <a href="{{ $account['url'] }}">
     30                                 <img
     31                                     src="{{ $account['avatar'] }}"
     32                                     alt="{{ $account['acct'] }}"
     33                                     class="avatar"
     34                                 />
     35                                 {{ $account['display_name'] }}
     36                                 @if ($account['bot'] ?? false) &#129302; @endif
     37                                 @if ($account['locked']) &#128274; @endif
     38                             </a>
     39                         </span>
     40                     </li>
     41                 @endforeach
     42                 @foreach ($results['statuses'] as $status)
     43                     @component('status', ['status' => $status])
     44                     @endcomponent
     45                 @endforeach
     46             </ul>
     47         @endif
     48     </body>
     49 </html>