Show route description in plan cards

This commit is contained in:
Davide Scaini
2026-05-22 12:13:09 +02:00
parent f20407eecf
commit fa6225d2cd
+3
View File
@@ -1298,6 +1298,7 @@ ${trkpts}
{:else} {:else}
<div class="plan-card-stats">{plan.waypoints?.length ?? 0} pts · {plan.profile}</div> <div class="plan-card-stats">{plan.waypoints?.length ?? 0} pts · {plan.profile}</div>
{/if} {/if}
{#if plan.description}<div class="plan-card-desc">{plan.description}</div>{/if}
{#if plan.author}<div class="plan-card-author">by {plan.author}</div>{/if} {#if plan.author}<div class="plan-card-author">by {plan.author}</div>{/if}
</button> </button>
<button class="plan-card-link" onclick={(e) => { e.stopPropagation(); navigator.clipboard?.writeText(`${window.location.origin}${window.location.pathname}?shared=${plan.id}`); }} title="Copy shareable link"></button> <button class="plan-card-link" onclick={(e) => { e.stopPropagation(); navigator.clipboard?.writeText(`${window.location.origin}${window.location.pathname}?shared=${plan.id}`); }} title="Copy shareable link"></button>
@@ -1314,6 +1315,7 @@ ${trkpts}
{:else} {:else}
<div class="plan-card-stats">{plan.waypoints?.length ?? 0} pts · {plan.profile}</div> <div class="plan-card-stats">{plan.waypoints?.length ?? 0} pts · {plan.profile}</div>
{/if} {/if}
{#if plan.description}<div class="plan-card-desc">{plan.description}</div>{/if}
{#if browseCollId === null && plan.collection_id} {#if browseCollId === null && plan.collection_id}
{@const col = collections.find(c => c.id === plan.collection_id)} {@const col = collections.find(c => c.id === plan.collection_id)}
{#if col}<div class="plan-card-col">{col.name}</div>{/if} {#if col}<div class="plan-card-col">{col.name}</div>{/if}
@@ -1716,6 +1718,7 @@ ${trkpts}
} }
.plan-card-name { font-size: 0.8rem; color: var(--text-primary); font-weight: 500; margin-bottom: 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .plan-card-name { font-size: 0.8rem; color: var(--text-primary); font-weight: 500; margin-bottom: 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-card-stats { font-size: 0.7rem; color: var(--text-5); font-variant-numeric: tabular-nums; } .plan-card-stats { font-size: 0.7rem; color: var(--text-5); font-variant-numeric: tabular-nums; }
.plan-card-desc { font-size: 0.68rem; color: var(--text-4); margin-top: 0.25rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.plan-card-col { .plan-card-col {
display: inline-block; display: inline-block;
margin-top: 0.3rem; margin-top: 0.3rem;