Skip to content

Commit 0d53540

Browse files
authored
Enhance social share buttons with Facebook integration
Updated share buttons to include Facebook iframe and improved Twitter button.
1 parent 201a819 commit 0d53540

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

app/views/index.scala.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22

33

44
@optanonInsert = {
5-
Optanon.InsertHtml('<a href="https://twitter.com/share" class="twitter-share-button" data-lang="@lang.code">Tweet</a><div class="fb-like" data-href="https://www.reactivemanifesto.org" data-width="" data-layout="button_count" data-action="like" data-size="small" data-share="false"></div>', 'share-buttons', function() {if (typeof FB !== 'undefined') {FB.XFBML.parse();} if (typeof twttr !== 'undefined') {twttr.widgets.load();}}, null, 4)
5+
var shareUrl = encodeURIComponent('https://www.reactivemanifesto.org');
6+
var fbIframe = '<iframe src="https://www.facebook.com/plugins/like.php?href=' + shareUrl + '&width=120&layout=button_count&action=like&size=small&share=false&height=21&appId" ' +
7+
'width="120" height="21" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" ' +
8+
'allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>';
9+
Optanon.InsertHtml(
10+
'<a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>' + fbIframe,
11+
'share-buttons',
12+
null,
13+
null,
14+
4
15+
);
616
}
717

818
@main(messages("title"), dir, optanonInsert) {

0 commit comments

Comments
 (0)