add meetup event landing page

This commit is contained in:
HolgerHatGarKeineNode
2023-02-06 18:49:38 +01:00
parent a24618e074
commit 62a18bac28
24 changed files with 781 additions and 256 deletions

View File

@@ -0,0 +1,152 @@
<?php
namespace App\Http\Livewire\Meetup;
use App\Models\Country;
use App\Models\Meetup;
use App\Models\MeetupEvent;
use App\Rules\UniqueAttendeeName;
use Livewire\Component;
class LandingPageEvent extends Component
{
public MeetupEvent $meetupEvent;
public Country $country;
public ?Meetup $meetup = null;
public bool $willShowUp = false;
public bool $perhapsShowUp = false;
public string $name = '';
public function rules()
{
return [
'name' => [
'required',
new UniqueAttendeeName($this->meetupEvent)
],
];
}
public function mount()
{
$this->meetupEvent->load('meetup.users:id');
$this->meetup = $this->meetupEvent->meetup;
$this->checkShowUp();
}
public function checkShowUp()
{
$attendees = collect($this->meetupEvent->attendees);
$mightAttendees = collect($this->meetupEvent->might_attendees);
if (auth()->check() && $attendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) {
$this->name = str($attendees->filter(fn($value) => str($value)->contains('id_'.auth()->id()))
->first())
->after('|')
->toString();
$this->willShowUp = true;
}
if (!auth()->check() && $attendees->contains(fn($value) => str($value)->contains('anon_'.session()->getId()))) {
$this->name = str($attendees->filter(fn($value) => str($value)->contains('anon_'.session()->getId()))
->first())
->after('|')
->toString();
$this->willShowUp = true;
}
if (auth()->check() && $mightAttendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) {
$this->name = str($mightAttendees->filter(fn($value) => str($value)->contains('id_'.auth()->id()))
->first())
->after('|')
->toString();
$this->perhapsShowUp = true;
}
if (!auth()->check() && $mightAttendees->contains(fn($value
) => str($value)->contains('anon_'.session()->getId()))) {
$this->name = str($mightAttendees->filter(fn($value) => str($value)->contains('anon_'.session()->getId()))
->first())
->after('|')
->toString();
$this->perhapsShowUp = true;
}
}
public function cannotCome()
{
$attendees = collect($this->meetupEvent->attendees);
$mightAttendees = collect($this->meetupEvent->might_attendees);
if (auth()->check() && $attendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) {
$attendees = $attendees->filter(fn($value) => !str($value)->contains('id_'.auth()->id()));
$this->willShowUp = false;
}
if (!auth()->check() && $attendees->contains(fn($value) => str($value)->contains('anon_'.session()->getId()))) {
$attendees = $attendees->filter(fn($value) => !str($value)->contains('anon_'.session()->getId()));
$this->willShowUp = false;
}
if (auth()->check() && $mightAttendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) {
$mightAttendees = $mightAttendees->filter(fn($value) => !str($value)->contains('id_'.auth()->id()));
$this->perhapsShowUp = false;
}
if (!auth()->check() && $mightAttendees->contains(fn($value
) => str($value)->contains('anon_'.session()->getId()))) {
$mightAttendees = $mightAttendees->filter(fn($value) => !str($value)->contains('anon_'.session()->getId()));
$this->perhapsShowUp = false;
}
$this->meetupEvent->update([
'attendees' => $attendees->toArray(),
'might_attendees' => $mightAttendees->toArray(),
]);
}
public function attend()
{
$this->validate();
$attendees = collect($this->meetupEvent->attendees);
if (auth()->check() && !$attendees->contains('id_'.auth()->id().'|'.$this->name)) {
$attendees->push('id_'.auth()->id().'|'.$this->name);
$this->willShowUp = true;
}
if (!auth()->check() && !$attendees->contains('anon_'.session()->getId().'|'.$this->name)) {
$attendees->push('anon_'.session()->getId().'|'.$this->name);
$this->willShowUp = true;
}
$this->meetupEvent->update([
'attendees' => $attendees->toArray(),
]);
}
public function mightAttend()
{
$this->validate();
$mightAttendees = collect($this->meetupEvent->might_attendees);
if (auth()->check() && !$mightAttendees->contains('id_'.auth()->id().'|'.$this->name)) {
$mightAttendees->push('id_'.auth()->id().'|'.$this->name);
$this->perhapsShowUp = true;
}
if (!auth()->check() && !$mightAttendees->contains('anon_'.session()->getId().'|'.$this->name)) {
$mightAttendees->push('anon_'.session()->getId().'|'.$this->name);
$this->perhapsShowUp = true;
}
$this->meetupEvent->update([
'might_attendees' => $mightAttendees->toArray(),
]);
}
public function render()
{
return view('livewire.meetup.landing-page-event');
}
}

View File

@@ -17,9 +17,8 @@ class MeetupEventTable extends DataTableComponent
public function configure(): void
{
$this->setPrimaryKey('id')
->setAdditionalSelects(['id'])
->setAdditionalSelects(['meetup_events.id','meetup_events.meetup_id'])
->setDefaultSort('start', 'asc')
->setAdditionalSelects(['meetup_events.meetup_id'])
->setThAttributes(function (Column $column) {
return [
'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400',

View File

@@ -24,6 +24,8 @@ class MeetupEvent extends Model
'id' => 'integer',
'meetup_id' => 'integer',
'start' => 'datetime',
'attendees' => 'array',
'might_attendees' => 'array',
];
protected static function booted()

View File

@@ -0,0 +1,45 @@
<?php
namespace App\Rules;
use App\Models\MeetupEvent;
use Illuminate\Contracts\Validation\InvokableRule;
class UniqueAttendeeName implements InvokableRule
{
/**
* Create a new rule instance.
* @return void
*/
public function __construct(public MeetupEvent $meetupEvent)
{
//
}
public function __invoke($attribute, $value, $fail)
{
$this->meetupEvent->refresh();
$attendees = collect($this->meetupEvent->attendees);
$mightAttendees = collect($this->meetupEvent->might_attendees);
$isInAttendees = $attendees
->contains(fn($v) => str($v)
->after('|')
->lower()
->toString() === str($value)
->lower()
->toString());
$isInMightAttendees = $mightAttendees
->contains(fn($v) => str($v)
->after('|')
->lower()
->toString() === str($value)
->lower()
->toString());
if ($isInAttendees) {
$fail('The name is already taken.');
}
if ($isInMightAttendees) {
$fail('The name is already taken.');
}
}
}

26
composer.lock generated
View File

@@ -4526,16 +4526,16 @@
},
{
"name": "monolog/monolog",
"version": "2.8.0",
"version": "2.9.1",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "720488632c590286b88b80e62aa3d3d551ad4a50"
"reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50",
"reference": "720488632c590286b88b80e62aa3d3d551ad4a50",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
"reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
"shasum": ""
},
"require": {
@@ -4550,7 +4550,7 @@
"doctrine/couchdb": "~1.0@dev",
"elasticsearch/elasticsearch": "^7 || ^8",
"ext-json": "*",
"graylog2/gelf-php": "^1.4.2",
"graylog2/gelf-php": "^1.4.2 || ^2@dev",
"guzzlehttp/guzzle": "^7.4",
"guzzlehttp/psr7": "^2.2",
"mongodb/mongodb": "^1.8",
@@ -4612,7 +4612,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/2.8.0"
"source": "https://github.com/Seldaek/monolog/tree/2.9.1"
},
"funding": [
{
@@ -4624,7 +4624,7 @@
"type": "tidelift"
}
],
"time": "2022-07-24T11:55:47+00:00"
"time": "2023-02-06T13:44:46+00:00"
},
{
"name": "myclabs/php-enum",
@@ -9137,16 +9137,16 @@
},
{
"name": "spatie/laravel-ray",
"version": "1.32.1",
"version": "1.32.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-ray.git",
"reference": "8ecf893a7af385e72b1f63cbd318fb00e2dca340"
"reference": "0c28a8274ec261a2857b4318b6f934af98024395"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-ray/zipball/8ecf893a7af385e72b1f63cbd318fb00e2dca340",
"reference": "8ecf893a7af385e72b1f63cbd318fb00e2dca340",
"url": "https://api.github.com/repos/spatie/laravel-ray/zipball/0c28a8274ec261a2857b4318b6f934af98024395",
"reference": "0c28a8274ec261a2857b4318b6f934af98024395",
"shasum": ""
},
"require": {
@@ -9206,7 +9206,7 @@
],
"support": {
"issues": "https://github.com/spatie/laravel-ray/issues",
"source": "https://github.com/spatie/laravel-ray/tree/1.32.1"
"source": "https://github.com/spatie/laravel-ray/tree/1.32.2"
},
"funding": [
{
@@ -9218,7 +9218,7 @@
"type": "other"
}
],
"time": "2023-01-26T13:02:05+00:00"
"time": "2023-02-06T09:46:50+00:00"
},
{
"name": "spatie/laravel-sluggable",

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('meetup_events', function (Blueprint $table) {
$table->json('attendees')
->nullable();
$table->json('might_attendees')
->nullable();
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
Schema::table('meetup_events', function (Blueprint $table) {
//
});
}
};

View File

@@ -273,10 +273,10 @@ Deshalb werden Sie von mir in diesem Kurs leicht verständlich an das Thema hera
'venue_id' => 2,
'link' => 'https://einundzwanzig.space',
'from' => now()
->addDays(3)
->addDays(31)
->startOfDay(),
'to' => now()
->addDays(3)
->addDays(31)
->startOfDay()
->addHour(),
'created_by' => 1,
@@ -387,11 +387,12 @@ Deshalb werden Sie von mir in diesem Kurs leicht verständlich an das Thema hera
'name' => 'Einundzwanzig Hessen',
'telegram_link' => 'https://t.me/EinundzwanzigHessen',
'created_by' => 1,
'intro' => fake()->text(80),
]);
MeetupEvent::create([
'meetup_id' => 1,
'start' => now()
->addDays(2)
->addDays(31)
->startOfDay()
->addHours(20),
'location' => 'Einundzwanzig Kempten',
@@ -415,54 +416,63 @@ Deshalb werden Sie von mir in diesem Kurs leicht verständlich an das Thema hera
'name' => 'Einundzwanzig ' . str()->random(5),
'telegram_link' => 'https://t.me/EinundzwanzigKempten',
'created_by' => 1,
'intro' => fake()->text(80),
]);
Meetup::create([
'city_id' => 3,
'name' => 'Einundzwanzig ' . str()->random(5),
'telegram_link' => 'https://t.me/EinundzwanzigKempten',
'created_by' => 1,
'intro' => fake()->text(80),
]);
Meetup::create([
'city_id' => 1,
'name' => 'Einundzwanzig ' . str()->random(5),
'telegram_link' => 'https://t.me/EinundzwanzigKempten',
'created_by' => 1,
'intro' => fake()->text(80),
]);
Meetup::create([
'city_id' => 1,
'name' => 'Einundzwanzig ' . str()->random(5),
'telegram_link' => 'https://t.me/EinundzwanzigKempten',
'created_by' => 1,
'intro' => fake()->text(80),
]);
Meetup::create([
'city_id' => 1,
'name' => 'Einundzwanzig ' . str()->random(5),
'telegram_link' => 'https://t.me/EinundzwanzigKempten',
'created_by' => 1,
'intro' => fake()->text(80),
]);
Meetup::create([
'city_id' => 1,
'name' => 'Einundzwanzig ' . str()->random(5),
'telegram_link' => 'https://t.me/EinundzwanzigKempten',
'created_by' => 1,
'intro' => fake()->text(80),
]);
Meetup::create([
'city_id' => 1,
'name' => 'Einundzwanzig ' . str()->random(5),
'telegram_link' => 'https://t.me/EinundzwanzigKempten',
'created_by' => 1,
'intro' => fake()->text(80),
]);
Meetup::create([
'city_id' => 1,
'name' => 'Einundzwanzig ' . str()->random(5),
'telegram_link' => 'https://t.me/EinundzwanzigKempten',
'created_by' => 1,
'intro' => fake()->text(80),
]);
Meetup::create([
'city_id' => 1,
'name' => 'Einundzwanzig ' . str()->random(5),
'telegram_link' => 'https://t.me/EinundzwanzigKempten',
'created_by' => 1,
'intro' => fake()->text(80),
]);
BitcoinEvent::create([
'venue_id' => 4,

View File

@@ -698,5 +698,14 @@
"Open on Youtube": "Auf Youtube öffnen",
"You do not have permission to view the page.": "Du hast keine Berechtigung, die Seite anzuzeigen.",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "Bitte kontaktiere die Administratoren für neue Dateitypen, ansonsten packe die Dateien in ein ZIP! (Derzeit: PDF, ZIP)",
"load more...": ""
"load more...": "laden mehr...",
"When": "Wann",
"Where": "Wo",
"Event-Link": "Event-Link",
"Confirmations": "Teilnahmebestätigungen",
"Perhaps": "Vielleicht",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "Dein eindeutiger Name, damit wir die Anzahl der Teilnehmer korrekt zählen können (muss nicht unbedingt dein echter Name sein)",
"I will show up": "Ich sage zu",
"Unfortunately I can\\'t come": "Leider kann ich nicht kommen",
"Might attend": "Vielleicht komme ich"
}

View File

@@ -1,6 +1,6 @@
<?php
return array (
return [
'accepted' => ':Attribute muss akzeptiert werden.',
'accepted_if' => ':Attribute muss akzeptiert werden, wenn :other :value ist.',
'active_url' => ':Attribute ist keine gültige Internet-Adresse.',
@@ -12,7 +12,7 @@ return array (
'array' => ':Attribute muss ein Array sein.',
'attached' => ':Attribute ist bereits angehängt.',
'attributes' =>
array (
[
'address' => 'adresse',
'age' => 'alter',
'amount' => 'amount',
@@ -84,16 +84,16 @@ return array (
'updated_at' => 'aktualisiert am',
'username' => 'benutzername',
'year' => 'jahr',
),
],
'before' => ':Attribute muss ein Datum vor :date sein.',
'before_or_equal' => ':Attribute muss ein Datum vor :date oder gleich :date sein.',
'between' =>
array (
[
'array' => ':Attribute muss zwischen :min & :max Elemente haben.',
'file' => ':Attribute muss zwischen :min & :max Kilobytes groß sein.',
'numeric' => ':Attribute muss zwischen :min & :max liegen.',
'string' => ':Attribute muss zwischen :min & :max Zeichen lang sein.',
),
],
'boolean' => ':Attribute muss entweder \'true\' oder \'false\' sein.',
'confirmed' => ':Attribute stimmt nicht mit der Bestätigung überein.',
'current_password' => 'Das Passwort ist falsch.',
@@ -116,19 +116,19 @@ return array (
'file' => ':Attribute muss eine Datei sein.',
'filled' => ':Attribute muss ausgefüllt sein.',
'gt' =>
array (
[
'array' => ':Attribute muss mehr als :value Elemente haben.',
'file' => ':Attribute muss größer als :value Kilobytes sein.',
'numeric' => ':Attribute muss größer als :value sein.',
'string' => ':Attribute muss länger als :value Zeichen sein.',
),
],
'gte' =>
array (
[
'array' => ':Attribute muss mindestens :value Elemente haben.',
'file' => ':Attribute muss größer oder gleich :value Kilobytes sein.',
'numeric' => ':Attribute muss größer oder gleich :value sein.',
'string' => ':Attribute muss mindestens :value Zeichen lang sein.',
),
],
'image' => ':Attribute muss ein Bild sein.',
'in' => 'Der gewählte Wert für :attribute ist ungültig.',
'in_array' => 'Der gewählte Wert für :attribute kommt nicht in :other vor.',
@@ -139,50 +139,50 @@ return array (
'json' => ':Attribute muss ein gültiger JSON-String sein.',
'lowercase' => ':Attribute muss in Kleinbuchstaben sein.',
'lt' =>
array (
[
'array' => ':Attribute muss weniger als :value Elemente haben.',
'file' => ':Attribute muss kleiner als :value Kilobytes sein.',
'numeric' => ':Attribute muss kleiner als :value sein.',
'string' => ':Attribute muss kürzer als :value Zeichen sein.',
),
],
'lte' =>
array (
[
'array' => ':Attribute darf maximal :value Elemente haben.',
'file' => ':Attribute muss kleiner oder gleich :value Kilobytes sein.',
'numeric' => ':Attribute muss kleiner oder gleich :value sein.',
'string' => ':Attribute darf maximal :value Zeichen lang sein.',
),
],
'mac_address' => 'Der Wert muss eine gültige MAC-Adresse sein.',
'max' =>
array (
[
'array' => ':Attribute darf maximal :max Elemente haben.',
'file' => ':Attribute darf maximal :max Kilobytes groß sein.',
'numeric' => ':Attribute darf maximal :max sein.',
'string' => ':Attribute darf maximal :max Zeichen haben.',
),
],
'max_digits' => ':Attribute darf maximal :max Ziffern lang sein.',
'mimes' => ':Attribute muss den Dateityp :values haben.',
'mimetypes' => ':Attribute muss den Dateityp :values haben.',
'min' =>
array (
[
'array' => ':Attribute muss mindestens :min Elemente haben.',
'file' => ':Attribute muss mindestens :min Kilobytes groß sein.',
'numeric' => ':Attribute muss mindestens :min sein.',
'string' => ':Attribute muss mindestens :min Zeichen lang sein.',
),
],
'min_digits' => ':Attribute muss mindestens :min Ziffern lang sein.',
'multiple_of' => ':Attribute muss ein Vielfaches von :value sein.',
'not_in' => 'Der gewählte Wert für :attribute ist ungültig.',
'not_regex' => ':Attribute hat ein ungültiges Format.',
'numeric' => ':Attribute muss eine Zahl sein.',
'password' =>
array (
[
'letters' => ':Attribute muss mindestens einen Buchstaben beinhalten.',
'mixed' => ':Attribute muss mindestens einen Großbuchstaben und einen Kleinbuchstaben beinhalten.',
'numbers' => ':Attribute muss mindestens eine Zahl beinhalten.',
'symbols' => ':Attribute muss mindestens ein Sonderzeichen beinhalten.',
'uncompromised' => ':Attribute wurde in einem Datenleck gefunden. Bitte wählen Sie ein anderes :attribute.',
),
],
'present' => ':Attribute muss vorhanden sein.',
'prohibited' => ':Attribute ist unzulässig.',
'prohibited_if' => ':Attribute ist unzulässig, wenn :other :value ist.',
@@ -201,12 +201,12 @@ return array (
'required_without_all' => ':Attribute muss ausgefüllt werden, wenn keines der Felder :values ausgefüllt wurde.',
'same' => ':Attribute und :other müssen übereinstimmen.',
'size' =>
array (
[
'array' => ':Attribute muss genau :size Elemente haben.',
'file' => ':Attribute muss :size Kilobyte groß sein.',
'numeric' => ':Attribute muss gleich :size sein.',
'string' => ':Attribute muss :size Zeichen lang sein.',
),
],
'starts_with' => ':Attribute muss mit einem der folgenden Anfänge aufweisen: :values',
'string' => ':Attribute muss ein String sein.',
'timezone' => ':Attribute muss eine gültige Zeitzone sein.',
@@ -215,4 +215,4 @@ return array (
'uppercase' => ':Attribute muss in Großbuchstaben sein.',
'url' => ':Attribute muss eine URL sein.',
'uuid' => ':Attribute muss ein UUID sein.',
);
];

View File

@@ -692,5 +692,14 @@
"Open on Youtube": "",
"You do not have permission to view the page.": "",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "",
"load more...": ""
"load more...": "",
"When": "",
"Where": "",
"Event-Link": "",
"Confirmations": "",
"Perhaps": "",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "",
"I will show up": "",
"Unfortunately I can\\'t come": "",
"Might attend": ""
}

View File

@@ -692,5 +692,14 @@
"Open on Youtube": "Abrir en Youtube",
"You do not have permission to view the page.": "No tienes permiso para ver la página.",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "Si deseas nuevos tipos de archivo, pónte en contacto con los administradores; de lo contrario, envíe los archivos en un ZIP. (Actualmente: PDF, ZIP)",
"load more...": ""
"load more...": "",
"When": "",
"Where": "",
"Event-Link": "",
"Confirmations": "",
"Perhaps": "",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "",
"I will show up": "",
"Unfortunately I can\\'t come": "",
"Might attend": ""
}

View File

@@ -693,5 +693,14 @@
"Open on Youtube": "",
"You do not have permission to view the page.": "",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "",
"load more...": ""
"load more...": "",
"When": "",
"Where": "",
"Event-Link": "",
"Confirmations": "",
"Perhaps": "",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "",
"I will show up": "",
"Unfortunately I can\\'t come": "",
"Might attend": ""
}

View File

@@ -693,5 +693,14 @@
"Open on Youtube": "",
"You do not have permission to view the page.": "",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "",
"load more...": ""
"load more...": "",
"When": "",
"Where": "",
"Event-Link": "",
"Confirmations": "",
"Perhaps": "",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "",
"I will show up": "",
"Unfortunately I can\\'t come": "",
"Might attend": ""
}

View File

@@ -693,5 +693,14 @@
"Open on Youtube": "",
"You do not have permission to view the page.": "",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "",
"load more...": ""
"load more...": "",
"When": "",
"Where": "",
"Event-Link": "",
"Confirmations": "",
"Perhaps": "",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "",
"I will show up": "",
"Unfortunately I can\\'t come": "",
"Might attend": ""
}

View File

@@ -693,5 +693,14 @@
"Open on Youtube": "",
"You do not have permission to view the page.": "",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "",
"load more...": ""
"load more...": "",
"When": "",
"Where": "",
"Event-Link": "",
"Confirmations": "",
"Perhaps": "",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "",
"I will show up": "",
"Unfortunately I can\\'t come": "",
"Might attend": ""
}

View File

@@ -693,5 +693,14 @@
"Open on Youtube": "",
"You do not have permission to view the page.": "",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "",
"load more...": ""
"load more...": "",
"When": "",
"Where": "",
"Event-Link": "",
"Confirmations": "",
"Perhaps": "",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "",
"I will show up": "",
"Unfortunately I can\\'t come": "",
"Might attend": ""
}

View File

@@ -693,5 +693,14 @@
"Open on Youtube": "",
"You do not have permission to view the page.": "",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "",
"load more...": ""
"load more...": "",
"When": "",
"Where": "",
"Event-Link": "",
"Confirmations": "",
"Perhaps": "",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "",
"I will show up": "",
"Unfortunately I can\\'t come": "",
"Might attend": ""
}

View File

@@ -667,5 +667,14 @@
"Open on Youtube": "",
"You do not have permission to view the page.": "",
"Please contact the admins for new file types, otherwise pack the files in a ZIP! (Currently: PDF, ZIP)": "",
"load more...": ""
"load more...": "",
"When": "",
"Where": "",
"Event-Link": "",
"Confirmations": "",
"Perhaps": "",
"Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)": "",
"I will show up": "",
"Unfortunately I can\\'t come": "",
"Might attend": ""
}

View File

@@ -1,9 +1,9 @@
<div class="flex flex-col space-y-1">
<div>
<x-button
black
primary
xs
:href="route('meetup.landing', ['country' => $country, 'meetup' => $row->meetup->slug])"
:href="route('meetup.event.landing', ['country' => $country, 'meetupEvent' => $row->id])"
>
<i class="fa fa-thin fa-browser mr-2"></i>
{{ __('Show landing page') }}

View File

@@ -12,8 +12,8 @@
<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">
@if(!str(request()->route()->getName())->contains('.view'))
<a href="{{ route('welcome', ['c' => $c]) }}"
@if(str(request()->route()->getName())->contains('event.landing'))
<a href="{{ route('meetup.table.meetupEvent', ['country' => $country]) }}"
class="text-gray-400 mr-5 font-medium leading-6 hover:text-gray-300">
{{ __('Back to the overview') }}
</a>
@@ -32,6 +32,11 @@
class="text-gray-400 mr-5 font-medium leading-6 hover:text-gray-300">
{{ __('Back to the overview') }}
</a>
@elseif(!str(request()->route()->getName())->contains('.view'))
<a href="{{ route('welcome', ['c' => $c]) }}"
class="text-gray-400 mr-5 font-medium leading-6 hover:text-gray-300">
{{ __('Back to the overview') }}
</a>
@endif
@if(str(request()->route()->getName())->contains('school.'))

View File

@@ -0,0 +1,182 @@
<div class="bg-21gray flex flex-col h-screen justify-between">
<livewire:frontend.header :country="null"/>
{{-- MAIN --}}
<section class="w-full mb-12 mt-2">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4 flex flex-col sm:flex-row">
<div class="relative py-4 sm:py-4">
<div class="lg:mx-auto lg:grid lg:max-w-7xl lg:grid-cols-2 lg:items-start lg:gap-24 lg:px-8">
<div class="relative sm:py-16 lg:py-0">
<div aria-hidden="true" class="hidden sm:block lg:absolute lg:inset-y-0 lg:right-0 lg:w-screen">
<div class="absolute inset-y-0 right-1/2 w-full rounded-r-3xl lg:right-72"></div>
<svg class="absolute top-8 left-1/2 -ml-3 lg:-right-8 lg:left-auto lg:top-12" width="404"
height="392" fill="none" viewBox="0 0 404 392">
<defs>
<pattern id="02f20b47-fd69-4224-a62a-4c9de5c763f7" x="0" y="0" width="20"
height="20" patternUnits="userSpaceOnUse">
<rect x="0" y="0" width="4" height="4" class="text-gray-200"
fill="currentColor"/>
</pattern>
</defs>
<rect width="404" height="392" fill="url(#02f20b47-fd69-4224-a62a-4c9de5c763f7)"/>
</svg>
</div>
<div class="relative mx-auto max-w-md px-6 sm:max-w-3xl lg:max-w-none lg:px-0 lg:py-20">
<!-- Testimonial card-->
<div class="relative overflow-hidden rounded-2xl pt-64 pb-10 shadow-xl">
<img class="absolute inset-0 h-full w-full object-cover"
src="{{ $meetup->getFirstMediaUrl('logo', 'preview') }}"
alt="">
<div class="absolute inset-0 bg-amber-500 mix-blend-multiply"></div>
<div
class="absolute inset-0 bg-gradient-to-t from-amber-600 via-amber-600 opacity-90"></div>
<div class="relative px-8">
<blockquote class="mt-8">
<div class="relative text-lg font-medium text-white md:flex-grow">
<p class="relative">{{ $meetup->intro }}</p>
</div>
<footer class="mt-4">
<p class="text-base font-semibold text-amber-200">{{ $meetup->users->count() }} {{ __('Plebs') }}</p>
</footer>
</blockquote>
</div>
</div>
</div>
</div>
<div class="relative mx-auto max-w-md px-6 sm:max-w-3xl lg:px-0">
<!-- Content area -->
<div class="pt-12 sm:pt-16 lg:pt-20">
<h2 class="text-3xl font-bold tracking-tight text-gray-200 sm:text-4xl">{{ $meetup->name }}</h2>
<div class="mt-6 space-y-6 text-gray-100">
<p class="font-bold text-xl">
{{ __('When') }}: {{ $meetupEvent->start->asDateTime() }}
</p>
<p class="font-bold text-xl">
{{ __('Where') }}: {{ $meetupEvent->location }}
</p>
<p>
{{ $meetupEvent->description }}
</p>
<div>
@if($meetupEvent->link)
<x-button
target="_blank"
:href="$meetupEvent->link"
primary lg class="mt-4 whitespace-nowrap">
<i class="fa fa-thin fa-external-link mr-2"></i>
{{ __('Event-Link') }}
</x-button>
@endif
</div>
</div>
<div class="mt-6 space-y-6 text-gray-100 flex flex-col space-y-2">
<div>
@if($meetup->telegram_link)
<x-button
target="_blank"
:href="$meetup->telegram_link"
secondary lg class="mt-4 whitespace-nowrap">
<i class="fa fa-thin fa-external-link mr-2"></i>
{{ __('Telegram-Link') }}
</x-button>
@endif
</div>
<div>
@if($meetup->webpage)
<x-button
target="_blank"
:href="$meetup->webpage"
secondary lg class="mt-4 whitespace-nowrap">
<i class="fa fa-thin fa-external-link mr-2"></i>
{{ __('Website') }}
</x-button>
@endif
</div>
<div>
@if($meetup->matrix_group)
<x-button
target="_blank"
:href="$meetup->matrix_group"
secondary lg class="mt-4 whitespace-nowrap">
<i class="fa fa-thin fa-people-group mr-2"></i>
{{ __('Matrix-Group') }}
</x-button>
@endif
</div>
<div>
@if($meetup->twitter_username)
<x-button
target="_blank"
:href="'https://twitter.com/'.$meetup->twitter_username"
secondary lg class="mt-4 whitespace-nowrap">
<i class="fa fa-thin fa-external-link mr-2"></i>
{{ __('Twitter') }}
</x-button>
@endif
</div>
</div>
</div>
<!-- Stats section -->
<div class="mt-10">
<dl class="grid grid-cols-2 gap-x-4 gap-y-8">
<div class="border-t-2 border-gray-100 pt-6">
<dt class="text-base font-medium text-gray-200">{{ __('Confirmations') }}</dt>
<dd class="text-3xl font-bold tracking-tight text-gray-300">{{ count($meetupEvent->attendees ?? []) }}</dd>
</div>
<div class="border-t-2 border-gray-100 pt-6">
<dt class="text-base font-medium text-gray-200">{{ __('Perhaps') }}</dt>
<dd class="text-3xl font-bold tracking-tight text-gray-300">{{ count($meetupEvent->might_attendees ?? []) }}</dd>
</div>
</dl>
<div class="mt-6">
<x-input
wire:model.debounce="name"
label="{{ __('Name') }}"
hint="{{ __('Your unique name so that we can count the number of participants correctly (does not necessarily have to be your real name)') }}"
/>
</div>
<div class="mt-10 flex flex-row space-x-2 items-center">
<div>
@if(!$willShowUp && !$perhapsShowUp)
<x-button
lg primary wire:click="attend">
<i class="fa fa-thin fa-check mr-2"></i>
{{ __('I will show up') }}
</x-button>
@else
<x-button
lg primary wire:click="cannotCome">
<i class="fa fa-thin fa-face-frown mr-2"></i>
{{ __('Unfortunately I can\'t come') }}
</x-button>
@endif
</div>
<div>
@if(!$perhapsShowUp && !$willShowUp)
<x-button
lg wire:click="mightAttend">
<i class="fa fa-thin fa-question mr-2"></i>
{{ __('Might attend') }}
</x-button>
@endif
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
{{-- FOOTER --}}
<livewire:frontend.footer/>
</div>

View File

@@ -141,16 +141,25 @@ Route::middleware([])
->as('meetup.')
->prefix('/{country:code}/meetup')
->group(function () {
Route::get('stream-calendar', \App\Http\Controllers\DownloadMeetupCalendar::class)
->name('ics');
Route::get('world', \App\Http\Livewire\Meetup\WorldMap::class)
->name('world');
Route::get('overview', \App\Http\Livewire\Meetup\MeetupTable::class)
->name('table.meetup');
Route::get('/meetup-events/l/{meetupEvent}', \App\Http\Livewire\Meetup\LandingPageEvent::class)
->name('event.landing');
Route::get('/meetup-events', \App\Http\Livewire\Meetup\MeetupEventTable::class)
->name('table.meetupEvent');
Route::get('/{meetup:slug}', \App\Http\Livewire\Meetup\LandingPage::class)
->name('landing');
});
/*

View File

@@ -9,7 +9,6 @@ module.exports = {
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./vendor/laravel/jetstream/**/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
'./app/Http/Livewire/**/*.php',

View File

@@ -544,9 +544,9 @@ nanoid@^3.3.4:
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
node-releases@^2.0.8:
version "2.0.9"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.9.tgz#fe66405285382b0c4ac6bcfbfbe7e8a510650b4d"
integrity sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA==
version "2.0.10"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f"
integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"