Skip to content

Commit

Permalink
fix: design tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
blt950 committed Aug 2, 2024
1 parent 13024c5 commit e3bb2fa
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 69 deletions.
14 changes: 6 additions & 8 deletions resources/views/calendar/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
</style>
@endsection
@section('content')
<div class="mt-5">
<div class="card mt-5 shadow-sm">
<div class="card-header bg-primary text-white">
<h5 class="m-0">{{ $calendar->name }}</h5>
</div>
<div class="card-body">
<div id='calendar'></div>
</div>
<div class="card shadow-sm">
<div class="card-header bg-primary text-white">
<h5 class="m-0">{{ $calendar->name }}</h5>
</div>
<div class="card-body">
<div id='calendar'></div>
</div>
</div>

Expand Down
53 changes: 24 additions & 29 deletions resources/views/events/show.blade.php
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
@extends('layouts.app')
@section('title', $event->title)
@section('content')
<div class="container mt-5">
<div class="card shadow mb-4">
<div class="card-body text-center">
<h1 class="card-title">{{ $event->title }}</h1>
<p class="card-text text-muted">Hosted <a href="{{ route('calendar', $event->calendar->id) }}" class="card-link">{{ $event->calendar->name }}</a></p>
</div>
</div>

<div style="width: 1000px;">

@if($event->image)
<div class="card shadow mb-4">
<div class="card-body text-center">
<img src="{{ asset('storage/banners/' . $event->image) }}" alt="{{ $event->title }}" class="img-fluid">
</div>
</div>
<img src="{{ asset('storage/banners/' . $event->image) }}" alt="{{ $event->title }}" class="img-fluid">
@endif

<div class="card shadow mb-4">
<div class="card-body">
<h2 class="card-title">Description</h2>
<p class="card-text">@markdown($event->description)</p>
</div>
<div class="mt-4">
<i class="fas fa-clock"></i>
<strong>Start:</strong>
{{ \Carbon\Carbon::parse($event->start_date)->format('F j, Y, H:i') }}z
</div>

<div class="card shadow mb-4">
<div class="card-body">
<h2 class="card-title">Details</h2>
<ul class="list-group list-group-flush">
<li class="list-group-item"><strong>Start Date:</strong> {{ \Carbon\Carbon::parse($event->start_date)->format('F j, Y, H:i') }}z</li>
<li class="list-group-item"><strong>End Date:</strong> {{ \Carbon\Carbon::parse($event->end_date)->format('F j, Y, H:i') }}z</li>
@if($event->recurrence_interval)
<li class="list-group-item"><strong>Recurrence:</strong> Every {{ $event->recurrence_interval }} {{ Str::plural($event->recurrence_unit, $event->recurrence_interval) }}</li>
<li class="list-group-item"><strong>Recurrence End Date:</strong> {{ \Carbon\Carbon::parse($event->recurrence_end_date)->format('F j, Y, H:i') }}z</li>
@endif
</ul>
</div>
<div class="mb-4">
<i class="fas fa-clock"></i>
<strong>End:</strong>
{{ \Carbon\Carbon::parse($event->end_date)->format('F j, Y, H:i') }}z
</div>

@if($event->recurrence_interval)
<div>
<i class="fas fa-calendar-alt"></i>
<strong>Recurrence:</strong> Every {{ $event->recurrence_interval }} {{ Str::plural($event->recurrence_unit, $event->recurrence_interval) }}
</div>
<div>
<i class="fas fa-calendar-alt"></i>
<strong>Recurrence End Date:</strong> {{ \Carbon\Carbon::parse($event->recurrence_end_date)->format('F j, Y, H:i') }}z
</div>
@endif

<p class="card-text">@markdown($event->long_description)</p>
</div>
@endsection
57 changes: 28 additions & 29 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
@extends('layouts.app')
@section('title', 'Home')
@section('content')
<div class="mt-5">
<div class="card shadow-sm">
<div class="card-header bg-primary text-white">
<h5 class="m-0">Upcoming Events</h5>
</div>
<div class="card-body">
<ul class="list-group list-group-flush">
@if ($upcomingEvents->isNotEmpty())
@foreach($upcomingEvents as $event)
<li class="list-group-item d-flex justify-content-between align-items-center">
<img src={{ asset('storage/banners/' . $event->image) }} height="100">
<span>{{ $event->title }}</span>
<div>
<a href="{{ route('events.show', $event->id) }}" class="btn btn-info btn-sm">View Event</a>
<a href="{{ route('calendar', $event->calendar) }}" class="btn btn-secondary btn-sm">View Calendar</a>
</div>
</li>
@endforeach
@else
<span>No Events Available</span>
@endif
</ul>
</div>
</div>

@if ($calendar)
<div class="card mt-5 shadow-sm">
<div class="card-header bg-primary text-white">
<h5 class="m-0">Upcoming Events</h5>
<h5 class="m-0">{{ $calendar->name }}</h5>
</div>
<div class="card-body">
<ul class="list-group list-group-flush">
@if ($upcomingEvents->isNotEmpty())
@foreach($upcomingEvents as $event)
<li class="list-group-item d-flex justify-content-between align-items-center">
<span>{{ $event->title }}</span>
<div>
<a href="{{ route('events.show', $event->id) }}" class="btn btn-info btn-sm">View Event</a>
<a href="{{ route('calendar', $event->calendar) }}" class="btn btn-secondary btn-sm">View Calendar</a>
</div>
</li>
@endforeach
@else
<span>No Events Available</span>
@endif
</ul>
<div id="calendar"></div>
</div>
</div>

@if ($calendar)
<div class="card mt-5 shadow-sm">
<div class="card-header bg-primary text-white">
<h5 class="m-0">{{ $calendar->name }}</h5>
</div>
<div class="card-body">
<div id="calendar"></div>
</div>
</div>
@endif
</div>
@endif

<footer class="text-center mt-5 mb-3">
<a href="https://github.com/Vatsim-Scandinavia/events" target="_blank">Event Manager v{{ config('app.version') }}</a>
Expand Down
16 changes: 15 additions & 1 deletion resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,21 @@
<div class="row">
<div class="col-lg-12 margin-tb">
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">@yield('title', 'Page Title')</h1>
@php
$icon = '';
if(Route::is('home')){
$icon = 'fas fa-home';
} elseif(Route::is('calendar*')){
$icon = 'fas fa-calendar-alt';
} elseif(Route::is('events*')){
$icon = 'fas fa-calendar-day';
} elseif(Route::is('user*')){
$icon = 'fas fa-users';
}
@endphp
<h1 class="h3 mb-0 text-primary"><i class="{{ $icon }}"></i> @yield('title', 'Page Title')</h1>
@yield('title-flex')
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/users/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<div class="row">
<div class="col-xl-12 col-md-12 mb-12">
<div class="card shadow mb-4">
<div class="card-header bg-primary py-3 d-flex flex-row align-items-center justify-content-center">
<h6 class="m-0 fw-bold text-white">Event Overview</h6>
<div class="card-header bg-primary py-3 d-flex flex-row align-items-center">
<h6 class="m-0 fw-bold text-white">Users</h6>
</div>

<div class="card-body p-0">
Expand Down

0 comments on commit e3bb2fa

Please sign in to comment.