Update forum looks

This commit is contained in:
DariusIII
2025-11-19 13:59:19 +01:00
parent 2a63645d3b
commit ae00a438fb
4 changed files with 79 additions and 8 deletions
@@ -16,13 +16,33 @@
@endif
<div>
<span class="text-gray-900 dark:text-gray-100">{{ $post->authorName }}</span>
<span class="text-gray-500 dark:text-gray-400">
@include ('forum::partials.timestamp', ['carbon' => $post->created_at])
@if ($post->hasBeenUpdated())
({{ trans('forum::general.last_updated') }} @include ('forum::partials.timestamp', ['carbon' => $post->updated_at]))
@endif
</span>
<div>
<span class="text-gray-900 dark:text-gray-100 font-semibold">{{ $post->authorName }}</span>
<span class="text-gray-500 dark:text-gray-400">
@include ('forum::partials.timestamp', ['carbon' => $post->created_at])
@if ($post->hasBeenUpdated())
({{ trans('forum::general.last_updated') }} @include ('forum::partials.timestamp', ['carbon' => $post->updated_at]))
@endif
</span>
</div>
@if ($post->author && $post->author->role)
<div class="mt-1">
@php
$roleName = $post->author->role->name;
$roleColors = [
'Admin' => 'bg-red-500 dark:bg-red-600 text-white',
'Moderator' => 'bg-green-500 dark:bg-green-600 text-white',
'Friend' => 'bg-purple-500 dark:bg-purple-600 text-white',
'User' => 'bg-blue-500 dark:bg-blue-600 text-white',
'Disabled' => 'bg-gray-500 dark:bg-gray-600 text-white',
];
$roleClass = $roleColors[$roleName] ?? 'bg-gray-400 dark:bg-gray-500 text-white';
@endphp
<span class="inline-block text-xs font-medium px-2 py-1 rounded {{ $roleClass }}">
{{ $roleName }}
</span>
</div>
@endif
</div>
</div>
<div class="p-6 text-gray-900 dark:text-gray-100">
@@ -5,7 +5,28 @@
<a href="{{ Forum::route('thread.show', $post) }}" class="text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 transition-colors">#{{ $post->sequence }}</a>
</span>
<div>
<strong class="text-gray-900 dark:text-gray-100">{{ $post->authorName }}</strong> <span class="text-gray-500 dark:text-gray-400">{{ $post->posted }}</span>
<div>
<strong class="text-gray-900 dark:text-gray-100">{{ $post->authorName }}</strong>
<span class="text-gray-500 dark:text-gray-400">{{ $post->posted }}</span>
</div>
@if ($post->author && $post->author->role)
<div class="mt-1">
@php
$roleName = $post->author->role->name;
$roleColors = [
'Admin' => 'bg-red-500 dark:bg-red-600 text-white',
'Moderator' => 'bg-green-500 dark:bg-green-600 text-white',
'Friend' => 'bg-purple-500 dark:bg-purple-600 text-white',
'User' => 'bg-blue-500 dark:bg-blue-600 text-white',
'Disabled' => 'bg-gray-500 dark:bg-gray-600 text-white',
];
$roleClass = $roleColors[$roleName] ?? 'bg-gray-400 dark:bg-gray-500 text-white';
@endphp
<span class="inline-block text-xs font-medium px-2 py-1 rounded {{ $roleClass }}">
{{ $roleName }}
</span>
</div>
@endif
</div>
</div>
<div class="text-gray-900 dark:text-gray-100">