Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
@php
use Illuminate\Support\Facades\Date;
@endphp

@props([
'event',
])
@php
$eventStart = $event->start;
$eventEnd = $event->end;
$diffHours = $event->duration;
@endphp

<section class="hp-section relative items-start" id="hero">
<div class="absolute inset-0 -left-[20%] z-0 h-full w-[150%]">
<img src="{{ asset('images/3pontos/logo-chain.png') }}" alt="" class="h-full w-full object-cover" />
Expand All @@ -21,10 +34,9 @@ class="spin-slow h-auto w-full object-contain"
<x-slot:badge>
<x-he4rt::section-title>3 Pontos Start</x-he4rt::section-title>
</x-slot>
<x-slot:title>Participe do primeiro evento presencial da 3Pontos</x-slot>
<x-slot:title>{{ $event->title }}</x-slot>
<x-slot:description>
Um evento híbrido de 5 horas, em parceria com a He4rt, com palestras exclusivas, networking e uma missão
social que transforma.
{{ $event->description }}
</x-slot>
<x-slot:actions>
<x-he4rt::button>Faça sua inscrição</x-he4rt::button>
Expand All @@ -44,7 +56,9 @@ class="bg-elevation-surface/32 border-outline-dark/60 grid w-full grid-cols-1 ga
<x-he4rt::text size="sm" class="font-semibold">Horário</x-he4rt::text>
</div>
</x-slot>
<x-slot:title>15h ~ 20h - Duração: 5h</x-slot>
<x-slot:title>
{{ $eventStart }} ~ {{ $eventEnd }} Duração: {{ $diffHours }}h
</x-slot>
</x-he4rt::card>
</x-he4rt::animate-block>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@props([
'event',
])
<section class="hp-section relative z-1" id="info">
<div class="hp-container">
<div class="grid grid-cols-1 gap-y-8 lg:grid-cols-2">
Expand All @@ -15,17 +18,18 @@
icon="heroicon-o-map-pin"
class="text-icon-light bg-transparent p-0!"
/>
<x-he4rt::text class="font-bold">
Endereço: R. Aspicuelta, 422 - Vila Madalena, São Paulo - SP, 05416-011
</x-he4rt::text>
<x-he4rt::text class="font-bold">Endereço: {{ $event->location }}</x-he4rt::text>
</div>
<div class="flex gap-2">
<x-he4rt::icon
:interactive="false"
icon="heroicon-o-clock"
class="text-icon-light bg-transparent p-0!"
/>
<x-he4rt::text class="font-bold">Horário: Sábado (3/12) - 14:00 até 19:00</x-he4rt::text>
<x-he4rt::text class="font-bold">
Horário: {{ $event->start_at->format('D') }} {{ $event->day }} - {{ $event->start }}
até {{ $event->end }}
</x-he4rt::text>
</div>
<div class="flex gap-8">
<x-he4rt::icon icon="fab-instagram" class="text-icon-light bg-transparent p-0!" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@props([
'event',
])
<section class="hp-section" id="schedule">
<div class="hp-container">
<div>
Expand All @@ -13,45 +16,13 @@
</div>

<div class="mt-24 flex w-full max-w-5xl flex-col gap-4">
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="15:00" title="Abertura e Início da Live (Twitch)" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="15:30" title="Talk Juliana Gaioso (DevSec PicPay) - Tema" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="15:50" title="Talk Fernanda Fagundes (Ipê) - Tema" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="16:10" title="Ações social I (Cestas Básicas)" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="16:30" title="Coffee Break" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="17:00" title="Talk Tatiana Barros - Tema" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="17:20" title="Talk Daniel Reis - Tema" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="17:40" title="Ações social II (Materiais Escolares)" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card
starts-at="17:45"
title="Roda de Conversa com ?????????? - IA como ferramenta do dia a dia"
/>
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="18:50" title="Lançamento da comunidade 3 Pontos" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="19:20" title="Hunting de Oportunidades para Comunidade" />
</x-he4rt::animate-block>
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="20:00" title="Encerramento e Agradecimentos" />
</x-he4rt::animate-block>
@forelse ($event->talks as $talk)
<x-he4rt::animate-block observe type="fade-right">
<x-he4rt::schedule-card starts-at="{{$talk->start}}" title="{{$talk->title}}" />
</x-he4rt::animate-block>
@empty
<p>There is no talk yet.</p>
@endforelse
</div>
</div>
</section>
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@props([
'event',
'speakers' => $event->speakers->where('name',
'!=',
$event->slug),
])
Comment thread
danielhe4rt marked this conversation as resolved.
<section class="hp-section relative" id="speakers">
<div
class="absolute bottom-0 left-0 z-1 flex origin-top rotate-90 justify-start sm:-translate-x-[20%] sm:translate-y-32 lg:-translate-x-[5%] lg:translate-y-24 lg:rotate-0 xl:translate-y-0"
Expand All @@ -24,74 +30,26 @@ class="hidden h-auto w-full object-contain sm:block sm:max-w-[60%]"
x-intersect.once="visible = true"
class="grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-8 lg:grid-cols-4"
>
<x-he4rt::animate-block>
<x-he4rt::card class="hover:border-b-outline-light border-b-8">
<x-slot:header class="flex flex-col items-center justify-center border-none pb-0">
<div class="flex flex-col items-center gap-2">
<x-he4rt::avatar size="2xl" src="https://avatars.githubusercontent.com/u/85951158?v=4" />
<x-he4rt::heading level="3" size="xs">Juliana Gaioso</x-he4rt::heading>
<x-he4rt::text class="text-center" size="sm">DevSec</x-he4rt::text>
</div>
</x-slot>
<x-slot:description class="pb-4 text-center">
Por mais de quinze anos, solucionando problemas na indústria através de automação, IoT e
desenvolvimento de software. Atualmente focada em solucionar problemas de software de segurança.
</x-slot>
</x-he4rt::card>
</x-he4rt::animate-block>

<x-he4rt::animate-block>
<x-he4rt::card class="hover:border-b-outline-light border-b-8">
<x-slot:header class="flex flex-col items-center justify-center border-none pb-0">
<div class="flex flex-col items-center gap-2">
<x-he4rt::avatar size="2xl" src="https://avatars.githubusercontent.com/u/85951158?v=4" />
<x-he4rt::heading level="3" size="xs">Tatiana Barros</x-he4rt::heading>
<x-he4rt::text class="text-center" size="sm">Technology Evangelist</x-he4rt::text>
</div>
</x-slot>
<x-slot:description class="pb-4 text-center">
Há mais de uma década unindo tecnologia, criatividade e impacto social. Evangelista de
Tecnologia focada em fortalecer comunidades dev e ampliar o acesso à educação tecnológica por
meio de workshops, mentorias e iniciativas premiadas.
</x-slot>
</x-he4rt::card>
</x-he4rt::animate-block>

<x-he4rt::animate-block>
<x-he4rt::card class="hover:border-b-outline-light border-b-8">
<x-slot:header class="flex flex-col items-center justify-center border-none pb-0">
<div class="flex flex-col items-center gap-2">
<x-he4rt::avatar size="2xl" src="https://avatars.githubusercontent.com/u/6912596?v=4" />
<x-he4rt::heading level="3" size="xs">Daniel Reis</x-he4rt::heading>
<x-he4rt::text class="text-center" size="sm">
Tech Lead & Fundador da He4rt Developers
</x-he4rt::text>
</div>
</x-slot>
<x-slot:description class="pb-4 text-center">
Linha de frente na criação de softwares e fortalecendo comunidades dev. DevRel focado em
conteúdo técnico, live coding e educação, sempre impulsionando novos talentos. Fundador da He4rt
Developers e apaixonado por ensinar, programar e construir espaços onde desenvolvedores crescem
juntos.
</x-slot>
</x-he4rt::card>
</x-he4rt::animate-block>

<x-he4rt::animate-block>
<x-he4rt::card class="hover:border-b-outline-light border-b-8">
<x-slot:header class="flex flex-col items-center justify-center border-none pb-0">
<div class="flex flex-col items-center gap-2">
<x-he4rt::avatar size="2xl" src="https://avatars.githubusercontent.com/u/85951158?v=4" />
<x-he4rt::heading level="3" size="xs">Gabriel Vieira</x-he4rt::heading>
<x-he4rt::text class="text-center" size="sm">Product Designer</x-he4rt::text>
</div>
</x-slot>
<x-slot:description class="pb-4 text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae viverra nisi. Morbi at
lorem facilisis enim eleifend sagittis at id massa.
</x-slot>
</x-he4rt::card>
</x-he4rt::animate-block>
@forelse ($speakers as $speaker)
<x-he4rt::animate-block>
<x-he4rt::card class="hover:border-b-outline-light border-b-8">
<x-slot:header class="flex flex-col items-center justify-center border-none pb-0">
<div class="flex flex-col items-center gap-2">
<x-he4rt::avatar size="2xl" src="{{$speaker->getFirstMediaUrl('avatar')}}" />
<x-he4rt::heading level="3" size="xs">{{ $speaker->name }}</x-he4rt::heading>
<x-he4rt::text class="text-center" size="sm">
{{ $speaker->talks->first()->field_type }}
</x-he4rt::text>
</div>
</x-slot>
<x-slot:description class="pb-4 text-center">
{{ $speaker->talks->first()->description }}
</x-slot>
Comment thread
danielhe4rt marked this conversation as resolved.
</x-he4rt::card>
</x-he4rt::animate-block>
@empty
<p>There is no Speaker Yet.</p>
@endforelse
</div>
</div>
</section>
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<x-he4rt::layouts.page class="relative" full-height="true">
<x-events::themes.3pontos.components.sections.hero />
<x-events::themes.3pontos.components.sections.hero :$event />
<x-events::themes.3pontos.components.sections.social-action />
<x-events::themes.3pontos.components.sections.community />
<x-events::themes.3pontos.components.sections.meet-up />
<x-events::themes.3pontos.components.sections.speakers />
<x-events::themes.3pontos.components.sections.schedule />
<x-events::themes.3pontos.components.sections.speakers :$event />
<x-events::themes.3pontos.components.sections.schedule :$event />
<x-events::themes.3pontos.components.sections.watch-live />
<x-events::themes.3pontos.components.sections.partners />
<x-events::themes.3pontos.components.sections.about />
<x-events::themes.3pontos.components.sections.info />
<x-events::themes.3pontos.components.sections.info :$event />
<div class="absolute bottom-[2%] z-0 translate-x-[90%] lg:-translate-x-[60%] lg:translate-y-1/3">
<img src="{{ asset('images/3pontos/logo-creation.png') }}" class="max-h-[500px] lg:max-h-[700px]" alt="" />
</div>
Expand Down
25 changes: 19 additions & 6 deletions app-modules/events/src/Filament/Events/EventLandingPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@

use Filament\Pages\Dashboard;
use Filament\Support\Enums\Width;
use He4rt\Tenant\Models\Tenant;

class EventLandingPage extends Dashboard
{
public $tenant;

protected static bool $shouldRegisterNavigation = false;

protected Width|string|null $maxContentWidth = Width::Full;

public function mount(): void {}

public function getView(): string
public function mount(): void
{

if (app()->isLocal()) {
$tenantSlug = str(request()->path())->explode('/')
->get(1);
Expand All @@ -26,9 +26,15 @@ public function getView(): string
$tenantSlug = array_shift($path);
}

$tenantSlug = str($tenantSlug)->replace(['.', '-'], '');
$tenantSlug = str($tenantSlug)->replace(['.', '-'], '')->toString();

$this->tenant = Tenant::query()->where('slug', $tenantSlug)->firstOrFail();

}

$view = sprintf('events::components.themes.%s.homepage', $tenantSlug);
public function getView(): string
{
$view = sprintf('events::components.themes.%s.homepage', $this->tenant->slug);

abort_unless(view()->exists($view), 403, 'Forbidden Tenant');

Expand All @@ -49,4 +55,11 @@ public function getLayout(): string
{
return 'he4rt::components.base.index';
}

protected function getViewData(): array
{
return [
'event' => $this->tenant->events()->first(),
];
}
Comment thread
danielhe4rt marked this conversation as resolved.
}
32 changes: 31 additions & 1 deletion app-modules/events/src/Models/EventModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Attributes\UseFactory;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
Expand All @@ -37,6 +38,7 @@
* @property int $tenant_id
* @property Date $end_at
* @property Date $start_at
* @property Date $event_at
*/
#[UseFactory(EventFactory::class)]
class EventModel extends Model
Expand Down Expand Up @@ -153,7 +155,35 @@ public function talks(): HasMany
*/
public function speakers(): HasManyThrough
{
return $this->hasManyThrough(User::class, Talk::class, 'user_id');
return $this->hasManyThrough(User::class, Talk::class, 'event_id', 'id', 'id', 'user_id');
}

protected function duration(): Attribute
{
return Attribute::make(
get: fn () => $this->start_at->diffInHours($this->end_at),
);
}

protected function start(): Attribute
{
return Attribute::make(
get: fn () => $this->start_at?->format('H:i'),
);
}

protected function day(): Attribute
{
return Attribute::make(
get: fn () => $this->event_at?->format('d/m'),
);
}

protected function end(): Attribute
{
return Attribute::make(
get: fn () => $this->end_at?->format('H:i'),
);
}

#[Scope]
Expand Down
Loading