add intro for meetups

This commit is contained in:
Benjamin Takats
2023-01-15 15:23:22 +01:00
parent 2a2004a20a
commit 9f0a28c17e
4 changed files with 46 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ use Ebess\AdvancedNovaMediaLibrary\Fields\Images;
use Illuminate\Database\Eloquent\Model;
use Laravel\Nova\Fields\ID;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\Markdown;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Http\Requests\NovaRequest;
@@ -75,6 +76,9 @@ class Meetup extends Resource
BelongsTo::make(__('City'), 'city', City::class)->searchable()->withSubtitles(),
Markdown::make(__('Intro'), 'intro')
->help(__('This is the introduction text that is shown on the landing page.')),
BelongsTo::make(__('Created By'), 'createdBy', User::class)
->canSee(function ($request) {
return $request->user()

View File

@@ -0,0 +1,30 @@
<?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('meetups', function (Blueprint $table) {
$table->text('intro')
->nullable();
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
Schema::table('meetups', function (Blueprint $table) {
//
});
}
};

View File

@@ -11,17 +11,19 @@
{{ __('Plebs together strong 💪') }}
</h1>
<div class="px-0 mb-6 text-lg text-gray-600 md:text-xl">
{{ __('Bitcoiner Meetups are a great way to meet other Bitcoiners in your area. You can learn from each other, share ideas, and have fun!') }}
<x-markdown>
{!! $meetup->intro !!}
</x-markdown>
</div>
<x-button
target="_blank"
:href="$meetup->link"
primary lg class="whitespace-nowrap">
primary lg class="mt-4 whitespace-nowrap">
<i class="fa fa-thin fa-external-link mr-2"></i>
{{ __('Link') }}
</x-button>
</div>
</div>
<div class="p-4">
<img class="max-h-64" src="{{ $meetup->getFirstMediaUrl('logo') }}" alt="Logo">

View File

@@ -48,7 +48,7 @@
href="{{ $currentModal?->link }}" target="_blank">{{ __('Link to the registration') }}</a>
<div class="prose-xl prose-white">
<x-markdown>
{{ $currentModal?->course->description }}
{!! $currentModal?->course->description !!}
</x-markdown>
</div>
<a class="block w-full rounded-md border border-transparent bg-white py-3 px-5 text-center text-base font-medium text-amber-500 shadow-md hover:bg-gray-50 sm:inline-block sm:w-auto"