Added Bad Space Info to index
Added some preliminary Bad Spade stats to the index to set up a space for additional information to be shared in the future. Starting with an accurate display of locations tracked, Current Sources count and last update date
This commit is contained in:
parent
175ea25d7b
commit
c13f144e20
5 changed files with 45 additions and 18 deletions
|
@ -25,12 +25,14 @@ class FrontIndexController extends Controller
|
||||||
|
|
||||||
public function start()
|
public function start()
|
||||||
{
|
{
|
||||||
$list = $this->getRecent();
|
$list = $this->getRecent();
|
||||||
|
$latest_date = $list[0]->updated_at->format('Y M d');
|
||||||
return view('front.index', [
|
return view('front.index', [
|
||||||
'count' => count($list),
|
'count' => count($list),
|
||||||
'sources' => count(Source::where("active", true)->get()),
|
'sources' => count(Source::where("active", true)->get()),
|
||||||
'recent' => $list,
|
'recent' => $list,
|
||||||
'title' => "The Bad Space"
|
'latest_date' => $latest_date,
|
||||||
|
'title' => "The Bad Space"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,16 +52,17 @@ class FrontIndexController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
//this gets recent updates to display under search results
|
//this gets recent updates to display under search results
|
||||||
$list = $this->getRecent();
|
$list = $this->getRecent();
|
||||||
|
$latest_date = $list[0]->updated_at->format('Y M d');
|
||||||
return view('front.index', [
|
return view('front.index', [
|
||||||
'count' => count($list),
|
'count' => count($list),
|
||||||
'sources' => count(Source::where("active", true)->get()),
|
'sources' => count(Source::where("active", true)->get()),
|
||||||
'recent' => $list,
|
'recent' => $list,
|
||||||
'results' => $results,
|
'results' => $results,
|
||||||
'recent' => $list,
|
'recent' => $list,
|
||||||
'terms' => $terms,
|
'terms' => $terms,
|
||||||
'title' => "Search Results",
|
'latest_date' => $latest_date,
|
||||||
|
'title' => "Search Results",
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,23 @@ section.index-meta article {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.index-meta {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 50% 50%;
|
||||||
|
gap: 10px;
|
||||||
|
width: 98%;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
div.index-meta > label:nth-child(2),
|
||||||
|
div.index-meta > label:nth-child(4),
|
||||||
|
div.index-meta > label:nth-child(6) {
|
||||||
|
color: var(--white);
|
||||||
|
width: 100%;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 800px) {
|
@media only screen and (max-width: 800px) {
|
||||||
form.index-search-form > input[type="text"] {
|
form.index-search-form > input[type="text"] {
|
||||||
width: 85%;
|
width: 85%;
|
||||||
|
|
|
@ -39,7 +39,7 @@ a.list-link {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 70px 80% 80px 80px;
|
grid-template-columns: 70px 80% 80px 80px;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: 80%;
|
width: 90%;
|
||||||
height: 45px;
|
height: 45px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -185,6 +185,7 @@ footer {
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
background: var(--secondary);
|
background: var(--secondary);
|
||||||
height: 200px;
|
height: 200px;
|
||||||
|
margin-top: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer > div:nth-child(1) {
|
footer > div:nth-child(1) {
|
||||||
|
|
|
@ -57,9 +57,15 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@endfor
|
@endfor
|
||||||
<h2>Bad Space Stats</h2>
|
<h2>Info</h2>
|
||||||
<strong>{{$count}}</strong><br />
|
<div class="index-meta">
|
||||||
Instances being tracked.
|
<label>Locations Tracked</label>
|
||||||
|
<label>{{$count}}</label>
|
||||||
|
<label>Total Sources</label>
|
||||||
|
<label>{{$sources}}</label>
|
||||||
|
<label>Latest Update</label>
|
||||||
|
<label>{{$latest_date}}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in a new issue