Skip to content

Commit

Permalink
fix: correct logo display and link style
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Nov 11, 2024
1 parent 910d66a commit 1feb1cd
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-ants-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astro-community/astro-embed-bluesky': patch
---

Fixes Bluesky logo and styling of links in posts
8 changes: 8 additions & 0 deletions demo/src/pages/bluesky.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import post from '../post.json';
---

<Base title="BlueskyPost component example">
<div class="content">
<BlueskyPost post={post.data} />
<p>Raw data</p>
<BlueskyPost post="https://bsky.app/profile/wesbos.com/post/3la2ezdodvu2g" />
Expand All @@ -24,3 +25,10 @@ import post from '../post.json';
<BlueskyPost post="https://bsky.app/profile/sentry.io/post/3la5clrgyw52g" />
<p>Starter pack</p>
</Base>
</div>
<style>
/* Testing leaky styles */
.content :global(a) {
text-decoration: 1px solid underline;
}
</style>
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions packages/astro-embed-bluesky/src/post.astro
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ const formatter = new Intl.DateTimeFormat('en-US', {
transition: var(--bluesky-card-transition);
}

.bluesky-post-container .post-content :global(a) {
text-decoration: none;
}

.post-content {
padding: var(--bluesky-space-md) var(--bluesky-space-lg)
var(--bluesky-space-sm);
Expand Down Expand Up @@ -122,7 +126,7 @@ const formatter = new Intl.DateTimeFormat('en-US', {
}

.bluesky-logo {
height: var(--bluesky-avatar-sm);
height: var(--bluesky-icon-size-lg);
transition: transform 0.2s ease;
}

Expand All @@ -139,8 +143,9 @@ const formatter = new Intl.DateTimeFormat('en-US', {
color: var(--bluesky-color-text);
}

.post-text :global(a) {
color: var(--bluesky-color-text);
.bluesky-post-container .post-text :global(a) {
color: var(--bluesky-color-link);
text-decoration: none;
}

.timestamp {
Expand Down
2 changes: 2 additions & 0 deletions packages/astro-embed-bluesky/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* Colours */
--bluesky-color-overlay: rgba(0, 0, 0, 0.5);

--bluesky-color-link: rgb(59 130 246);

/* Colour palette */
--bluesky-color-text--light: #000000;
--bluesky-color-text-secondary--light: rgb(66 87 108);
Expand Down

0 comments on commit 1feb1cd

Please sign in to comment.