From c13f144e20ae940cb2f6a20749636505bd218cd5 Mon Sep 17 00:00:00 2001 From: ro Date: Fri, 26 Jan 2024 12:16:38 -0600 Subject: [PATCH] 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 --- app/Http/Controllers/FrontIndexController.php | 31 ++++++++++--------- public/assets/css/front/index.css | 17 ++++++++++ public/assets/css/front/listing.css | 2 +- public/assets/css/global/frame.css | 1 + resources/views/front/index.blade.php | 12 +++++-- 5 files changed, 45 insertions(+), 18 deletions(-) diff --git a/app/Http/Controllers/FrontIndexController.php b/app/Http/Controllers/FrontIndexController.php index 43723b4..33ef848 100644 --- a/app/Http/Controllers/FrontIndexController.php +++ b/app/Http/Controllers/FrontIndexController.php @@ -25,12 +25,14 @@ class FrontIndexController extends Controller public function start() { - $list = $this->getRecent(); + $list = $this->getRecent(); + $latest_date = $list[0]->updated_at->format('Y M d'); return view('front.index', [ - 'count' => count($list), - 'sources' => count(Source::where("active", true)->get()), - 'recent' => $list, - 'title' => "The Bad Space" + 'count' => count($list), + 'sources' => count(Source::where("active", true)->get()), + 'recent' => $list, + '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 - $list = $this->getRecent(); - + $list = $this->getRecent(); + $latest_date = $list[0]->updated_at->format('Y M d'); return view('front.index', [ - 'count' => count($list), - 'sources' => count(Source::where("active", true)->get()), - 'recent' => $list, - 'results' => $results, - 'recent' => $list, - 'terms' => $terms, - 'title' => "Search Results", + 'count' => count($list), + 'sources' => count(Source::where("active", true)->get()), + 'recent' => $list, + 'results' => $results, + 'recent' => $list, + 'terms' => $terms, + 'latest_date' => $latest_date, + 'title' => "Search Results", ]); } diff --git a/public/assets/css/front/index.css b/public/assets/css/front/index.css index fa07b22..356716b 100644 --- a/public/assets/css/front/index.css +++ b/public/assets/css/front/index.css @@ -41,6 +41,23 @@ section.index-meta article { 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) { form.index-search-form > input[type="text"] { width: 85%; diff --git a/public/assets/css/front/listing.css b/public/assets/css/front/listing.css index 7f7e96b..b628635 100644 --- a/public/assets/css/front/listing.css +++ b/public/assets/css/front/listing.css @@ -39,7 +39,7 @@ a.list-link { display: grid; grid-template-columns: 70px 80% 80px 80px; gap: 10px; - width: 80%; + width: 90%; height: 45px; padding-bottom: 20px; cursor: pointer; diff --git a/public/assets/css/global/frame.css b/public/assets/css/global/frame.css index c9faecc..3d52e62 100644 --- a/public/assets/css/global/frame.css +++ b/public/assets/css/global/frame.css @@ -185,6 +185,7 @@ footer { color: var(--primary); background: var(--secondary); height: 200px; + margin-top: 50px; } footer > div:nth-child(1) { diff --git a/resources/views/front/index.blade.php b/resources/views/front/index.blade.php index cf20a3f..6d76f0d 100644 --- a/resources/views/front/index.blade.php +++ b/resources/views/front/index.blade.php @@ -57,9 +57,15 @@ @endfor -

Bad Space Stats

- {{$count}}
- Instances being tracked. +

Info

+
+ + + + + + +