split into modules

This commit is contained in:
Benjamin Takats
2022-12-12 16:21:10 +01:00
parent 8406fe6dd2
commit d8f66f61f3
35 changed files with 259 additions and 309 deletions

View File

@@ -1,18 +1,18 @@
<?php
namespace App\Http\Livewire\Frontend;
namespace App\Http\Livewire\BookCase;
use App\Models\BookCase;
use App\Models\Country;
use Livewire\Component;
class SearchBookCase extends Component
class BookCaseTable extends Component
{
public string $c = 'de';
public function render()
{
return view('livewire.frontend.search-book-case', [
return view('livewire.book-case.book-case-table', [
'bookCases' => BookCase::get(),
'countries' => Country::query()
->select(['code', 'name'])

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Frontend;
namespace App\Http\Livewire\BookCase;
use App\Models\BookCase;
use Livewire\Component;
@@ -18,7 +18,7 @@ class CommentBookCase extends Component
public function render()
{
return view('livewire.frontend.comment-book-case');
return view('livewire.book-case.comment-book-case');
}
public function save()
@@ -31,7 +31,7 @@ class CommentBookCase extends Component
->addMedia($this->photo)
->toMediaCollection('images');
return to_route('comment.bookcase', ['bookCase' => $this->bookCase->id]);
return to_route('bookCases.comment.bookcase', ['bookCase' => $this->bookCase->id]);
}
protected function url_to_absolute($url)

View File

@@ -9,7 +9,7 @@ use Livewire\Component;
class Header extends Component
{
public Country $country;
public ?Country $country = null;
public $currentRouteName;
public string $c = 'de';
public bool $withGlobe = true;
@@ -23,6 +23,11 @@ class Header extends Component
public function mount()
{
if (!$this->country) {
$this->country = Country::query()
->where('code', $this->c)
->first();
}
$this->currentRouteName = Route::currentRouteName();
$this->c = $this->country->code;
}

View File

@@ -1,16 +0,0 @@
<?php
namespace App\Http\Livewire\Frontend;
use App\Models\Country;
use Livewire\Component;
class SearchLecturer extends Component
{
public Country $country;
public function render()
{
return view('livewire.frontend.search-lecturer');
}
}

View File

@@ -1,12 +1,12 @@
<?php
namespace App\Http\Livewire\Frontend;
namespace App\Http\Livewire\Library;
use App\Models\Country;
use App\Models\Podcast;
use Livewire\Component;
class Library extends Component
class LibraryTable extends Component
{
public Country $country;
@@ -20,7 +20,7 @@ class Library extends Component
{
$shouldBePublic = request()
->route()
->getName() !== 'library.lecturer';
->getName() !== 'library.table.lecturer';
if (!$shouldBePublic && !auth()->user()->is_lecturer) {
abort(403);
}
@@ -39,7 +39,7 @@ class Library extends Component
]);
}
return view('livewire.frontend.library', [
return view('livewire.library.library-table', [
'libraries' => $tabs,
]);
}

View File

@@ -1,11 +1,11 @@
<?php
namespace App\Http\Livewire\Frontend;
namespace App\Http\Livewire\Library;
use App\Models\Tag;
use Livewire\Component;
class SearchByTagInLibrary extends Component
class SearchByTagComponent extends Component
{
public string $country = 'de';
public ?array $table = [];
@@ -18,9 +18,9 @@ class SearchByTagInLibrary extends Component
{
$shouldBePublic = request()
->route()
->getName() !== 'library.lecturer';
->getName() !== 'library.table.lecturer';
return view('livewire.frontend.search-by-tag-in-library', [
return view('livewire.library.search-by-tag-component', [
'tags' => Tag::query()
->with([
'libraryItems.libraries',

View File

@@ -1,16 +1,16 @@
<?php
namespace App\Http\Livewire\Frontend;
namespace App\Http\Livewire\School;
use App\Models\Country;
use Livewire\Component;
class SearchCity extends Component
class CityTable extends Component
{
public Country $country;
public function render()
{
return view('livewire.frontend.search-city');
return view('livewire.school.city-table');
}
}

View File

@@ -1,16 +1,16 @@
<?php
namespace App\Http\Livewire\Frontend;
namespace App\Http\Livewire\School;
use App\Models\Country;
use Livewire\Component;
class SearchVenue extends Component
class CouseTable extends Component
{
public Country $country;
public function render()
{
return view('livewire.frontend.search-venue');
return view('livewire.school.couse-table');
}
}

View File

@@ -1,16 +1,16 @@
<?php
namespace App\Http\Livewire\Frontend;
namespace App\Http\Livewire\School;
use App\Models\Country;
use Livewire\Component;
class SearchEvent extends Component
class EventTable extends Component
{
public Country $country;
public function render()
{
return view('livewire.frontend.search-event');
return view('livewire.school.event-table');
}
}

View File

@@ -1,16 +1,16 @@
<?php
namespace App\Http\Livewire\Frontend;
namespace App\Http\Livewire\School;
use App\Models\Country;
use Livewire\Component;
class SearchCourse extends Component
class LecturerTable extends Component
{
public Country $country;
public function render()
{
return view('livewire.frontend.search-course');
return view('livewire.school.lecturer-table');
}
}

View File

@@ -1,11 +1,11 @@
<?php
namespace App\Http\Livewire\Frontend;
namespace App\Http\Livewire\School;
use App\Models\Tag;
use Livewire\Component;
class SearchByTag extends Component
class SearchByTagComponent extends Component
{
public string $country = 'de';
public ?array $table = [];
@@ -16,7 +16,7 @@ class SearchByTag extends Component
public function render()
{
return view('livewire.frontend.search-by-tag', [
return view('livewire.school.search-by-tag-component', [
'tags' => Tag::query()
->where('type', 'course')
->with([

View File

@@ -0,0 +1,16 @@
<?php
namespace App\Http\Livewire\School;
use App\Models\Country;
use Livewire\Component;
class VenueTable extends Component
{
public Country $country;
public function render()
{
return view('livewire.school.venue-table');
}
}

View File

@@ -76,7 +76,7 @@ class CityTable extends DataTableComponent
->find($id);
$query = City::radius($city->latitude, $city->longitude, 100)
->where('id', '!=', $id);
return to_route('search.event', [
return to_route('school.table.event', [
'#table',
'country' => $this->country,
'table' => [
@@ -94,7 +94,7 @@ class CityTable extends DataTableComponent
$city = City::query()
->find($id);
$query = BookCase::radius($city->latitude, $city->longitude, 5);
return to_route('search.bookcases', [
return to_route('bookCases.table.bookcases', [
'#table',
'country' => $this->country,
'table' => [

View File

@@ -94,7 +94,7 @@ class CourseTable extends DataTableComponent
public function courseSearch($id)
{
return to_route('search.event', [
return to_route('school.table.event', [
'#table',
'country' => $this->country,
'table' => [

View File

@@ -81,7 +81,7 @@ class LecturerTable extends DataTableComponent
{
$lecturer = Lecturer::query()->find($id);
return to_route('search.event', [
return to_route('school.table.event', [
'#table',
'country' => $this->country,
'table' => [

View File

@@ -145,7 +145,7 @@ class LibraryItemTable extends DataTableComponent
{
$shouldBePublic = request()
->route()
->getName() !== 'library.lecturer';
->getName() !== 'library.table.lecturer';
return LibraryItem::query()
->whereHas('libraries', fn($query) => $query->where('libraries.is_public', $shouldBePublic))

View File

@@ -75,7 +75,7 @@ class VenueTable extends DataTableComponent
{
$venue = Venue::query()->find($id);
return to_route('search.event', [
return to_route('school.table.event', [
'#table',
'country' => $this->country,
'table' => [

View File

@@ -74,6 +74,6 @@ class BookCase extends Model implements HasMedia
*/
public function commentUrl(): string
{
return url()->route('comment.bookcase', ['bookCase' => $this->id]);
return url()->route('bookCases.comment.bookcase', ['bookCase' => $this->id]);
}
}

View File

@@ -8,7 +8,7 @@
@endif
<div class="flex items-center space-x-1">
<x-button primary class="text-21gray whitespace-nowrap" wire:click="viewHistoryModal({{ $row->id }})">💊 Orange Pill Now</x-button>
<x-button :href="route('comment.bookcase', ['bookCase' => $row->id])">Details</x-button>
<x-button :href="route('bookCases.comment.bookcase', ['bookCase' => $row->id])">Details</x-button>
</div>
@else
<div>

View File

@@ -67,7 +67,7 @@
<div
class="relative flex items-center space-x-3 rounded-lg border border-amber-300 bg-21gray px-6 py-5 shadow-sm focus-within:ring-2 focus-within:ring-amber-500 focus-within:ring-offset-2 hover:border-amber-400">
<div class="min-w-0 flex-1">
<a href="{{ route('search.course', ['country' => 'de']) }}" class="focus:outline-none">
<a href="{{ route('school.table.course', ['country' => 'de']) }}" class="focus:outline-none">
<span class="absolute inset-0" aria-hidden="true"></span>
<p class="text-sm font-medium text-gray-200">Übersicht der Kurse</p>
<p class="truncate text-sm text-gray-300">Zeige das Benutzer Frontend</p>

View File

@@ -0,0 +1,12 @@
<div class="bg-21gray flex flex-col h-screen justify-between">
{{-- HEADER --}}
<livewire:frontend.header/>
{{-- MAIN --}}
<section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10" id="table">
<livewire:tables.book-case-table/>
</div>
</section>
{{-- FOOTER --}}
<livewire:frontend.footer/>
</div>

View File

@@ -17,29 +17,29 @@
<div
class="relative sm:sticky sm:top-0 bg-21gray z-10 flex flex-col flex-wrap items-center justify-between py-7 mx-auto md:flex-row max-w-screen-2xl">
<div class="relative flex flex-col md:flex-row">
<a href="{{ route('search.city', ['country' => $c]) }}"
<a href="{{ route('school.table.city', ['country' => $c]) }}"
class="flex items-center mb-5 font-medium text-gray-900 lg:w-auto lg:items-center lg:justify-center md:mb-0">
<img src="{{ asset('img/einundzwanzig-horizontal-inverted.svg') }}">
</a>
<nav
class="flex flex-wrap items-center mb-5 text-lg md:mb-0 md:pl-8 md:ml-8 md:border-l md:border-gray-800">
<a href="{{ route('search.city', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.city') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Städte</a>
<a href="{{ route('search.lecturer', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Dozenten</a>
<a href="{{ route('search.venue', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.venue') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Veranstaltungs-Orte</a>
<a href="{{ route('search.course', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.course') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Kurse</a>
<a href="{{ route('search.event', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.event') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Termine</a>
<a href="{{ route('library', ['country' => $c]) }}"
class="{{ request()->routeIs('library') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Bibliothek</a>
<a href="{{ route('search.bookcases', ['country' => $c]) }}"
class="{{ request()->routeIs('search.bookcases') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Bücher-Schränke</a>
<a href="{{ route('school.table.city', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.city') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Städte</a>
<a href="{{ route('school.table.lecturer', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Dozenten</a>
<a href="{{ route('school.table.venue', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.venue') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Veranstaltungs-Orte</a>
<a href="{{ route('school.table.course', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.course') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Kurse</a>
<a href="{{ route('school.table.event', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.event') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Termine</a>
<a href="{{ route('library.table.libraryItems', ['country' => $c]) }}"
class="{{ request()->routeIs('library.table.libraryItems') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Bibliothek</a>
<a href="{{ route('bookCases.table.bookcases', ['country' => $c]) }}"
class="{{ request()->routeIs('bookCases.table.bookcases') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Bücher-Schränke</a>
@if(auth()->user()?->is_lecturer)
<a href="{{ route('library.lecturer', ['country' => $c]) }}"
class="{{ request()->routeIs('library.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Dozenten-Bibliothek</a>
<a href="{{ route('library.table.lecturer', ['country' => $c]) }}"
class="{{ request()->routeIs('library.table.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Dozenten-Bibliothek</a>
@endif
</nav>
</div>
@@ -65,7 +65,7 @@
<section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10">
<div class="flex items-center justify-end space-x-2 my-6">
<x-button primary :href="route('search.bookcases', ['country' => $c])">
<x-button primary :href="route('bookCases.table.bookcases', ['country' => $c])">
<i class="fa fa-thin fa-arrow-left"></i>
Zurück zur Übersicht
</x-button>

View File

@@ -1,15 +1,4 @@
<div>
<script src="{{ asset('earth/miniature.earth.js') }}"></script>
<style>
.earth-container::after {
content: "";
position: absolute;
height: 22%;
bottom: 4%;
left: 13%;
right: 13%;
}
</style>
<section class="w-full">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10">
<div
@@ -21,24 +10,53 @@
</a>
<nav
class="flex flex-wrap items-center mb-5 text-lg md:mb-0 md:pl-8 md:ml-8 md:border-l md:border-gray-800">
<a href="{{ route('search.city', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.city') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Städte</a>
<a href="{{ route('search.lecturer', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Dozenten</a>
<a href="{{ route('search.venue', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.venue') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Veranstaltungs-Orte</a>
<a href="{{ route('search.course', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.course') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Kurse</a>
<a href="{{ route('search.event', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.event') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Termine</a>
<a href="{{ route('library', ['country' => $c]) }}"
class="{{ request()->routeIs('library') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Bibliothek</a>
<a href="{{ route('search.bookcases', ['country' => $c]) }}"
class="{{ request()->routeIs('search.bookcases') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Bücher-Schränke</a>
@if(auth()->user()?->is_lecturer)
<a href="{{ route('library.lecturer', ['country' => $c]) }}"
class="{{ request()->routeIs('library.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Dozenten-Bibliothek</a>
<a href="{{ route('welcome') }}"
class="text-gray-400 mr-5 font-medium leading-6 hover:text-gray-300">
Zurück zur Übersicht
</a>
@if(str(request()->route()->getName())->contains('school.'))
<a href="{{ route('school.table.city', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.city') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
Städte
</a>
<a href="{{ route('school.table.lecturer', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
Dozenten
</a>
<a href="{{ route('school.table.venue', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.venue') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
Veranstaltungs-Orte
</a>
<a href="{{ route('school.table.course', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.course') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
Kurse
</a>
<a href="{{ route('school.table.event', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('school.table.event') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
Termine
</a>
@endif
@if(str(request()->route()->getName())->contains('library.'))
<a href="{{ route('library.table.libraryItems', ['country' => $c]) }}"
class="{{ request()->routeIs('library.table.libraryItems') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
Bibliothek
</a>
@if(auth()->user()?->is_lecturer)
<a href="{{ route('library.table.lecturer', ['country' => $c]) }}"
class="{{ request()->routeIs('library.table.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
Dozenten-Bibliothek
</a>
@endif
@endif
@if(str(request()->route()->getName())->contains('bookCases.'))
<a href="{{ route('bookCases.table.bookcases', ['country' => $c]) }}"
class="{{ request()->routeIs('bookCases.table.bookcases') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
Bücher-Schränke
</a>
@endif
</nav>
</div>
@auth
@@ -56,84 +74,50 @@
</div>
@endauth
</div>
@if($withGlobe)
<div class="flex lg:flex-row flex-col pt-4 md:pt-4 lg:pt-4">
<div
class="w-full lg:w-1/2 flex lg:px-0 px-5 flex-col md:items-center lg:items-start justify-center -mt-12">
</div>
</section>
<section class="h-auto">
<div class="px-10 py-6 mx-auto max-w-7xl">
<div class="w-full mx-auto text-left md:text-center">
<h1 class="text-white text-3xl sm:text-5xl lg:max-w-none max-w-4xl lg:text-left text-left md:text-center xl:text-7xl font-black">
@if(str(request()->route()->getName())->contains('school.'))
<div>
<h1 class="mb-6 text-5xl font-extrabold leading-none max-w-5xl mx-auto tracking-normal text-gray-200 sm:text-6xl md:text-6xl lg:text-7xl md:tracking-tight">
Bitcoin <span
class="bg-clip-text text-transparent bg-gradient-to-br from-yellow-400 via-yellow-500 to-yellow-700 mt-1 lg:block">School
</span> <br class="lg:block sm:hidden"> {{ str($country->name)->upper() }}
class="w-full text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200 lg:inline">Kurse</span>
für deine<br class="lg:block hidden"> Reise in den Kaninchenbau.
</h1>
<div>
<x-select
label="Land wechseln"
placeholder="Land wechseln"
wire:model="c"
:clearable="false"
>
@foreach($countries as $country)
<x-select.user-option
src="{{ asset('vendor/blade-country-flags/4x3-'.$country->code.'.svg') }}"
label="{{ $country->name }}" value="{{ $country->code }}"/>
@endforeach
</x-select>
</div>
<p class="text-gray-500 sm:text-lg md:text-xl xl:text-2xl lg:max-w-none max-w-2xl md:text-center lg:text-left lg:pr-32 mt-6">
Finde Bitcoin Kurse in deiner City</p>
@php
$searchTitle = match ($currentRouteName) {
'search.city' => 'Stadt',
'search.lecturer' => 'Dozent',
'search.venue' => 'Veranstaltungs-Ort',
'search.course' => 'Kurs',
'search.event' => 'Termin',
};
@endphp
<a href="#table"
class="whitespace-nowrap bg-white px-4 lg:px-16 py-2 text-center lg:py-5 font-bold rounded text-xs md:text-xl lg:text-2xl mt-8 inline-block w-auto">
👇 {{ $searchTitle }} finden 👇
</a>
<p class="text-gray-400 font-normal mt-4">{{-- TEXT --}}</p>
<p class="px-0 mb-6 text-lg text-gray-600 md:text-xl lg:px-24"> Wähle deine Stadt, suche im
Umkreis nach
Kursen und wähle ein für dich passendes Thema aus. </p>
</div>
<div
x-data="{
earth: null,
init() {
this.earth = new Earth(this.$refs.myearth, {
location : {lat: {{ $cities->first()->latitude }}, lng: {{ $cities->first()->longitude }}},
zoom: 2,
light: 'sun',
polarLimit: 0.6,
@endif
transparent : true,
mapSeaColor : 'RGBA(34, 34, 34,0.76)',
mapLandColor : '#F7931A',
mapBorderColor : '#5D5D5D',
mapBorderWidth : 0.25,
mapHitTest : true,
autoRotate: true,
autoRotateSpeed: 0.7,
autoRotateDelay: 500,
});
this.earth.addEventListener('ready', function() {
@foreach($cities as $city)
this.addMarker( {
mesh : ['Needle'],
location : { lat: {{ $city->latitude }}, lng: {{ $city->longitude }} },
});
@endforeach
});
}
}" class="hidden sm:inline-block w-1/2">
{{--<img src="https://cdn.devdojo.com/images/march2022/mesh-gradient1.png"
class="absolute lg:max-w-none max-w-3xl mx-auto mt-32 w-full h-full inset-0">--}}
<div x-ref="myearth" class="earth-container"></div>
@if(str(request()->route()->getName())->contains('library.'))
<div>
<h1 class="mb-6 text-5xl font-extrabold leading-none max-w-5xl mx-auto tracking-normal text-gray-200 sm:text-6xl md:text-6xl lg:text-7xl md:tracking-tight">
Bitcoin <span
class="w-full text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200 lg:inline">Content</span>
für deine<br class="lg:block hidden"> Reise in den Kaninchenbau.
</h1>
<p class="px-0 mb-6 text-lg text-gray-600 md:text-xl lg:px-24"> Wähle ein für dich passendes
Thema aus. </p>
</div>
</div>
@endif
@endif
@if(str(request()->route()->getName())->contains('bookCases.'))
<div>
<h1 class="mb-6 text-5xl font-extrabold leading-none max-w-5xl mx-auto tracking-normal text-gray-200 sm:text-6xl md:text-6xl lg:text-7xl md:tracking-tight">
Bitcoin <span
class="w-full text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200 lg:inline">Bücher-Schränke</span>
für deine<br class="lg:block hidden"> Reise in den Kaninchenbau.
</h1>
<p class="px-0 mb-6 text-lg text-gray-600 md:text-xl lg:px-24"> Suche einen öffentlichen
Bücher-Schrank aus. </p>
</div>
@endif
</div>
</div>
</section>
</div>

View File

@@ -1,79 +0,0 @@
<div class="bg-21gray flex flex-col h-screen justify-between">
{{-- HEADER --}}
<div>
<section class="w-full">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10">
<div
class="relative sm:sticky sm:top-0 bg-21gray z-10 flex flex-col flex-wrap items-center justify-between py-7 mx-auto md:flex-row max-w-screen-2xl">
<div class="relative flex flex-col md:flex-row">
<a href="{{ route('search.city', ['country' => $c]) }}"
class="flex items-center mb-5 font-medium text-gray-900 lg:w-auto lg:items-center lg:justify-center md:mb-0">
<img src="{{ asset('img/einundzwanzig-horizontal-inverted.svg') }}">
</a>
<nav
class="flex flex-wrap items-center mb-5 text-lg md:mb-0 md:pl-8 md:ml-8 md:border-l md:border-gray-800">
<a href="{{ route('search.city', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.city') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Städte</a>
<a href="{{ route('search.lecturer', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Dozenten</a>
<a href="{{ route('search.venue', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.venue') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Veranstaltungs-Orte</a>
<a href="{{ route('search.course', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.course') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Kurse</a>
<a href="{{ route('search.event', ['country' => $c, '#table']) }}"
class="{{ request()->routeIs('search.event') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Termine</a>
<a href="{{ route('library', ['country' => $c]) }}"
class="{{ request()->routeIs('library') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Bibliothek</a>
<a href="{{ route('search.bookcases', ['country' => $c]) }}"
class="{{ request()->routeIs('search.bookcases') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Bücher-Schränke</a>
@if(auth()->user()?->is_lecturer)
<a href="{{ route('library.lecturer', ['country' => $c]) }}"
class="{{ request()->routeIs('library.lecturer') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">Dozenten-Bibliothek</a>
@endif
</nav>
</div>
@auth
<div></div>
@else
<div class="inline-flex items-center ml-5 my-2 text-lg space-x-6 lg:justify-end">
<a href="{{ route('auth.ln') }}"
class="text-xs sm:text-base font-medium leading-6 text-gray-400 hover:text-gray-300 whitespace-no-wrap transition duration-150 ease-in-out">
Login
</a>
<a href="{{ route('auth.ln') }}"
class="text-xs sm:text-base inline-flex items-center justify-center px-4 py-2 font-medium leading-6 text-gray-200 hover:text-white whitespace-no-wrap bg-gray-800 border border-transparent rounded shadow-sm hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-800">
Registrieren
</a>
</div>
@endauth
</div>
<div class="flex lg:flex-row flex-col pt-4 md:pt-4 lg:pt-4 mt-12">
<div
class="w-full lg:w-1/2 flex lg:px-0 px-5 flex-col md:items-center lg:items-start justify-center -mt-12">
<h1 class="text-white text-3xl sm:text-5xl lg:max-w-none max-w-4xl lg:text-left text-left md:text-center xl:text-7xl font-black">
Bitcoin <span
class="bg-clip-text text-transparent bg-gradient-to-br from-yellow-400 via-yellow-500 to-yellow-700 mt-1 lg:block">School
</span> <br class="lg:block sm:hidden"> Worldwide
</h1>
<p class="text-gray-500 sm:text-lg md:text-xl xl:text-2xl lg:max-w-none max-w-2xl md:text-center lg:text-left lg:pr-32 mt-6">
Finde einen Bücher-Schrank in deiner City</p>
<a href="#table"
class="whitespace-nowrap bg-white px-4 lg:px-16 py-2 text-center lg:py-5 font-bold rounded text-xs md:text-xl lg:text-2xl mt-8 inline-block w-auto">
👇 Bücher-Schrank finden 👇
</a>
<p class="text-gray-400 font-normal mt-4">{{-- TEXT --}}</p>
</div>
</div>
</div>
</section>
</div>
{{-- MAIN --}}
<section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10" id="table">
<livewire:tables.book-case-table/>
</div>
</section>
{{-- FOOTER --}}
<livewire:frontend.footer/>
</div>

View File

@@ -9,20 +9,20 @@
$currentTab = 'border-amber-500 text-amber-600';
$notCurrentTab = 'border-transparent text-gray-200 hover:text-gray-400 hover:border-gray-300';
@endphp
<a href="{{ route('search.city', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('search.city') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Städte</a>
<a href="{{ route('school.table.city', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('school.table.city') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Städte</a>
<a href="{{ route('search.lecturer', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('search.lecturer') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Dozenten</a>
<a href="{{ route('school.table.lecturer', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('school.table.lecturer') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Dozenten</a>
<a href="{{ route('search.venue', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('search.venue') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Veranstaltungs-Orte</a>
<a href="{{ route('school.table.venue', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('school.table.venue') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Veranstaltungs-Orte</a>
<a href="{{ route('search.course', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('search.course') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Kurse</a>
<a href="{{ route('school.table.course', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('school.table.course') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Kurse</a>
<a href="{{ route('search.event', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('search.event') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Termine</a>
<a href="{{ route('school.table.event', ['country' => $country]).'#table' }}"
class="{{ request()->routeIs('school.table.event') ? $currentTab : $notCurrentTab }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">Termine</a>
</nav>
</div>

View File

@@ -35,7 +35,7 @@
</div>
<div
class="row-span-2 col-span-full sm:col-span-1 md:col-start-1 xl:col-start-2 sm:row-start-4 md:row-start-5 xl:row-start-2">
<a href="{{ route('search.city', ['country' => 'de']) }}"
<a href="{{ route('school.table.city', ['country' => 'de']) }}"
class="relative flex flex-col items-start justify-end w-full h-full overflow-hidden bg-black shadow-lg rounded-xl group"
style="aspect-ratio: 1/1;">
<div class="absolute inset-0 w-full h-full">
@@ -56,7 +56,7 @@
</div>
<div
class="row-span-2 col-span-full sm:col-span-1 md:col-start-2 xl:col-start-2 sm:row-start-6 md:row-start-2 xl:row-start-4">
<a href="{{ route('library', ['country' => 'de']) }}"
<a href="{{ route('library.table.libraryItems', ['country' => 'de']) }}"
class="relative flex flex-col items-start justify-end w-full h-full overflow-hidden bg-black shadow-lg rounded-xl group"
style="aspect-ratio: 1/1;">
<div class="absolute inset-0 w-full h-full">
@@ -98,7 +98,7 @@
</div>
<div
class="row-span-2 col-span-full sm:col-span-1 md:col-start-3 xl:col-start-3 sm:row-start-3 md:row-start-1 xl:row-start-3">
<a href="{{ route('library', ['country' => 'de']) }}"
<a href="{{ route('library.table.libraryItems', ['country' => 'de']) }}"
class="relative flex flex-col items-start justify-end w-full h-full overflow-hidden bg-black shadow-lg rounded-xl group"
style="aspect-ratio: 1/1;">
<div class="absolute inset-0 w-full h-full">
@@ -119,7 +119,7 @@
</div>
<div
class="row-span-2 col-span-full sm:col-span-1 md:col-start-3 xl:col-start-4 sm:row-start-5 md:row-start-3 xl:row-start-2">
<a href="{{ route('search.bookcases', ['country' => 'de']) }}"
<a href="{{ route('bookCases.table.bookcases', ['country' => 'de']) }}"
class="relative flex flex-col items-start justify-end w-full h-full overflow-hidden bg-black shadow-lg rounded-xl group"
style="aspect-ratio: 1/1;">
<div class="absolute inset-0 w-full h-full">

View File

@@ -1,13 +1,13 @@
<div class="bg-21gray flex flex-col h-screen justify-between">
{{-- HEADER --}}
<livewire:frontend.header :country="$country" :withGlobe="false"/>
<livewire:frontend.header :country="$country"/>
{{-- MAIN --}}
<section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10" id="table">
<div class="relative border-b border-gray-200 pb-5 sm:pb-0">
<div class="md:flex md:items-center md:justify-between">
@if(request()->route()->getName() === 'library.lecturer')
@if(request()->route()->getName() === 'library.table.lecturer')
<h3 class="text-2xl font-medium leading-6 text-gray-200">Dozenten-Bibliotheken</h3>
@else
<h3 class="text-2xl font-medium leading-6 text-gray-200">Bibliotheken</h3>
@@ -40,7 +40,7 @@
</div>
</div>
<livewire:frontend.search-by-tag-in-library/>
<livewire:library.search-by-tag-component/>
<div class="my-12">
<livewire:tables.library-item-table :currentTab="$currentTab"/>

View File

@@ -3,9 +3,9 @@
<livewire:frontend.header :country="$country"/>
{{-- MAIN --}}
<section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10" id="table">
<livewire:frontend.search-by-tag :country="$country->code"/>
<livewire:frontend.search-tabs :country="$country->code"/>
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
<livewire:school.search-by-tag-component :country="$country->code"/>
{{-- <livewire:frontend.search-tabs :country="$country->code"/>--}}
<livewire:tables.city-table :country="$country->code"/>
</div>
</section>

View File

@@ -3,9 +3,9 @@
<livewire:frontend.header :country="$country"/>
{{-- MAIN --}}
<section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10" id="table">
<livewire:frontend.search-by-tag :country="$country->code"/>
<livewire:frontend.search-tabs :country="$country->code"/>
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
<livewire:school.search-by-tag-component :country="$country->code"/>
{{-- <livewire:frontend.search-tabs :country="$country->code"/>--}}
<livewire:tables.course-table :country="$country->code"/>
</div>
</section>

View File

@@ -3,9 +3,9 @@
<livewire:frontend.header :country="$country"/>
{{-- MAIN --}}
<section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10" id="table">
<livewire:frontend.search-by-tag :country="$country->code"/>
<livewire:frontend.search-tabs :country="$country->code"/>
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
<livewire:school.search-by-tag-component :country="$country->code"/>
{{-- <livewire:frontend.search-tabs :country="$country->code"/>--}}
<livewire:tables.event-table :country="$country->code"/>
</div>
</section>

View File

@@ -3,9 +3,9 @@
<livewire:frontend.header :country="$country"/>
{{-- MAIN --}}
<section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10" id="table">
<livewire:frontend.search-by-tag :country="$country->code"/>
<livewire:frontend.search-tabs :country="$country->code"/>
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
<livewire:school.search-by-tag-component :country="$country->code"/>
{{-- <livewire:frontend.search-tabs :country="$country->code"/>--}}
<livewire:tables.lecturer-table :country="$country->code"/>
</div>
</section>

View File

@@ -13,7 +13,7 @@
@endphp
<a
class="{{ $activeClass }} flex relative flex-col flex-shrink-0 justify-between py-1 px-3 w-full h-20 border-0 border-solid duration-300 ease-in-out cursor-pointer bg-opacity-[0.07]"
href="{{ $isActive ? '#table' : route('search.course', ['country' => $country, 'table' => ['filters' => ['tag' => [$tag->name]]], '#table']) }}"
href="{{ $isActive ? '#table' : route('school.table.course', ['country' => $country, 'table' => ['filters' => ['tag' => [$tag->name]]], '#table']) }}"
>
<div
class="flex flex-1 items-center p-0 m-0 text-center align-baseline border-0 border-solid"

View File

@@ -3,9 +3,9 @@
<livewire:frontend.header :country="$country"/>
{{-- MAIN --}}
<section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10" id="table">
<livewire:frontend.search-by-tag :country="$country->code"/>
<livewire:frontend.search-tabs :country="$country->code"/>
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
<livewire:school.search-by-tag-component :country="$country->code"/>
{{-- <livewire:frontend.search-tabs :country="$country->code"/>--}}
<livewire:tables.venue-table :country="$country->code"/>
</div>
</section>

View File

@@ -9,40 +9,68 @@ Route::get('/auth/ln', \App\Http\Livewire\Auth\LNUrlAuth::class)
->name('auth.ln')
->middleware('guest');
Route::get('/{country:code}/suche/stadt', \App\Http\Livewire\Frontend\SearchCity::class)
->name('search.city')
->where(
'country',
'(.*)'
);
/*
* School
* */
Route::middleware([])
->as('school.')
->prefix('school')
->group(function () {
Route::get('/{country:code}/table/city', \App\Http\Livewire\School\CityTable::class)
->name('table.city');
Route::get('/{country:code}/suche/dozent', \App\Http\Livewire\Frontend\SearchLecturer::class)
->name('search.lecturer');
Route::get('/{country:code}/table/lecturer', \App\Http\Livewire\School\LecturerTable::class)
->name('table.lecturer');
Route::get('/{country:code}/suche/ort', \App\Http\Livewire\Frontend\SearchVenue::class)
->name('search.venue');
Route::get('/{country:code}/table/venue', \App\Http\Livewire\School\VenueTable::class)
->name('table.venue');
Route::get('/{country:code}/suche/kurs', \App\Http\Livewire\Frontend\SearchCourse::class)
->name('search.course');
Route::get('/{country:code}/table/course', \App\Http\Livewire\School\CouseTable::class)
->name('table.course');
Route::get('/{country:code}/suche/termin', \App\Http\Livewire\Frontend\SearchEvent::class)
->name('search.event');
Route::get('/{country:code}/table/event', \App\Http\Livewire\School\EventTable::class)
->name('table.event');
});
Route::get('/{country:code}/bibliothek', \App\Http\Livewire\Frontend\Library::class)
->name('library');
/*
* Library
* */
Route::middleware([])
->as('library.')
->prefix('library')
->group(function () {
Route::get('/{country:code}/table/library-item', \App\Http\Livewire\Library\LibraryTable::class)
->name('table.libraryItems');
Route::get('/{country:code}/dozenten/bibliothek', \App\Http\Livewire\Frontend\Library::class)
->name('library.lecturer');
Route::get('/{country:code}/table/content-creator', \App\Http\Livewire\Library\LibraryTable::class)
->name('table.lecturer');
});
Route::get('/dozenten', \App\Http\Livewire\Guest\Welcome::class)
->name('search.lecturers');
/*
* Books
* */
Route::middleware([])
->as('bookCases.')
->prefix('book-cases')
->group(function () {
Route::get('/table/book-case', \App\Http\Livewire\BookCase\BookCaseTable::class)
->name('table.bookcases');
Route::get('/buecher-schraenke', \App\Http\Livewire\Frontend\SearchBookCase::class)
->name('search.bookcases');
Route::get('/book-case/{bookCase}', \App\Http\Livewire\BookCase\CommentBookCase::class)
->name('comment.bookcase');
});
Route::get('/buecher-schrank/{bookCase}', \App\Http\Livewire\Frontend\CommentBookCase::class)
->name('comment.bookcase');
/*
* Events
* */
/*
* Meetups
* */
/*
* Authenticated
* */
Route::middleware([
'auth:sanctum',
config('jetstream.auth_session'),