2024-12-05 13:00:17 +00:00
|
|
|
@import nu.marginalia.api.domains.model.SimilarDomain
|
|
|
|
@import java.util.List
|
|
|
|
|
|
|
|
@param String title
|
|
|
|
@param String domainName
|
|
|
|
@param List<SimilarDomain> list
|
|
|
|
|
|
|
|
@if (!list.isEmpty())
|
|
|
|
|
2024-12-13 14:22:01 +00:00
|
|
|
<div class="bg-white dark:bg-gray-800 shadow-sm rounded overflow-hidden border dark:border-gray-600">
|
2025-01-01 14:23:25 +00:00
|
|
|
<div class="px-4 py-2 bg-margeblue text-white border-b border-gray-200 dark:border-gray-600 flex place-items-baseline">
|
2024-12-05 17:43:27 +00:00
|
|
|
<h2 class="text-md">${title}</h2>
|
2025-01-01 14:23:25 +00:00
|
|
|
<div class="grow"></div>
|
|
|
|
<button class="hide-filter-button fas fa-close"></button>
|
2024-12-05 13:00:17 +00:00
|
|
|
</div>
|
|
|
|
|
2025-01-01 15:06:08 +00:00
|
|
|
<div class="overflow-x-auto overflow-hidden">
|
2024-12-13 14:22:01 +00:00
|
|
|
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-600">
|
2024-12-05 13:00:17 +00:00
|
|
|
<thead>
|
2024-12-13 14:22:01 +00:00
|
|
|
<tr class="bg-gray-50 dark:bg-gray-700">
|
2025-01-01 14:23:25 +00:00
|
|
|
<th scope="col" class="px-2 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-100 uppercase tracking-wider">Link</th>
|
2025-01-01 15:06:08 +00:00
|
|
|
<th scope="col" class="px-2 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-100 uppercase tracking-wider hidden sm:inline">Rank</th>
|
2024-12-13 14:22:01 +00:00
|
|
|
<th scope="col" class="px-2 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-100 uppercase tracking-wider">Domain</th>
|
|
|
|
<th scope="col" class="px-2 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-100 uppercase tracking-wider">Similarity</th>
|
2024-12-05 13:00:17 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2024-12-13 14:22:01 +00:00
|
|
|
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-600 text-xs">
|
2024-12-05 13:00:17 +00:00
|
|
|
@for(SimilarDomain item : list)
|
2024-12-13 15:22:11 +00:00
|
|
|
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700">
|
2025-01-01 14:23:25 +00:00
|
|
|
<td class="px-3 py-6 md:py-3 whitespace-nowrap">
|
2024-12-05 13:00:17 +00:00
|
|
|
@if(item.linkType().isLinked())
|
2025-01-01 15:09:19 +00:00
|
|
|
<a href="/crosstalk?domains=${domainName},${item.url().getDomain().toString()}"
|
2024-12-13 14:22:01 +00:00
|
|
|
class="text-liteblue dark:text-blue-200 ${item.linkType().faIcon()}"
|
2024-12-05 13:00:17 +00:00
|
|
|
title="${item.linkType().getDescription()}">
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
</td>
|
2025-01-01 15:06:08 +00:00
|
|
|
<td class="px-3 py-6 sm:py-3 whitespace-nowrap hidden sm:inline">
|
2024-12-05 13:00:17 +00:00
|
|
|
<div class="flex items-center">
|
2024-12-13 20:51:25 +00:00
|
|
|
<span title="${item.rank()}%" class="text-sm text-gray-600 dark:text-yellow-200">
|
2024-12-13 14:22:01 +00:00
|
|
|
$unsafe{item.getRankSymbols()}
|
|
|
|
</span>
|
2024-12-05 13:00:17 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
|
2025-01-01 15:06:08 +00:00
|
|
|
<td class="px-3 py-6 sm:py-3 whitespace-nowrap">
|
2025-01-02 17:11:57 +00:00
|
|
|
@if (item.feed())
|
|
|
|
<i class="fas fa-rss text-orange-500 mr-1" title="Feed available"></i>
|
|
|
|
@else
|
|
|
|
<i class="fas fa-link mr-1"></i>
|
|
|
|
@endif
|
|
|
|
|
2024-12-05 13:00:17 +00:00
|
|
|
<a href="/site/${item.url().getDomain().toString()}?view=similar"
|
|
|
|
rel="external noopener nofollow"
|
2024-12-13 14:22:01 +00:00
|
|
|
class="text-liteblue dark:text-blue-200 dark:text-blue-200">
|
2024-12-05 13:00:17 +00:00
|
|
|
${item.url().getDomain().toString()}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
|
2025-01-01 15:06:08 +00:00
|
|
|
<td class="px-3 py-6 sm:py-3">
|
2024-12-05 13:00:17 +00:00
|
|
|
<div class="w-16">
|
2024-12-13 20:51:25 +00:00
|
|
|
<div class="dark:bg-gray-600 bg-gray-200 rounded-full h-2 overflow-hidden">
|
|
|
|
<div class="bg-margeblue dark:bg-blue-400 h-2 rounded-full"
|
2024-12-13 14:22:01 +00:00
|
|
|
aria-valuenow="${item.relatedness()}"
|
|
|
|
aria-valuemin="0"
|
|
|
|
aria-valuemax="100"
|
|
|
|
aria-roledescription="meter"
|
2024-12-05 13:00:17 +00:00
|
|
|
style="width: ${item.relatedness()}%">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endfor
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|