@{ function _generateSocialIcon(socialIcon, type) { return '[social_icon ' + shortcode_attributes({ "type": type, "permalink_url": [socialIcon.permalinkURL], "share_type": [socialIcon.shareType, socialIcon.shareType !== 'static'], "share_title": [socialIcon.shareTitle], "share_image_url": [socialIcon.shareImageUrl], "picture": [socialIcon.icon.picture.fileName, socialIcon.icon.picture.toString('url')], "icon": [socialIcon.icon.icon] }, shortcode_css('icon_', socialIcon.icon), shortcode_css('', socialIcon)) + ']' + socialIcon.shareText + '[/social_icon]'; } } [social_icons @shortcode_attributes({}, shortcode_css('passive_', passive), shortcode_css('hovered_', hovered), shortcode_css())] @if (showFb) { @_generateSocialIcon(fbIcon, 'fb') } @if (showTw) { @_generateSocialIcon(twIcon, 'tw') } @if (showGl) { @_generateSocialIcon(glIcon, 'gl') } @if (showPi) { @_generateSocialIcon(piIcon, 'pi') } @if (showLi) { @_generateSocialIcon(liIcon, 'li') } @if (showIn) { @_generateSocialIcon(inIcon, 'in') } @if (showDr) { @_generateSocialIcon(drIcon, 'dr') } @if (showTm) { @_generateSocialIcon(tmIcon, 'tm') } @if (showFl) { @_generateSocialIcon(flIcon, 'fl') } @if (showVk) { @_generateSocialIcon(vkIcon, 'vk') } @if (showBe) { @_generateSocialIcon(beIcon, 'be') } [/social_icons]