adds list default thumbnail
This commit is contained in:
@@ -38,24 +38,17 @@
|
||||
class="flex items-start gap-6 p-4 hover:bg-menu-item-background-hover rounded-xl transition-colors cursor-pointer"
|
||||
class:bg-menu-item-background-hover={active}
|
||||
>
|
||||
{#if list.avatar}
|
||||
<img
|
||||
class="w-16 md:w-20 aspect-square rounded-full object-cover"
|
||||
src={getFileURL(list, list.avatar)}
|
||||
alt="avatar"
|
||||
/>
|
||||
{:else}
|
||||
<div
|
||||
class="flex w-16 md:w-20 aspect-square shrink-0 items-center justify-center"
|
||||
>
|
||||
<i class="fa fa-table-list text-5xl"></i>
|
||||
</div>
|
||||
{/if}
|
||||
<img
|
||||
class="w-16 md:w-20 aspect-square rounded-full object-cover"
|
||||
src={list.avatar
|
||||
? getFileURL(list, list.avatar)
|
||||
: "/imgs/default_list_thumbnail.webp"}
|
||||
alt="avatar"
|
||||
/>
|
||||
|
||||
<div class="self-start min-w-0 basis-full transition-transform">
|
||||
<div class="flex items-center gap-3">
|
||||
<h5
|
||||
class="text-xl font-semibold overflow-hidden overflow-ellipsis"
|
||||
>
|
||||
<h5 class="text-xl font-semibold overflow-hidden overflow-ellipsis">
|
||||
{list.name}
|
||||
</h5>
|
||||
{#if list.public}
|
||||
|
||||
@@ -111,17 +111,13 @@
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
{#if list.avatar}
|
||||
<img
|
||||
class="w-full object-cover"
|
||||
src={getFileURL(list, list.avatar)}
|
||||
alt="avatar"
|
||||
/>
|
||||
{:else}
|
||||
<div class="flex w-full shrink-0 items-center justify-center min-h-72">
|
||||
<i class="fa fa-table-list text-5xl"></i>
|
||||
</div>
|
||||
{/if}
|
||||
<img
|
||||
class="w-full object-cover max-h-64"
|
||||
src={list.avatar
|
||||
? getFileURL(list, list.avatar)
|
||||
: "/imgs/default_list_thumbnail.webp"}
|
||||
alt="avatar"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="p-4 md:p-6">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { getFileURL } from "$lib/util/file_util";
|
||||
import { _ } from "svelte-i18n";
|
||||
import Modal from "../base/modal.svelte";
|
||||
|
||||
|
||||
export let lists: List[];
|
||||
|
||||
export let openModal: (() => void) | undefined = undefined;
|
||||
@@ -41,19 +41,14 @@
|
||||
on:click={() => handleSelect(list)}
|
||||
role="presentation"
|
||||
>
|
||||
{#if list.avatar}
|
||||
<img
|
||||
class="w-12 aspect-square rounded-full"
|
||||
src={getFileURL(list, list.avatar)}
|
||||
alt="avatar"
|
||||
/>
|
||||
{:else}
|
||||
<div
|
||||
class="flex w-12 aspect-square shrink-0 items-center justify-center"
|
||||
>
|
||||
<i class="fa fa-table-list text-5xl"></i>
|
||||
</div>
|
||||
{/if}
|
||||
<img
|
||||
class="w-12 aspect-square rounded-full"
|
||||
src={list.avatar
|
||||
? getFileURL(list, list.avatar)
|
||||
: "/imgs/default_list_thumbnail.webp"}
|
||||
alt="avatar"
|
||||
/>
|
||||
|
||||
<h5 class="text-md font-semibold">{list.name}</h5>
|
||||
|
||||
<i
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
let fullDescription: boolean = false;
|
||||
</script>
|
||||
|
||||
<div class="activity-card p-6 space-y-6 shadow-md rounded-xl">
|
||||
<div class="activity-card p-6 space-y-6 rounded-xl border border-input-border">
|
||||
<div class="flex gap-x-4 items-start">
|
||||
<img
|
||||
class="rounded-full w-10 aspect-square overflow-hidden"
|
||||
|
||||
@@ -257,10 +257,8 @@
|
||||
/>
|
||||
{:else}
|
||||
<div
|
||||
class="flex items-center justify-center w-32 aspect-square rounded-full object-cover border border-gray-200"
|
||||
>
|
||||
<i class="fa fa-table-list text-5xl"></i>
|
||||
</div>
|
||||
class="w-32 aspect-square rounded-full bg-menu-item-background-focus border-gray-200"
|
||||
></div>
|
||||
{/if}
|
||||
<button
|
||||
class="btn-secondary"
|
||||
|
||||
@@ -82,19 +82,14 @@
|
||||
href="/lists?list={list.id}"
|
||||
class="relative w-64 h-48 rounded-xl overflow-hidden group shrink-0"
|
||||
>
|
||||
{#if list.avatar}
|
||||
<img
|
||||
class="w-full h-full object-cover transition-transform group-hover:scale-110"
|
||||
src={getFileURL(list, list.avatar)}
|
||||
alt="avatar"
|
||||
/>
|
||||
{:else}
|
||||
<div
|
||||
class="flex w-16 md:w-20 aspect-square shrink-0 items-center justify-center"
|
||||
>
|
||||
<i class="fa fa-table-list text-5xl"></i>
|
||||
</div>
|
||||
{/if}
|
||||
<img
|
||||
class="w-full h-full object-cover transition-transform group-hover:scale-110"
|
||||
src={list.avatar
|
||||
? getFileURL(list, list.avatar)
|
||||
: "/imgs/default_list_thumbnail.webp"}
|
||||
alt="avatar"
|
||||
/>
|
||||
|
||||
<div
|
||||
class="absolute bottom-0 w-full h-2/3 bg-gradient-to-b from-transparent to-black opacity-50"
|
||||
></div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
import {
|
||||
lists_add_trail,
|
||||
lists_index,
|
||||
lists_remove_trail
|
||||
lists_remove_trail,
|
||||
} from "$lib/stores/list_store";
|
||||
import { summitLog } from "$lib/stores/summit_log_store";
|
||||
import { show_toast } from "$lib/stores/toast_store";
|
||||
@@ -51,10 +51,7 @@
|
||||
formatElevation,
|
||||
formatTimeHHMM,
|
||||
} from "$lib/util/format_util";
|
||||
import {
|
||||
fromFile,
|
||||
gpx2trail
|
||||
} from "$lib/util/gpx_util";
|
||||
import { fromFile, gpx2trail } from "$lib/util/gpx_util";
|
||||
|
||||
import {
|
||||
createAnchorMarker,
|
||||
@@ -851,15 +848,14 @@
|
||||
<div
|
||||
class="flex gap-2 items-center border border-input-border rounded-xl p-2"
|
||||
>
|
||||
{#if list.avatar}
|
||||
<img
|
||||
class="w-8 aspect-square rounded-full object-cover"
|
||||
src={getFileURL(list, list.avatar)}
|
||||
alt="avatar"
|
||||
/>
|
||||
{:else}
|
||||
<i class="fa fa-table-list text-2xl"></i>
|
||||
{/if}
|
||||
<img
|
||||
class="w-8 aspect-square rounded-full object-cover"
|
||||
src={list.avatar
|
||||
? getFileURL(list, list.avatar)
|
||||
: "/imgs/default_list_thumbnail.webp"}
|
||||
alt="avatar"
|
||||
/>
|
||||
|
||||
<span class="text-sm">{list.name}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
BIN
web/static/imgs/default_list_thumbnail.webp
Normal file
BIN
web/static/imgs/default_list_thumbnail.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 228 KiB |
Reference in New Issue
Block a user