Added About, Listings, Location pages

Added additional pages About, Listings, and Location as well as
implementing the corresponding functionality for those pages to be able
to pull the data they need from the DB.

Also continued layout clean up and adjusted some gloabal font sizing
settings
about-updates
Ro 1 year ago
parent 25d51646ba
commit 7151314122
Signed by untrusted user: are0h
GPG Key ID: 29B551CDBD4D3B50

@ -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

@ -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'),
]);
}

@ -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;
}

@ -6,5 +6,6 @@
--white: #efebe3;
--grey: #abb7b7;
--black: #32302f;
--error: #b62520;
--primary-rgb: 20 13 13;
}

@ -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;
}

@ -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);
}

@ -4,11 +4,9 @@
@section('main-content')
@parent
@if($errors->any())
<h4>{{$errors->first()}}</h4>
@endif
<section>
<article>
<h2>Hey, Rando. </h2>
<form action="/login" method="post" enctype="multipart/form-data">
@csrf
<label>Handle</label><br />

@ -20,7 +20,7 @@
</a>
</div>
<div>
<span title="page-title">{{$title}}</span>
<h1>{{$title}}</h1>
</div>
<div>
<nav>
@ -37,14 +37,15 @@
</div>
</div>
</header>
@if($errors->any())
<div class="system-notice">
<i class="ti ti-alert-circle"></i> {{$errors->first()}}
<div class="system-notice-error" role="status">
{{$errors->first()}}
</div>
@endif
@if(session('message'))
<div class="system-notice">
<i class="ti ti-alert-circle"></i> {!! session('message') !!}
<div class="system-notice-message" role="status">
{!! session('message') !!}
</div>
@endif
@ -52,6 +53,11 @@
@section('main-content')
@show
</main>
<footer>
<div>
<p>The Bad Space © 2023</p>
</div>
</footer>
</body>
</body>

@ -0,0 +1,58 @@
@extends('frame')
@section('title', 'The Bad Space|About')
@section('main-content')
@parent
<section>
<article>
<h2>What is The Bad Space?</h2>
<p>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.
</p>
<p>
It is an extension of the
<strong>#fediblock</strong>
hashtag created by
<a href="https://www.artistmarciax.com/">Artist Marcia X</a>
with additional support from
<a href="https://digital.rooting.garden">Ginger</a>
to provide a catalog of instances that seek to cause harm and reduce the quality of experience in the fediverse.
</p>
<p>
Technical support provided by
<a href="https://roiskinda.cool/profile.html">Ro</a>.
</p>
<h2>How do I use it?</h2>
<p>
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.
<h3>Search</h3>
To see if a site is listed in the database, use the
<a href="/">search feature</a>
to search for that URL. If it is in the database, information for that instance will be returned and associated instances if applicable.
<h3>CSV Exports</h3>
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.
<br />
<a href="/exports/mastodon">For Mastodon</a>
<h3>API</h3>
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<br />
<code>https://thebad.space/api/v1/search</code>
by posting a JSON object with the following format:
<code>{"url":"search.url"}</code><br />
Data from API request will be returned in the follow format:<br />
<pre>
<code>{
"listingCount":1,
"locations":
[
{
"url":"search.url",
"name":"Instance Name",
"description":"instance description",
"link":"bad-space-instance-link"
}
]
}</code>
</pre>
</p>
</article>
</section>
@endsection

@ -10,9 +10,14 @@
</button>
</form>
</section>
<section>
<section class="index-meta">
<article>
tracking {{$count}} sites;
<strong>{{$count}}</strong>
sites tracked<br /><br />
<strong>Recent Updates</strong><br />
@foreach($recent as $item)
{{$item->name}}<br />
@endforeach
</article>
</section>
@endsection

@ -4,13 +4,13 @@
@parent
<section>
<article>
<h1>Page {{$pageNum}}</h1>
<h2>Page {{$pageNum}}</h2>
<a href="/listings/{{$prev}}">PREV</a>
{{$pageNum}} of {{$totalPages}}
<a href="/listings/{{$next}}">NEXT</a><br />
@foreach($locations as $location)
{{$location->name}}<br />
<a href="/location/{{$location->uuid}}">{{$location->name}}</a></a><br />
@endforeach
<a href="/listings/{{$prev}}">PREV</a>
{{$pageNum}} of {{$totalPages}}

@ -0,0 +1,19 @@
@extends('frame')
@section('title', 'The Bad Space | Location Info')
@section('main-content')
@parent
<section>
<article>
<h2>Description</h2>
{{$location->description}}<br />
<h2>Screens</h2>
@foreach($images as $image)
<a href="/{{$image->path}}" class="location-image" style="background: url(/{{$image->path}}) no-repeat center center / cover #fc6399" />
</a>
@endforeach
<br />UPDATED : {{$updated}}
</article>
</section>
@endsection

@ -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']);

Loading…
Cancel
Save