lecturer landing pages added

This commit is contained in:
Benjamin Takats
2023-01-15 14:36:43 +01:00
parent e66c505fa9
commit 9409e484c7
23 changed files with 495 additions and 28 deletions

View File

@@ -0,0 +1,44 @@
<?php
namespace App\Http\Livewire\School;
use App\Models\Country;
use App\Models\CourseEvent;
use App\Models\Lecturer;
use Livewire\Component;
class LecturerLandingPage extends Component
{
public Lecturer $lecturer;
public Country $country;
public ?int $year = null;
public ?int $activeEvent = null;
protected $queryString = ['year'];
public function render()
{
return view('livewire.school.lecturer-landing-page', [
'courseEvents' => CourseEvent::query()
->get(),
'events' => CourseEvent::query()
->whereHas('course', function ($query) {
$query->where('lecturer_id', $this->lecturer->id);
})
->get()
->map(fn($event) => [
'id' => $event->id,
'startDate' => $event->from,
'endDate' => $event->to,
'location' => $event->course->name,
'description' => $event->venue->name,
]),
]);
}
public function showEvent($id)
{
$this->activeEvent = $id;
}
}

View File

@@ -62,7 +62,7 @@ class LecturerTable extends DataTableComponent
->collapseOnMobile(), ->collapseOnMobile(),
Column::make('') Column::make('')
->label( ->label(
fn($row, Column $column) => view('columns.lectures.action')->withRow($row) fn($row, Column $column) => view('columns.lectures.action')->withRow($row)->withCountry($this->country)
), ),
]; ];
@@ -77,10 +77,11 @@ class LecturerTable extends DataTableComponent
]); ]);
} }
public function lecturerSearch($id) public function lecturerSearch($id, $event = true)
{ {
$lecturer = Lecturer::query()->find($id); $lecturer = Lecturer::query()->find($id);
if ($event) {
return to_route('school.table.event', [ return to_route('school.table.event', [
'#table', '#table',
'country' => $this->country, 'country' => $this->country,
@@ -90,5 +91,16 @@ class LecturerTable extends DataTableComponent
], ],
] ]
]); ]);
} else {
return to_route('library.table.libraryItems', [
'#table',
'country' => $this->country,
'table' => [
'filters' => [
'lecturer_id' => $lecturer->id,
],
]
]);
}
} }
} }

View File

@@ -12,6 +12,7 @@ use Rappasoft\LaravelLivewireTables\Views\Column;
use Rappasoft\LaravelLivewireTables\Views\Columns\ImageColumn; use Rappasoft\LaravelLivewireTables\Views\Columns\ImageColumn;
use Rappasoft\LaravelLivewireTables\Views\Filters\MultiSelectFilter; use Rappasoft\LaravelLivewireTables\Views\Filters\MultiSelectFilter;
use Rappasoft\LaravelLivewireTables\Views\Filters\SelectFilter; use Rappasoft\LaravelLivewireTables\Views\Filters\SelectFilter;
use Rappasoft\LaravelLivewireTables\Views\Filters\TextFilter;
use Spatie\LaravelOptions\Options; use Spatie\LaravelOptions\Options;
class LibraryItemTable extends DataTableComponent class LibraryItemTable extends DataTableComponent
@@ -43,6 +44,11 @@ class LibraryItemTable extends DataTableComponent
public function filters(): array public function filters(): array
{ {
return [ return [
TextFilter::make(__('By lecturer'), 'lecturer_id')
->hiddenFromMenus()
->filter(function (Builder $builder, string $value) {
$builder->where('library_items.lecturer_id', '=', $value);
}),
MultiSelectFilter::make('Tag') MultiSelectFilter::make('Tag')
->options( ->options(
Tag::query() Tag::query()

View File

@@ -2,7 +2,6 @@
namespace App\Models; namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\BelongsToMany;
@@ -17,7 +16,6 @@ use Spatie\Tags\HasTags;
class LibraryItem extends Model implements HasMedia, Sortable class LibraryItem extends Model implements HasMedia, Sortable
{ {
use HasFactory;
use InteractsWithMedia; use InteractsWithMedia;
use HasTags; use HasTags;
use SortableTrait; use SortableTrait;

View File

@@ -88,6 +88,12 @@ class Lecturer extends Resource
Text::make('Name') Text::make('Name')
->rules('required', 'string'), ->rules('required', 'string'),
Markdown::make(__('Subtitle'), 'subtitle')
->help(__('This is the subtitle on the landing page.')),
Markdown::make(__('Intro'), 'intro')
->help(__('This is the introduction text that is shown on the landing page.')),
Text::make('Slug') Text::make('Slug')
->rules('required', 'string', 'unique:lecturers,slug') ->rules('required', 'string', 'unique:lecturers,slug')
->exceptOnForms(), ->exceptOnForms(),
@@ -108,7 +114,8 @@ class Lecturer extends Resource
return $request->user() return $request->user()
->hasRole('super-admin'); ->hasRole('super-admin');
}) })
->searchable()->withSubtitles(), ->searchable()
->withSubtitles(),
]; ];
} }

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
* @return void
*/
public function up()
{
Schema::table('lecturers', function (Blueprint $table) {
$table->text('subtitle')
->nullable();
$table->text('intro')
->nullable();
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
Schema::table('lecturers', function (Blueprint $table) {
//
});
}
};

View File

@@ -186,6 +186,19 @@ class DatabaseSeeder extends Seeder
'lecturer_id' => 1, 'lecturer_id' => 1,
'name' => 'Hands on Bitcoin', 'name' => 'Hands on Bitcoin',
'created_by' => 1, 'created_by' => 1,
'description' => '
Klimakiller Bitcoin! Bitcoin hat keinen Nutzen! Bitcoin wird nur von Kriminellen genutzt!
Diese oder ähnliche Aussprüche kennen Sie bestimmt? Dann lassen Sie uns Bitcoin doch einmal genauer anschauen! In meinem Kurs nehme ich Sie mit auf einen Weg der bei der Geschichte unseres Geldes beginnt. Lassen Sie uns schauen wie unser Geld entsteht und welche Aufgaben dabei Geschäftsbanken und Zentralbanken haben. Welche Rolle spielt eigentlich das Jahr 1971 und welche Auswirkungen hatte dies auf unser Geld wie wir es heute verwenden. Was hat die Banken- und Finanzkrise 2008/ 2009 mit Bitcoin und Neuseeland mit unserer Inflation zu tun?
Was ist eigentlich dieses Bitcoin? Wer hat es erfunden und warum? Lassen Sie uns schauen, was eine Blockchain überhaupt ist und wie sie funktioniert- warum ist es wichtig, dass hierfür Energie eingesetzt wird. Was ist eigentlich dieses Proof of Work von dem immer geschrieben wird und warum ist er so wichtig? Und ist Bitcoin vielleicht sogar ein Treiber im Ausbau der erneuerbaren Energien bei? Sie haben schonmal von Minern gehört und vielleicht sogar von Nodes? Doch welche Rolle spielen Sie und wie sehen diese eigentlich aus- auch das können Sie in diesem Kurs herausfinden.
Bitcoin wird nur von Kriminellen genutzt? Lassen Sie uns gemeinsam schauen wie eine Bitcoin Transaktion funktioniert und was eine sog. „Wallet“ ist. Welche Unterschiede gibt es beim Verwahren von Bitcoin und wie können diese sicher vererbt werden. Dabei werden wir auch Begriffe wie PrivateKey, PublicKey und Seed kennenlernen und wie diese zusammenspielen. Und nein- sie müssen für diesen Kurs kein Informatikstudium besitzen!
Bitcoin ist interdisziplinär! Und wer anfängt sich damit zu beschäftigen wird schnell feststellen, dass es mehrere hundert Stunden benötigt, um Bitcoin zu verstehen.
Deshalb werden Sie von mir in diesem Kurs leicht verständlich an das Thema herangeführt. Sie erhalten dabei Kenntnis von den Grundbegriffen, der Funktion und der Verwendung von Bitcoin.
',
]); ]);
$course->syncTagsWithType(['Hardware Wallet'], 'course'); $course->syncTagsWithType(['Hardware Wallet'], 'course');
$course->categories() $course->categories()
@@ -194,6 +207,19 @@ class DatabaseSeeder extends Seeder
'lecturer_id' => 1, 'lecturer_id' => 1,
'name' => 'Bitcoin <> Crypto', 'name' => 'Bitcoin <> Crypto',
'created_by' => 1, 'created_by' => 1,
'description' => '
Klimakiller Bitcoin! Bitcoin hat keinen Nutzen! Bitcoin wird nur von Kriminellen genutzt!
Diese oder ähnliche Aussprüche kennen Sie bestimmt? Dann lassen Sie uns Bitcoin doch einmal genauer anschauen! In meinem Kurs nehme ich Sie mit auf einen Weg der bei der Geschichte unseres Geldes beginnt. Lassen Sie uns schauen wie unser Geld entsteht und welche Aufgaben dabei Geschäftsbanken und Zentralbanken haben. Welche Rolle spielt eigentlich das Jahr 1971 und welche Auswirkungen hatte dies auf unser Geld wie wir es heute verwenden. Was hat die Banken- und Finanzkrise 2008/ 2009 mit Bitcoin und Neuseeland mit unserer Inflation zu tun?
Was ist eigentlich dieses Bitcoin? Wer hat es erfunden und warum? Lassen Sie uns schauen, was eine Blockchain überhaupt ist und wie sie funktioniert- warum ist es wichtig, dass hierfür Energie eingesetzt wird. Was ist eigentlich dieses Proof of Work von dem immer geschrieben wird und warum ist er so wichtig? Und ist Bitcoin vielleicht sogar ein Treiber im Ausbau der erneuerbaren Energien bei? Sie haben schonmal von Minern gehört und vielleicht sogar von Nodes? Doch welche Rolle spielen Sie und wie sehen diese eigentlich aus- auch das können Sie in diesem Kurs herausfinden.
Bitcoin wird nur von Kriminellen genutzt? Lassen Sie uns gemeinsam schauen wie eine Bitcoin Transaktion funktioniert und was eine sog. „Wallet“ ist. Welche Unterschiede gibt es beim Verwahren von Bitcoin und wie können diese sicher vererbt werden. Dabei werden wir auch Begriffe wie PrivateKey, PublicKey und Seed kennenlernen und wie diese zusammenspielen. Und nein- sie müssen für diesen Kurs kein Informatikstudium besitzen!
Bitcoin ist interdisziplinär! Und wer anfängt sich damit zu beschäftigen wird schnell feststellen, dass es mehrere hundert Stunden benötigt, um Bitcoin zu verstehen.
Deshalb werden Sie von mir in diesem Kurs leicht verständlich an das Thema herangeführt. Sie erhalten dabei Kenntnis von den Grundbegriffen, der Funktion und der Verwendung von Bitcoin.
',
]); ]);
$course->syncTagsWithType(['Lightning'], 'course'); $course->syncTagsWithType(['Lightning'], 'course');
$course->categories() $course->categories()
@@ -202,6 +228,19 @@ class DatabaseSeeder extends Seeder
'lecturer_id' => 2, 'lecturer_id' => 2,
'name' => 'Bitcoin Lightning Network', 'name' => 'Bitcoin Lightning Network',
'created_by' => 1, 'created_by' => 1,
'description' => '
Klimakiller Bitcoin! Bitcoin hat keinen Nutzen! Bitcoin wird nur von Kriminellen genutzt!
Diese oder ähnliche Aussprüche kennen Sie bestimmt? Dann lassen Sie uns Bitcoin doch einmal genauer anschauen! In meinem Kurs nehme ich Sie mit auf einen Weg der bei der Geschichte unseres Geldes beginnt. Lassen Sie uns schauen wie unser Geld entsteht und welche Aufgaben dabei Geschäftsbanken und Zentralbanken haben. Welche Rolle spielt eigentlich das Jahr 1971 und welche Auswirkungen hatte dies auf unser Geld wie wir es heute verwenden. Was hat die Banken- und Finanzkrise 2008/ 2009 mit Bitcoin und Neuseeland mit unserer Inflation zu tun?
Was ist eigentlich dieses Bitcoin? Wer hat es erfunden und warum? Lassen Sie uns schauen, was eine Blockchain überhaupt ist und wie sie funktioniert- warum ist es wichtig, dass hierfür Energie eingesetzt wird. Was ist eigentlich dieses Proof of Work von dem immer geschrieben wird und warum ist er so wichtig? Und ist Bitcoin vielleicht sogar ein Treiber im Ausbau der erneuerbaren Energien bei? Sie haben schonmal von Minern gehört und vielleicht sogar von Nodes? Doch welche Rolle spielen Sie und wie sehen diese eigentlich aus- auch das können Sie in diesem Kurs herausfinden.
Bitcoin wird nur von Kriminellen genutzt? Lassen Sie uns gemeinsam schauen wie eine Bitcoin Transaktion funktioniert und was eine sog. „Wallet“ ist. Welche Unterschiede gibt es beim Verwahren von Bitcoin und wie können diese sicher vererbt werden. Dabei werden wir auch Begriffe wie PrivateKey, PublicKey und Seed kennenlernen und wie diese zusammenspielen. Und nein- sie müssen für diesen Kurs kein Informatikstudium besitzen!
Bitcoin ist interdisziplinär! Und wer anfängt sich damit zu beschäftigen wird schnell feststellen, dass es mehrere hundert Stunden benötigt, um Bitcoin zu verstehen.
Deshalb werden Sie von mir in diesem Kurs leicht verständlich an das Thema herangeführt. Sie erhalten dabei Kenntnis von den Grundbegriffen, der Funktion und der Verwendung von Bitcoin.
',
]); ]);
$course->syncTagsWithType(['Für Unternehmen'], 'course'); $course->syncTagsWithType(['Für Unternehmen'], 'course');
$course->categories() $course->categories()
@@ -279,6 +318,7 @@ class DatabaseSeeder extends Seeder
'value' => 'https://www.youtube.com/watch?v=Oztd2Sja4k0', 'value' => 'https://www.youtube.com/watch?v=Oztd2Sja4k0',
'created_by' => 1, 'created_by' => 1,
]); ]);
$libraryItem->setStatus('published');
$libraryItem->syncTagsWithType(['Bitcoin'], 'library_item'); $libraryItem->syncTagsWithType(['Bitcoin'], 'library_item');
$library->libraryItems() $library->libraryItems()
->attach($libraryItem); ->attach($libraryItem);
@@ -295,6 +335,7 @@ class DatabaseSeeder extends Seeder
'value' => 'https://aprycot.media/blog/liebe-krypto-und-fiat-bros/', 'value' => 'https://aprycot.media/blog/liebe-krypto-und-fiat-bros/',
'created_by' => 1, 'created_by' => 1,
]); ]);
$libraryItem->setStatus('published');
$libraryItem->syncTagsWithType(['Bitcoin'], 'library_item'); $libraryItem->syncTagsWithType(['Bitcoin'], 'library_item');
$library->libraryItems() $library->libraryItems()
->attach($libraryItem); ->attach($libraryItem);
@@ -311,6 +352,7 @@ class DatabaseSeeder extends Seeder
'value' => 'https://www.youtube.com/watch?v=C7ynm0Zkwfk', 'value' => 'https://www.youtube.com/watch?v=C7ynm0Zkwfk',
'created_by' => 1, 'created_by' => 1,
]); ]);
$libraryItem->setStatus('published');
$libraryItem->syncTagsWithType(['Proof of Work'], 'library_item'); $libraryItem->syncTagsWithType(['Proof of Work'], 'library_item');
$library->libraryItems() $library->libraryItems()
->attach($libraryItem); ->attach($libraryItem);
@@ -328,6 +370,7 @@ class DatabaseSeeder extends Seeder
'value' => null, 'value' => null,
'created_by' => 1, 'created_by' => 1,
]); ]);
$libraryItem->setStatus('published');
$libraryItem->syncTagsWithType(['Präsentationen'], 'library_item'); $libraryItem->syncTagsWithType(['Präsentationen'], 'library_item');
$nonPublicLibrary->libraryItems() $nonPublicLibrary->libraryItems()
->attach($libraryItem); ->attach($libraryItem);

View File

@@ -7,6 +7,7 @@
"build-start-prod": "cd nova-components/Start && npm run prod" "build-start-prod": "cd nova-components/Start && npm run prod"
}, },
"devDependencies": { "devDependencies": {
"@alpinejs/collapse": "^3.10.5",
"@tailwindcss/forms": "^0.5.2", "@tailwindcss/forms": "^0.5.2",
"@tailwindcss/typography": "^0.5.0", "@tailwindcss/typography": "^0.5.0",
"alpinejs": "^3.0.6", "alpinejs": "^3.0.6",

View File

@@ -1,7 +1,9 @@
import './bootstrap'; import './bootstrap';
import Alpine from 'alpinejs'; import Alpine from 'alpinejs';
import collapse from '@alpinejs/collapse'
window.Alpine = Alpine; window.Alpine = Alpine;
Alpine.plugin(collapse)
Alpine.start(); Alpine.start();

View File

@@ -622,5 +622,18 @@
"nova-spatie-permissions::lang.display_names\": \"": "", "nova-spatie-permissions::lang.display_names\": \"": "",
"PlebArt": "", "PlebArt": "",
"Highscore Table": "Highscore-Tabelle", "Highscore Table": "Highscore-Tabelle",
"Hall of fame of our honorable plebs": "Hall of fame unserer Plebs" "Hall of fame of our honorable plebs": "Hall of fame unserer Plebs",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"Back": "",
"By lecturer": "Nach Dozent",
"All courses of :name": "Alle Kurse von :name",
"Here you can see all events of :name.": "Hier siehst du alle Kurs-Termine von :name.",
"This is the introduction text that is shown on the landing page.": "Das ist der Text, der auf der Landing-Page des Dozenten.",
"This is the subtitle on the landing page.": "Das ist der Untertitel auf der Landing-Page des Dozenten.",
"Subtitle": "Untertitel auf der Landing-Page",
"Intro": "Intro auf der Landing-Page"
} }

View File

@@ -614,5 +614,18 @@
"Venues in the surrounding area.": "", "Venues in the surrounding area.": "",
"PlebArt": "", "PlebArt": "",
"Highscore Table": "", "Highscore Table": "",
"Hall of fame of our honorable plebs": "" "Hall of fame of our honorable plebs": "",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"Back": "",
"By lecturer": "",
"All courses of :name": "",
"Here you can see all events of :name.": "",
"This is the introduction text that is shown on the landing page.": "",
"This is the subtitle on the landing page.": "",
"Subtitle": "",
"Intro": ""
} }

View File

@@ -610,5 +610,17 @@
"World map of meetups": "", "World map of meetups": "",
"Dates for courses about Bitcoin.": "", "Dates for courses about Bitcoin.": "",
"Lecturers in the surrounding area.": "", "Lecturers in the surrounding area.": "",
"Venues in the surrounding area.": "" "Venues in the surrounding area.": "",
"Highscore Table": "",
"Hall of fame of our honorable plebs": "",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"PlebArt": "",
"Back": "",
"By lecturer": "",
"All courses of this lecturer": "",
"Here you can see all events of this lecturer.": ""
} }

View File

@@ -610,5 +610,17 @@
"World map of meetups": "", "World map of meetups": "",
"Dates for courses about Bitcoin.": "", "Dates for courses about Bitcoin.": "",
"Lecturers in the surrounding area.": "", "Lecturers in the surrounding area.": "",
"Venues in the surrounding area.": "" "Venues in the surrounding area.": "",
"Highscore Table": "",
"Hall of fame of our honorable plebs": "",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"PlebArt": "",
"Back": "",
"By lecturer": "",
"All courses of this lecturer": "",
"Here you can see all events of this lecturer.": ""
} }

View File

@@ -610,5 +610,17 @@
"World map of meetups": "", "World map of meetups": "",
"Dates for courses about Bitcoin.": "", "Dates for courses about Bitcoin.": "",
"Lecturers in the surrounding area.": "", "Lecturers in the surrounding area.": "",
"Venues in the surrounding area.": "" "Venues in the surrounding area.": "",
"Highscore Table": "",
"Hall of fame of our honorable plebs": "",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"PlebArt": "",
"Back": "",
"By lecturer": "",
"All courses of this lecturer": "",
"Here you can see all events of this lecturer.": ""
} }

View File

@@ -610,5 +610,17 @@
"World map of meetups": "", "World map of meetups": "",
"Dates for courses about Bitcoin.": "", "Dates for courses about Bitcoin.": "",
"Lecturers in the surrounding area.": "", "Lecturers in the surrounding area.": "",
"Venues in the surrounding area.": "" "Venues in the surrounding area.": "",
"Highscore Table": "",
"Hall of fame of our honorable plebs": "",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"PlebArt": "",
"Back": "",
"By lecturer": "",
"All courses of this lecturer": "",
"Here you can see all events of this lecturer.": ""
} }

View File

@@ -610,5 +610,17 @@
"World map of meetups": "", "World map of meetups": "",
"Dates for courses about Bitcoin.": "", "Dates for courses about Bitcoin.": "",
"Lecturers in the surrounding area.": "", "Lecturers in the surrounding area.": "",
"Venues in the surrounding area.": "" "Venues in the surrounding area.": "",
"Highscore Table": "",
"Hall of fame of our honorable plebs": "",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"PlebArt": "",
"Back": "",
"By lecturer": "",
"All courses of this lecturer": "",
"Here you can see all events of this lecturer.": ""
} }

View File

@@ -610,5 +610,17 @@
"World map of meetups": "", "World map of meetups": "",
"Dates for courses about Bitcoin.": "", "Dates for courses about Bitcoin.": "",
"Lecturers in the surrounding area.": "", "Lecturers in the surrounding area.": "",
"Venues in the surrounding area.": "" "Venues in the surrounding area.": "",
"Highscore Table": "",
"Hall of fame of our honorable plebs": "",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"PlebArt": "",
"Back": "",
"By lecturer": "",
"All courses of this lecturer": "",
"Here you can see all events of this lecturer.": ""
} }

View File

@@ -610,5 +610,17 @@
"World map of meetups": "", "World map of meetups": "",
"Dates for courses about Bitcoin.": "", "Dates for courses about Bitcoin.": "",
"Lecturers in the surrounding area.": "", "Lecturers in the surrounding area.": "",
"Venues in the surrounding area.": "" "Venues in the surrounding area.": "",
"Highscore Table": "",
"Hall of fame of our honorable plebs": "",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"PlebArt": "",
"Back": "",
"By lecturer": "",
"All courses of this lecturer": "",
"Here you can see all events of this lecturer.": ""
} }

View File

@@ -584,5 +584,17 @@
"World map of meetups": "", "World map of meetups": "",
"Dates for courses about Bitcoin.": "", "Dates for courses about Bitcoin.": "",
"Lecturers in the surrounding area.": "", "Lecturers in the surrounding area.": "",
"Venues in the surrounding area.": "" "Venues in the surrounding area.": "",
"Highscore Table": "",
"Hall of fame of our honorable plebs": "",
"Perimeter search bookcase :name (25km)": "",
"Show landing page": "",
"Orange pilled": "",
"Points": "",
"Changelog": "",
"PlebArt": "",
"Back": "",
"By lecturer": "",
"All courses of this lecturer": "",
"Here you can see all events of this lecturer.": ""
} }

View File

@@ -12,15 +12,21 @@
</x-button> </x-button>
@endif @endif
@if($row->library_items_count > 0) @if($row->library_items_count > 0)
<x-button amber wire:click="lecturerSearch({{ $row->id }})"> <x-button amber wire:click="lecturerSearch({{ $row->id }}, false)">
<i class="fa fa-thin fa-book mr-2"></i> <i class="fa fa-thin fa-book mr-2"></i>
{{ __('Show content') }} ({{ $row->library_items_count }}) {{ __('Show content') }} ({{ $row->library_items_count }})
</x-button> </x-button>
@endif @endif
@if($row->library_items_count < 1) @if($row->library_items_count < 1)
<x-button outlined wire:click="lecturerSearch({{ $row->id }})"> <x-button outlined wire:click="lecturerSearch({{ $row->id }}, false)">
<i class="fa fa-thin fa-book mr-2"></i> <i class="fa fa-thin fa-book mr-2"></i>
{{ __('Show content') }} ({{ $row->library_items_count }}) {{ __('Show content') }} ({{ $row->library_items_count }})
</x-button> </x-button>
@endif @endif
<x-button
:href="route('school.landingPage.lecturer', ['country' => $country, 'lecturer' => $row->id])"
amber>
<i class="fa fa-thin fa-browser mr-2"></i>
{{ __('Show landing page') }}
</x-button>
</div> </div>

View File

@@ -0,0 +1,186 @@
<div class="bg-21gray flex flex-col h-screen justify-between">
{{-- MAIN --}}
<section class="w-full mb-12 mt-8">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4 flex flex-col sm:flex-row">
<div class="flex flex-col sm:flex-row sm:space-x-6">
<div class="flex flex-col">
<h1 class="mb-6 text-5xl font-extrabold leading-none tracking-normal text-gray-200 sm:text-6xl md:text-6xl lg:text-7xl md:tracking-tight">
<span
class="text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200">{{ $lecturer->name }}</span><br
class="lg:block hidden">
{{ $lecturer->subtitle }}
</h1>
<div class="px-0 mb-6 text-lg text-gray-600 md:text-xl">
{{ $lecturer->intro }}
</div>
</div>
<div class="p-4">
<img class="max-h-64" src="{{ $lecturer->getFirstMediaUrl('avatar') }}" alt="Avatar">
</div>
</div>
</div>
<section class="h-auto px-10 py-16">
<div class="max-w-3xl mx-auto space-y-4 sm:text-center">
<h2 class="text-4xl sm:text-5xl font-semibold text-white">
{{ __('Courses') }}
</h2>
<p class="text-gray-400 text-lg sm:text-xl leading-normal">
{{ __('All courses of :name', ['name' => $lecturer->name]) }}
</p>
</div>
</section>
<ul role="list" class="grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4">
@foreach($courseEvents as $courseEvent)
@php
$activeClass = $activeEvent === $courseEvent->id ? 'bg-gradient-to-r from-amber-800 via-amber-600 to-amber-500' : 'bg-amber-500';
@endphp
<li id="courseEventId_{{ $courseEvent->id }}" class="{{ $activeClass }} col-span-1 flex flex-col divide-y divide-gray-200 rounded-lg text-center shadow-2xl">
<div class="flex flex-1 flex-col p-8">
<img class="mx-auto h-32 w-32 object-cover flex-shrink-0 rounded"
src="{{ $courseEvent->course->getFirstMediaUrl('logo') }}"
alt="{{ $courseEvent->course->name }}">
<h3 class="mt-6 text-xl font-medium text-gray-900 truncate">{{ $courseEvent->from->asDate() }}</h3>
<h3 class="mt-6 text-xl font-medium text-gray-900 truncate">{{ $courseEvent->venue->city->name }}</h3>
<h3 class="mt-6 text-xl font-medium text-gray-900 truncate">{{ $courseEvent->venue->name }}</h3>
<dl class="mt-1 flex flex-grow flex-col justify-between">
<div x-data="{ active: 2 }" class="mx-auto max-w-3xl w-full space-y-4">
<div x-data="{
id: 1,
get expanded() {
return this.active === this.id
},
set expanded(value) {
this.active = value ? this.id : null
},
}"
role="region" class="rounded-lg bg-white shadow">
<h2>
<button
x-on:click="expanded = !expanded"
:aria-expanded="expanded"
class="flex w-full items-center justify-between px-6 py-4 text-xl font-bold"
>
<span>{{ __('Description') }}</span>
<span x-show="expanded" aria-hidden="true" class="ml-4">&minus;</span>
<span x-show="!expanded" aria-hidden="true" class="ml-4">&plus;</span>
</button>
</h2>
<div x-show="expanded" x-collapse>
<div class="px-6 pb-4 text-left">{!! nl2br($courseEvent->course->description) !!}</div>
</div>
</div>
</div>
<dd class="mt-3 flex flex-col space-y-1">
@foreach($courseEvent->course->tags as $tag)
<span
class="rounded-full bg-21gray px-2 py-1 text-xs font-medium text-gray-200">{{ $tag->name }}</span>
@endforeach
</dd>
</dl>
</div>
<div>
<div class="-mt-px flex divide-x divide-gray-200">
<div class="-ml-px flex w-0 flex-1">
<a target="_blank" href="{{ $courseEvent->link }}"
class="relative inline-flex w-0 flex-1 items-center justify-center rounded-br-lg border border-transparent py-4 text-sm font-medium text-gray-700 hover:text-gray-500">
<i class="text-gray-100 text-2xl fa-thin fa-right-to-bracket"></i>
<span class="ml-3 text-gray-100 text-2xl">{{ __('Register') }}</span>
</a>
</div>
</div>
</div>
</li>
@endforeach
</ul>
<section class="h-auto px-10 py-16">
<div class="max-w-3xl mx-auto space-y-4 sm:text-center">
<h2 class="text-4xl sm:text-5xl font-semibold text-white">
{{ __('Events') }}
</h2>
<p class="text-gray-400 text-lg sm:text-xl leading-normal">
{{ __('Here you can see all events of :name.', ['name' => $lecturer->name]) }}
</p>
</div>
</section>
<div class="w-full">
@php
$locale = \Illuminate\Support\Facades\Cookie::get('lang', 'de');
@endphp
<link rel="stylesheet" type="text/css"
href="https://unpkg.com/js-year-calendar@latest/dist/js-year-calendar.min.css"/>
<script src="https://unpkg.com/js-year-calendar@latest/dist/js-year-calendar.min.js"></script>
<script src="https://unpkg.com/js-year-calendar@latest/locales/js-year-calendar.{{ $locale }}.js"></script>
<style>
.calendar .calendar-header {
background-color: #F7931A;
color: white;
border: 0;
}
.calendar table.month th.month-title {
color: #F7931A;
}
.calendar table.month th.day-header {
color: #fff;
}
.calendar table.month td.day .day-content {
color: #fff;
}
.calendar .calendar-header table th:hover {
background: #222;
}
</style>
<div
wire:ignore
x-data="{
calendar: null,
init() {
let events = {{ Js::from($events) }};
events = events.map(function(e){
return {id: e.id, startDate: new Date(e.startDate), endDate: new Date(e.endDate), location: e.location, description: e.description}
})
new Calendar(this.$refs.calendar, {
style: 'background',
language: '{{ $locale }}',
startYear: {{ date('Y') }},
dataSource: events,
yearChanged: function(e) {
@this.set('year', e.currentYear);
},
clickDay: function(e) {
if(e.events.length > 0) {
$wire.call('showEvent', e.events[0].id);
document.getElementById('courseEventId_'+e.events[0].id).scrollIntoView();
}
},
});
},
}"
>
<div x-ref="calendar"></div>
</div>
<div class="p-4 w-full flex justify-end">
<x-button :href="route('welcome')" primary lg class="whitespace-nowrap">
<i class="fa fa-thin fa-arrow-left mr-2"></i>
{{ __('Back') }}
</x-button>
</div>
</div>
</section>
{{-- FOOTER --}}
<livewire:frontend.footer/>
</div>

View File

@@ -30,6 +30,9 @@ Route::middleware([])
Route::get('/event', \App\Http\Livewire\School\EventTable::class) Route::get('/event', \App\Http\Livewire\School\EventTable::class)
->name('table.event'); ->name('table.event');
Route::get('/{lecturer}', \App\Http\Livewire\School\LecturerLandingPage::class)
->name('landingPage.lecturer');
}); });
/* /*

View File

@@ -2,6 +2,11 @@
# yarn lockfile v1 # yarn lockfile v1
"@alpinejs/collapse@^3.10.5":
version "3.10.5"
resolved "https://registry.yarnpkg.com/@alpinejs/collapse/-/collapse-3.10.5.tgz#97adf33161e8af475edb93556b27e5b7eb949198"
integrity sha512-ucpZNm+K9GBlmCR2WK5ket67xvwUH/KDzXc5bJSsxAAucrQuhdXuZN5a9kuqBfrm3x9t/bV6CGXEqNkrZ2/LRA==
"@esbuild/android-arm@0.15.16": "@esbuild/android-arm@0.15.16":
version "0.15.16" version "0.15.16"
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.16.tgz#0642926178b15e3d1545efae6eee05c4f3451d15" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.16.tgz#0642926178b15e3d1545efae6eee05c4f3451d15"