ro
175ea25d7b
Search methodolgy has been tweaked and the correspending result links have been updated, as well as links in the Listing page to display both silence and suspend counts and the overall heat rating. Also plugged in new silence and suspend icons provideb by https://rage.love/@puf. Big thanks for that, man.
66 lines
2.6 KiB
PHP
66 lines
2.6 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">
|
|
<img class="button-icon" src="assets/images/global/icon-search.svg" />
|
|
</button>
|
|
@csrf
|
|
</form>
|
|
</section>
|
|
@isset($results)
|
|
<section>
|
|
<article>
|
|
<h2>Found {{count($results)}} results for {{$terms}}</h2>
|
|
@foreach($results as $item)
|
|
@php
|
|
$action = $item->block_count + $item->silence_count;
|
|
$rating = ($action / $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>
|
|
<h2>Recent Updates</h2>
|
|
@for($i = 0; $i < 10; $i++)
|
|
@php
|
|
$action = $recent[$i]->block_count + $recent[$i]->silence_count;
|
|
$rating = ($action / $sources)*100;
|
|
@endphp
|
|
<a class="list-link" role="listitem" href="/location/{{$recent[$i]->uuid}}">
|
|
<span class="item-rating">{{$rating}}%</span>
|
|
<label class="item-name">{{$recent[$i]->name}}</label>
|
|
<div class="item-silence">
|
|
<img class="item-icon" src="/assets/images/global/status-silence.svg" title="silenced" />
|
|
{{$recent[$i]->silence_count}}
|
|
</div>
|
|
<div class="item-block">
|
|
<img class="item-icon" src="/assets/images/global/status-suspend.svg" title="suspended" />
|
|
{{$recent[$i]->block_count}}
|
|
</div>
|
|
</a>
|
|
@endfor
|
|
<h2>Bad Space Stats</h2>
|
|
<strong>{{$count}}</strong><br />
|
|
Instances being tracked.
|
|
|
|
</article>
|
|
</section>
|
|
@endsection |