Add description to pixelfed feed

This commit is contained in:
Fred Boniface 2023-11-04 01:00:52 +00:00
parent bb41208e15
commit 78b922dbe7
1 changed files with 9 additions and 2 deletions

View File

@ -61,10 +61,12 @@ import type { AtomFeed, PixelfedFeed } from "./feedTypes";
{:then feedData} {:then feedData}
{#each feedData.content as feedItem} {#each feedData.content as feedItem}
<EmptyCard> <EmptyCard>
<p>{feedItem.title?.split('|')[0]}</p> <p class="title">{feedItem.title?.split('|')[0]}</p>
<p class="desc">{feedItem.title?.split('| ')[1].split('#')[0]}</p>
<a href={feedItem.pixelfedUrl}> <a href={feedItem.pixelfedUrl}>
<img class="pixelfedImg" src="{feedItem.imgUrl}" alt="{feedItem.title}"> <img class="pixelfedImg" src="{feedItem.imgUrl}" alt="{feedItem.title}">
</a> </a>
<p class="uploaded">Uploaded: {new Date(feedItem.updated).toLocaleString()}</p>
</EmptyCard> </EmptyCard>
{/each} {/each}
{:catch} {:catch}
@ -77,10 +79,15 @@ import type { AtomFeed, PixelfedFeed } from "./feedTypes";
max-width: 600px; max-width: 600px;
margin: auto; margin: auto;
} }
p { .title {
text-align: center; text-align: center;
margin: auto; margin: auto;
font-weight: bolder; font-weight: bolder;
margin-bottom: 5px; margin-bottom: 5px;
} }
.uploaded {
margin: 0;
margin: auto;
font-size: 14px;
}
</style> </style>