Skip to content

Commit b0f8242

Browse files
authored
Merge pull request #2233 from tf/more-share
Add Bluesky and Threads to sharing menu
2 parents aec8e30 + 8e3af01 commit b0f8242

File tree

12 files changed

+61
-1
lines changed

12 files changed

+61
-1
lines changed

app/helpers/pageflow/social_share_links_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ module SocialShareLinksHelper
33
include SocialShareHelper
44

55
PROVIDER_URL_TEMPLATES = {
6+
bluesky: 'https://bsky.app/intent/compose?text=%{url}',
67
email: 'mailto:?body=%{url}',
78
facebook: 'http://www.facebook.com/sharer/sharer.php?u=%{url}',
89
google: 'https://plus.google.com/share?url=%{url}',
910
linked_in: 'https://www.linkedin.com/shareArticle?mini=true&url=%{url}',
1011
telegram: 'tg://msg?text=%{url}',
12+
threads: 'https://threads.net/intent/post?text=%{url}',
1113
twitter: 'https://x.com/intent/post?url=%{url}',
1214
whats_app: 'WhatsApp://send?text=%{url}'
1315
}.freeze
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<%= social_share_link(:bluesky, entry) do %>
2+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
3+
<path d="M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z"/>
4+
</svg>
5+
6+
<span class="hint"><%= t('pageflow.public.share_on_bluesky') %></span>
7+
<p>Bluesky</p>
8+
<% end %>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<%= social_share_link(:threads, entry) do %>
2+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
3+
<path d="M331.5 235.7c2.2 .9 4.2 1.9 6.3 2.8c29.2 14.1 50.6 35.2 61.8 61.4c15.7 36.5 17.2 95.8-30.3 143.2c-36.2 36.2-80.3 52.5-142.6 53h-.3c-70.2-.5-124.1-24.1-160.4-70.2c-32.3-41-48.9-98.1-49.5-169.6V256v-.2C17 184.3 33.6 127.2 65.9 86.2C102.2 40.1 156.2 16.5 226.4 16h.3c70.3 .5 124.9 24 162.3 69.9c18.4 22.7 32 50 40.6 81.7l-40.4 10.8c-7.1-25.8-17.8-47.8-32.2-65.4c-29.2-35.8-73-54.2-130.5-54.6c-57 .5-100.1 18.8-128.2 54.4C72.1 146.1 58.5 194.3 58 256c.5 61.7 14.1 109.9 40.3 143.3c28 35.6 71.2 53.9 128.2 54.4c51.4-.4 85.4-12.6 113.7-40.9c32.3-32.2 31.7-71.8 21.4-95.9c-6.1-14.2-17.1-26-31.9-34.9c-3.7 26.9-11.8 48.3-24.7 64.8c-17.1 21.8-41.4 33.6-72.7 35.3c-23.6 1.3-46.3-4.4-63.9-16c-20.8-13.8-33-34.8-34.3-59.3c-2.5-48.3 35.7-83 95.2-86.4c21.1-1.2 40.9-.3 59.2 2.8c-2.4-14.8-7.3-26.6-14.6-35.2c-10-11.7-25.6-17.7-46.2-17.8H227c-16.6 0-39 4.6-53.3 26.3l-34.4-23.6c19.2-29.1 50.3-45.1 87.8-45.1h.8c62.6 .4 99.9 39.5 103.7 107.7l-.2 .2zm-156 68.8c1.3 25.1 28.4 36.8 54.6 35.3c25.6-1.4 54.6-11.4 59.5-73.2c-13.2-2.9-27.8-4.4-43.4-4.4c-4.8 0-9.6 .1-14.4 .4c-42.9 2.4-57.2 23.2-56.2 41.8l-.1 .1z"/>
4+
</svg>
5+
6+
<span class="hint"><%= t('pageflow.public.share_on_threads') %></span>
7+
<p>Threads</p>
8+
<% end %>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
de:
2+
activerecord:
3+
values:
4+
pageflow/entry:
5+
share_providers:
6+
bluesky: Bluesky
7+
threads: Threads
8+
pageflow:
9+
public:
10+
share_on_bluesky: Auf Bluesky teilen
11+
share_on_threads: Auf Threads teilen
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
en:
2+
activerecord:
3+
values:
4+
pageflow/entry:
5+
share_providers:
6+
bluesky: Bluesky
7+
threads: Threads
8+
pageflow:
9+
public:
10+
share_on_bluesky: Share on Bluesky
11+
share_on_threads: Share on Threads

entry_types/scrolled/package/src/entryState/sharing.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ export function useShareProviders({isPhonePlatform}) {
3434

3535
return useMemo(() => {
3636
const sharing = {
37+
bluesky: {
38+
iconName: 'bluesky',
39+
name: 'Bluesky',
40+
url: urlTemplates.bluesky
41+
},
3742
email: {
3843
iconName: 'email',
3944
name: 'Mail',
@@ -54,6 +59,11 @@ export function useShareProviders({isPhonePlatform}) {
5459
name: 'Telegram',
5560
url: urlTemplates.telegram
5661
},
62+
threads: {
63+
iconName: 'threads',
64+
name: 'threads',
65+
url: urlTemplates.threads
66+
},
5767
twitter: {
5868
iconName: 'twitter',
5969
name: 'X',

entry_types/scrolled/package/src/frontend/ThemeIcon.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ import world from './icons/world.svg';
1111
import close from './icons/close.svg';
1212
import checked from './icons/checked.svg';
1313

14+
import bluesky from './icons/social/bluesky.svg';
1415
import email from './icons/social/email.svg';
1516
import facebook from './icons/social/facebook.svg';
1617
import linkedIn from './icons/social/linkedIn.svg';
1718
import telegram from './icons/social/telegram.svg';
19+
import threads from './icons/social/threads.svg';
1820
import twitter from './icons/social/twitter.svg';
1921
import whatsApp from './icons/social/whatsApp.svg';
2022

@@ -43,10 +45,12 @@ const icons = {
4345
close,
4446
checked,
4547

48+
bluesky,
4649
email,
4750
facebook,
4851
linkedIn,
4952
telegram,
53+
threads,
5054
twitter,
5155
whatsApp,
5256

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

lib/pageflow/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def initialize(target_type_name = nil)
537537

538538
@available_locales = [:en, :de]
539539
@available_public_locales = PublicI18n.available_locales
540-
@available_share_providers = [:email, :facebook, :linked_in, :twitter, :telegram, :whats_app]
540+
@available_share_providers = [:email, :facebook, :linked_in, :bluesky, :threads, :twitter, :telegram, :whats_app]
541541

542542
@public_https_mode = :prevent
543543

0 commit comments

Comments
 (0)