marky

Lightweight bookmarking + plaintext archive
Log | Files | Refs | README | LICENSE

commit d0730de5f0b43d056ece1fa2fcf3e058e14b4f31
parent 4889ab21f6eb6197fa5903178cf4e6de4f3e732d
Author: David Eisinger <[email protected]>
Date:   Thu, 16 Oct 2025 09:50:08 -0400

Hide long referrer URL

Diffstat:
Minternal/web/styles.css | 5+++--
Minternal/web/user.html | 4++--
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/internal/web/styles.css b/internal/web/styles.css @@ -66,8 +66,9 @@ button.btn { border: none; } .edit-form .actions { display: flex; gap: 8px; } .url { color: #666; font-size: 12px; margin: 0 0 6px 0; overflow-wrap: anywhere; word-break: break-word; } .url.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; } -.referrer { color: #999; font-size: 12px; margin: 0 0 6px 0; word-break: break-all; } -.referrer a { color: inherit; } +.referrer { color: #999; font-size: 12px; margin: 0 0 6px 0; display: flex; gap: 4px; align-items: baseline; } +.referrer .ref-link { display: inline-block; min-width: 0; text-decoration: none; border-bottom: 1px solid currentColor; line-height: 1; } +.referrer .ref-link a { display: inline-block; max-width: 100%; color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1; vertical-align: bottom; } .action-links { margin: 6px 0 0 0; font-size: 13px; color: #555; } .action-links a { color: inherit; } .action-links .sep { margin: 0 6px; opacity: 0.6; } diff --git a/internal/web/user.html b/internal/web/user.html @@ -63,7 +63,7 @@ <article v-for="b in results" :key="b.id" :class="['card', { private: !b.public }]"> <h3><a :href="b.url" target="_blank" rel="noopener noreferrer">{{ b.title || b.url }}</a></h3> <p :class="['url', { truncate: b.urlTrunc }]" :title="b.url" @click="toggleURL(b)">{{ b.url }}</p> - <p v-if="b.referrer" class="referrer">Referrer: <a :href="b.referrer" target="_blank" rel="noopener noreferrer">{{ b.referrer }}</a></p> + <p v-if="b.referrer" class="referrer">Referrer: <span class="ref-link"><a :href="b.referrer" target="_blank" rel="noopener noreferrer">{{ b.referrer }}</a></span></p> <div v-if="b.editing" class="edit-form"> <label>URL <input v-model.trim="b.editUrl" type="url" required /></label> <label>Title <input v-model.trim="b.editTitle" type="text" required /></label> @@ -157,7 +157,7 @@ <article v-for="b in results" :key="b.id" class="card"> <h3><a :href="b.url" target="_blank" rel="noopener noreferrer">{{ b.title || b.url }}</a></h3> <p :class="['url', { truncate: b.urlTrunc }]" :title="b.url" @click="toggleURL(b)">{{ b.url }}</p> - <p v-if="b.referrer" class="referrer">Referrer: <a :href="b.referrer" target="_blank" rel="noopener noreferrer">{{ b.referrer }}</a></p> + <p v-if="b.referrer" class="referrer">Referrer: <span class="ref-link"><a :href="b.referrer" target="_blank" rel="noopener noreferrer">{{ b.referrer }}</a></span></p> <div v-if="b.description" class="desc" v-html="renderMarkdown(b.description)"></div> <p class="action-links"> <span class="meta">{{ formatDate(b.updated_at) }}</span>