Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed posts #129

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 40 additions & 43 deletions src/components/Post.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -180,54 +180,51 @@
</div>
{/if}
</header>
<section class="p-4">
<p
class="h-[15vh] border-solid border-2 border-gray-800 p-1 text-lg h-auto"
title="postcontent"
>
<section class="p-4 border-solid border-2 border-white-200 rounded mr-10 ml-10 mt-5 mb-5">
<p class="h-[15vh] p-1 text-lg h-auto min-h-[5vh]" title="postcontent">
{#each newPost as { hashtagClass, text, wordID } (wordID)}
<span class={hashtagClass}>{text} </span>
{/each}
{#if post.repost != undefined || post.repost != null}
<header class="card-header w-full flex justify-between items-center">
<div class="flex flex-row items-center">
<Avatar
class="h-[5vh] w-[5vh] rounded-full mr-3"
src={post.repost.author.profilePictureUrl}
initials=""
/>
<div class="flex flex-col">
<a
class="text-[0.75rem]"
title="repostAuthorUsername"
href="/profile?username={post.repost.author.username}"
data-sveltekit-preload-data="hover">@{post.repost.author.username}</a
>
<p class="font-light text-xs text-[0.75rem]" title="repostAuthorNickname">
{post.repost.author.nickname}
</p>
</div>
</div>
<div class="flex flex-col items-end">
<p class="text-xs text-[0.75rem]">{repostLocationString}</p>
<p class="text-xs text-[0.75rem]" title="repostPostdate">{repostDate}</p>
</div>
</header>
<section class="p-4">
<p
class="h-[10vh] border-solid border-2 border-gray-800 p-1 text-lg h-auto"
title="repostPostcontent"
>
{#each newRepostPost as { hashtagClass, text, wordID } (wordID)}
<span class="{hashtagClass} text-[0.75rem]">{text} </span>
{/each}
</p>
</section>
{/if}
</p>
{#if post.repost != undefined || post.repost != null}
<header class="card-header w-full flex justify-between items-center">
<div class="flex flex-row items-center">
<Avatar
class="h-[5vh] w-[5vh] rounded-full mr-3"
src={post.repost.author.profilePictureUrl}
initials=""
/>
<div class="flex flex-col">
<a
class="text-[0.75rem]"
title="repostAuthorUsername"
href="/profile?username={post.repost.author.username}"
data-sveltekit-preload-data="hover">@{post.repost.author.username}</a
>
<p class="font-light text-xs text-[0.75rem]" title="repostAuthorNickname">
{post.repost.author.nickname}
</p>
</div>
</div>
<div class="flex flex-col items-end">
<p class="text-xs text-[0.75rem]">{repostLocationString}</p>
<p class="text-xs text-[0.75rem]" title="repostPostdate">{repostDate}</p>
</div>
</header>
<section class="p-4">
<p
class="h-[10vh] border-solid border-2 border-white-200 rounded p-1 text-lg h-auto"
title="repostPostcontent"
>
{#each newRepostPost as { hashtagClass, text, wordID } (wordID)}
<span class="{hashtagClass} text-[0.75rem]">{text} </span>
{/each}
</p>
</section>
{/if}
</section>
<footer class="card-footer h-18 items-center pb-1 flex flex-row w-full">
<div class="flex flex-row float-left items-center w-[35%]">
<footer class="card-footer h-18 items-center pb-1 flex flex-col md:flex-row w-full">
<div class="flex flex-row float-left items-center justify-center w-[35%]">
<button disabled={isLoggedOut} on:click={handleLikeClick} title="like">
<Icon class="w-7 h-7 mr-1" icon="ph:heart-fill" color={post.liked ? 'red' : 'white'}
></Icon>
Expand Down
Loading