Skip to content

Commit

Permalink
#6 styling
Browse files Browse the repository at this point in the history
  • Loading branch information
amay077 committed Jan 4, 2025
1 parent 72735c2 commit d5c1a67
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,7 @@ body {
.disconnect_button:hover {
background-color: #0056b3;
}

.h5 {
margin-bottom: 0;
}
28 changes: 25 additions & 3 deletions src/lib/MainContent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let posting = false;
let text = loadMessage()?.message ?? '';
let imageDataURLs: string[] = [];
let expandedReply = false;
let replyToIdForMastodon = '';
let replyToIdForBluesky = '';
let replyToIdForTwitter = '';
Expand Down Expand Up @@ -135,7 +136,7 @@ const onVersion = async () => {
<div class="mt-4">

<div class="mb-3">
<label for="message" class="form-label">Message:</label>
<span class="h5">Message:</span>
<textarea
class="form-control"
id="message"
Expand Down Expand Up @@ -184,9 +185,29 @@ const onVersion = async () => {

</div>

<div class="mt-2 d-flex flex-column align-items-start gap-1">
<label for="message" class="form-label">Reply:</label>
<div class="mt-4 d-flex flex-column align-items-start gap-1">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="d-flex flex-row align-items-center gap-1" style="cursor: pointer;" on:click={() => {
expandedReply = !expandedReply;
}}>

<span class="h5">Reply:</span>
<div class="d-flex flex-row gap-1 align-items-center">
{#if !expandedReply}
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>
</svg>
{:else}
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
</svg>
{/if}

</div>
</div>

{#if expandedReply}
{#if postSettings.mastodon != null && postTo.mastodon}
<div style="width: 100%;" class="d-flex flex-row align-items-center gap-1">
<svg style="width: 18px;" xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" class="bi bi-mastodon" viewBox="0 0 16 16">
Expand All @@ -212,6 +233,7 @@ const onVersion = async () => {
<input class="form-control" type="text" placeholder="Tweet URL or ID" bind:value={replyToIdForTwitter} />
</div>
{/if}
{/if}

</div>

Expand Down

0 comments on commit d5c1a67

Please sign in to comment.