1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-05-06 14:41:02 -05:00
thebadspace/resources/views/front/index.blade.php
Zoë d165d0c2bd
feat: replace search icon with an SVG
this change allows us to use the font colour for the icon. it might also be nice to use a sprite.svg for all icons. this would use the same <use> mechanism as i did here.

this also optimises the SVG a bit
2025-05-05 22:40:59 +02:00

61 lines
2.1 KiB
PHP

@extends('frame')
@section('title', 'This is The Bad Space')
@section('main-content')
@parent
<section class="index-search">
<form class="index-search-form" action="/search" method="post" enctype="multipart/form-data">
<input type="text" name="index_search" value="" placeholder="Hi! This is where you search." />
<button aria-label="search-button">
<label id="search-label">LOOK FOR IT</label>
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="trye">
<use href="assets/images/global/icon-search.svg#search" />
</svg>
</button>
@csrf
</form>
</section>
@isset($results)
<section>
<article>
<h2>Found {{count($results)}} results for {{$terms}}</h2>
@foreach($results as $item)
@php
$rating = floor(($item->actions_count / $sources)*100);
@endphp
<a class="list-link" role="listitem" href="/location/{{$item->uuid}}">
<span class="item-rating">{{$rating}}%</span>
<label class="item-name">{{$item->name}}</label>
<div class="item-silence">
<img class="item-icon" src="/assets/images/global/status-silence.svg" title="silenced" />
{{$item->silence_count}}
</div>
<div class="item-block">
<img class="item-icon" src="/assets/images/global/status-suspend.svg" title="suspended" />
{{$item->block_count}}
</div>
</a>
@endforeach
</article>
</section>
@endisset
<section class="index-meta">
<article>
<table class="index-meta">
<caption class="visually-hidden">Meta</caption>
<tr>
<th>Active Locations Tracked</th>
<td>{{$count}}</td>
</tr>
<tr>
<th>Total Sources</th>
<td>{{$sources}}</td>
</tr>
<tr>
<th>Latest Update</th>
<td>{{$latest_date}}</td>
</tr>
</table>
</article>
</section>
@endsection