diff --git a/resources/views/guestbook/index.blade.php b/resources/views/guestbook/index.blade.php index e03e4e6..5039b5d 100644 --- a/resources/views/guestbook/index.blade.php +++ b/resources/views/guestbook/index.blade.php @@ -180,34 +180,39 @@ $isFromMe = Auth::check() && $msg->who === Auth::user()->username; @endphp + {{-- 消息卡片 --}}
+ class="bg-white rounded-2xl border {{ $isSecret ? 'border-pink-200 bg-pink-50/20' : 'border-gray-100' }} shadow-sm hover:shadow-md transition-shadow duration-200 overflow-hidden"> - @if ($isSecret) -
- 🔒 私密信件 + {{-- 卡片头部:发件人 / 收件人 / 时间 --}} +
+
+ {{-- 发件人头像占位 --}} +
+ {{ mb_substr($msg->who, 0, 1) }} +
+ {{ $msg->who }} + + + {{ $msg->towho ?: '大家' }} + + @if ($isSecret) + 🔒 + 您您话 + @endif
- @endif - -
-
- {{ $msg->who }} - - {{ $msg->towho ?: '大家' }} - 留言: -
-
+
{{ \Carbon\Carbon::parse($msg->post_time)->diffForHumans() }} - @if ($isFromMe || $isToMe || (Auth::check() && Auth::user()->user_level >= 15))
+ onsubmit="return confirm('确定要抓除这条留言吗?');" class="inline"> @csrf @method('DELETE')
@@ -215,18 +220,19 @@
-
- {!! nl2br(e($msg->text_body)) !!} + {{-- 正文内容 --}} +
+

+ {!! nl2br(e($msg->text_body)) !!}

+ {{-- 回复TA按钒 --}} @if (!Auth::check() || $msg->who !== Auth::user()->username) -
+