Cool-Y.github.io/themes/next/layout/_third-party/needsharebutton.swig

30 lines
1.2 KiB
Plaintext
Raw Normal View History

2019-04-02 08:28:32 +00:00
{% if theme.needmoreshare2.enable %}
{% set needmoreshare2_css = url_for(theme.vendors._internal + '/needsharebutton/needsharebutton.css') %}
{% if theme.vendors.needmoreshare2 %}
{% set needmoreshare2_css = theme.vendors.needmoreshare2_css %}
{% endif %}
<link rel="stylesheet" href="{{ needmoreshare2_css }}">
{% set needmoreshare2_js = url_for(theme.vendors._internal + '/needsharebutton/needsharebutton.js') %}
{% if theme.vendors.needmoreshare2_js %}
{% set needmoreshare2_js = theme.vendors.needmoreshare2_js %}
{% endif %}
<script src="{{ needmoreshare2_js }}"></script>
<script>
{% if theme.needmoreshare2.postbottom.enable %}
pbOptions = {};
{% for k,v in theme.needmoreshare2.postbottom.options %}
pbOptions.{{ k }} = "{{ v }}";
{% endfor %}
new needShareButton('#needsharebutton-postbottom', pbOptions);
{% endif %}
{% if theme.needmoreshare2.float.enable %}
flOptions = {};
{% for k,v in theme.needmoreshare2.float.options %}
flOptions.{{ k }} = "{{ v }}";
{% endfor %}
new needShareButton('#needsharebutton-float', flOptions);
{% endif %}
</script>
{% endif %}