mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
stream calendar
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Meetup;
|
use App\Models\Meetup;
|
||||||
|
use App\Models\MeetupEvent;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Spatie\IcalendarGenerator\Components\Calendar;
|
use Spatie\IcalendarGenerator\Components\Calendar;
|
||||||
use Spatie\IcalendarGenerator\Components\Event;
|
use Spatie\IcalendarGenerator\Components\Event;
|
||||||
@@ -18,14 +19,19 @@ class DownloadMeetupCalendar extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __invoke(Request $request)
|
public function __invoke(Request $request)
|
||||||
{
|
{
|
||||||
$meetup = Meetup::query()
|
if ($request->has('meetup')) {
|
||||||
->with([
|
$meetup = Meetup::query()
|
||||||
'meetupEvents',
|
->with([
|
||||||
])
|
'meetupEvents',
|
||||||
->findOrFail($request->input('meetup'));
|
])
|
||||||
|
->findOrFail($request->input('meetup'));
|
||||||
|
$events = $meetup->meetupEvents;
|
||||||
|
} else {
|
||||||
|
$events = MeetupEvent::query()->get();
|
||||||
|
}
|
||||||
|
|
||||||
$entries = [];
|
$entries = [];
|
||||||
foreach ($meetup->meetupEvents as $event) {
|
foreach ($events as $event) {
|
||||||
$entries[] = Event::create()
|
$entries[] = Event::create()
|
||||||
->name($meetup->name)
|
->name($meetup->name)
|
||||||
->uniqueIdentifier(str($meetup->name)->slug.$event->id)
|
->uniqueIdentifier(str($meetup->name)->slug.$event->id)
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
x-data="{
|
x-data="{
|
||||||
textToCopy: '{{ route('meetup.ics', ['country' => $country, 'meetup' => $row->id]) }}',
|
textToCopy: '{{ route('meetup.ics', ['country' => $country, 'meetup' => $row->id]) }}',
|
||||||
}"
|
}"
|
||||||
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'Kalendar URL kopiert!',description:'Füge den Kalender Stream-Link in eine kompatible Kalender-App ein.',icon:'success'});"
|
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'{{ __('Calendar Stream Url copied!') }}',description:'{{ __('Paste the calendar stream link into a compatible calendar app.') }}',icon:'success'});"
|
||||||
amber>
|
amber>
|
||||||
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
||||||
{{ __('Stream Calendar (WIP)') }} ({{ $row->meetup_events_count }})
|
{{ __('Calendar Stream-Url') }} ({{ $row->meetup_events_count }})
|
||||||
</x-button>
|
</x-button>
|
||||||
@endif
|
@endif
|
||||||
@if($row->meetup_events_count < 1)
|
@if($row->meetup_events_count < 1)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
x-data="{
|
x-data="{
|
||||||
textToCopy: 'lightning:{{ $this->lnurl }}',
|
textToCopy: 'lightning:{{ $this->lnurl }}',
|
||||||
}"
|
}"
|
||||||
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'URL kopiert!',icon:'success'});"
|
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'{{ __('URL copied!') }}',icon:'success'});"
|
||||||
>
|
>
|
||||||
<x-button
|
<x-button
|
||||||
xs
|
xs
|
||||||
@@ -45,14 +45,15 @@
|
|||||||
</x-button>
|
</x-button>
|
||||||
|
|
||||||
<x-button icon="at-symbol" primary class="ml-4" wire:click="switchToEmailSignup">
|
<x-button icon="at-symbol" primary class="ml-4" wire:click="switchToEmailSignup">
|
||||||
{{ __('Email registration') }}
|
{{ __('Email registration') }}
|
||||||
</x-button>
|
</x-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="pt-12">
|
<div class="pt-12">
|
||||||
<p class="text-xs">{{ __('Zeus bug:') }} <a target="_blank" href="https://github.com/ZeusLN/zeus/issues/1045">https://github.com/ZeusLN/zeus/issues/1045</a>
|
<p class="text-xs">{{ __('Zeus bug:') }} <a target="_blank"
|
||||||
|
href="https://github.com/ZeusLN/zeus/issues/1045">https://github.com/ZeusLN/zeus/issues/1045</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
x-data="{
|
x-data="{
|
||||||
textToCopy: '{{ route('bitcoinEvent.ics', ['country' => $country]) }}',
|
textToCopy: '{{ route('bitcoinEvent.ics', ['country' => $country]) }}',
|
||||||
}"
|
}"
|
||||||
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'Kalendar URL kopiert!',description:'Füge den Kalender Stream-Link in eine kompatible Kalender-App ein.',icon:'success'});"
|
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'{{ __('Calendar Stream Url copied!') }}',description:'{{ __('Paste the calendar stream link into a compatible calendar app.') }}',icon:'success'});"
|
||||||
amber>
|
amber>
|
||||||
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
||||||
{{ __('Stream Calendar (WIP)') }} ({{ $events->count() }})
|
{{ __('Calendar Stream-Url') }} ({{ $events->count() }})
|
||||||
</x-button>
|
</x-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -136,18 +136,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-full flex justify-end">
|
|
||||||
<x-button
|
|
||||||
x-data="{
|
|
||||||
textToCopy: '{{ route('bitcoinEvent.ics', ['country' => $country]) }}',
|
|
||||||
}"
|
|
||||||
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'Kalendar URL kopiert!',description:'Füge den Kalender Stream-Link in eine kompatible Kalender-App ein.',icon:'success'});"
|
|
||||||
amber>
|
|
||||||
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
|
||||||
{{ __('Stream Calendar (WIP)') }} ({{ $events->count() }})
|
|
||||||
</x-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<livewire:tables.bitcoin-event-table :country="$country->code"/>
|
<livewire:tables.bitcoin-event-table :country="$country->code"/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -3,27 +3,39 @@
|
|||||||
<livewire:frontend.header :country="$country"/>
|
<livewire:frontend.header :country="$country"/>
|
||||||
{{-- MAIN --}}
|
{{-- MAIN --}}
|
||||||
<section class="w-full mb-12">
|
<section class="w-full mb-12">
|
||||||
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4 flex flex-col sm:flex-row">
|
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4 py-4">
|
||||||
<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">
|
<div class="w-full flex justify-end">
|
||||||
{{ __('Bitcoiner') }} <span
|
<x-button
|
||||||
class="w-full text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200 lg:inline">{{ __('Meetups') }}</span><br
|
x-data="{
|
||||||
class="lg:block hidden">
|
textToCopy: '{{ route('meetup.ics', ['country' => $country]) }}',
|
||||||
{{ __('Plebs together strong 💪') }}
|
}"
|
||||||
</h1>
|
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'{{ __('Calendar Stream Url copied!') }}',description:'{{ __('Paste the calendar stream link into a compatible calendar app.') }}',icon:'success'});"
|
||||||
<p class="px-0 mb-6 text-lg text-gray-600 md:text-xl lg:px-24">
|
amber>
|
||||||
|
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
||||||
|
{{ __('Calendar Stream-Url for all meetup events') }}
|
||||||
|
</x-button>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col sm:flex-row">
|
||||||
|
<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">
|
||||||
|
{{ __('Bitcoiner') }} <span
|
||||||
|
class="w-full text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200 lg:inline">{{ __('Meetups') }}</span><br
|
||||||
|
class="lg:block hidden">
|
||||||
|
{{ __('Plebs together strong 💪') }}
|
||||||
|
</h1>
|
||||||
|
<p class="px-0 mb-6 text-lg text-gray-600 md:text-xl lg:px-24">
|
||||||
{{ __('Bitcoiner Meetups are a great way to meet other Bitcoiners in your area. You can learn from each other, share ideas, and have fun!') }}
|
{{ __('Bitcoiner Meetups are a great way to meet other Bitcoiners in your area. You can learn from each other, share ideas, and have fun!') }}
|
||||||
@php
|
@php
|
||||||
$focus = '';
|
$focus = '';
|
||||||
$map = $country->code . '_merc';
|
$map = $country->code . '_merc';
|
||||||
if (!\File::exists(public_path('vendor/jvector/maps/' . $country->code . '.js'))) {
|
if (!\File::exists(public_path('vendor/jvector/maps/' . $country->code . '.js'))) {
|
||||||
$map = 'europe_merc';
|
$map = 'europe_merc';
|
||||||
$focus = 'focusOn: {lat:'.$country->latitude.',lng:'.$country->longitude.',scale:8,animate:true},';
|
$focus = 'focusOn: {lat:'.$country->latitude.',lng:'.$country->longitude.',scale:8,animate:true},';
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
<div
|
<div
|
||||||
wire:ignore
|
wire:ignore
|
||||||
class="w-full flex justify-center"
|
class="w-full flex justify-center"
|
||||||
x-data="{
|
x-data="{
|
||||||
init() {
|
init() {
|
||||||
let markers = {{ Js::from($markers) }};
|
let markers = {{ Js::from($markers) }};
|
||||||
|
|
||||||
@@ -54,8 +66,9 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div id="map" style="width: 100%;" class="h-[200px] sm:h-[400px] my-4 sm:my-0"></div>
|
<div id="map" style="width: 100%;" class="h-[200px] sm:h-[400px] my-4 sm:my-0"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
|
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
|
||||||
|
|||||||
Reference in New Issue
Block a user