Upload beautify
This commit is contained in:
@@ -1,115 +1,2 @@
|
||||
@php
|
||||
// If a Collection or array was passed accidentally, pick the first item.
|
||||
if (isset($art) && (is_array($art) || $art instanceof Illuminate\Support\Collection || $art instanceof Illuminate\Database\Eloquent\Collection)) {
|
||||
$first = null;
|
||||
if (is_array($art)) {
|
||||
$first = reset($art);
|
||||
} elseif ($art instanceof Illuminate\Support\Collection || $art instanceof Illuminate\Database\Eloquent\Collection) {
|
||||
$first = $art->first();
|
||||
}
|
||||
if ($first) {
|
||||
$art = $first;
|
||||
}
|
||||
}
|
||||
|
||||
$title = trim((string) ($art->name ?? $art->title ?? 'Untitled artwork'));
|
||||
$author = trim((string) ($art->uname ?? $art->author_name ?? $art->author ?? 'Skinbase'));
|
||||
$category = trim((string) ($art->category_name ?? $art->category ?? 'General'));
|
||||
$license = trim((string) ($art->license ?? 'Standard'));
|
||||
$resolution = trim((string) ($art->resolution ?? ((isset($art->width, $art->height) && $art->width && $art->height) ? ($art->width . '×' . $art->height) : '')));
|
||||
// Safe integer extractor: handle numeric, arrays, Collections, or relations
|
||||
$safeInt = function ($v, $fallback = 0) {
|
||||
if (is_numeric($v)) return (int) $v;
|
||||
if (is_array($v)) return count($v);
|
||||
if (is_object($v)) {
|
||||
// Eloquent Collections implement Countable and have count()
|
||||
if (method_exists($v, 'count')) return (int) $v->count();
|
||||
if ($v instanceof Countable) return (int) count($v);
|
||||
}
|
||||
return (int) $fallback;
|
||||
};
|
||||
|
||||
$likes = $safeInt($art->likes ?? $art->favourites ?? 0);
|
||||
$downloads = $safeInt($art->downloads ?? $art->downloaded ?? 0);
|
||||
|
||||
$img_src = (string) ($art->thumb ?? $art->thumbnail_url ?? '/images/placeholder.jpg');
|
||||
$img_srcset = (string) ($art->thumb_srcset ?? $art->thumbnail_srcset ?? $img_src);
|
||||
$img_avif_srcset = (string) ($art->thumb_avif_srcset ?? $img_srcset);
|
||||
$img_webp_srcset = (string) ($art->thumb_webp_srcset ?? $img_srcset);
|
||||
|
||||
// Width/height may be stored directly or as a related object; handle safely
|
||||
$resolveDimension = function ($val, $fallback) {
|
||||
if (is_numeric($val)) return (int) $val;
|
||||
if (is_array($val)) {
|
||||
$v = reset($val);
|
||||
return is_numeric($v) ? (int) $v : (int) $fallback;
|
||||
}
|
||||
if (is_object($val)) {
|
||||
if (method_exists($val, 'first')) {
|
||||
$f = $val->first();
|
||||
if (is_object($f) && isset($f->width)) return (int) ($f->width ?: $fallback);
|
||||
if (is_object($f) && isset($f->height)) return (int) ($f->height ?: $fallback);
|
||||
}
|
||||
// Try numeric cast otherwise
|
||||
if (isset($val->width)) return (int) $val->width;
|
||||
if (isset($val->height)) return (int) $val->height;
|
||||
}
|
||||
return (int) $fallback;
|
||||
};
|
||||
|
||||
$img_width = max(1, $resolveDimension($art->width ?? null, 800));
|
||||
$img_height = max(1, $resolveDimension($art->height ?? null, 600));
|
||||
|
||||
$contentUrl = $img_src;
|
||||
$cardUrl = (string) ($art->url ?? '#');
|
||||
@endphp
|
||||
|
||||
<article class="nova-card artwork" itemscope itemtype="https://schema.org/ImageObject">
|
||||
<meta itemprop="name" content="{{ $title }}">
|
||||
<meta itemprop="contentUrl" content="{{ $contentUrl }}">
|
||||
<meta itemprop="creator" content="{{ $author }}">
|
||||
<meta itemprop="license" content="{{ $license }}">
|
||||
|
||||
<a href="{{ $cardUrl }}" itemprop="url" class="group relative block overflow-hidden rounded-2xl ring-1 ring-white/5 bg-black/20 shadow-lg shadow-black/40 transition-all duration-200 ease-out hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-300/70">
|
||||
|
||||
@if(!empty($category))
|
||||
<div class="absolute left-3 top-3 z-30 rounded-md bg-black/55 px-2 py-1 text-xs text-white backdrop-blur-sm">{{ $category }}</div>
|
||||
@endif
|
||||
|
||||
<div class="nova-card-media relative aspect-[16/10] overflow-hidden bg-neutral-900">
|
||||
<picture>
|
||||
<source srcset="{{ $img_avif_srcset }}" type="image/avif">
|
||||
<source srcset="{{ $img_webp_srcset }}" type="image/webp">
|
||||
<img
|
||||
src="{{ $img_src }}"
|
||||
srcset="{{ $img_srcset }}"
|
||||
sizes="(max-width: 768px) 50vw, (max-width: 1280px) 33vw, 25vw"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
alt="{{ e($title) }}"
|
||||
width="{{ $img_width }}"
|
||||
height="{{ $img_height }}"
|
||||
class="h-full w-full object-cover transition-transform duration-200 ease-out group-hover:scale-[1.04]"
|
||||
itemprop="thumbnailUrl"
|
||||
/>
|
||||
</picture>
|
||||
|
||||
<div class="pointer-events-none absolute inset-x-0 bottom-0 z-20 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-3 backdrop-blur-[2px] opacity-100 transition-opacity duration-200 md:opacity-0 md:group-hover:opacity-100 md:group-focus-visible:opacity-100">
|
||||
<div class="truncate text-sm font-semibold text-white">{{ $title }}</div>
|
||||
<div class="mt-1 flex items-center justify-between gap-3 text-xs text-white/80">
|
||||
<span class="truncate">by {{ $author }}</span>
|
||||
<span class="shrink-0">❤ {{ $likes }} · ⬇ {{ $downloads }}</span>
|
||||
</div>
|
||||
<div class="mt-1 text-[11px] text-white/70">
|
||||
@if($resolution !== '')
|
||||
{{ $resolution }} •
|
||||
@endif
|
||||
{{ $category }} • {{ $license }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<span class="sr-only">{{ $title }} by {{ $author }}</span>
|
||||
</a>
|
||||
</article>
|
||||
{{-- Shim for legacy artwork card includes. Points to new web partial. --}}
|
||||
@include('web.partials._artwork_card')
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
<div class="legacy-artwork">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="effect2" style="max-width:800px">
|
||||
<a class="artwork-zoom" href="{{ $thumb_file ?? '#' }}" title="{{ $artwork->name }}">
|
||||
<img src="{{ $thumb_file }}" alt="{{ $artwork->name ?? '' }}" class="img-thumbnail img-responsive">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="clear:both;margin-top:10px;">
|
||||
<img src="/avatar/{{ $artwork->user_id ?? 0 }}/{{ urlencode($artwork->icon ?? '') }}" class="pull-left" style="padding-right:10px;max-height:50px;" alt="Avatar">
|
||||
<h1 class="page-header">{{ $artwork->name }}</h1>
|
||||
<p>By <i class="fa fa-user fa-fw"></i> <a href="/profile/{{ $artwork->user_id }}/{{ \Illuminate\Support\Str::slug($artwork->uname) }}" title="Profile of member {{ $artwork->uname }}">{{ $artwork->uname }}</a></p>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
@if(!empty($artwork->description))
|
||||
<div class="panel panel-skinbase">
|
||||
<div class="panel-body">{!! nl2br(e($artwork->description)) !!}</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Comments --}}
|
||||
@if(!empty($comments) && $comments->count() > 0)
|
||||
<h3 class="comment-title"><i class="fa fa-comments fa-fw"></i> Comments:</h3>
|
||||
@foreach($comments as $comment)
|
||||
<div class="comment_box effect3">
|
||||
<div class="cb_image">
|
||||
<a href="/profile/{{ $comment->user_id }}/{{ urlencode($comment->uname) }}">
|
||||
<img src="/avatar/{{ $comment->user_id }}/{{ urlencode($comment->icon) }}" width="50" height="50" class="comment_avatar" alt="{{ $comment->uname }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="bubble_comment panel panel-skinbase">
|
||||
<div class="panel-heading">
|
||||
<div class="pull-right">{{ \Illuminate\Support\Str::limit($comment->date, 16) }}</div>
|
||||
<h5 class="panel-title">Comment by: <a href="/profile/{{ $comment->user_id }}/{{ urlencode($comment->uname) }}">{{ $comment->uname }}</a></h5>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! nl2br(e($comment->description)) !!}
|
||||
</div>
|
||||
@if(!empty($comment->signature))
|
||||
<div class="panel-footer comment-footer">{!! nl2br(e($comment->signature)) !!}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@auth
|
||||
<div class="comment_box effect3">
|
||||
<div class="cb_image">
|
||||
<a href="/profile/{{ auth()->id() }}/{{ urlencode(auth()->user()->name) }}">
|
||||
<img src="/avatar/{{ auth()->id() }}/{{ urlencode(auth()->user()->avatar ?? '') }}" class="comment_avatar" width="50" height="50">
|
||||
</a>
|
||||
<br>
|
||||
<a href="/profile/{{ auth()->id() }}/{{ urlencode(auth()->user()->name) }}">{{ auth()->user()->name }}</a>
|
||||
</div>
|
||||
<form action="/art/{{ $artwork->id }}" method="post">
|
||||
@csrf
|
||||
<div class="bubble_comment panel panel-skinbase">
|
||||
<div class="panel-heading"><h4 class="panel-title">Write comment</h4></div>
|
||||
<div class="panel-body">
|
||||
<textarea name="comment_text" class="form-control" style="width:98%; height:120px;"></textarea><br>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<button type="submit" class="btn btn-success">Post comment</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="artwork_id" value="{{ $artwork->id }}">
|
||||
<input type="hidden" name="action" value="store_comment">
|
||||
</form>
|
||||
</div>
|
||||
@endauth
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default effect3">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-info" style="width:100%;margin-bottom:5px" href="/download/{{ $artwork->id }}" title="Download Full Size Artwork to your computer">
|
||||
<i class="fa fa-download fa-fw"></i> Download
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@if(auth()->check())
|
||||
<span class="btn btn-warning addFavourites" style="width:100%" data-artwork_id="{{ $artwork->id }}"><i class="fa fa-heart fa-fw"></i> Add To Favourites</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<h4 class="panel-title">Details</h4>
|
||||
<table class="table table-condensed">
|
||||
<tr><td>Category</td><td class="text-right">{{ $artwork->category_name ?? '' }}</td></tr>
|
||||
<tr><td>Uptime</td><td class="text-right">{{ \Illuminate\Support\Str::limit($artwork->datum ?? '', 10) }}</td></tr>
|
||||
<tr><td>Submitted</td><td class="text-right">{{ optional(\Carbon\Carbon::parse($artwork->datum))->format('d.m.Y') }}</td></tr>
|
||||
<tr><td>Resolution</td><td class="text-right">{{ ($artwork->width ?? '') . 'x' . ($artwork->height ?? '') }}</td></tr>
|
||||
</table>
|
||||
|
||||
<h4 class="panel-title">Statistics</h4>
|
||||
<table class="table table-condensed">
|
||||
<tr><td>Views</td><td class="text-right">{{ $artwork->views ?? 0 }}</td></tr>
|
||||
<tr><td>Downloads</td><td class="text-right">{{ $artwork->dls ?? 0 }} @if(!empty($num_downloads)) <small>({{ $num_downloads }} today)</small>@endif</td></tr>
|
||||
</table>
|
||||
|
||||
<h4 class="panel-title">Social</h4>
|
||||
<div class="fb-like" data-href="{{ url()->current() }}" data-send="true" data-width="450" data-show-faces="true"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,44 +0,0 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="effect2 page-header-wrap">
|
||||
<header class="page-heading">
|
||||
<h1 class="page-header">{{ $page_title ?? 'Followers' }}</h1>
|
||||
<p>Members who follow you</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="icon-grid">
|
||||
@forelse($followers as $f)
|
||||
@php
|
||||
$icon = $f->icon ?? 'default.jpg';
|
||||
$uname = $f->uname ?? 'Unknown';
|
||||
$followerId = $f->user_id ?? null;
|
||||
@endphp
|
||||
|
||||
<div class="icon-flex">
|
||||
<div>
|
||||
<a href="/profile/{{ $followerId }}/{{ Str::slug($uname) }}">
|
||||
<h4>{{ $uname }}</h4>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="/profile/{{ $followerId }}/{{ Str::slug($uname) }}">
|
||||
<img src="/avatar/{{ $followerId }}/{{ rawurlencode($icon) }}" alt="{{ $uname }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<p>No followers yet.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@if(method_exists($followers, 'links'))
|
||||
<div class="mt-3">{{ $followers->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,52 +0,0 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="effect2 page-header-wrap">
|
||||
<header class="page-heading">
|
||||
<h1 class="page-header">Browse Categories</h1>
|
||||
<p>Select a category to view its artworks.</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@forelse ($contentTypes as $ct)
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>{{ $ct->name }}</strong></div>
|
||||
<div class="panel-body">
|
||||
<p>{!! $ct->description ?? 'Browse artworks by content type.' !!}</p>
|
||||
|
||||
@forelse ($ct->roots as $cat)
|
||||
@php
|
||||
$name = $cat->category_name ?? '';
|
||||
$subs = $subgroups[$cat->category_id] ?? collect();
|
||||
@endphp
|
||||
<div class="legacy-root-category">
|
||||
<h4>{{ $name }}</h4>
|
||||
<ul class="browseList">
|
||||
@forelse ($subs as $sub)
|
||||
@php $picture = $sub->picture ?? 'cfolder15.gif'; @endphp
|
||||
<li style="width:19%">
|
||||
<img src="/gfx/icons/{{ $picture }}" width="15" height="15" border="0" alt="{{ $sub->category_name }}" />
|
||||
<a href="/{{ $name }}/{{ Str::slug($sub->category_name) }}/{{ $sub->category_id }}" title="{{ $sub->category_name }}">{{ $sub->category_name }}</a>
|
||||
</li>
|
||||
@empty
|
||||
<li class="text-muted">No subcategories</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
@empty
|
||||
<div class="alert alert-info">No categories for this content type.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-info">No content types available.</div>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,81 +0,0 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@php
|
||||
use Illuminate\Support\Str;
|
||||
use App\Banner;
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page category-wrapper">
|
||||
@php Banner::ShowResponsiveAd(); @endphp
|
||||
|
||||
<div id="category-artworks">
|
||||
<div class="effect2 page-header-wrap">
|
||||
<header class="page-heading">
|
||||
<div class="category-display"><i class="fa fa-bars fa-fw"></i></div>
|
||||
|
||||
@if (!empty($category->rootid) && $category->rootid > 0)
|
||||
<div id="location_bar">
|
||||
<a href="/{{ $category->category_name }}/{{ $category->category_id }}">{{ $category->category_name }}</a>
|
||||
@if (!empty($category->rootid))
|
||||
»
|
||||
<a href="/{{ $group }}/{{ Str::slug($category->category_name) }}/{{ $category->category_id }}">{{ $category->category_name }}</a>
|
||||
@endif
|
||||
:
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h1 class="page-header">{{ $category->category_name }}</h1>
|
||||
<p style="clear:both">{!! $category->description ?? ($group . ' artworks on Skinbase.') !!}</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
@if ($artworks->count())
|
||||
<div class="container_photo gallery_box">
|
||||
@foreach ($artworks as $art)
|
||||
@include('legacy._artwork_card', ['art' => $art])
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>No Artworks Yet</strong></div>
|
||||
<div class="panel-body">
|
||||
<p>Once uploads arrive they will appear here. Check back soon.</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="paginationMenu text-center">
|
||||
{{ $artworks->withQueryString()->links('pagination::bootstrap-4') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="category-list">
|
||||
<div id="artwork_subcategories">
|
||||
<div class="category-toggle"><i class="fa fa-bars fa-fw"></i></div>
|
||||
|
||||
<h5 class="browse_categories">Main Categories:</h5>
|
||||
<ul>
|
||||
<li><a href="/Photography/3" title="Stock Photography"><i class="fa fa-photo fa-fw"></i> Photography</a></li>
|
||||
<li><a href="/Wallpapers/2" title="Desktop Wallpapers"><i class="fa fa-photo fa-fw"></i> Wallpapers</a></li>
|
||||
<li><a href="/Skins/1" title="Skins for Applications"><i class="fa fa-photo fa-fw"></i> Skins</a></li>
|
||||
<li><a href="/Other/4" title="Other Artworks"><i class="fa fa-photo fa-fw"></i> Other</a></li>
|
||||
</ul>
|
||||
|
||||
<h5 class="browse_categories">Browse Subcategories:</h5>
|
||||
<ul class="scrollContent" data-mcs-theme="dark">
|
||||
@foreach ($subcategories as $sub)
|
||||
@php $selected = $sub->category_id == $category->category_id ? 'selected_group' : ''; @endphp
|
||||
<li class="subgroup {{ $selected }}">
|
||||
<a href="/{{ $group }}/{{ Str::slug($sub->category_name) }}/{{ $sub->category_id }}">{{ $sub->category_name }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="/js/legacy-gallery-init.js"></script>
|
||||
@endpush
|
||||
@@ -1,33 +0,0 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="page-heading">
|
||||
<h1 class="page-header">{{ $page_title }}</h1>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="mb-3">{!! $adHtml !!}</div>
|
||||
|
||||
<div class="panel panel-skinbase effect2">
|
||||
<div class="panel-body">
|
||||
{!! $chatHtml !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="smileyList">
|
||||
@foreach ($smileys as $smiley)
|
||||
@php
|
||||
$codeJs = json_encode($smiley->code);
|
||||
$imgSrc = '/gfx/smiles/' . rawurlencode($smiley->picture ?? '');
|
||||
$alt = e($smiley->emotion ?? '');
|
||||
@endphp
|
||||
<li>
|
||||
<img style="cursor:pointer;" onclick="put_smiley_chat({{ $codeJs }}, 'chat_txt');" alt="{{ $alt }}" src="{{ $imgSrc }}">
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,48 +0,0 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="effect2 page-header-wrap">
|
||||
<header class="page-heading">
|
||||
<h1 class="page-header">Daily Uploads</h1>
|
||||
<p>List of all latest uploaded Artworks - <strong>Skins</strong>, <strong>Photography</strong> and <strong>Wallpapers</strong> to Skinbase ordered by upload date.</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default uploads-panel effect2">
|
||||
<div class="panel-body">
|
||||
<b>Choose date:</b>
|
||||
<ul id="recentTab">
|
||||
@foreach($dates as $i => $d)
|
||||
<li id="tab-{{ $i+1 }}" data-iso="{{ $d['iso'] }}">{{ $d['label'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<div id="myContent">
|
||||
@include('legacy.partials.daily-uploads-grid', ['arts' => $recent])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
(function(){
|
||||
function loadDate(iso, tabId){
|
||||
var el = document.getElementById('myContent');
|
||||
fetch('/daily-uploads?ajax=1&datum=' + encodeURIComponent(iso))
|
||||
.then(function(r){ return r.text(); })
|
||||
.then(function(html){ el.innerHTML = html; });
|
||||
}
|
||||
|
||||
document.getElementById('recentTab').addEventListener('click', function(e){
|
||||
var li = e.target.closest('li');
|
||||
if (!li) return;
|
||||
var iso = li.getAttribute('data-iso');
|
||||
loadDate(iso, li.id);
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@endsection
|
||||
@@ -1,73 +0,0 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@section('content')
|
||||
<div class="container legacy-page">
|
||||
<div class="page-header-wrap">
|
||||
<h1 class="page-header">Favourites</h1>
|
||||
<p class="text-muted">List of uploaded Artworks which were added to user's favourites list</p>
|
||||
</div>
|
||||
|
||||
@if(session('status'))
|
||||
<div class="alert alert-success">{{ session('status') }}</div>
|
||||
@endif
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Thumb</th>
|
||||
<th>Name</th>
|
||||
<th>Author</th>
|
||||
<th>Date</th>
|
||||
<th>Dls</th>
|
||||
<th>Views</th>
|
||||
<th>Zoom</th>
|
||||
<th>Rating</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($results as $ar)
|
||||
@php
|
||||
$artId = (int)($ar->id ?? 0);
|
||||
$nid = (int)($artId / 100);
|
||||
$picture = rawurlencode($ar->picture ?? '');
|
||||
@endphp
|
||||
<tr>
|
||||
<td style="width:80px;">
|
||||
<a href="/art/{{ $artId }}/{{ $ar->slug }}"><img src="/files/archive/shots/{{ $nid }}/{{ $picture }}" height="60" alt="{{ $ar->name }}"></a>
|
||||
</td>
|
||||
<td>
|
||||
@if(auth()->check() && auth()->id() == ($ar->user_id ?? null))
|
||||
<form method="POST" action="{{ route('legacy.favourites.delete', ['userId' => auth()->id(), 'artworkId' => $artId]) }}" style="display:inline" onsubmit="return confirm('Really Remove From Favourites: {{ addslashes($ar->name ?? '') }}');">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-link"><img src="/gfx/icon_delete.gif" alt="Delete"></button>
|
||||
</form>
|
||||
@endif
|
||||
<a href="/art/{{ $artId }}/{{ $ar->slug }}">{{ $ar->name }}</a>
|
||||
</td>
|
||||
<td><a href="/profile.php?uname={{ urlencode($ar->uname ?? '') }}">{{ $ar->uname ?? '' }}</a></td>
|
||||
<td>{{ is_string($ar->datum) ? date('d.m.Y', strtotime($ar->datum)) : '' }}</td>
|
||||
<td>{{ (int)($ar->dls ?? 0) }}</td>
|
||||
<td>{{ (int)($ar->views ?? 0) }}</td>
|
||||
<td>{{ e($ar->zoom ?? '') }}</td>
|
||||
<td>{{ e($ar->rating ?? '') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{-- Simple pagination controls --}}
|
||||
@php
|
||||
$pages = (int) ceil($total / $hits);
|
||||
@endphp
|
||||
@if($pages > 1)
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
@for($i=1;$i<=$pages;$i++)
|
||||
<li class="{{ $i == $page ? 'active' : '' }}"><a href="{{ route('legacy.favourites', ['id' => $user_id, 'page' => $i]) }}">{{ $i }}</a></li>
|
||||
@endfor
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,49 +0,0 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="effect2 page-header-wrap">
|
||||
<header class="page-heading">
|
||||
<h1 class="page-header">{{ $page_title ?? 'Featured Artworks' }}</h1>
|
||||
</header>
|
||||
|
||||
<div class="mb-3">
|
||||
<strong>Show:</strong>
|
||||
<ul id="recentTab" class="list-inline">
|
||||
@foreach($artworkTypes as $k => $label)
|
||||
<li class="list-inline-item">
|
||||
<a href="/featured-artworks?type={{ (int)$k }}" @if((int)$k === (int)$type) class="active" @endif>{{ $label }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<br style="clear:both">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($artworks)
|
||||
<div class="container_photo gallery_box">
|
||||
@foreach($artworks as $art)
|
||||
@php
|
||||
$card = (object) [
|
||||
'url' => url('/art/' . ($art->id ?? '') . '/' . \Illuminate\Support\Str::slug($art->name ?? '')),
|
||||
'thumb' => $art->thumb_url ?? '/gfx/sb_join.jpg',
|
||||
'thumb_srcset' => $art->thumb_srcset ?? null,
|
||||
'name' => $art->name ?? '',
|
||||
'uname' => $art->uname ?? 'Unknown',
|
||||
'gid_num' => $art->gid_num ?? 0,
|
||||
'category_name' => $art->category_name ?? '',
|
||||
];
|
||||
@endphp
|
||||
@include('legacy._artwork_card', ['art' => $card])
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<p class="text-muted">No artworks found.</p>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="paginationMenu text-center">
|
||||
@if($artworks){{ $artworks->withQueryString()->links('pagination::bootstrap-4') }}@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="panel-body" style="display:flex; gap:12px;">
|
||||
<div style="min-width:52px;">
|
||||
@if (!empty($post->user_id) && !empty($post->icon))
|
||||
<img src="/avatar/{{ $post->user_id }}/{{ $post->icon }}" alt="{{ $post->uname }}" width="50" height="50" class="img-thumbnail">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $post->user_id, null, 50) }}" alt="{{ $post->uname }}" width="50" height="50" class="img-thumbnail">
|
||||
@else
|
||||
<div class="img-thumbnail" style="width:50px;height:50px;"></div>
|
||||
@endif
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="effect2 page-header-wrap">
|
||||
<header class="page-heading">
|
||||
<h1 class="page-header">Gallery: {{ $user->uname ?? $user->name ?? 'User' }}</h1>
|
||||
<p>{{ $user->name ?? '' }}</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>User Gallery</strong></div>
|
||||
<div class="panel-body">
|
||||
<div class="gallery-grid">
|
||||
@foreach($artworks as $art)
|
||||
<div class="thumb-card effect2">
|
||||
<a href="/art/{{ $art->id }}/{{ Str::slug($art->name ?? '') }}" class="thumb-link">
|
||||
<img src="{{ $art->thumb }}" srcset="{{ $art->thumb_srcset }}" alt="{{ $art->name }}" class="img-responsive" loading="lazy" decoding="async">
|
||||
</a>
|
||||
<div class="thumb-meta">
|
||||
<div class="thumb-title">{{ $art->name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>User</strong></div>
|
||||
<div class="panel-body">
|
||||
<img src="/avatar/{{ (int)($user->user_id ?? $user->id) }}/{{ rawurlencode($user->icon ?? '') }}" class="img-responsive" style="max-width:120px;" alt="{{ $user->uname ?? $user->name }}">
|
||||
<h3>{{ $user->uname ?? $user->name }}</h3>
|
||||
<p>{{ $user->about_me ?? '' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Simple pagination controls like legacy site --}}
|
||||
@php
|
||||
$pages = (int) ceil($total / $hits);
|
||||
@endphp
|
||||
@if($pages > 1)
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
@for($i=1;$i<=$pages;$i++)
|
||||
<li class="{{ $i == $page ? 'active' : '' }}"><a href="{{ url('/gallery/'.$user->id.'?page='.$i) }}">{{ $i }}</a></li>
|
||||
@endfor
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@@ -32,7 +32,7 @@
|
||||
<tr>
|
||||
<td rowspan="3" valign="top" width="100" style="background:#fff">
|
||||
@if(!empty($comment->user_id) && !empty($comment->icon))
|
||||
<div align="center"><a href="/profile/{{ $comment->user_id }}"><img src="/avatar/{{ $comment->user_id }}/{{ \Illuminate\Support\Str::slug($comment->author ?? '') }}" width="50" height="50" border="0" alt="" /></a></div>
|
||||
<div align="center"><a href="/profile/{{ $comment->user_id }}"><img src="{{ \App\Support\AvatarUrl::forUser((int) $comment->user_id, null, 50) }}" width="50" height="50" border="0" alt="" /></a></div>
|
||||
@endif
|
||||
<br/>Posted by: <b><a href="/profile/{{ $comment->user_id ?? '' }}">{{ $comment->author }}</a></b><br/>
|
||||
Posts: {{ $postCounts[$comment->author] ?? 0 }}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<td style="width:60px;">
|
||||
@if(!empty($interview->icon))
|
||||
<a href="/profile/{{ $interview->user_id }}/{{ \Illuminate\Support\Str::slug($interview->uname ?? '') }}">
|
||||
<img src="/avatar/{{ $interview->user_id }}/{{ $interview->icon }}" width="50" height="50" alt="">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $interview->user_id, null, 50) }}" width="50" height="50" alt="">
|
||||
</a>
|
||||
@else
|
||||
<img src="/gfx/avatar.jpg" alt="">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="comment_box effect3">
|
||||
<div class="cb_image">
|
||||
<a href="/profile/{{ $comment->commenter_id }}/{{ rawurlencode($comment->uname) }}">
|
||||
<img src="/avatar/{{ (int)$comment->commenter_id }}/{{ rawurlencode($comment->uname) }}" width="50" height="50" class="comment_avatar" alt="{{ $comment->uname }}">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $comment->commenter_id, null, 50) }}" width="50" height="50" class="comment_avatar" alt="{{ $comment->uname }}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<tr>
|
||||
<td width="50" class="text-center">
|
||||
<a href="/profile/{{ (int)$row->user_id }}/{{ rawurlencode($row->uname) }}">
|
||||
<img src="/avatar/{{ (int)$row->user_id }}/{{ rawurlencode($row->uname) }}" width="30" alt="{{ $row->uname }}">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $row->user_id, null, 32) }}" width="30" alt="{{ $row->uname }}">
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<div>
|
||||
<a href="/profile/{{ $friendId }}/{{ Str::slug($uname) }}">
|
||||
<img src="/avatar/{{ $friendId }}/{{ rawurlencode($icon) }}" alt="{{ $uname }}">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $friendId, null, 50) }}" alt="{{ $uname }}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
@if(!empty($ar->icon))
|
||||
<div style="float:right;padding-left:20px;">
|
||||
<a href="/profile/{{ $ar->user_id ?? '' }}/{{ Str::slug($ar->uname ?? '') }}">
|
||||
<img src="/avatar/{{ $ar->user_id ?? '' }}/{{ $ar->icon ?? '' }}" width="50" height="50" alt="">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) ($ar->user_id ?? 0), null, 50) }}" width="50" height="50" alt="">
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
@if($arts && count($arts))
|
||||
<div class="container_photo gallery_box">
|
||||
@foreach($arts as $art)
|
||||
<div class="photo_frame">
|
||||
<a href="/art/{{ $art->id }}/{{ \Illuminate\Support\Str::slug($art->name ?? '') }}">
|
||||
<img src="{{ $art->thumb }}" srcset="{{ $art->thumb_srcset }}" loading="lazy" decoding="async" alt="{{ $art->name }}" class="img-responsive">
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<br style="clear:both"><br>
|
||||
@else
|
||||
<p class="text-muted">No uploads for this date.</p>
|
||||
@endif
|
||||
@@ -1,12 +0,0 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@section('content')
|
||||
<div class="container" style="padding-top:20px;">
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>{{ $title ?? 'Legacy Page' }}</strong></div>
|
||||
<div class="panel-body">
|
||||
<p>This legacy page is not yet migrated. Navigation works; content will be implemented soon.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>User</strong></div>
|
||||
<div class="panel-body">
|
||||
<img src="/avatar/{{ (int)$user->user_id }}/{{ rawurlencode($user->icon ?? '') }}" class="img-responsive" style="max-width:120px;" alt="{{ $user->uname }}">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $user->user_id, null, 128) }}" class="img-responsive" style="max-width:120px;" alt="{{ $user->uname }}">
|
||||
<h3>{{ $user->uname }}</h3>
|
||||
<p>{{ $user->about_me ?? '' }}</p>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="comment_box effect3">
|
||||
<div class="cb_image">
|
||||
<a href="/profile/{{ (int)($author->id ?? $author->user_id) }}/{{ rawurlencode($author->name ?? $author->uname ?? '') }}">
|
||||
<img src="/avatar/{{ (int)($author->id ?? $author->user_id) }}/{{ rawurlencode($author->icon ?? '') }}" width="50" height="50" class="comment_avatar" alt="{{ $author->name ?? $author->uname ?? '' }}">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) ($author->id ?? $author->user_id), null, 50) }}" width="50" height="50" class="comment_avatar" alt="{{ $author->name ?? $author->uname ?? '' }}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -119,9 +119,9 @@
|
||||
}
|
||||
try {
|
||||
$profile = \Illuminate\Support\Facades\DB::table('user_profiles')->where('user_id', $userId)->first();
|
||||
$avatar = $profile->avatar ?? null;
|
||||
$avatarHash = $profile->avatar_hash ?? null;
|
||||
} catch (\Throwable $e) {
|
||||
$avatar = null;
|
||||
$avatarHash = null;
|
||||
}
|
||||
$displayName = auth()->user()->name ?: (auth()->user()->username ?? '');
|
||||
@endphp
|
||||
@@ -141,9 +141,7 @@
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle c-white" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
|
||||
@if($avatar)
|
||||
<img src="/storage/{{ ltrim($avatar, '/') }}" alt="{{ $displayName }}" width="18">
|
||||
@endif
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $userId, $avatarHash ?? null, 32) }}" alt="{{ $displayName }}" width="18">
|
||||
<span class="username">{{ $displayName }}</span>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</a>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<tr>
|
||||
<td width="80">
|
||||
<a href="/profile/{{ $u->user_id }}/{{ \Illuminate\Support\Str::slug($u->uname) }}">
|
||||
<img src="/avatar/{{ $u->user_id }}/{{ rawurlencode($u->icon ?? '') }}" width="30" height="30" alt="{{ $u->uname }}">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $u->user_id, null, 32) }}" width="30" height="30" alt="{{ $u->uname }}">
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
@@ -60,7 +60,7 @@
|
||||
<tr>
|
||||
<td width="60" align="center">
|
||||
<a href="/profile/{{ $f->user_id }}/{{ \Illuminate\Support\Str::slug($f->uname) }}">
|
||||
<img src="/avatar/{{ $f->user_id }}/{{ rawurlencode($f->uname) }}" width="30" alt="{{ $f->uname }}">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $f->user_id, null, 32) }}" width="30" alt="{{ $f->uname }}">
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
@@ -92,7 +92,7 @@
|
||||
<tr>
|
||||
<td width="50" align="center">
|
||||
<a href="/profile/{{ $c->user_id }}/{{ \Illuminate\Support\Str::slug($c->uname) }}">
|
||||
<img src="/avatar/{{ $c->user_id }}/{{ rawurlencode($c->uname) }}" width="30" alt="{{ $c->uname }}">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $c->user_id, null, 32) }}" width="30" alt="{{ $c->uname }}">
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user