forge/resources/views/components/global-search-result-mod.blade.php
Refringe 8eae71b22a
Simplifies Latest Version Relationship
This change removes the `latestSptVersion()` relationship, which fetched the latest mod version for the latest SPT version, with a more simple `latestVersion()` relationship that simply fetches the latest mod version based on the mod version, version number field.

This is less complicated and much less confusing.
2024-07-23 21:21:55 -04:00

13 lines
1.1 KiB
PHP

<a href="/mod/{{ $result['id'] }}/{{ $result['slug'] }}" class="{{ $linkClass }}" role="listitem" tabindex="0" class="flex flex-col">
@if(empty($result->thumbnail))
<img src="https://placehold.co/450x450/EEE/31343C?font=source-sans-pro&text={{ $result['name'] }}" alt="{{ $result['name'] }}" class="block dark:hidden h-6 w-6 self-center border border-gray-200 group-hover/global-search-link:border-gray-400">
<img src="https://placehold.co/450x450/31343C/EEE?font=source-sans-pro&text={{ $result['name'] }}" alt="{{ $result['name'] }}" class="hidden dark:block h-6 w-6 self-center border border-gray-700 group-hover/global-search-link:border-gray-600">
@else
<img src="{{ Storage::url($result['thumbnail']) }}" alt="{{ $result['name'] }}" class="h-6 w-6 self-center">
@endif
<p class="flex-grow">{{ $result['name'] }}</p>
<p class="ml-auto self-center badge-version {{ $result['latestVersionColorClass'] }} }} inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-nowrap">
{{ $result['latestVersion'] }}
</p>
</a>