diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index d8c7ea5..26d9cd4 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -13,7 +13,7 @@ class AuthController extends Controller //$token = $request->session()->token(); //$token = csrf_token(); - return view('back.login', ["title" => "The Den Login"]); + return view('back.login', ["title" => "The Den"]); } public function memberAuth(Request $request): Response diff --git a/app/Http/Controllers/FrontIndexController.php b/app/Http/Controllers/FrontIndexController.php index fa0e169..470af0d 100644 --- a/app/Http/Controllers/FrontIndexController.php +++ b/app/Http/Controllers/FrontIndexController.php @@ -13,14 +13,38 @@ class FrontIndexController extends Controller { $locations = Location::where("active", true)->get(); $count = count($locations); - - $terms = "no|agenda"; + $terms = "no|agenda"; + $recent = Location::where("active", true) + ->limit(5)->orderByDesc('updated_at')->get(); //$result = DB::select("SELECT * FROM searchlocations('$terms')"); return view('front.index', [ - 'count' => $count, - 'title' => "The Bad Space" + 'count' => $count, + 'recent' => $recent, + 'title' => "The Bad Space" + ]); + } + + public function about() + { + return view('front.about', [ + 'title' => "ABOUT" + ]); + } + + public function location(string $uuid = "1") + { + $location = Location::where("uuid", $uuid)->first(); + $name = "NO LOCATION FOUND"; + if ($location) { + $name = $location->name; + } + return view('front.location', [ + 'title' => $name, + 'location' => $location, + 'images' => json_decode($location->images), + 'updated' => $location->updated_at->format('Y M d'), ]); } diff --git a/public/assets/css/front/index.css b/public/assets/css/front/index.css index 617ac2f..0f4f581 100644 --- a/public/assets/css/front/index.css +++ b/public/assets/css/front/index.css @@ -35,3 +35,7 @@ form.index-search-form > button { /* Chrome, Firefox, Opera, Safari 10.1+ */ color: var(--highlight); } + +section.index-meta article { + margin-top: 20px; +} diff --git a/public/assets/css/global/colors.css b/public/assets/css/global/colors.css index d8a815f..092c4a8 100644 --- a/public/assets/css/global/colors.css +++ b/public/assets/css/global/colors.css @@ -6,5 +6,6 @@ --white: #efebe3; --grey: #abb7b7; --black: #32302f; + --error: #b62520; --primary-rgb: 20 13 13; } diff --git a/public/assets/css/global/frame.css b/public/assets/css/global/frame.css index 5513e0c..f644082 100644 --- a/public/assets/css/global/frame.css +++ b/public/assets/css/global/frame.css @@ -2,7 +2,7 @@ html { width: 100%; height: 100%; overflow: hidden; - font: 400 1.2em/1.4em var(--base-type); + font: 400 1.6em/1.3em var(--base-type); } html body { @@ -71,20 +71,23 @@ header > div nav { right: 0; } -div.system-notice { - background: var(--highlight); - color: var(--primary); +div.system-notice-error { + background: var(--error); + color: var(--white); padding: 10px; } -main { - height: 100%; +div.system-notice-message { + background: var(--highlight); + color: var(--black); + padding: 10px; } main > section > article { width: 80%; max-width: 1000px; margin: 0 auto; + min-height: 400px; } /* GLOBALS */ @@ -122,3 +125,31 @@ sup { height: 90%; padding-top: 3px; } + +.location-image { + height: 200px; + width: 200px; + display: inline-block; + border-radius: 3px; +} + +/* GLOBALS */ + +footer { + width: 100%; + color: var(--primary); + background: var(--secondary); + height: 200px; +} + +footer > div:nth-child(1) { + display: grid; + grid-template-columns: 50% 50%; + padding: 10px; + gap: 10px; + height: 200px; + width: 80%; + margin: 0 auto; + max-width: 1000px; + position: relative; +} diff --git a/public/assets/css/global/typography.css b/public/assets/css/global/typography.css index 19f6249..96e9c3e 100644 --- a/public/assets/css/global/typography.css +++ b/public/assets/css/global/typography.css @@ -40,34 +40,28 @@ --mono-type: "Lucida Console", monaco, monospace; } -h1, -h2, -h3 { - color: var(--white); - font-family: var(--title-type); -} - h1 { - font-size: 4em; - font-weight: 500; + font-size: 3em; + font-weight: 600; font-kerning: normal; letter-spacing: -5px; text-transform: uppercase; line-height: 0.75em; - margin: 40px 0; + margin: 0; + position: absolute; + bottom: 20px; + width: 70%; } h2 { - font-size: 3em; - font-weight: 400; + font-size: 2em; + font-weight: 500; line-height: 0.8em; + color: var(--white); + margin: 30px 0; } h3 { font-size: 2em; font-weight: 300; } - -main > article > h1 { - color: var(--primary); -} diff --git a/resources/views/back/login.blade.php b/resources/views/back/login.blade.php index 4841ea7..fdf09b6 100644 --- a/resources/views/back/login.blade.php +++ b/resources/views/back/login.blade.php @@ -4,11 +4,9 @@ @section('main-content') @parent - @if($errors->any()) -

{{$errors->first()}}

- @endif
+

Hey, Rando.

@csrf
diff --git a/resources/views/frame.blade.php b/resources/views/frame.blade.php index d116895..8fcb632 100644 --- a/resources/views/frame.blade.php +++ b/resources/views/frame.blade.php @@ -20,7 +20,7 @@
- {{$title}} +

{{$title}}

+ @if($errors->any()) -
- {{$errors->first()}} +
+ {{$errors->first()}}
@endif @if(session('message')) -
- {!! session('message') !!} +
+ {!! session('message') !!}
@endif @@ -52,6 +53,11 @@ @section('main-content') @show +
+
+

The Bad Space © 2023

+
+
diff --git a/resources/views/front/about.blade.php b/resources/views/front/about.blade.php index e69de29..b5c66fb 100644 --- a/resources/views/front/about.blade.php +++ b/resources/views/front/about.blade.php @@ -0,0 +1,58 @@ +@extends('frame') +@section('title', 'The Bad Space|About') + @section('main-content') + @parent +
+
+

What is The Bad Space?

+

The Bad Space project was born from a need to effectively identify instances that house bad actors and are poorly moderated, which puts marginalized communities at risk. +

+

+ It is an extension of the + #fediblock + hashtag created by + Artist Marcia X + with additional support from + Ginger + to provide a catalog of instances that seek to cause harm and reduce the quality of experience in the fediverse. +

+

+ Technical support provided by + Ro. +

+

How do I use it?

+

+ The Bad Space is meant to be a resource for anyone looking to improve the quality of their online experience by creating a tool that catalogs sources for harassment and abuse. There are several options for how it can be used. +

Search

+ To see if a site is listed in the database, use the + search feature + to search for that URL. If it is in the database, information for that instance will be returned and associated instances if applicable. +

CSV Exports

+ For a list of the current locations being tracked, click on one of the links below to download a dynamically generated CSV file that can be consumed as a blocklist. More formats will be added over time. +
+ For Mastodon +

API

+ The Bad Space has a public api that can be used to search the database programatically and return results in the JSON format. The API can be accsess at
+ https://thebad.space/api/v1/search + by posting a JSON object with the following format: + {"url":"search.url"}
+ Data from API request will be returned in the follow format:
+ +
+        {
+        "listingCount":1,
+          "locations":
+          [
+            {
+              "url":"search.url",
+              "name":"Instance Name",
+              "description":"instance description",
+              "link":"bad-space-instance-link"
+            }
+          ]
+        }
+        
+

+
+
+ @endsection \ No newline at end of file diff --git a/resources/views/front/index.blade.php b/resources/views/front/index.blade.php index 3e70fa5..5ae28b2 100644 --- a/resources/views/front/index.blade.php +++ b/resources/views/front/index.blade.php @@ -10,9 +10,14 @@
-
+
- tracking {{$count}} sites; + {{$count}} + sites tracked

+ Recent Updates
+ @foreach($recent as $item) + {{$item->name}}
+ @endforeach
@endsection \ No newline at end of file diff --git a/resources/views/front/listing.blade.php b/resources/views/front/listing.blade.php index 6a56215..d985495 100644 --- a/resources/views/front/listing.blade.php +++ b/resources/views/front/listing.blade.php @@ -4,13 +4,13 @@ @parent
-

Page {{$pageNum}}

+

Page {{$pageNum}}

PREV {{$pageNum}} of {{$totalPages}} NEXT
@foreach($locations as $location) - {{$location->name}}
+ {{$location->name}}
@endforeach PREV {{$pageNum}} of {{$totalPages}} diff --git a/resources/views/front/location.blade.php b/resources/views/front/location.blade.php index e69de29..3814c4c 100644 --- a/resources/views/front/location.blade.php +++ b/resources/views/front/location.blade.php @@ -0,0 +1,19 @@ +@extends('frame') + +@section('title', 'The Bad Space | Location Info') + + @section('main-content') + @parent +
+
+

Description

+ {{$location->description}}
+

Screens

+ @foreach($images as $image) + + + @endforeach +
UPDATED : {{$updated}} +
+
+ @endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 363b438..0b1147c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -20,6 +20,8 @@ use App\Http\Controllers\LocationController; //front Route::get("/", [FrontIndexController::class, 'start']); Route::get("/listings/{pageNum}", [FrontIndexController::class, 'listings']); +Route::get("/about", [FrontIndexController::class, 'about']); +Route::get("/location/{uuid}", [FrontIndexController::class, 'location']); //auth Route::get("/login", [AuthController::class, 'showLogin']);