-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize the rendering of posts (#1075)
- Loading branch information
1 parent
73697d8
commit 6c03d3d
Showing
6 changed files
with
110 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{%- 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) %} | ||
<div class="post-widgets"> | ||
{%- if theme.rating.enable %} | ||
<div class="wp_rating"> | ||
<div id="wpac-rating"></div> | ||
</div> | ||
{%- endif %} | ||
|
||
{%- if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} | ||
<div class="social-like"> | ||
{%- if theme.vkontakte_api.enable and theme.vkontakte_api.like %} | ||
<div class="vk_like"> | ||
<span id="vk_like"></span> | ||
</div> | ||
{%- endif %} | ||
|
||
{%- if theme.facebook_sdk.enable and theme.facebook_sdk.like_button %} | ||
<div class="fb_like"> | ||
<div class="fb-like" data-layout="button_count" data-share="true"></div> | ||
</div> | ||
{%- endif %} | ||
</div> | ||
{%- endif %} | ||
|
||
{%- if theme.likely.enable or (theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable) %} | ||
<div class="social-share"> | ||
{%- if theme.likely.enable %} | ||
{%- if theme.likely.look == 'normal' %} | ||
{%- set likely_look = 'likely' %} | ||
{% else %} | ||
{%- set likely_look = 'likely likely-' + theme.likely.look %} | ||
{%- endif %} | ||
|
||
<div class="{{ likely_look }}"> | ||
{%- for x in theme.likely.networks %} | ||
<div class="{{ loop.key }}">{{ x }}</div> | ||
{%- endfor %} | ||
</div> | ||
{%- endif %} | ||
{%- if theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable %} | ||
<div id="needsharebutton-postbottom"> | ||
<span class="btn"> | ||
<i class="fa fa-share-alt" aria-hidden="true"></i> | ||
</span> | ||
</div> | ||
{%- endif %} | ||
</div> | ||
{%- endif %} | ||
</div> | ||
{%- endif %} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
{%- if theme.add_this_id %} | ||
{% include 'add-this.swig' %} | ||
{%- endif %} | ||
{%- if theme.likely.enable %} | ||
{% include 'likely.swig' %} | ||
{%- endif %} | ||
{%- if theme.needmoreshare2.enable %} | ||
{% include 'needsharebutton.swig' %} | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,5 @@ | ||
{%- if theme.likely.look == 'normal' %} | ||
{%- set likely_look = 'likely' %} | ||
{% else %} | ||
{%- set likely_look = 'likely likely-' + theme.likely.look %} | ||
{%- endif %} | ||
|
||
<div class="{{ likely_look }}"> | ||
{%- for x in theme.likely.networks %} | ||
<div class="{{ loop.key }}">{{ x }}</div> | ||
{%- endfor %} | ||
</div> | ||
|
||
{%- 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 %} | ||
<script src="{{ likely_js_url }}"></script> | ||
|