Enable CSS to show thumbnail at a fixed height. Fix showing created dates are the same

This commit is contained in:
Deon George 2024-09-18 13:55:09 +10:00
parent 90323fef5f
commit 5bd5bb8488
4 changed files with 9 additions and 5 deletions

View File

@ -0,0 +1,4 @@
.thumbnail {
width: auto !important;
height: 20em !important;
}

View File

@ -17,7 +17,7 @@
<tr>
<td>
<input type="hidden" name="items[]" value="{{ $o->id }}">
@include($o::config.'.widgets.thumbnail',['o'=>$o,'reference'=>$o->newInstance()])
@include($o::config.'.widgets.thumbnail',['o'=>$o,'reference'=>$o->newInstance(),'css'=>'thumbnail'])
</td>
@if (! ($d=$o->myduplicates()->get())->count())
@ -32,7 +32,7 @@
@php($rendered->push($item))
<td>
<input type="hidden" name="items[]" value="{{ $item->id }}">
@include($item::config.'.widgets.thumbnail',['o'=>$item,'reference'=>$o])
@include($item::config.'.widgets.thumbnail',['o'=>$item,'reference'=>$o,'css'=>'thumbnail'])
</td>
@endforeach
@endif

View File

@ -1,3 +1,3 @@
<a href="{{ url('p/view',$id) }}" target="{{ $id }}">
<img class="pb-3 w-100" src="{{ url('p/thumbnail',$id) }}">
<img @class(['pb-3','w-100',$css]) src="{{ url('p/thumbnail',$id) }}">
</a>

View File

@ -25,7 +25,7 @@
</div>
<div class="card-body">
<x-photo.thumbnail :id="$o->id"/>
<x-photo.thumbnail :id="$o->id" :css="$css ?? NULL"/>
</div>
<div class="card-footer card-comments">
@ -33,7 +33,7 @@
<tr><th>ID</th><td><x-info :id="$o->id"/></td></tr>
@foreach($data as $k=>$v)
<tr @class(['bg-success'=>($reference->exists && $reference->{$v[1]} === $o->{$v[1]})])>
<tr @class(['bg-success'=>($reference->exists && ((string)$reference->{$v[1]} === (string)$o->{$v[1]}))])>
<th>{{$k}}</th>
<td>{!! $o->{$v[1]} !!}</td>
</tr>