mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
Adds a `Number:downloads()` macro to format the number of downloads depending on how many there are. Example: 1259000 is converted into 1.25M, 125900 is converted into 125.9K. Updated the views to use this macro. Also included a title tag with the exact number so they can be viewed on hover.
14 lines
590 B
PHP
14 lines
590 B
PHP
<p {{ $attributes->class(['text-slate-700 dark:text-gray-300 text-sm']) }}>
|
|
<span title="{{ __('Exactly') }} {{ $mod->total_downloads }}">{{ Number::downloads($mod->total_downloads) }} downloads</span>
|
|
@if(!is_null($mod->created_at))
|
|
<span>
|
|
— Created
|
|
<time datetime="{{ $mod->created_at->format('c') }}">
|
|
{{ $mod->created_at->diffForHumans() }}
|
|
</time>
|
|
</span>
|
|
@elseif(!is_null($modVersion->updated_at))
|
|
<span>— Updated {{ $modVersion->updated_at->diffForHumans() }}</span>
|
|
@endif
|
|
</p>
|