Skip to content
Snippets Groups Projects
Commit 7dca92a2 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-3661: adding styling for facebook

parent 8a97607d
No related branches found
No related tags found
No related merge requests found
.uw-facebook {
width: 100%;
&__wrapper {
margin-left: auto;
margin-right: auto;
text-align: center;
}
}
(function ($, Drupal) {
'use strict';
// The styling for this mobile menu is located in source/_patterns/04-components/menus/menu--main/.
Drupal.behaviors.facebook = {
attach(context, settings) {
$('.uw-facebook__data').each(function () {
var fbwidth = $(this).parent().width();
if (fbwidth == 0) {
fbwidth = 239;
}
var fburl = encodeURIComponent('/' + $(this).data('username'));
$(this).before('<iframe src="https://www.facebook.com/plugins/likebox.php?href=' + fburl + '&amp;width=' + fbwidth + '&amp;height=350&amp;colorscheme=light&amp;show_faces=false&amp;border_color&amp;stream=true&amp;header=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; max-width: 500px;width:' + fbwidth + 'px; height:350px;" allowTransparency="true"></iframe>');
$(this).remove();
});
},
};
})(jQuery, Drupal);
<div class="uw-facebook">
<div class="uw-facebook__wrapper">
<div class="uw-facebook__data" data-username="{{ username }}">
</div>
</div>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment