Skip to content

Commit

Permalink
Show url hostname on title
Browse files Browse the repository at this point in the history
  • Loading branch information
parksb committed Sep 16, 2023
1 parent f8d362b commit b509304
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/Items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ function Items(props: Props) {
<For each={items()}>{(item: api.Item) =>
<li class={`${item.status == api.ItemStatus.READ ? "lowp" : ""} ${(selectedItem() && selectedItem()?.id == item.id) ? "selected" : ""}`}>
<strong><a href={item.link} target="_blank"
onClick={() => markAs([item], api.ItemStatus.READ)}>{item.title}</a></strong>
onClick={() => markAs([item], api.ItemStatus.READ)}>
{item.title} <small class="hostname">({new URL(item.link).hostname})</small>
</a></strong>
<small class="row">
<span class="sep">on</span> <A href={`/feeds/${item.feed.id}`}>{item.feed.title}</A>
<span class="sep"> by</span> {item.author}
Expand Down
4 changes: 4 additions & 0 deletions src/styles/Items.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ div.items-page div.item-list > ul > li.selected {
background-color: var(--color-selected);
}

div.items-page div.item-list > ul > li .hostname {
font-weight: normal;
}

div.items-page div.item-list > ul > li > small {
display: block;
font-size: .8rem;
Expand Down

0 comments on commit b509304

Please sign in to comment.