forge/resources/views/components/mod-list-stats.blade.php
Refringe 713ea7e076
Download Number Macro
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.
2024-08-09 00:35:18 -04:00

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>
&mdash; Created
<time datetime="{{ $mod->created_at->format('c') }}">
{{ $mod->created_at->diffForHumans() }}
</time>
</span>
@elseif(!is_null($modVersion->updated_at))
<span>&mdash; Updated {{ $modVersion->updated_at->diffForHumans() }}</span>
@endif
</p>