From 7db5774563613875a3447661d6d7eaed2dff62f2 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Tue, 17 Jan 2017 20:05:18 +0300 Subject: [PATCH 01/23] ADD: VK API support. (1) --- _config.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/_config.yml b/_config.yml index dd125120f..7448abcd5 100755 --- a/_config.yml +++ b/_config.yml @@ -339,6 +339,15 @@ facebook_comments_plugin: width: 100% # default width is 550px scheme: light # default scheme is light (light or dark) +# VKontakte API Support. +# To get your AppID visit https://vk.com/editapp?act=create +vkontakte_api: + enable: false + app_id: # + like: true + comments: true + num_of_posts: 10 + # Show number of visitors to each article. # You can visit https://leancloud.cn get AppID and AppKey. From 9e79f14c1cc4fb3c1836771f97f1ea2c7f6774fe Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Tue, 17 Jan 2017 20:05:29 +0300 Subject: [PATCH 02/23] ADD: VK API support. (2) --- layout/_scripts/third-party/analytics.swig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/_scripts/third-party/analytics.swig b/layout/_scripts/third-party/analytics.swig index e26bcdca7..1eddf3d1a 100644 --- a/layout/_scripts/third-party/analytics.swig +++ b/layout/_scripts/third-party/analytics.swig @@ -1,6 +1,7 @@ {% include 'analytics/facebook-sdk.swig' %} +{% include 'analytics/vkontakte-api.swig' %} {% include 'analytics/google-analytics.swig' %} {% include 'analytics/baidu-analytics.swig' %} {% include 'analytics/tencent-analytics.swig' %} {% include 'analytics/cnzz-analytics.swig' %} -{% include 'analytics/application-insights.swig' %} \ No newline at end of file +{% include 'analytics/application-insights.swig' %} From def4dc210b5a55e5d566c554284e26a2020cb110 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Tue, 17 Jan 2017 20:05:50 +0300 Subject: [PATCH 03/23] ADD: VK API support. (3) --- .../third-party/analytics/vkontakte-api.swig | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 layout/_scripts/third-party/analytics/vkontakte-api.swig diff --git a/layout/_scripts/third-party/analytics/vkontakte-api.swig b/layout/_scripts/third-party/analytics/vkontakte-api.swig new file mode 100644 index 000000000..018051606 --- /dev/null +++ b/layout/_scripts/third-party/analytics/vkontakte-api.swig @@ -0,0 +1,27 @@ +{% if theme.vkontakte_api.enable %} + +
+ + +{% endif %} From bb89ece1c05ae21b68f61ded4a40beaf9b61187d Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Tue, 17 Jan 2017 20:06:02 +0300 Subject: [PATCH 04/23] ADD: VK API support. (4) --- layout/_macro/post.swig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index e37c89ee6..3841c5293 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -177,6 +177,13 @@
{% endif %} + {% if not is_index and theme.vkontakte_api.enable and theme.vkontakte_api.like %} + {% if post.categories and post.categories.length and theme.post_meta.categories %} + + {% endif %} +
+ {% endif %} + {# LeanCould PageView #} {% if theme.leancloud_visitors.enable %} From 1b8a517b410845ff346e30abbeb27698233e27e1 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Tue, 17 Jan 2017 20:06:12 +0300 Subject: [PATCH 05/23] ADD: VK API support. (5) --- layout/_partials/comments.swig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layout/_partials/comments.swig b/layout/_partials/comments.swig index 26c496ee4..a61f536a6 100644 --- a/layout/_partials/comments.swig +++ b/layout/_partials/comments.swig @@ -11,6 +11,8 @@ data-width="{{ theme.facebook_comments_plugin.width }}" data-colorscheme="{{ theme.facebook_comments_plugin.scheme }}"> + {% elseif theme.vkontakte_api.enable and theme.vkontakte_api.comments %} +
{% elseif theme.disqus_shortname %}
{% endif %} + {% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} + + {% endif %} + {% if not is_index and (post.prev or post.next) %}
From fb1f5c20553d2cfbf50ce3fa4ed2bd0d2280fcaf Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Wed, 18 Jan 2017 02:01:43 +0300 Subject: [PATCH 09/23] FIX: refatcor buttons style alignment. (2) --- source/css/_common/components/post/post-meta.styl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/css/_common/components/post/post-meta.styl b/source/css/_common/components/post/post-meta.styl index 2588da1b8..101965bc0 100644 --- a/source/css/_common/components/post/post-meta.styl +++ b/source/css/_common/components/post/post-meta.styl @@ -44,11 +44,17 @@ +mobile() { display: none; } } -.fb_iframe_widget { - top: -2px; +.social-like { + height: 20px; + text-align: center; + border-top: 1px solid #eee; + padding-top: 6px; + margin-top: 40px; } -#vk_like { +.vk_like { display: inline-block; - top: 6px; + width: 85px; + height: 22px; + vertical-align: bottom; } From 66fad6d7ca44e72619e3746ff1a136f340baf054 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Wed, 18 Jan 2017 02:02:08 +0300 Subject: [PATCH 10/23] FIX: for better like buttons style. (3) --- source/css/_common/components/post/post-nav.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/css/_common/components/post/post-nav.styl b/source/css/_common/components/post/post-nav.styl index 73a9436f7..ba5d4aaf7 100644 --- a/source/css/_common/components/post/post-nav.styl +++ b/source/css/_common/components/post/post-nav.styl @@ -1,6 +1,6 @@ .post-nav { display: table; - margin-top: 60px; + margin-top: 30px; width: 100%; border-top: 1px solid $gainsboro; } From 51289787a7ae5352d27782597ae5472cbf4d9571 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Wed, 18 Jan 2017 05:01:15 +0300 Subject: [PATCH 11/23] FIX: add `fb_like` div for better alignment. (4) --- layout/_macro/post.swig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 176342d2d..9ecf13fdd 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -298,7 +298,9 @@ {% endif %} {% if not is_index and theme.facebook_sdk.enable and theme.facebook_sdk.like_button %} -
+
+
+
{% endif %}
{% endif %} From dfea208538ffb2ec21ba6c363ca4055b4d4e846f Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Wed, 18 Jan 2017 05:01:25 +0300 Subject: [PATCH 12/23] FIX: refactor social alignment style. (5) --- .../css/_common/components/post/post-meta.styl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/source/css/_common/components/post/post-meta.styl b/source/css/_common/components/post/post-meta.styl index 101965bc0..01b5f2420 100644 --- a/source/css/_common/components/post/post-meta.styl +++ b/source/css/_common/components/post/post-meta.styl @@ -43,18 +43,24 @@ .posts-expand .post-comments-count { +mobile() { display: none; } } - .social-like { height: 20px; text-align: center; border-top: 1px solid #eee; - padding-top: 6px; + padding-top: 9px; margin-top: 40px; + display: flex; + justify-content: center; } .vk_like { - display: inline-block; width: 85px; - height: 22px; - vertical-align: bottom; + height: 21px; + padding-top: 7px; + align-self: center; +} + +.fb_like { + height: 30px; + align-self: center; } From 1e10b2c486f424a8a40983d0a9c70544d6cda0fb Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Wed, 18 Jan 2017 05:01:34 +0300 Subject: [PATCH 13/23] FIX: refactor social alignment style. (6) --- source/css/_common/components/post/post-nav.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/css/_common/components/post/post-nav.styl b/source/css/_common/components/post/post-nav.styl index ba5d4aaf7..fa85838d2 100644 --- a/source/css/_common/components/post/post-nav.styl +++ b/source/css/_common/components/post/post-nav.styl @@ -1,6 +1,6 @@ .post-nav { display: table; - margin-top: 30px; + margin-top: 15px; width: 100%; border-top: 1px solid $gainsboro; } From 7f7b248322d71bea4b847c8bbaa5c318af3a09f2 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Wed, 18 Jan 2017 08:57:24 +0300 Subject: [PATCH 14/23] FIX: refactor social alignment style. (7) --- source/css/_common/components/post/post-meta.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/css/_common/components/post/post-meta.styl b/source/css/_common/components/post/post-meta.styl index 01b5f2420..8442dad36 100644 --- a/source/css/_common/components/post/post-meta.styl +++ b/source/css/_common/components/post/post-meta.styl @@ -48,7 +48,7 @@ text-align: center; border-top: 1px solid #eee; padding-top: 9px; - margin-top: 40px; + margin-top: 45px; display: flex; justify-content: center; } From 1fb1716421c831b7795dfdeff05b3ebb197742de Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Wed, 18 Jan 2017 09:00:09 +0300 Subject: [PATCH 15/23] FIX: disable `social-like` div on index page . (8) --- layout/_macro/post.swig | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 9ecf13fdd..77183dbd4 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -289,20 +289,22 @@
{% endif %} - {% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} - + {% endif %} {% endif %} {% if not is_index and (post.prev or post.next) %} From c56b267fc62a35b5fedea518354021e3b9d06f92 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Wed, 18 Jan 2017 23:25:39 +0300 Subject: [PATCH 16/23] FIX: social buttons vertical align. (9) --- source/css/_common/components/post/post-meta.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/source/css/_common/components/post/post-meta.styl b/source/css/_common/components/post/post-meta.styl index 8442dad36..727a1704e 100644 --- a/source/css/_common/components/post/post-meta.styl +++ b/source/css/_common/components/post/post-meta.styl @@ -44,6 +44,7 @@ +mobile() { display: none; } } .social-like { + font-size: 14px; height: 20px; text-align: center; border-top: 1px solid #eee; From 788e795ffd6a30993e3e2136139a7f19bf6f6362 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Thu, 19 Jan 2017 02:21:52 +0300 Subject: [PATCH 17/23] ADD: hexo-wordcount plugin support. (1) --- languages/ru.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/languages/ru.yml b/languages/ru.yml index ba9226f44..af054fdb6 100644 --- a/languages/ru.yml +++ b/languages/ru.yml @@ -2,6 +2,7 @@ title: archive: Архив category: Категория tag: Тэг + schedule: Календарь author: Author @@ -12,6 +13,7 @@ menu: tags: Тэги about: О сайте search: Поиск + schedule: Календарь sitemap: Карта сайта sidebar: @@ -28,6 +30,8 @@ post: untitled: Без имени toc_empty: Эта запись без оглавления visitors: Просмотров + wordcount: Кол-во слов в статье + min2read: Время чтения в минутах page: totally: Всего From 9707b075fc183fbd4b4aa1717f0521567f16a64d Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Thu, 19 Jan 2017 02:23:06 +0300 Subject: [PATCH 18/23] ADD: hexo-wordcount plugin support. (2) --- languages/default.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/languages/default.yml b/languages/default.yml index 2f7050fea..7d1c6a5c9 100644 --- a/languages/default.yml +++ b/languages/default.yml @@ -2,6 +2,7 @@ title: archive: Archive category: Category tag: Tag + schedule: Schedule author: Author @@ -12,6 +13,7 @@ menu: tags: Tags about: About search: Search + schedule: Schedule sitemap: Sitemap sidebar: @@ -28,6 +30,8 @@ post: untitled: Untitled toc_empty: This post does not have a Table of Contents visitors: Visitors + wordcount: Words count in article + min2read: Reading time page: totally: Totally From 1eb5ff86db565e3b0e116fab035718245cb3c802 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Thu, 19 Jan 2017 02:24:22 +0300 Subject: [PATCH 19/23] ADD: hexo-wordcount plugin support. (3) --- languages/en.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/languages/en.yml b/languages/en.yml index deb0bf731..7d1c6a5c9 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -1,8 +1,8 @@ title: archive: Archive category: Category - schedule: Schedule tag: Tag + schedule: Schedule author: Author @@ -10,10 +10,10 @@ menu: home: Home archives: Archives categories: Categories - schedule: Schedule tags: Tags about: About search: Search + schedule: Schedule sitemap: Sitemap sidebar: @@ -30,6 +30,8 @@ post: untitled: Untitled toc_empty: This post does not have a Table of Contents visitors: Visitors + wordcount: Words count in article + min2read: Reading time page: totally: Totally From 4965910e0ea48daf13b48319954672841c8b8dc9 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Thu, 19 Jan 2017 02:26:22 +0300 Subject: [PATCH 20/23] ADD: hexo-wordcount plugin support. (4) --- _config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 7448abcd5..5c3c179a2 100755 --- a/_config.yml +++ b/_config.yml @@ -217,7 +217,13 @@ post_meta: created_at: true updated_at: false categories: true - + +# Post wordcount display settings +# Dependies: https://github.com/willin/hexo-wordcount +post_wordcount: + item_text: true + wordcount: false + min2read: false # Wechat Subscriber #wechat_subscriber: From 614b8eaec47b321dea6eac5cbf6b635ce4a8d942 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Thu, 19 Jan 2017 02:28:05 +0300 Subject: [PATCH 21/23] ADD: hexo-wordcount plugin support. (5) --- layout/_macro/post.swig | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 77183dbd4..56dd0536a 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -193,6 +193,38 @@
{% endif %} + {% if theme.post_wordcount.wordcount or theme.post_wordcount.min2read %} +
+ {% if theme.post_wordcount.wordcount %} + + {% if theme.post_wordcount.item_text %} + + {% endif %} + + {{ wordcount(post.content) }} + + {% endif %} + + {% if theme.post_wordcount.wordcount and theme.post_wordcount.min2read %} + + {% endif %} + + {% if theme.post_wordcount.min2read %} + + {% if theme.post_wordcount.item_text %} + + {% endif %} + + {{ min2read(post.content) }} + + {% endif %} +
+ {% endif %} + {% if post.description and (not theme.excerpt_description or not is_index) %}
{{ post.description }} From 39521c7eac9ccbd51ace538bc8721686d052198d Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Tue, 31 Jan 2017 20:45:40 +0300 Subject: [PATCH 22/23] ADD: Yandex verification option. (1) --- layout/_partials/head.swig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layout/_partials/head.swig b/layout/_partials/head.swig index 4f036eda6..8fa1ad251 100644 --- a/layout/_partials/head.swig +++ b/layout/_partials/head.swig @@ -13,6 +13,11 @@ {% endif %} +{% if theme.yandex_site_verification %} + +{% endif %} + + {% if theme.baidu_site_verification %} {% endif %} From 9992dd78fb2536ac0964e65f1bb0cd2c5736d011 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Tue, 31 Jan 2017 20:47:50 +0300 Subject: [PATCH 23/23] ADD: Yandex verification option. (2) --- _config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 5c3c179a2..efa914530 100755 --- a/_config.yml +++ b/_config.yml @@ -306,10 +306,13 @@ mathjax: # See: https://www.google.com/webmasters/ #google_site_verification: - # Google Analytics #google_analytics: +# Yandex Webmaster tools verification setting +# See: https://webmaster.yandex.ru/ +#yandex_site_verification: + # CNZZ count #cnzz_siteid: