messages implemented

This commit is contained in:
2026-02-26 21:12:32 +01:00
parent d0aefc5ddc
commit 15b7b77d20
168 changed files with 14728 additions and 6786 deletions

View File

@@ -103,7 +103,7 @@
$uploadCount = 0;
}
try {
$favCount = \Illuminate\Support\Facades\DB::table('favourites')->where('user_id', $userId)->count();
$favCount = \Illuminate\Support\Facades\DB::table('artwork_favourites')->where('user_id', $userId)->count();
} catch (\Throwable $e) {
$favCount = 0;
}

View File

@@ -216,6 +216,7 @@
following: {{ $viewerIsFollowing ? 'true' : 'false' }},
count: {{ (int) $followerCount }},
loading: false,
hovering: false,
async toggle() {
this.loading = true;
try {
@@ -232,13 +233,13 @@
this.loading = false;
}
}">
<button @click="toggle" :disabled="loading" class="follow-btn inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-all"
<button @click="toggle" @mouseenter="hovering=true" @mouseleave="hovering=false" :disabled="loading" class="follow-btn inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-all"
:class="following
? 'bg-green-500/10 border-green-500/40 text-green-400 hover:bg-red-500/10 hover:border-red-500/40 hover:text-red-400'
: 'bg-[--sb-blue]/10 border-[--sb-blue]/40 text-[--sb-blue] hover:bg-[--sb-blue]/20'">
<i class="fa-solid fa-fw"
:class="loading ? 'fa-circle-notch fa-spin' : (following ? 'fa-user-check' : 'fa-user-plus')"></i>
<span x-text="following ? 'Following' : 'Follow'"></span>
:class="loading ? 'fa-circle-notch fa-spin' : (following ? (hovering ? 'fa-user-minus' : 'fa-user-check') : 'fa-user-plus')"></i>
<span x-text="following ? (hovering ? 'Unfollow' : 'Following') : 'Follow'"></span>
<span class="text-xs opacity-60" x-text="'(' + count + ')'"></span>
</button>
</div>
@@ -268,11 +269,12 @@
<div class="max-w-screen-xl mx-auto px-4">
<div class="flex divide-x divide-[--sb-line] overflow-x-auto">
@foreach([
['value' => number_format($stats->uploads ?? 0), 'label' => 'Uploads', 'icon' => 'fa-cloud-arrow-up'],
['value' => number_format($stats->downloads ?? 0), 'label' => 'Downloads', 'icon' => 'fa-download'],
['value' => number_format($stats->profile_views ?? 0), 'label' => 'Profile Views', 'icon' => 'fa-eye'],
['value' => number_format($followerCount), 'label' => 'Followers', 'icon' => 'fa-users'],
['value' => number_format($stats->awards ?? 0), 'label' => 'Awards', 'icon' => 'fa-trophy'],
['value' => number_format($stats->uploads_count ?? 0), 'label' => 'Uploads', 'icon' => 'fa-cloud-arrow-up'],
['value' => number_format($stats->downloads_received_count ?? 0),'label' => 'Downloads', 'icon' => 'fa-download'],
['value' => number_format($stats->profile_views_count ?? 0), 'label' => 'Profile Views', 'icon' => 'fa-eye'],
['value' => number_format($followerCount), 'label' => 'Followers', 'icon' => 'fa-users'],
['value' => number_format($stats->following_count ?? 0), 'label' => 'Following', 'icon' => 'fa-user-check'],
['value' => number_format($stats->awards_received_count ?? 0), 'label' => 'Awards', 'icon' => 'fa-trophy'],
] as $si)
<div class="stat-item flex-1 py-3">
<div class="stat-value">{{ $si['value'] }}</div>
@@ -503,11 +505,11 @@
<div class="nova-panel-body p-0">
<table class="profile-table w-full">
@foreach([
['Profile Views', number_format($stats->profile_views ?? 0), null],
['Uploads', number_format($stats->uploads ?? 0), null],
['Downloads', number_format($stats->downloads ?? 0), null],
['Page Views', number_format($stats->pageviews ?? 0), null],
['Featured Works',number_format($stats->awards ?? 0), 'fa-star text-yellow-400'],
['Profile Views', number_format($stats->profile_views_count ?? 0), null],
['Uploads', number_format($stats->uploads_count ?? 0), null],
['Downloads', number_format($stats->downloads_received_count ?? 0), null],
['Page Views', number_format($stats->artwork_views_received_count ?? 0), null],
['Featured Works',number_format($stats->awards_received_count ?? 0), 'fa-star text-yellow-400'],
] as [$label, $value, $iconClass])
<tr>
<td class="pl-4">{{ $label }}</td>

View File

@@ -1,34 +1,55 @@
@extends('layouts.nova')
@section('content')
<div class="container-fluid legacy-page">
<div class="effect2 page-header-wrap">
<header class="page-heading">
<h1 class="page-header">{{ $page_title ?? 'Today in History' }}</h1>
<p>List of featured Artworks on this day in history of Skinbase.</p>
</header>
</div>
<div class="panel panel-default uploads-panel effect2">
<div class="panel-body">
<div class="container_photo gallery_box">
@if($artworks && $artworks->count())
@foreach($artworks as $ar)
<div class="photo_frame">
<a href="/art/{{ $ar->id }}/{{ \Illuminate\Support\Str::slug($ar->name ?? '') }}">
<img src="{{ $ar->thumb_url ?? '/gfx/sb_join.jpg' }}" @if(!empty($ar->thumb_srcset)) srcset="{{ $ar->thumb_srcset }}" @endif loading="lazy" decoding="async" alt="{{ $ar->name }}">
</a>
</div>
@endforeach
@else
<p class="text-muted">No featured artworks found for today in history.</p>
@endif
</div>
</div>
</div>
<div class="paginationMenu text-center">
@if($artworks){{ $artworks->withQueryString()->links('pagination::bootstrap-4') }}@endif
{{-- ── Hero header ── --}}
<div class="px-6 pt-10 pb-6 md:px-10">
<div>
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">History</p>
<h1 class="text-3xl font-bold text-white leading-tight">{{ $page_title ?? 'Today in History' }}</h1>
<p class="mt-1 text-sm text-white/50">
Featured artworks uploaded on
<span class="text-white/80 font-medium">{{ $todayLabel ?? now()->format('F j') }}</span>
in past years.
</p>
</div>
</div>
{{-- ── Gallery ── --}}
<div class="px-6 pb-16 md:px-10">
@if($artworks && $artworks->count())
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-3">
@foreach($artworks as $ar)
<a href="{{ $ar->art_url ?? ('/art/' . $ar->id) }}"
class="group relative block overflow-hidden rounded-xl ring-1 ring-white/5 bg-black/20 shadow-md transition-all duration-200 hover:-translate-y-0.5">
<div class="relative aspect-square overflow-hidden bg-neutral-900">
<img src="{{ $ar->thumb_url ?? '/gfx/sb_join.jpg' }}"
alt="{{ $ar->name ?? '' }}"
loading="lazy"
decoding="async"
class="h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.06]"
onerror="this.src='/gfx/sb_join.jpg'">
{{-- Title overlay on hover --}}
<div class="pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent px-2 py-2
opacity-0 transition-opacity duration-200 group-hover:opacity-100">
<p class="truncate text-xs font-medium text-white">{{ $ar->name ?? 'Untitled' }}</p>
</div>
</div>
</a>
@endforeach
</div>
{{-- Pagination --}}
<div class="mt-10 flex justify-center">
{{ $artworks->withQueryString()->links('pagination::bootstrap-4') }}
</div>
@else
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-16 text-center">
<p class="text-4xl mb-4">📅</p>
<p class="text-white/60 text-sm">No featured artworks found for this day in history.</p>
<p class="text-white/30 text-xs mt-1">Check back tomorrow!</p>
</div>
@endif
</div>
@endsection