Upload beautify
This commit is contained in:
118
resources/views/web/art.blade.php
Normal file
118
resources/views/web/art.blade.php
Normal file
@@ -0,0 +1,118 @@
|
||||
@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="{{ \App\Support\AvatarUrl::forUser((int) ($artwork->user_id ?? 0), null, 50) }}" 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="{{ \App\Support\AvatarUrl::forUser((int) $comment->user_id, null, 50) }}" 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="{{ \App\Support\AvatarUrl::forUser((int) auth()->id(), null, 50) }}" 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
|
||||
52
resources/views/web/categories.blade.php
Normal file
52
resources/views/web/categories.blade.php
Normal file
@@ -0,0 +1,52 @@
|
||||
@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
|
||||
81
resources/views/web/category.blade.php
Normal file
81
resources/views/web/category.blade.php
Normal file
@@ -0,0 +1,81 @@
|
||||
@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('web.partials._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
|
||||
48
resources/views/web/daily-uploads.blade.php
Normal file
48
resources/views/web/daily-uploads.blade.php
Normal file
@@ -0,0 +1,48 @@
|
||||
@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('web.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
|
||||
49
resources/views/web/featured-artworks.blade.php
Normal file
49
resources/views/web/featured-artworks.blade.php
Normal file
@@ -0,0 +1,49 @@
|
||||
@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('web.partials._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
|
||||
60
resources/views/web/gallery.blade.php
Normal file
60
resources/views/web/gallery.blade.php
Normal file
@@ -0,0 +1,60 @@
|
||||
@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="{{ \App\Support\AvatarUrl::forUser((int) ($user->user_id ?? $user->id), null, 128) }}" 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
|
||||
17
resources/views/web/home.blade.php
Normal file
17
resources/views/web/home.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@php
|
||||
use Illuminate\Support\Str;
|
||||
use Carbon\Carbon;
|
||||
use App\Services\LegacyService;
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
@include('web.home.featured')
|
||||
|
||||
@include('web.home.uploads')
|
||||
|
||||
@include('web.home.news')
|
||||
</div>
|
||||
@endsection
|
||||
47
resources/views/web/home/featured.blade.php
Normal file
47
resources/views/web/home/featured.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
{{-- Featured row (migrated from legacy/home/featured.blade.php) --}}
|
||||
<div class="row featured-row">
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<div class="featured-card effect2">
|
||||
<div class="card-header">Featured Artwork</div>
|
||||
<div class="card-body text-center">
|
||||
<a href="/art/{{ data_get($featured, 'id') }}/{{ Str::slug(data_get($featured, 'name') ?? 'artwork') }}" class="thumb-link">
|
||||
@php
|
||||
$fthumb = data_get($featured, 'thumb_url') ?? data_get($featured, 'thumb');
|
||||
@endphp
|
||||
<img src="{{ $fthumb }}" class="img-responsive featured-img" alt="{{ data_get($featured, 'name') }}">
|
||||
</a>
|
||||
<div class="featured-title">{{ data_get($featured, 'name') }}</div>
|
||||
<div class="featured-author">by {{ data_get($featured, 'uname') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<div class="featured-card effect2">
|
||||
<div class="card-header">Featured by Members Vote</div>
|
||||
<div class="card-body text-center">
|
||||
<a href="/art/{{ data_get($memberFeatured, 'id') }}/{{ Str::slug(data_get($memberFeatured, 'name') ?? 'artwork') }}" class="thumb-link">
|
||||
@php
|
||||
$mthumb = data_get($memberFeatured, 'thumb_url') ?? data_get($memberFeatured, 'thumb');
|
||||
@endphp
|
||||
<img src="{{ $mthumb }}" class="img-responsive featured-img" alt="{{ data_get($memberFeatured, 'name') }}">
|
||||
</a>
|
||||
<div class="featured-title">{{ data_get($memberFeatured, 'name') }}</div>
|
||||
<div class="featured-author">by {{ data_get($memberFeatured, 'uname') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<div class="featured-card join-card effect2">
|
||||
<div class="card-header">Join to Skinbase World</div>
|
||||
<div class="card-body text-center">
|
||||
<a href="{{ route('register') }}" title="Join Skinbase">
|
||||
<img src="/gfx/sb_join.jpg" alt="Join SkinBase Community" class="img-responsive join-img center-block">
|
||||
</a>
|
||||
<div class="join-text">Join to Skinbase and be part of our great community! We have big collection of high quality Photography, Wallpapers and Skins for popular applications.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
80
resources/views/web/home/news.blade.php
Normal file
80
resources/views/web/home/news.blade.php
Normal file
@@ -0,0 +1,80 @@
|
||||
{{-- News and forum columns (migrated from legacy/home/news.blade.php) --}}
|
||||
<div class="row news-row">
|
||||
<div class="col-sm-6">
|
||||
@forelse ($forumNews as $item)
|
||||
<div class="panel panel-skinbase effect2">
|
||||
<div class="panel-heading"><h4 class="panel-title">{{ $item->topic }}</h4></div>
|
||||
<div class="panel-body">
|
||||
<div class="text-muted news-head">
|
||||
Written by {{ $item->uname }} on {{ Carbon::parse($item->post_date)->format('j F Y \@ H:i') }}
|
||||
</div>
|
||||
{!! Str::limit(strip_tags($item->preview ?? ''), 240, '...') !!}
|
||||
<br>
|
||||
<a class="clearfix btn btn-xs btn-info" href="/forum/{{ $item->topic_id }}/{{ Str::slug($item->topic ?? '') }}" title="{{ strip_tags($item->topic) }}">More</a>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<p>No forum news available.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
@forelse ($ourNews as $news)
|
||||
<div class="panel panel-skinbase effect2">
|
||||
<div class="panel-heading"><h3 class="panel-title">{{ $news->headline }}</h3></div>
|
||||
<div class="panel-body">
|
||||
<div class="text-muted news-head">
|
||||
<i class="fa fa-user"></i> {{ $news->uname }}
|
||||
<i class="fa fa-calendar"></i> {{ Carbon::parse($news->create_date)->format('j F Y \@ H:i') }}
|
||||
<i class="fa fa-info"></i> {{ $news->category_name }}
|
||||
<i class="fa fa-info"></i> {{ $news->views }} reads
|
||||
<i class="fa fa-comment"></i> {{ $news->num_comments }} comments
|
||||
</div>
|
||||
|
||||
@if (!empty($news->picture))
|
||||
@php $nid = floor($news->news_id / 100); @endphp
|
||||
<div class="col-md-4">
|
||||
<img src="/archive/news/{{ $nid }}/{{ $news->picture }}" class="img-responsive" alt="{{ $news->headline }}">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{!! $news->preview !!}
|
||||
</div>
|
||||
@else
|
||||
{!! $news->preview !!}
|
||||
@endif
|
||||
|
||||
<a class="clearfix btn btn-xs btn-info text-white" href="/news/{{ $news->news_id }}/{{ Str::slug($news->headline ?? '') }}">More</a>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<p>No news available.</p>
|
||||
@endforelse
|
||||
|
||||
{{-- Site info --}}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><strong>Info</strong></div>
|
||||
<div class="panel-body">
|
||||
<h4>Photography, Wallpapers and Skins... Thats Skinbase</h4>
|
||||
<p>Skinbase is the site dedicated to <strong>Photography</strong>, <strong>Wallpapers</strong> and <strong>Skins</strong> for <u>popular applications</u> for every major operating system like Windows, Mac OS X, Linux, iOS and Android</p>
|
||||
<em>Our members every day uploads new artworks to our site, so don't hesitate and check Skinbase frequently for updates. We also have forum where you can discuss with other members with anything.</em>
|
||||
<p>On the site toolbar you can click on Categories and start browsing our atwork (<i>photo</i>, <i>desktop themes</i>, <i>pictures</i>) and of course you can <u>download</u> them for free!</p>
|
||||
<p>We are also active on all major <b>social</b> sites, find us there too</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Latest forum activity --}}
|
||||
<div class="panel panel-default activity-panel">
|
||||
<div class="panel-heading"><strong>Latest Forum Activity</strong></div>
|
||||
<div class="panel-body">
|
||||
<div class="list-group effect2">
|
||||
@forelse ($latestForumActivity as $topic)
|
||||
<a class="list-group-item" href="/forum/{{ $topic->topic_id }}/{{ Str::slug($topic->topic ?? '') }}">
|
||||
{{ $topic->topic }} <span class="badge badge-info">{{ $topic->numPosts }}</span>
|
||||
</a>
|
||||
@empty
|
||||
<p>No recent forum activity.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
14
resources/views/web/home/uploads.blade.php
Normal file
14
resources/views/web/home/uploads.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
{{-- Latest uploads grid (migrated from legacy/home/uploads.blade.php) --}}
|
||||
<div class="gallery-grid">
|
||||
@foreach ($latestUploads as $upload)
|
||||
<div class="thumb-card effect2">
|
||||
@php
|
||||
$t = \App\Services\ThumbnailPresenter::present($upload, 'md');
|
||||
@endphp
|
||||
<a href="/art/{{ $t['id'] }}/{{ Str::slug($t['title'] ?: 'artwork') }}" title="{{ $t['title'] }}" class="thumb-link">
|
||||
<img src="{{ $t['url'] }}" @if(!empty($t['srcset'])) srcset="{{ $t['srcset'] }}" @endif alt="{{ $t['title'] }}" class="img-responsive">
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div> <!-- end .gallery-grid -->
|
||||
|
||||
112
resources/views/web/partials/_artwork_card.blade.php
Normal file
112
resources/views/web/partials/_artwork_card.blade.php
Normal file
@@ -0,0 +1,112 @@
|
||||
@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)) {
|
||||
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);
|
||||
|
||||
$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);
|
||||
}
|
||||
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>
|
||||
14
resources/views/web/partials/daily-uploads-grid.blade.php
Normal file
14
resources/views/web/partials/daily-uploads-grid.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@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
|
||||
Reference in New Issue
Block a user