diff --git a/_config.yml b/_config.yml index b3c34a7a42..1a85ffe2c4 100644 --- a/_config.yml +++ b/_config.yml @@ -622,6 +622,24 @@ gitalk: # Go to https://www.addthis.com/dashboard to customize your tools. #add_this_id: +# Likely Share +# See: https://ilyabirman.net/projects/likely/ +# Likely supports four looks, nine social networks, any button text +# You are free to modify the text value and order of any network +likely: + enable: false + look: normal # available values: normal, light, small, big + networks: + twitter: Tweet + facebook: Share + linkedin: Link + gplus: Plus + vkontakte: Share + odnoklassniki: Class + telegram: Send + whatsapp: Send + pinterest: Pin + # NeedMoreShare2 # Dependencies: https://github.com/theme-next/theme-next-needmoreshare2 # See: https://github.com/revir/need-more-share2, https://github.com/DzmVasileusky/needShareButton @@ -1110,6 +1128,14 @@ vendors: gitalk_css: md5: + # likely + # See: https://github.com/ilyabirman/Likely + # Example: + # likely_js: //cdn.jsdelivr.net/npm/ilyabirman-likely@2/release/likely.js + # likely_css: //cdn.jsdelivr.net/npm/ilyabirman-likely@2/release/likely.css + likely_js: + likely_css: + # Assets css: css js: js diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 9f897061b9..6e29f9d631 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -369,7 +369,7 @@ {% endif %} {% if not is_index %} - {% if theme.rating.enable or (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) or (theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable) or (theme.baidushare and theme.baidushare.type === "button") %} + {% if theme.rating.enable or (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) or theme.likely.enable or (theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable) or (theme.baidushare and theme.baidushare.type === "button") %}
{% endif %} diff --git a/layout/_partials/share/likely.swig b/layout/_partials/share/likely.swig new file mode 100644 index 0000000000..272fec348d --- /dev/null +++ b/layout/_partials/share/likely.swig @@ -0,0 +1,23 @@ +{% set likely_js_url = '//cdn.jsdelivr.net/npm/ilyabirman-likely@2/release/likely.js' %} +{% if theme.vendors.likely_js %} + {% set likely_js_url = theme.vendors.likely_js %} +{% endif %} + + +{% set likely_css_url = '//cdn.jsdelivr.net/npm/ilyabirman-likely@2/release/likely.css' %} +{% if theme.vendors.likely_css %} + {% set likely_css_url = theme.vendors.likely_css %} +{% endif %} + + +{% if theme.likely.look == 'normal' %} + {% set likely_look = 'likely' %} +{% else %} + {% set likely_look = 'likely likely-' + theme.likely.look %} +{% endif %} + +