From a10ad0a99ba6e44a35253c3bcaff80c90e99348e Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Sun, 3 Oct 2021 00:10:58 -0500 Subject: Revert ALL jekyll-text-theme configuration files I am changing the theme of the site, and need to revert these changes to make everything work. Revert "Add jekyll-text-theme YAML files" This reverts commit 61b34a5f260db45575d448d766ea29c0fb273ed3. Revert "Bring all of jekyll-text-theme _includes into site" This reverts commit c6bf5f7c895287d2028f6024265913b59784a154. Revert "Bring all of jekyll-text-theme assets to site" This reverts commit 7b69c2e5975f98da09d932ba6c70bdd71b1601a7. Remove jekyll text theme from Gemfile --- _includes/analytics-providers/custom.html | 3 - _includes/analytics-providers/google.html | 14 -- _includes/analytics.html | 7 - _includes/article-footer.html | 55 ------ _includes/article-header.html | 49 ----- _includes/article-info.html | 96 ---------- _includes/article-list.html | 144 --------------- _includes/article-section-navigator.html | 54 ------ _includes/article/footer/author-profile.html | 47 ----- _includes/article/footer/custom.html | 3 - _includes/article/footer/license.html | 14 -- _includes/article/footer/subscribe.html | 6 - _includes/article/top/custom.html | 3 - _includes/aside/toc.html | 1 - _includes/comments-providers/custom.html | 3 - _includes/comments-providers/disqus.html | 22 --- _includes/comments-providers/gitalk.html | 39 ---- _includes/comments-providers/valine.html | 46 ----- _includes/comments.html | 11 -- _includes/extensions/bilibili.html | 5 - _includes/extensions/codepen.html | 4 - _includes/extensions/netease-cloud-music.html | 4 - _includes/extensions/slideshare.html | 6 - _includes/extensions/soundcloud.html | 4 - _includes/extensions/ted.html | 5 - _includes/extensions/youtube.html | 4 - _includes/footer.html | 37 ---- _includes/head.html | 24 --- _includes/head/custom.html | 3 - _includes/header.html | 44 ----- _includes/main/bottom/custom.html | 3 - _includes/main/top/custom.html | 3 - _includes/markdown-enhancements.html | 17 -- _includes/markdown-enhancements/chart.html | 15 -- _includes/markdown-enhancements/mathjax.html | 17 -- _includes/markdown-enhancements/mermaid.html | 10 - _includes/pageview-providers/custom/home.html | 3 - _includes/pageview-providers/custom/post.html | 3 - _includes/pageview-providers/leancloud/home.html | 35 ---- .../pageview-providers/leancloud/leancloud.js | 72 -------- _includes/pageview-providers/leancloud/post.html | 31 ---- _includes/pageview.html | 29 --- _includes/paginator.html | 98 ---------- _includes/scripts/archieve.js | 135 -------------- _includes/scripts/article.js | 24 --- _includes/scripts/aside/affix.js | 26 --- _includes/scripts/aside/toc.js | 35 ---- _includes/scripts/common.js | 7 - _includes/scripts/components/lightbox.js | 49 ----- _includes/scripts/components/search.js | 86 --------- _includes/scripts/components/sidebar.js | 30 --- _includes/scripts/home.js | 3 - _includes/scripts/lib/affix.js | 111 ----------- _includes/scripts/lib/gallery.js | 192 ------------------- _includes/scripts/lib/lazyload.js | 143 --------------- _includes/scripts/lib/modal.js | 64 ------- _includes/scripts/lib/scroll-to.js | 13 -- _includes/scripts/lib/swiper.js | 203 --------------------- _includes/scripts/lib/throttle.js | 28 --- _includes/scripts/lib/toc.js | 107 ----------- _includes/scripts/page.js | 3 - _includes/scripts/utils/imagesLoad.js | 28 --- _includes/scripts/utils/utils.js | 39 ---- _includes/scripts/variables.html | 35 ---- _includes/search-providers/custom/search.html | 3 - _includes/search-providers/default/search-data.js | 14 -- _includes/search-providers/default/search.html | 18 -- _includes/search-providers/default/search.js | 112 ------------ .../google-custom-search-engine/search.html | 21 --- .../google-custom-search-engine/search.js | 33 ---- _includes/search.html | 20 -- _includes/sharing-providers/addthis.html | 9 - _includes/sharing-providers/addtoany.html | 10 - _includes/sharing-providers/custom.html | 3 - _includes/sharing.html | 7 - _includes/sidebar/toc.html | 25 --- _includes/snippets/assign.html | 9 - _includes/snippets/get-article-title.html | 11 -- _includes/snippets/get-lang.html | 6 - _includes/snippets/get-locale-string.html | 12 -- _includes/snippets/get-nav-url.html | 8 - _includes/snippets/get-sources.html | 2 - .../snippets/get-string-from-locale-config.html | 7 - _includes/snippets/is_collection.html | 6 - _includes/snippets/page-url.html | 2 - _includes/snippets/prepend-baseurl.html | 4 - _includes/snippets/prepend-path.html | 1 - _includes/svg/icon/social/behance.svg | 3 - _includes/svg/icon/social/douban.svg | 5 - _includes/svg/icon/social/facebook.svg | 3 - _includes/svg/icon/social/flicker.svg | 5 - _includes/svg/icon/social/github.svg | 3 - _includes/svg/icon/social/googleplus.svg | 3 - _includes/svg/icon/social/linkedin.svg | 3 - _includes/svg/icon/social/mail.svg | 6 - _includes/svg/icon/social/medium.svg | 3 - _includes/svg/icon/social/npm.svg | 9 - _includes/svg/icon/social/pinterest.svg | 3 - _includes/svg/icon/social/qq.svg | 3 - _includes/svg/icon/social/telegram.svg | 4 - _includes/svg/icon/social/twitter.svg | 3 - _includes/svg/icon/social/weibo.svg | 6 - _includes/svg/icon/social/weixin.svg | 3 - _includes/svg/icon/social/zhihu.svg | 3 - _includes/tags.html | 52 ------ 105 files changed, 2917 deletions(-) delete mode 100644 _includes/analytics-providers/custom.html delete mode 100644 _includes/analytics-providers/google.html delete mode 100644 _includes/analytics.html delete mode 100644 _includes/article-footer.html delete mode 100644 _includes/article-header.html delete mode 100644 _includes/article-info.html delete mode 100644 _includes/article-list.html delete mode 100644 _includes/article-section-navigator.html delete mode 100644 _includes/article/footer/author-profile.html delete mode 100644 _includes/article/footer/custom.html delete mode 100644 _includes/article/footer/license.html delete mode 100644 _includes/article/footer/subscribe.html delete mode 100644 _includes/article/top/custom.html delete mode 100644 _includes/aside/toc.html delete mode 100644 _includes/comments-providers/custom.html delete mode 100644 _includes/comments-providers/disqus.html delete mode 100644 _includes/comments-providers/gitalk.html delete mode 100644 _includes/comments-providers/valine.html delete mode 100644 _includes/comments.html delete mode 100644 _includes/extensions/bilibili.html delete mode 100644 _includes/extensions/codepen.html delete mode 100644 _includes/extensions/netease-cloud-music.html delete mode 100644 _includes/extensions/slideshare.html delete mode 100644 _includes/extensions/soundcloud.html delete mode 100644 _includes/extensions/ted.html delete mode 100644 _includes/extensions/youtube.html delete mode 100644 _includes/footer.html delete mode 100644 _includes/head.html delete mode 100644 _includes/head/custom.html delete mode 100644 _includes/header.html delete mode 100644 _includes/main/bottom/custom.html delete mode 100644 _includes/main/top/custom.html delete mode 100644 _includes/markdown-enhancements.html delete mode 100644 _includes/markdown-enhancements/chart.html delete mode 100644 _includes/markdown-enhancements/mathjax.html delete mode 100644 _includes/markdown-enhancements/mermaid.html delete mode 100644 _includes/pageview-providers/custom/home.html delete mode 100644 _includes/pageview-providers/custom/post.html delete mode 100644 _includes/pageview-providers/leancloud/home.html delete mode 100644 _includes/pageview-providers/leancloud/leancloud.js delete mode 100644 _includes/pageview-providers/leancloud/post.html delete mode 100644 _includes/pageview.html delete mode 100644 _includes/paginator.html delete mode 100644 _includes/scripts/archieve.js delete mode 100644 _includes/scripts/article.js delete mode 100644 _includes/scripts/aside/affix.js delete mode 100644 _includes/scripts/aside/toc.js delete mode 100644 _includes/scripts/common.js delete mode 100644 _includes/scripts/components/lightbox.js delete mode 100644 _includes/scripts/components/search.js delete mode 100644 _includes/scripts/components/sidebar.js delete mode 100644 _includes/scripts/home.js delete mode 100644 _includes/scripts/lib/affix.js delete mode 100644 _includes/scripts/lib/gallery.js delete mode 100644 _includes/scripts/lib/lazyload.js delete mode 100644 _includes/scripts/lib/modal.js delete mode 100644 _includes/scripts/lib/scroll-to.js delete mode 100644 _includes/scripts/lib/swiper.js delete mode 100644 _includes/scripts/lib/throttle.js delete mode 100644 _includes/scripts/lib/toc.js delete mode 100644 _includes/scripts/page.js delete mode 100644 _includes/scripts/utils/imagesLoad.js delete mode 100644 _includes/scripts/utils/utils.js delete mode 100644 _includes/scripts/variables.html delete mode 100644 _includes/search-providers/custom/search.html delete mode 100644 _includes/search-providers/default/search-data.js delete mode 100644 _includes/search-providers/default/search.html delete mode 100644 _includes/search-providers/default/search.js delete mode 100644 _includes/search-providers/google-custom-search-engine/search.html delete mode 100644 _includes/search-providers/google-custom-search-engine/search.js delete mode 100644 _includes/search.html delete mode 100644 _includes/sharing-providers/addthis.html delete mode 100644 _includes/sharing-providers/addtoany.html delete mode 100644 _includes/sharing-providers/custom.html delete mode 100644 _includes/sharing.html delete mode 100644 _includes/sidebar/toc.html delete mode 100644 _includes/snippets/assign.html delete mode 100644 _includes/snippets/get-article-title.html delete mode 100644 _includes/snippets/get-lang.html delete mode 100644 _includes/snippets/get-locale-string.html delete mode 100644 _includes/snippets/get-nav-url.html delete mode 100644 _includes/snippets/get-sources.html delete mode 100644 _includes/snippets/get-string-from-locale-config.html delete mode 100644 _includes/snippets/is_collection.html delete mode 100644 _includes/snippets/page-url.html delete mode 100644 _includes/snippets/prepend-baseurl.html delete mode 100644 _includes/snippets/prepend-path.html delete mode 100644 _includes/svg/icon/social/behance.svg delete mode 100644 _includes/svg/icon/social/douban.svg delete mode 100644 _includes/svg/icon/social/facebook.svg delete mode 100644 _includes/svg/icon/social/flicker.svg delete mode 100644 _includes/svg/icon/social/github.svg delete mode 100644 _includes/svg/icon/social/googleplus.svg delete mode 100644 _includes/svg/icon/social/linkedin.svg delete mode 100644 _includes/svg/icon/social/mail.svg delete mode 100644 _includes/svg/icon/social/medium.svg delete mode 100644 _includes/svg/icon/social/npm.svg delete mode 100644 _includes/svg/icon/social/pinterest.svg delete mode 100644 _includes/svg/icon/social/qq.svg delete mode 100644 _includes/svg/icon/social/telegram.svg delete mode 100644 _includes/svg/icon/social/twitter.svg delete mode 100644 _includes/svg/icon/social/weibo.svg delete mode 100644 _includes/svg/icon/social/weixin.svg delete mode 100644 _includes/svg/icon/social/zhihu.svg delete mode 100644 _includes/tags.html (limited to '_includes') diff --git a/_includes/analytics-providers/custom.html b/_includes/analytics-providers/custom.html deleted file mode 100644 index 58448f7..0000000 --- a/_includes/analytics-providers/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/analytics-providers/google.html b/_includes/analytics-providers/google.html deleted file mode 100644 index 5fbd17d..0000000 --- a/_includes/analytics-providers/google.html +++ /dev/null @@ -1,14 +0,0 @@ -{%- if site.analytics.google.tracking_id -%} - - - -{%- endif -%} diff --git a/_includes/analytics.html b/_includes/analytics.html deleted file mode 100644 index 46ba91d..0000000 --- a/_includes/analytics.html +++ /dev/null @@ -1,7 +0,0 @@ -{%- if jekyll.environment != 'development' -%} - {%- if site.analytics.provider == 'google' -%} - {%- include analytics-providers/google.html -%} - {%- elsif site.analytics.provider == 'custom' -%} - {%- include analytics-providers/custom.html -%} - {%- endif -%} -{%- endif -%} diff --git a/_includes/article-footer.html b/_includes/article-footer.html deleted file mode 100644 index 33c3742..0000000 --- a/_includes/article-footer.html +++ /dev/null @@ -1,55 +0,0 @@ -{%- include snippets/assign.html - target=site.data.variables.default.page.show_author_profile - source0=layout.show_author_profile source1=page.show_author_profile -%} -{%- assign _show_author_profile = __return -%} - -{%- include snippets/assign.html - target=site.data.variables.default.page.show_subscribe - source0=layout.show_subscribe source1=page.show_subscribe -%} -{%- assign _show_subscribe = __return -%} - -{%- include snippets/assign.html - target=site.data.variables.default.page.license - source0=layout.license source1=page.license -%} -{%- assign _license = __return -%} - - diff --git a/_includes/article-header.html b/_includes/article-header.html deleted file mode 100644 index 748b24c..0000000 --- a/_includes/article-header.html +++ /dev/null @@ -1,49 +0,0 @@ -{%- include snippets/get-article-title.html article=include.article-%} -{%- assign _article_title = __return -%} - -{%- if include.html != false -%} - - {%- include snippets/assign.html - target=site.data.variables.default.page.show_title - source0=layout.show_title source1=include.article.show_title -%} - {%- assign _show_title = __return -%} - - {%- include snippets/assign.html - target=site.data.variables.default.page.show_edit_on_github - source0=layout.show_edit_on_github source1=include.article.show_edit_on_github -%} - {%- assign _show_edit_on_github = __return -%} - - {%- if _show_title or _show_edit_on_github -%} -
- {%- if _show_title -%} -

{{ _article_title }}

- {%- endif -%} - {%- if _show_edit_on_github -%} - {%- if site.repository and site.repository_tree -%} - {%- include snippets/is_collection.html page=include.article -%} - {%- assign _is_article_collection = __return -%} - {%- include snippets/get-locale-string.html key='POST_ON_GITHUB' -%} - {%- assign _locale_post_on_github = __return -%} - {%- if _is_article_collection -%} - {%- include snippets/prepend-path.html path=include.article.path prepend_path=site.collections_dir -%} - {%- assign _article_path = __return -%} - {%- else -%} - {%- assign _article_path = include.article.path -%} - {%- endif -%} - {%- assign _github_path = site.repository | append: '/tree/' | append: site.repository_tree | append: '/' | append: _article_path | replace:'//','/' -%} -   - - - {%- endif -%} - {%- endif -%} -
- {%- else -%} -

{{ _article_title }}

- {%- endif -%} -{%- endif -%} - -{%- if include.semantic != false -%} - -{%- endif -%} diff --git a/_includes/article-info.html b/_includes/article-info.html deleted file mode 100644 index c97fac9..0000000 --- a/_includes/article-info.html +++ /dev/null @@ -1,96 +0,0 @@ -{%- assign _author = site.data.authors[include.article.author] | default: site.author -%} - -{%- if include.html != false -%} - - {%- include snippets/assign.html - target=site.data.variables.default.page.show_date - source0=layout.show_date source1=include.article.show_date -%} - {%- assign _show_date = __return -%} - {%- if _show_date and include.article.date -%} - {%- assign _show_date = true -%} - {%- else -%} - {%- assign _show_date = false -%} - {%- endif -%} - - {%- include snippets/assign.html - target=site.data.variables.default.page.show_tags - source0=layout.show_tags source1=include.article.show_tags -%} - {%- assign _show_tags = __return -%} - {%- if _show_tags and include.article.tags[0] -%} - {%- assign _show_tags = true -%} - {%- else -%} - {%- assign _show_tags = false -%} - {%- endif -%} - - {%- assign _show_author = include.article.author -%} - - {%- include snippets/assign.html target=site.data.variables.default.page.pageview - source0=layout.pageview source1=page.pageview -%} - {%- assign _pageview = __return -%} - {%- if _pageview or include.show_pageview -%} - {%- assign _pageview = true -%} - {%- else -%} - {%- assign _pageview = false -%} - {%- endif -%} - - {%- assign _paths_archive = site.paths.archive | default: site.data.variables.default.paths.archive -%} - - {%- if _show_tags or _show_author or _show_date or _pageview -%} -
- {%- if _show_tags -%} - - - {%- endif -%} - - {%- if _show_author or _show_date or _pageview -%} - - {%- endif -%} - -
- {%- endif -%} -{%- endif -%} - - -{%- if include.semantic != false -%} - {%- if _author -%} - - {%- endif -%} - {%- if include.article.date -%} - - {%- endif -%} - {%- if include.article.tags[0] -%} - {%- assign _keywords = include.article.tags | join: ',' %} - - {%- endif -%} -{%- endif -%} diff --git a/_includes/article-list.html b/_includes/article-list.html deleted file mode 100644 index dfe0c85..0000000 --- a/_includes/article-list.html +++ /dev/null @@ -1,144 +0,0 @@ -{%- assign _excerpt_truncate = include.excerpt_truncate | default: 350 -%} - -{%- assign _excerpt_type = include.excerpt_type -%} - -{%- include snippets/get-locale-string.html key='READMORE' -%} -{%- assign _locale_readmore = __return -%} - -{%- assign _sorted_list = include.articles -%} -{%- if include.group_by == 'year' -%} - {%- assign _sorted_list = _sorted_list | sort: 'date' -%} -{%- endif -%} -{%- if include.reverse -%} - {%- assign _sorted_list = _sorted_list | reverse -%} -{%- endif -%} - -{%- if include.type == 'item' -%} -
-{%- elsif include.type == 'brief' -%} -
-{%- elsif include.type == 'grid' -%} - {%- if include.size == 'sm' -%} -
- {%- else -%} -
- {%- endif -%} -{%- endif -%} - - {%- for _article in _sorted_list -%} - - {%- include snippets/prepend-baseurl.html path=_article.url -%} - {%- assign _article_url = __return -%} - - {%- if _article.cover -%} - {%- include snippets/get-nav-url.html path=_article.cover -%} - {%- assign _article_cover = __return -%} - {%- endif -%} - - {%- if include.type == 'item' -%} - {%- if include.article_type == 'BlogPosting' -%} -
- {%- else -%} -
- {%- endif -%} - {%- if _article.cover and include.show_cover-%} - {%- include snippets/get-nav-url.html path=_article.cover -%} - {%- assign _article_cover = __return -%} -
- {%- if include.cover_size == 'lg' -%} - - {%- elsif include.cover_size == 'sm' -%} - - {%- else -%} - - {%- endif -%} -
- {%- endif -%} -
-

{{ _article.title }}

-
- {%- if _article.excerpt and include.show_excerpt -%} -
- {%- if _excerpt_type == 'html' -%} - {{ _article.excerpt }} - {%- else -%} - {{ _article.excerpt | strip_html | strip | truncate: _excerpt_truncate }} - {%- endif -%} -
- {%- endif -%} - {%- if include.show_readmore -%} -

{{ _locale_readmore }}

- {%- endif -%} -
- {%- if include.show_info -%} - {%- include snippets/assign.html target=site.data.variables.default.page.pageview - source0=_article.pageview -%} - {%- assign _show_pageview = __return -%} - {%- include article-info.html article=_article show_pageview=_show_pageview -%} - {%- endif -%} -
-
- - - {%- elsif include.type == 'brief' -%} - {%- assign _tags = '' -%} - {%- for _tag in _article.tags -%} - {%- assign _tag_encode = _tag | strip | url_encode -%} - {%- if forloop.last -%} - {%- assign _tags = _tags | append: _tag_encode -%} - {%- else -%} - {%- assign _tags = _tags | append: _tag_encode | append: ',' -%} - {%- endif -%} - {%- endfor -%} - {%- if include.group_by == 'year' -%} - {%- assign _currentdate = _article.date | date: '%Y' -%} - {%- if _currentdate != _date -%} - {%- unless forloop.first -%}{%- endunless -%} -

{{ _currentdate }}

    - {%- assign _date = _currentdate -%} - {%- endif -%} - {%- endif -%} - {%- include snippets/get-locale-string.html key='ARTICLE_LIST_DATE_FORMAT' -%} -
  • -
    - {%- if include.show_info -%} - {{ _article.date | date: __return }} - {%- endif -%} - {{ _article.title }}
    -
  • - - {%- elsif include.type == 'grid' -%} - {%- if include.size == 'sm' -%} -
    -
    - {%- if _article.cover -%} -
    - - -
    - {%- endif -%} -
    -
    - {%- else -%} - -
    -
    - {%- if _article.cover -%} -
    - {%- endif -%} - -
    -
    - {%- endif -%} - {%- endif -%} - {%- endfor -%} - -
diff --git a/_includes/article-section-navigator.html b/_includes/article-section-navigator.html deleted file mode 100644 index a88aaf9..0000000 --- a/_includes/article-section-navigator.html +++ /dev/null @@ -1,54 +0,0 @@ -{%- if page.sidebar.nav -%} - {%- assign _sidebar_nav = site.data.navigation[page.sidebar.nav] -%} - {%- if _sidebar_nav -%} - {%- assign _find_cur = false -%} - {%- assign _find_next = false -%} - - {%- for _item in _sidebar_nav -%} - {%- if _find_next -%} {%- break -%} {%- endif -%} - {%- if _item.children -%} - - {%- for _child in _item.children -%} - {%- include snippets/get-nav-url.html path=_child.url -%} - {%- assign _nav_url = __return -%} - {%- include snippets/get-nav-url.html path=page.url -%} - {%- assign _page_url = __return -%} - - {%- if _nav_url == _page_url -%} - {%- assign _find_cur = true -%} - {%- elsif _find_cur and _find_next != true -%} - {%- assign _find_next = true -%} - {%- assign _next = _child -%} - {%- break -%} - {%- else -%} - {%- assign _previous = _child -%} - {%- endif -%} - {%- endfor -%} - - {%- endif -%} - {%- endfor -%} - {%- endif -%} - -{%- else -%} - {%- assign _previous = page.previous -%} - {%- assign _next = page.next -%} -{%- endif -%} - -{%- if _next or _previous -%} -
- {%- if _previous -%} - {%- include snippets/prepend-baseurl.html path=_previous.url -%} - {%- assign _href = __return -%} - {%- include snippets/get-locale-string.html key='PREVIOUS' -%} - {%- assign _locale_previous = __return -%} - - {%- endif -%} - {%- if _next -%} - {%- include snippets/prepend-baseurl.html path=_next.url -%} - {%- assign _href = __return -%} - {%- include snippets/get-locale-string.html key='NEXT' -%} - {%- assign _locale_next = __return -%} - - {%- endif -%} -
-{%- endif -%} diff --git a/_includes/article/footer/author-profile.html b/_includes/article/footer/author-profile.html deleted file mode 100644 index 8b0d72d..0000000 --- a/_includes/article/footer/author-profile.html +++ /dev/null @@ -1,47 +0,0 @@ -{%- assign _author = include.author -%} - -{%- if _author.type == 'organization' -%} - {%- assign _author_itemtype = 'http://schema.org/Organization' -%} -{%- else -%} - {%- assign _author_itemtype = 'http://schema.org/Person' -%} -{%- endif -%} - -
- {%- if _author.avatar -%} - {%- if _author.url -%} - - {%- endif -%} - {%- include snippets/get-nav-url.html path=_author.avatar -%} - {%- assign _author_avatar = __return -%} - - {%- if _author.url -%} - - {%- endif -%} - {%- endif -%} - - -
- - {%- if _author.name -%} - -

- {%- if _author.url -%} - - - {%- endif -%} - {{ _author.name }} - {%- if _author.url -%} - - {%- endif -%} -

- {%- endif -%} - - {%- if _author.bio -%} -

{{ _author.bio }}

- {%- endif -%} - - -
-
diff --git a/_includes/article/footer/custom.html b/_includes/article/footer/custom.html deleted file mode 100644 index edcd06d..0000000 --- a/_includes/article/footer/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/article/footer/license.html b/_includes/article/footer/license.html deleted file mode 100644 index a2c1535..0000000 --- a/_includes/article/footer/license.html +++ /dev/null @@ -1,14 +0,0 @@ -{%- include snippets/get-locale-string.html key='LICENSE_ANNOUNCE' -%} -{%- assign _license_announce = __return -%} - -{%- if include.license -%} - - {%-assign _license_name = '[NAME]' | replace: "[URL]", include.license.url | replace: "[NAME]", include.license.name -%} -
-

{{ _license_announce | replace: "[LICENSE]", _license_name }} - - {{ include.license.name }} - -

-
-{%- endif -%} diff --git a/_includes/article/footer/subscribe.html b/_includes/article/footer/subscribe.html deleted file mode 100644 index cb9a169..0000000 --- a/_includes/article/footer/subscribe.html +++ /dev/null @@ -1,6 +0,0 @@ -{%- assign _paths_rss = site.paths.rss | default: site.data.variables.default.paths.rss -%} -{%- include snippets/get-nav-url.html path=_paths_rss -%} -{%- assign _paths_rss = __return -%} -{%- include snippets/get-locale-string.html key='SUBSCRIBE' -%} -{%- assign _locale_nav_subscribe = __return -%} - diff --git a/_includes/article/top/custom.html b/_includes/article/top/custom.html deleted file mode 100644 index 12f393d..0000000 --- a/_includes/article/top/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/aside/toc.html b/_includes/aside/toc.html deleted file mode 100644 index 1d19e6a..0000000 --- a/_includes/aside/toc.html +++ /dev/null @@ -1 +0,0 @@ -
diff --git a/_includes/comments-providers/custom.html b/_includes/comments-providers/custom.html deleted file mode 100644 index 600b9f7..0000000 --- a/_includes/comments-providers/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/comments-providers/disqus.html b/_includes/comments-providers/disqus.html deleted file mode 100644 index 4022306..0000000 --- a/_includes/comments-providers/disqus.html +++ /dev/null @@ -1,22 +0,0 @@ -{%- if page.key and - site.comments.disqus.shortname -%} - -
- - - -{%- endif -%} diff --git a/_includes/comments-providers/gitalk.html b/_includes/comments-providers/gitalk.html deleted file mode 100644 index f7f5c67..0000000 --- a/_includes/comments-providers/gitalk.html +++ /dev/null @@ -1,39 +0,0 @@ -{%- if page.key and - site.comments.gitalk.clientID and - site.comments.gitalk.clientSecret and - site.comments.gitalk.repository and - site.comments.gitalk.owner and - site.comments.gitalk.admin -%} - - - - - {%- include snippets/get-sources.html -%} - {%- assign _sources = __return -%} -
- {%- assign _admin = '' -%} - {%- for _admin_id in site.comments.gitalk.admin -%} - {%- assign _admin = _admin | append: ", '" | append: _admin_id | append: "'" -%} - {%- endfor -%} - {%- assign _last = _admin | size | minus: 1 -%} - {%- assign _admin = _admin | slice: 2, _last -%} - - -{%- endif -%} diff --git a/_includes/comments-providers/valine.html b/_includes/comments-providers/valine.html deleted file mode 100644 index 68a4274..0000000 --- a/_includes/comments-providers/valine.html +++ /dev/null @@ -1,46 +0,0 @@ -{%- include snippets/get-sources.html -%} -{%- assign _sources = __return -%} - -{%- assign _VALINE_APP_ID = site.comments.valine.app_id -%} -{%- assign _VALINE_APP_KEY = site.comments.valine.app_key -%} -{%- assign _VALINE_PLACEHOLDER = site.comments.valine.placeholder -%} -{%- assign _VALINE_VISITOR = site.comments.valine.visitor -%} -{%- assign _VALINE_META = site.comments.valine.meta -%} - - -{%- if _VALINE_APP_ID and - _VALINE_APP_KEY -%} - -
- -{%- if _VALINE_VISITOR -%} - - -{%- endif -%} - - - -{%- endif -%} \ No newline at end of file diff --git a/_includes/comments.html b/_includes/comments.html deleted file mode 100644 index 8029395..0000000 --- a/_includes/comments.html +++ /dev/null @@ -1,11 +0,0 @@ -{%- if jekyll.environment != 'development' -%} - {%- if site.comments.provider == 'disqus' -%} - {%- include comments-providers/disqus.html -%} - {%- elsif site.comments.provider == 'gitalk' -%} - {%- include comments-providers/gitalk.html -%} - {%- elsif site.comments.provider == 'valine' -%} - {%- include comments-providers/valine.html -%} - {%- elsif site.comments.provider == 'custom' -%} - {%- include comments-providers/custom.html -%} - {%- endif -%} -{%- endif -%} diff --git a/_includes/extensions/bilibili.html b/_includes/extensions/bilibili.html deleted file mode 100644 index 26f4fa4..0000000 --- a/_includes/extensions/bilibili.html +++ /dev/null @@ -1,5 +0,0 @@ -
- -
diff --git a/_includes/extensions/codepen.html b/_includes/extensions/codepen.html deleted file mode 100644 index 2240dcf..0000000 --- a/_includes/extensions/codepen.html +++ /dev/null @@ -1,4 +0,0 @@ -
- -
diff --git a/_includes/extensions/netease-cloud-music.html b/_includes/extensions/netease-cloud-music.html deleted file mode 100644 index be0b3b1..0000000 --- a/_includes/extensions/netease-cloud-music.html +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/_includes/extensions/slideshare.html b/_includes/extensions/slideshare.html deleted file mode 100644 index 310806b..0000000 --- a/_includes/extensions/slideshare.html +++ /dev/null @@ -1,6 +0,0 @@ -
- -
diff --git a/_includes/extensions/soundcloud.html b/_includes/extensions/soundcloud.html deleted file mode 100644 index b4e086b..0000000 --- a/_includes/extensions/soundcloud.html +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/_includes/extensions/ted.html b/_includes/extensions/ted.html deleted file mode 100644 index 1ffc9f4..0000000 --- a/_includes/extensions/ted.html +++ /dev/null @@ -1,5 +0,0 @@ -
- -
diff --git a/_includes/extensions/youtube.html b/_includes/extensions/youtube.html deleted file mode 100644 index 6f9c2c8..0000000 --- a/_includes/extensions/youtube.html +++ /dev/null @@ -1,4 +0,0 @@ -
- -
diff --git a/_includes/footer.html b/_includes/footer.html deleted file mode 100644 index 0a4eb29..0000000 --- a/_includes/footer.html +++ /dev/null @@ -1,37 +0,0 @@ - -
-
- - {%- assign _site_author = site.author -%} - {%- if _site_author.type == 'organization' -%} - {%- assign _site_author_itemtype = 'http://schema.org/Organization' -%} - {%- else -%} - {%- assign _site_author_itemtype = 'http://schema.org/Person' -%} - {%- endif -%} - -
- - {%- assign _site_author_url = _site_author.url | default: '/'-%} - {%- include snippets/get-nav-url.html path=_site_author_url -%} - {%- assign _site_author_url = __return -%} - - {%- if _site_author.bio -%} - - {%- endif -%} - -
- {%- include snippets/get-locale-string.html key='COPYRIGHT_DATES' -%} - {%- assign _locale_copyright_dates = __return -%} -
-
- {%- include snippets/get-locale-string.html key='COPYRIGHT_DATES' -%} - {%- assign _locale_copyright_dates = __return -%} - © {{ site.title }} {{ _locale_copyright_dates }}, - Powered by Jekyll & TeXt Theme. -
-
-
-
diff --git a/_includes/head.html b/_includes/head.html deleted file mode 100644 index 35a3b19..0000000 --- a/_includes/head.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - -{%- include snippets/get-article-title.html article=page -%} -{%- if __return -%}{{ __return }} - {{ site.title }}{%- else -%}{{ site.title }}{%- endif -%} - - - - -{%- assign _paths_rss = site.paths.rss | default: site.data.variables.default.paths.rss -%} -{%- include snippets/get-nav-url.html path=_paths_rss -%} - - -{%- include head/favicon.html -%} - -{%- include snippets/prepend-baseurl.html path='/assets/css/main.css' -%} - - -{%- include snippets/get-sources.html -%} -{%- assign _sources = __return -%} - - -{%- include head/custom.html -%} diff --git a/_includes/head/custom.html b/_includes/head/custom.html deleted file mode 100644 index 33b1508..0000000 --- a/_includes/head/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/header.html b/_includes/header.html deleted file mode 100644 index c79d399..0000000 --- a/_includes/header.html +++ /dev/null @@ -1,44 +0,0 @@ -{%- if include.theme == 'dark' -%} -
-{%- elsif include.theme == 'light' -%} -
-{%- else -%} -
-{%- endif -%} -
-
-
- {%- include svg/logo.svg -%} - {%- assign _paths_root = site.paths.root | default: site.data.variables.default.paths.root -%} - {%- include snippets/get-nav-url.html path=_paths_root -%} - {%- if site.title -%} - {{ site.title }} - {%- endif -%} -
- {%- if site.search.provider -%} - - {%- endif -%} -
- {%- if site.data.navigation.header -%} - - {%- endif -%} -
-
diff --git a/_includes/main/bottom/custom.html b/_includes/main/bottom/custom.html deleted file mode 100644 index b19da2f..0000000 --- a/_includes/main/bottom/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/main/top/custom.html b/_includes/main/top/custom.html deleted file mode 100644 index 0bf5951..0000000 --- a/_includes/main/top/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/markdown-enhancements.html b/_includes/markdown-enhancements.html deleted file mode 100644 index fe701b4..0000000 --- a/_includes/markdown-enhancements.html +++ /dev/null @@ -1,17 +0,0 @@ -{%- include snippets/assign.html target=site.data.variables.default.chart - source0=site.chart source1=page.chart -%} -{%- if __return == true -%} - {%- include markdown-enhancements/chart.html -%} -{%- endif -%} - -{%- include snippets/assign.html target=site.data.variables.default.mathjax - source0=site.mathjax source1=page.mathjax -%} -{%- if __return == true -%} - {%- include markdown-enhancements/mathjax.html -%} -{%- endif -%} - -{%- include snippets/assign.html target=site.data.variables.default.mermaid - source0=site.mermaid source1=page.mermaid -%} -{%- if __return == true -%} - {%- include markdown-enhancements/mermaid.html -%} -{%- endif -%} diff --git a/_includes/markdown-enhancements/chart.html b/_includes/markdown-enhancements/chart.html deleted file mode 100644 index f1c476d..0000000 --- a/_includes/markdown-enhancements/chart.html +++ /dev/null @@ -1,15 +0,0 @@ -{%- include snippets/get-sources.html -%} -{%- assign _sources = __return -%} - diff --git a/_includes/markdown-enhancements/mathjax.html b/_includes/markdown-enhancements/mathjax.html deleted file mode 100644 index 9500faa..0000000 --- a/_includes/markdown-enhancements/mathjax.html +++ /dev/null @@ -1,17 +0,0 @@ -{%- include snippets/get-sources.html -%} -{%- assign _sources = __return -%} - -{%- include snippets/assign.html target=site.data.variables.default.mathjax_autoNumber - source0=site.mathjax_autoNumber source1=page.mathjax_autoNumber -%} -{%- assign _mathjax_autoNumber = __return -%} - - - diff --git a/_includes/markdown-enhancements/mermaid.html b/_includes/markdown-enhancements/mermaid.html deleted file mode 100644 index 64e4dac..0000000 --- a/_includes/markdown-enhancements/mermaid.html +++ /dev/null @@ -1,10 +0,0 @@ -{%- include snippets/get-sources.html -%} -{%- assign _sources = __return -%} - diff --git a/_includes/pageview-providers/custom/home.html b/_includes/pageview-providers/custom/home.html deleted file mode 100644 index 7fabc80..0000000 --- a/_includes/pageview-providers/custom/home.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/pageview-providers/custom/post.html b/_includes/pageview-providers/custom/post.html deleted file mode 100644 index c9d0f04..0000000 --- a/_includes/pageview-providers/custom/post.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/_includes/pageview-providers/leancloud/home.html b/_includes/pageview-providers/leancloud/home.html deleted file mode 100644 index 5dc99b7..0000000 --- a/_includes/pageview-providers/leancloud/home.html +++ /dev/null @@ -1,35 +0,0 @@ -{%- include snippets/get-sources.html -%} -{%- assign _sources = __return -%} - -{%- assign _LEANCLOUD_APP_ID = site.pageview.leancloud.app_id -%} -{%- assign _LEANCLOUD_APP_KEY = site.pageview.leancloud.app_key -%} -{%- assign _LEANCLOUD_APP_CLASS = site.pageview.leancloud.app_class -%} - -{%- if _LEANCLOUD_APP_ID and - _LEANCLOUD_APP_KEY and - _LEANCLOUD_APP_CLASS -%} - - - - -{%- endif -%} - - - diff --git a/_includes/pageview-providers/leancloud/leancloud.js b/_includes/pageview-providers/leancloud/leancloud.js deleted file mode 100644 index 32e3ba8..0000000 --- a/_includes/pageview-providers/leancloud/leancloud.js +++ /dev/null @@ -1,72 +0,0 @@ -(function() { - function errorHandler(error, callback) { - if (error) { - callback && callback(error); - throw error; - } - } - - function pageview(_AV, options) { - var AV = _AV; - var appId, appKey, appClass; - appId = options.appId; - appKey = options.appKey; - appClass = options.appClass; - AV.init({ - serverURLs: 'https://avoscloud.com', - appId: appId, - appKey: appKey - }); - return { - get: get, - increase: increase - }; - - function searchKey(key) { - var query = new AV.Query(appClass); - query.equalTo('key', key); - return query.first(); - } - - function insert(key, title) { - var Blog = AV.Object.extend(appClass); - var blog = new Blog(); - blog.set('title', title); - blog.set('key', key); - blog.set('views', 0); - return blog.save(); - } - - function increment(result) { - result.increment('views', 1); - return result.save(null, { - fetchWhenSave: true - }); - } - - function get(key, callback) { - searchKey(key).then(function(result) { - if (result) { - callback && callback(result.attributes.views); - } - }, errorHandler); - } - - function increase(key, title, callback) { - searchKey(key).then(function(result) { - if (result) { - increment(result).then(function(result) { - callback && callback(result.attributes.views); - }); - } else { - insert(key, title).then(function(result) { - increment(result).then(function(result) { - callback && callback(result.attributes.views); - }); - }, errorHandler); - } - }, errorHandler); - } - } - window.pageview = pageview; -})(); diff --git a/_includes/pageview-providers/leancloud/post.html b/_includes/pageview-providers/leancloud/post.html deleted file mode 100644 index ebd7510..0000000 --- a/_includes/pageview-providers/leancloud/post.html +++ /dev/null @@ -1,31 +0,0 @@ -{%- include snippets/get-sources.html -%} -{%- assign _sources = __return -%} - -{%- assign _LEANCLOUD_APP_ID = site.pageview.leancloud.app_id -%} -{%- assign _LEANCLOUD_APP_KEY = site.pageview.leancloud.app_key -%} -{%- assign _LEANCLOUD_APP_CLASS = site.pageview.leancloud.app_class -%} - -{%- if page.key and - _LEANCLOUD_APP_ID and - _LEANCLOUD_APP_KEY and - _LEANCLOUD_APP_CLASS -%} - - - - -{%- endif -%} \ No newline at end of file diff --git a/_includes/pageview.html b/_includes/pageview.html deleted file mode 100644 index bb31b15..0000000 --- a/_includes/pageview.html +++ /dev/null @@ -1,29 +0,0 @@ -{%- include snippets/assign.html target=site.data.variables.default.pageview source0=page.pageview -%} -{%- assign _pageview = __return -%} - - -{%- if page.layout == "home" -%} - - {%- if jekyll.environment != "development" -%} - {%- if site.pageview.provider == 'leancloud' -%} - {%- include pageview-providers/leancloud/home.html -%} - {%- elsif site.pageview.provider == 'custom' -%} - {%- include pageview-providers/custom/home.html -%} - {%- endif -%} - {%- endif -%} - - -{%- elsif page.layout == "article" -%} - {%- if _pageview -%} - - {%- if jekyll.environment != "development" and - jekyll.environment != "beta" -%} - {%- if site.pageview.provider == 'leancloud' -%} - {%- include pageview-providers/leancloud/post.html -%} - {%- elsif site.pageview.provider == 'custom' -%} - {%- include pageview-providers/custom/post.html -%} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endif -%} diff --git a/_includes/paginator.html b/_includes/paginator.html deleted file mode 100644 index 5956481..0000000 --- a/_includes/paginator.html +++ /dev/null @@ -1,98 +0,0 @@ -{%- if paginator.total_pages > 1 -%} - -{%- endif -%} diff --git a/_includes/scripts/archieve.js b/_includes/scripts/archieve.js deleted file mode 100644 index 96549b5..0000000 --- a/_includes/scripts/archieve.js +++ /dev/null @@ -1,135 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - function queryString() { - // This function is anonymous, is executed immediately and - // the return value is assigned to QueryString! - var i = 0, queryObj = {}, pair; - var queryStr = window.location.search.substring(1); - var queryArr = queryStr.split('&'); - for (i = 0; i < queryArr.length; i++) { - pair = queryArr[i].split('='); - // If first entry with this name - if (typeof queryObj[pair[0]] === 'undefined') { - queryObj[pair[0]] = pair[1]; - // If second entry with this name - } else if (typeof queryObj[pair[0]] === 'string') { - queryObj[pair[0]] = [queryObj[pair[0]], pair[1]]; - // If third or later entry with this name - } else { - queryObj[pair[0]].push(pair[1]); - } - } - return queryObj; - } - - var setUrlQuery = (function() { - var baseUrl = window.location.href.split('?')[0]; - return function(query) { - if (typeof query === 'string') { - window.history.replaceState(null, '', baseUrl + query); - } else { - window.history.replaceState(null, '', baseUrl); - } - }; - })(); - - window.Lazyload.js(SOURCES.jquery, function() { - var $tags = $('.js-tags'); - var $articleTags = $tags.find('button'); - var $tagShowAll = $tags.find('.tag-button--all'); - var $result = $('.js-result'); - var $sections = $result.find('section'); - var sectionArticles = []; - var $lastFocusButton = null; - var sectionTopArticleIndex = []; - var hasInit = false; - - $sections.each(function() { - sectionArticles.push($(this).find('.item')); - }); - - function init() { - var i, index = 0; - for (i = 0; i < $sections.length; i++) { - sectionTopArticleIndex.push(index); - index += $sections.eq(i).find('.item').length; - } - sectionTopArticleIndex.push(index); - } - - function searchButtonsByTag(_tag/*raw tag*/) { - if (!_tag) { - return $tagShowAll; - } - var _buttons = $articleTags.filter('[data-encode="' + _tag + '"]'); - if (_buttons.length === 0) { - return $tagShowAll; - } - return _buttons; - } - function buttonFocus(target) { - if (target) { - target.addClass('focus'); - $lastFocusButton && !$lastFocusButton.is(target) && $lastFocusButton.removeClass('focus'); - $lastFocusButton = target; - } - } - - function tagSelect (tag/*raw tag*/, target) { - var result = {}, $articles; - var i, j, k, _tag; - - for (i = 0; i < sectionArticles.length; i++) { - $articles = sectionArticles[i]; - for (j = 0; j < $articles.length; j++) { - if (tag === '' || tag === undefined) { - result[i] || (result[i] = {}); - result[i][j] = true; - } else { - var tags = $articles.eq(j).data('tags').split(','); - for (k = 0; k < tags.length; k++) { - if (tags[k] === tag) { - result[i] || (result[i] = {}); - result[i][j] = true; break; - } - } - } - } - } - - for (i = 0; i < sectionArticles.length; i++) { - result[i] && $sections.eq(i).removeClass('d-none'); - result[i] || $sections.eq(i).addClass('d-none'); - for (j = 0; j < sectionArticles[i].length; j++) { - if (result[i] && result[i][j]) { - sectionArticles[i].eq(j).removeClass('d-none'); - } else { - sectionArticles[i].eq(j).addClass('d-none'); - } - } - } - - hasInit || ($result.removeClass('d-none'), hasInit = true); - - - if (target) { - buttonFocus(target); - _tag = target.attr('data-encode'); - if (_tag === '' || typeof _tag !== 'string') { - setUrlQuery(); - } else { - setUrlQuery('?tag=' + _tag); - } - } else { - buttonFocus(searchButtonsByTag(tag)); - } - } - - var query = queryString(), _tag = query.tag; - init(); tagSelect(_tag); - $tags.on('click', 'button', function() { - tagSelect($(this).data('encode'), $(this)); - }); - - }); -})(); diff --git a/_includes/scripts/article.js b/_includes/scripts/article.js deleted file mode 100644 index 9b18ef5..0000000 --- a/_includes/scripts/article.js +++ /dev/null @@ -1,24 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - $(function() { - var $this ,$scroll; - var $articleContent = $('.js-article-content'); - var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar'); - var scroll = hasSidebar ? '.js-page-main' : 'html, body'; - $scroll = $(scroll); - - $articleContent.find('.highlight').each(function() { - $this = $(this); - $this.attr('data-lang', $this.find('code').attr('data-lang')); - }); - $articleContent.find('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]').each(function() { - $this = $(this); - $this.append($('').html('')); - }); - $articleContent.on('click', '.anchor', function() { - $scroll.scrollToAnchor('#' + $(this).parent().attr('id'), 400); - }); - }); - }); -})(); diff --git a/_includes/scripts/aside/affix.js b/_includes/scripts/aside/affix.js deleted file mode 100644 index 1db3b8e..0000000 --- a/_includes/scripts/aside/affix.js +++ /dev/null @@ -1,26 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - var $window = $(window), $pageFooter = $('.js-page-footer'); - var $pageAside = $('.js-page-aside'); - var affix; - var tocDisabled = false; - var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar'); - - affix = $pageAside.affix({ - offsetBottom: $pageFooter.outerHeight(), - scrollTarget: hasSidebar ? '.js-page-main' : null, - scroller: hasSidebar ? '.js-page-main' : null, - scroll: hasSidebar ? $('.js-page-main').children() : null, - disabled: tocDisabled - }); - - $window.on('resize', window.throttle(function() { - affix && affix.setOptions({ - disabled: tocDisabled - }); - }, 100)); - - window.pageAsideAffix = affix; - }); -})(); diff --git a/_includes/scripts/aside/toc.js b/_includes/scripts/aside/toc.js deleted file mode 100644 index a19ea95..0000000 --- a/_includes/scripts/aside/toc.js +++ /dev/null @@ -1,35 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - var TOC_SELECTOR = window.TEXT_VARIABLES.site.toc.selectors; - window.Lazyload.js(SOURCES.jquery, function() { - var $window = $(window); - var $articleContent = $('.js-article-content'); - var $tocRoot = $('.js-toc-root'), $col2 = $('.js-col-aside'); - var toc; - var tocDisabled = false; - var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar'); - var hasToc = $articleContent.find(TOC_SELECTOR).length > 0; - - function disabled() { - return $col2.css('display') === 'none' || !hasToc; - } - - tocDisabled = disabled(); - - toc = $tocRoot.toc({ - selectors: TOC_SELECTOR, - container: $articleContent, - scrollTarget: hasSidebar ? '.js-page-main' : null, - scroller: hasSidebar ? '.js-page-main' : null, - disabled: tocDisabled - }); - - $window.on('resize', window.throttle(function() { - tocDisabled = disabled(); - toc && toc.setOptions({ - disabled: tocDisabled - }); - }, 100)); - - }); -})(); diff --git a/_includes/scripts/common.js b/_includes/scripts/common.js deleted file mode 100644 index 09400a2..0000000 --- a/_includes/scripts/common.js +++ /dev/null @@ -1,7 +0,0 @@ -(function () { - var $root = document.getElementsByClassName('root')[0]; - if (window.hasEvent('touchstart')) { - $root.dataset.isTouch = true; - document.addEventListener('touchstart', function(){}, false); - } -})(); diff --git a/_includes/scripts/components/lightbox.js b/_includes/scripts/components/lightbox.js deleted file mode 100644 index 51689c2..0000000 --- a/_includes/scripts/components/lightbox.js +++ /dev/null @@ -1,49 +0,0 @@ -{%- include scripts/utils/imagesLoad.js -%} -(function () { - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - var $pageGalleryModal = $('.js-page-gallery-modal'); - var $images = $('.page__content').find('img:not(.lightbox-ignore)'); - window.imagesLoad($images).then(function() { - /* global Gallery */ - var pageGalleryModal = $pageGalleryModal.modal({ onChange: handleModalChange }); - var gallery = null; - var modalVisible = false; - var i, items = [], image, item; - if($images && $images.length > 0) { - for (i = 0; i < $images.length; i++) { - image = $images.eq(i); - if (image.get(0).naturalWidth > 800) { - items.push({ src: image.attr('src'), w: image.get(0).naturalWidth, h: image.get(0).naturalHeight, $el: image}); - } - } - } - - if(items.length > 0) { - gallery = new Gallery('.gallery', items); - gallery.setOptions({ disabled: !modalVisible }); - gallery.init(); - for (i = 0; i < items.length; i++) { - item = items[i]; - item.$el && (item.$el.addClass('popup-image'), item.$el.on('click', (function() { - var index = i; - return function() { - pageGalleryModal.show(); - gallery.setOptions({ initialSlide: index }); - gallery.refresh(true, { animation: false }); - }; - })())); - } - } - - function handleModalChange(visible) { - modalVisible = visible; - gallery && gallery.setOptions({ disabled: !modalVisible }); - } - - $pageGalleryModal.on('click', function() { - pageGalleryModal.hide(); - }); - }); - }); -})(); diff --git a/_includes/scripts/components/search.js b/_includes/scripts/components/search.js deleted file mode 100644 index e1c8c27..0000000 --- a/_includes/scripts/components/search.js +++ /dev/null @@ -1,86 +0,0 @@ - -(function () { - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - // search panel - var search = (window.search || (window.search = {})); - var useDefaultSearchBox = window.useDefaultSearchBox === undefined ? - true : window.useDefaultSearchBox ; - - var $searchModal = $('.js-page-search-modal'); - var $searchToggle = $('.js-search-toggle'); - var searchModal = $searchModal.modal({ onChange: handleModalChange, hideWhenWindowScroll: true }); - var modalVisible = false; - search.searchModal = searchModal; - - var $searchBox = null; - var $searchInput = null; - var $searchClear = null; - - function getModalVisible() { - return modalVisible; - } - search.getModalVisible = getModalVisible; - - function handleModalChange(visible) { - modalVisible = visible; - if (visible) { - search.onShow && search.onShow(); - useDefaultSearchBox && $searchInput[0] && $searchInput[0].focus(); - } else { - search.onShow && search.onHide(); - useDefaultSearchBox && $searchInput[0] && $searchInput[0].blur(); - setTimeout(function() { - useDefaultSearchBox && ($searchInput.val(''), $searchBox.removeClass('not-empty')); - search.clear && search.clear(); - window.pageAsideAffix && window.pageAsideAffix.refresh(); - }, 400); - } - } - - $searchToggle.on('click', function() { - modalVisible ? searchModal.hide() : searchModal.show(); - }); - // Char Code: 83 S, 191 / - $(window).on('keyup', function(e) { - if (!modalVisible && !window.isFormElement(e.target || e.srcElement) && (e.which === 83 || e.which === 191)) { - modalVisible || searchModal.show(); - } - }); - - if (useDefaultSearchBox) { - $searchBox = $('.js-search-box'); - $searchInput = $searchBox.children('input'); - $searchClear = $searchBox.children('.js-icon-clear'); - search.getSearchInput = function() { - return $searchInput.get(0); - }; - search.getVal = function() { - return $searchInput.val(); - }; - search.setVal = function(val) { - $searchInput.val(val); - }; - - $searchInput.on('focus', function() { - $(this).addClass('focus'); - }); - $searchInput.on('blur', function() { - $(this).removeClass('focus'); - }); - $searchInput.on('input', window.throttle(function() { - var val = $(this).val(); - if (val === '' || typeof val !== 'string') { - search.clear && search.clear(); - } else { - $searchBox.addClass('not-empty'); - search.onInputNotEmpty && search.onInputNotEmpty(val); - } - }, 400)); - $searchClear.on('click', function() { - $searchInput.val(''); $searchBox.removeClass('not-empty'); - search.clear && search.clear(); - }); - } - }); -})(); diff --git a/_includes/scripts/components/sidebar.js b/_includes/scripts/components/sidebar.js deleted file mode 100644 index 92c5591..0000000 --- a/_includes/scripts/components/sidebar.js +++ /dev/null @@ -1,30 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - - window.Lazyload.js(SOURCES.jquery, function() { - var $pageMask = $('.js-page-mask'); - var $pageRoot = $('.js-page-root'); - var $sidebarShow = $('.js-sidebar-show'); - var $sidebarHide = $('.js-sidebar-hide'); - - function freeze(e) { - if (e.target === $pageMask[0]) { - e.preventDefault(); - } - } - function stopBodyScrolling(bool) { - if (bool === true) { - window.addEventListener('touchmove', freeze, { passive: false }); - } else { - window.removeEventListener('touchmove', freeze, { passive: false }); - } - } - - $sidebarShow.on('click', function() { - stopBodyScrolling(true); $pageRoot.addClass('show-sidebar'); - }); - $sidebarHide.on('click', function() { - stopBodyScrolling(false); $pageRoot.removeClass('show-sidebar'); - }); - }); -})(); diff --git a/_includes/scripts/home.js b/_includes/scripts/home.js deleted file mode 100644 index 91d05b9..0000000 --- a/_includes/scripts/home.js +++ /dev/null @@ -1,3 +0,0 @@ -/*(function () { - -})();*/ diff --git a/_includes/scripts/lib/affix.js b/_includes/scripts/lib/affix.js deleted file mode 100644 index 779442f..0000000 --- a/_includes/scripts/lib/affix.js +++ /dev/null @@ -1,111 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - function affix(options) { - var $root = this, $window = $(window), $scrollTarget, $scroll, - offsetBottom = 0, scrollTarget = window, scroll = window.document, disabled = false, isOverallScroller = true, - rootTop, rootLeft, rootHeight, scrollBottom, rootBottomTop, - hasInit = false, curState; - - function setOptions(options) { - var _options = options || {}; - _options.offsetBottom && (offsetBottom = _options.offsetBottom); - _options.scrollTarget && (scrollTarget = _options.scrollTarget); - _options.scroll && (scroll = _options.scroll); - _options.disabled !== undefined && (disabled = _options.disabled); - $scrollTarget = $(scrollTarget); - isOverallScroller = window.isOverallScroller($scrollTarget[0]); - $scroll = $(scroll); - } - function preCalc() { - top(); - rootHeight = $root.outerHeight(); - rootTop = $root.offset().top + (isOverallScroller ? 0 : $scrollTarget.scrollTop()); - rootLeft = $root.offset().left; - } - function calc(needPreCalc) { - needPreCalc && preCalc(); - scrollBottom = $scroll.outerHeight() - offsetBottom - rootHeight; - rootBottomTop = scrollBottom - rootTop; - } - function top() { - if (curState !== 'top') { - $root.removeClass('fixed').css({ - left: 0, - top: 0 - }); - curState = 'top'; - } - } - function fixed() { - if (curState !== 'fixed') { - $root.addClass('fixed').css({ - left: rootLeft + 'px', - top: 0 - }); - curState = 'fixed'; - } - } - function bottom() { - if (curState !== 'bottom') { - $root.removeClass('fixed').css({ - left: 0, - top: rootBottomTop + 'px' - }); - curState = 'bottom'; - } - } - function setState() { - var scrollTop = $scrollTarget.scrollTop(); - if (scrollTop >= rootTop && scrollTop <= scrollBottom) { - fixed(); - } else if (scrollTop < rootTop) { - top(); - } else { - bottom(); - } - } - function init() { - if(!hasInit) { - var interval, timeout; - calc(true); setState(); - // run calc every 100 millisecond - interval = setInterval(function() { - calc(); - }, 100); - timeout = setTimeout(function() { - clearInterval(interval); - }, 45000); - window.pageLoad.then(function() { - setTimeout(function() { - clearInterval(interval); - clearTimeout(timeout); - }, 3000); - }); - $scrollTarget.on('scroll', function() { - disabled || setState(); - }); - $window.on('resize', function() { - disabled || (calc(true), setState()); - }); - hasInit = true; - } - } - - setOptions(options); - if (!disabled) { - init(); - } - $window.on('resize', window.throttle(function() { - init(); - }, 200)); - return { - setOptions: setOptions, - refresh: function() { - calc(true, { animation: false }); setState(); - } - }; - } - $.fn.affix = affix; - }); -})(); diff --git a/_includes/scripts/lib/gallery.js b/_includes/scripts/lib/gallery.js deleted file mode 100644 index 1793f04..0000000 --- a/_includes/scripts/lib/gallery.js +++ /dev/null @@ -1,192 +0,0 @@ -(function() { - {%- include scripts/lib/swiper.js -%} - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - var template = - ''; - function setState($item, zoom, translate) { - $item.css('transform', 'scale(' + zoom + ') translate(' + translate.x + 'px,' + translate.y + 'px)'); - } - function Gallery(root, items) { - this.$root = $(root); - this.$swiper = null; - this.$swiperWrapper = null; - this.$activeItem = null; - this.$items = []; - this.contentWidth = 0; - this.contentHeight = 0; - this.swiper = null; - this.items = items; - this.disabled = false; - this.curIndex = 0; - this.touchCenter = null; - this.lastTouchCenter = null; - this.zoomRect = null; - this.lastZoomRect = null; - this.lastTranslate = null; - this.translate = null; - this.lastZoom = 1; - this.preZoom = 1; - this.zoom = 1; - } - Gallery.prototype.init = function() { - var i, item, items = this.items, size, self = this, touchstartFingerCount = 0; - this.$root.append(template); - this.$swiper = this.$root.find('.gallery__swiper'); - this.$swiperWrapper = this.$root.find('.swiper__wrapper'); - this.contentWidth = this.$swiperWrapper && this.$swiperWrapper.width(); - this.contentHeight = this.$swiperWrapper && this.$swiperWrapper.height(); - for (i = 0; i < items.length; i++) { - item = items[i]; - size = this._calculateImageSize(item.w, item.h); - this.$items.push($( - '
' + - '' + - '
' - )); - } - this.$swiperWrapper && this.$swiperWrapper.append(this.$items); - this.swiper = this.$swiper && this.$swiper.swiper({ - onChangeEnd: function() { - self._handleChangeEnd.apply(self, Array.prototype.slice.call(arguments)); - } - }); - $(window).on('resize', function() { - if (self.disabled) { return; } - self._resizeImageSize(); - }); - // Char Code: 37 ⬅, 39 ➡ - $(window).on('keyup', function(e) { - if (window.isFormElement(e.target || e.srcElement) || self.disabled) { return; } - if (e.which === 37) { - self.swiper && self.swiper.previous(); - } else if (e.which === 39) { - self.swiper && self.swiper.next(); - } - }); - function getRect(touch0, touch1) { - return { - o: { - x: (touch0.pageX + touch1.pageX) / 2, - y: (touch0.pageY + touch1.pageY) / 2 - }, - w: Math.abs(touch0.pageX - touch1.pageX), - h: Math.abs(touch0.pageY - touch1.pageY) - }; - } - function getTouches(e) { - return e.touches || e; - } - function getTouchesCount(e) { - if (e.touches) { - return e.touches.length; - } else { - return 1; - } - } - this.$swiperWrapper.on('touchstart', function(e) { - var touch0, touch1, rect; - touchstartFingerCount = getTouchesCount(e); - if (touchstartFingerCount > 1) { - touch0 = e.touches[0]; - touch1 = e.touches[1]; - rect = getRect(touch0, touch1); - self.lastZoomRect = { w: rect.w, h: rect.h }; - self.lastTouchCenter = rect.o; - } else { - var touch = getTouches(e)[0]; - self.lastTouchCenter = { x: touch.pageX, y: touch.pageY }; - } - }); - this.$swiperWrapper.on('touchmove', function(e) { - if (touchstartFingerCount === getTouchesCount(e)) { - if (touchstartFingerCount > 1) { - var touch0 = e.touches[0]; - var touch1 = e.touches[1]; - var rect = getRect(touch0, touch1); - self.zoomRect = { w: rect.w, h: rect.h }; - self.touchCenter = rect.o; - self._zoom(); self._translate(); - setState(self.$activeItem, self.zoom, self.translate); - } else { - var touch = getTouches(e)[0]; - self.touchCenter = { x: touch.pageX, y: touch.pageY }; - self._translate(); - setState(self.$activeItem, self.zoom, self.translate); - } - } - }); - this.$swiperWrapper.on('touchend', function(e) { - self.lastZoom = self.zoom; - self.lastTranslate = self.translate; - touchstartFingerCount = 0; - }); - this.$root.on('touchmove', function(e) { - if (self.disabled) { return; } - e.preventDefault(); - }); - }; - - Gallery.prototype._translate = function() { - this.translate = this.touchCenter && this.lastTouchCenter && this.lastTranslate ? { - x: (this.touchCenter.x - this.lastTouchCenter.x) / this.zoom + this.lastTranslate.x, - y: (this.touchCenter.y - this.lastTouchCenter.y) / this.zoom + this.lastTranslate.y - } : { x: 0, y: 0 }; - } - Gallery.prototype._zoom = function() { - this.zoom = (this.zoomRect.w + this.zoomRect.h) / (this.lastZoomRect.w + this.lastZoomRect.h) * this.lastZoom; - this.zoom > 1 ? this.$activeItem.addClass('zoom') : this.$activeItem.removeClass('zoom'); - this.preZoom = this.zoom; - } - - Gallery.prototype._calculateImageSize = function(w, h) { - var scale = 1; - if (this.contentWidth > 0 && this.contentHeight > 0 && w > 0 && h > 0) { - scale = Math.min( - Math.min(w, this.contentWidth) / w, - Math.min(h, this.contentHeight) / h); - } - return { w: Math.floor(w * scale), h: Math.floor(h * scale) }; - }; - - Gallery.prototype._resizeImageSize = function() { - var i, $item, $items = this.$items, item, size; - this.contentWidth = this.$swiperWrapper && this.$swiperWrapper.width(); - this.contentHeight = this.$swiperWrapper && this.$swiperWrapper.height(); - if ($items.length < 1) { return; } - for (i = 0; i < $items.length; i++) { - item = this.items[i], $item = $items[i]; - size = this._calculateImageSize(item.w, item.h); - item.width = size.w; item.height = size.h; - $item && $item.find('img').css({ width: size.w, height: size.h }); - } - }; - Gallery.prototype._handleChangeEnd = function(index, $dom, preIndex, $preDom) { - this.curIndex = index; - this.lastZoomRect = null; this.lastZoomRect = null; - this.lastTranslate = this.translate = { x: 0, y:0 }; - this.lastZoom = this.preZoom = this.zoom = 1; - this.$activeItem = $dom.find('.gallery-item__content'); - setState($preDom.find('.gallery-item__content'), this.zoom, this.translate); - }; - - Gallery.prototype.refresh = function() { - this.swiper && this.swiper.refresh(); - this._resizeImageSize(); - }; - Gallery.prototype.setOptions = function(options) { - this.disabled = options.disabled; - this.swiper && this.swiper.setOptions(options); - }; - window.Gallery = Gallery; - }); -})(); \ No newline at end of file diff --git a/_includes/scripts/lib/lazyload.js b/_includes/scripts/lib/lazyload.js deleted file mode 100644 index 9911535..0000000 --- a/_includes/scripts/lib/lazyload.js +++ /dev/null @@ -1,143 +0,0 @@ -(function() { - var Set = (function() { - var add = function(item) { - var i, data = this._data; - for (i = 0; i < data.length; i++) { - if (data[i] === item) { - return; - } - } - this.size ++; - data.push(item); - return data; - }; - - var Set = function(data) { - this.size = 0; - this._data = []; - var i; - if (data.length > 0) { - for (i = 0; i < data.length; i++) { - add.call(this, data[i]); - } - } - }; - Set.prototype.add = add; - Set.prototype.get = function(index) { return this._data[index]; }; - Set.prototype.has = function(item) { - var i, data = this._data; - for (i = 0; i < data.length; i++) { - if (this.get(i) === item) { - return true; - } - } - return false; - }; - Set.prototype.is = function(map) { - if (map._data.length !== this._data.length) { return false; } - var i, j, flag, tData = this._data, mData = map._data; - for (i = 0; i < tData.length; i++) { - for (flag = false, j = 0; j < mData.length; j++) { - if (tData[i] === mData[j]) { - flag = true; - break; - } - } - if (!flag) { return false; } - } - return true; - }; - Set.prototype.values = function() { - return this._data; - }; - return Set; - })(); - - window.Lazyload = (function(doc) { - var queue = {js: [], css: []}, sources = {js: {}, css: {}}, context = this; - var createNode = function(name, attrs) { - var node = doc.createElement(name), attr; - for (attr in attrs) { - if (attrs.hasOwnProperty(attr)) { - node.setAttribute(attr, attrs[attr]); - } - } - return node; - }; - var end = function(type, url) { - var s, q, qi, cbs, i, j, cur, val, flag; - if (type === 'js' || type ==='css') { - s = sources[type], q = queue[type]; - s[url] = true; - for (i = 0; i < q.length; i++) { - cur = q[i]; - if (cur.urls.has(url)) { - qi = cur, val = qi.urls.values(); - qi && (cbs = qi.callbacks); - for (flag = true, j = 0; j < val.length; j++) { - cur = val[j]; - if (!s[cur]) { - flag = false; - } - } - if (flag && cbs && cbs.length > 0) { - for (j = 0; j < cbs.length; j++) { - cbs[j].call(context); - } - qi.load = true; - } - } - } - } - }; - var load = function(type, urls, callback) { - var s, q, qi, node, i, cur, - _urls = typeof urls === 'string' ? new Set([urls]) : new Set(urls), val, url; - if (type === 'js' || type ==='css') { - s = sources[type], q = queue[type]; - for (i = 0; i < q.length; i++) { - cur = q[i]; - if (_urls.is(cur.urls)) { - qi = cur; - break; - } - } - val = _urls.values(); - if (qi) { - callback && (qi.load || qi.callbacks.push(callback)); - callback && (qi.load && callback()); - } else { - q.push({ - urls: _urls, - callbacks: callback ? [callback] : [], - load: false - }); - for (i = 0; i < val.length; i++) { - node = null, url = val[i]; - if (s[url] === undefined) { - (type === 'js' ) && (node = createNode('script', { src: url })); - (type === 'css') && (node = createNode('link', { rel: 'stylesheet', href: url })); - if (node) { - node.onload = (function(type, url) { - return function() { - end(type, url); - }; - })(type, url); - (doc.head || doc.body).appendChild(node); - s[url] = false; - } - } - } - } - } - }; - return { - js: function(url, callback) { - load('js', url, callback); - }, - css: function(url, callback) { - load('css', url, callback); - } - }; - })(this.document); -})(); diff --git a/_includes/scripts/lib/modal.js b/_includes/scripts/lib/modal.js deleted file mode 100644 index cb5d188..0000000 --- a/_includes/scripts/lib/modal.js +++ /dev/null @@ -1,64 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - var $body = $('body'), $window = $(window); - var $pageRoot = $('.js-page-root'), $pageMain = $('.js-page-main'); - var activeCount = 0; - function modal(options) { - var $root = this, visible, onChange, hideWhenWindowScroll = false; - var scrollTop; - function setOptions(options) { - var _options = options || {}; - visible = _options.initialVisible === undefined ? false : show; - onChange = _options.onChange; - hideWhenWindowScroll = _options.hideWhenWindowScroll; - } - function init() { - setState(visible); - } - function setState(isShow) { - if (isShow === visible) { - return; - } - visible = isShow; - if (visible) { - activeCount++; - scrollTop = $(window).scrollTop() || $pageMain.scrollTop(); - $root.addClass('modal--show'); - $pageMain.scrollTop(scrollTop); - activeCount === 1 && ($pageRoot.addClass('show-modal'), $body.addClass('of-hidden')); - hideWhenWindowScroll && window.hasEvent('touchstart') && $window.on('scroll', hide); - $window.on('keyup', handleKeyup); - } else { - activeCount > 0 && activeCount--; - $root.removeClass('modal--show'); - $window.scrollTop(scrollTop); - activeCount === 0 && ($pageRoot.removeClass('show-modal'), $body.removeClass('of-hidden')); - hideWhenWindowScroll && window.hasEvent('touchstart') && $window.off('scroll', hide); - $window.off('keyup', handleKeyup); - } - onChange && onChange(visible); - } - function show() { - setState(true); - } - function hide() { - setState(false); - } - function handleKeyup(e) { - // Char Code: 27 ESC - if (e.which === 27) { - hide(); - } - } - setOptions(options); - init(); - return { - show: show, - hide: hide, - $el: $root - }; - } - $.fn.modal = modal; - }); -})(); diff --git a/_includes/scripts/lib/scroll-to.js b/_includes/scripts/lib/scroll-to.js deleted file mode 100644 index e5a0ea2..0000000 --- a/_includes/scripts/lib/scroll-to.js +++ /dev/null @@ -1,13 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - function scrollToAnchor(anchor, duration, callback) { - var $root = this; - $root.animate({ scrollTop: $(anchor).position().top }, duration, function() { - window.history.replaceState(null, '', window.location.href.split('#')[0] + anchor); - callback && callback(); - }); - } - $.fn.scrollToAnchor = scrollToAnchor; - }); -})(); diff --git a/_includes/scripts/lib/swiper.js b/_includes/scripts/lib/swiper.js deleted file mode 100644 index 3d06419..0000000 --- a/_includes/scripts/lib/swiper.js +++ /dev/null @@ -1,203 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - function swiper(options) { - var $window = $(window), $root = this, $swiperWrapper, $swiperSlides, $swiperButtonPrev, $swiperButtonNext, - initialSlide, animation, onChange, onChangeEnd, - rootWidth, count, preIndex, curIndex, translateX, CRITICAL_ANGLE = Math.PI / 3; - - function setOptions(options) { - var _options = options || {}; - initialSlide = _options.initialSlide || 0; - animation = _options.animation === undefined && true; - onChange = onChange || _options.onChange; - onChangeEnd = onChangeEnd || _options.onChangeEnd; - } - - function init() { - $swiperWrapper = $root.find('.swiper__wrapper'); - $swiperSlides = $root.find('.swiper__slide'); - $swiperButtonPrev = $root.find('.swiper__button--prev'); - $swiperButtonNext = $root.find('.swiper__button--next'); - animation && $swiperWrapper.addClass('swiper__wrapper--animation'); - calc(true); - } - - function preCalc() { - rootWidth = $root.width(); - count = $swiperWrapper.children('.swiper__slide').length; - if (count < 2) { - $swiperButtonPrev.addClass('d-none'); - $swiperButtonNext.addClass('d-none'); - } - curIndex = initialSlide || 0; - translateX = getTranslateXFromCurIndex(); - } - - var calc = (function() { - var preAnimation, $swiperSlide, $preSwiperSlide; - return function (needPreCalc, params) { - needPreCalc && preCalc(); - var _animation = (params && params.animation !== undefined) ? params.animation : animation; - if (preAnimation === undefined || preAnimation !== _animation) { - preAnimation = _animation ? $swiperWrapper.addClass('swiper__wrapper--animation') : - $swiperWrapper.removeClass('swiper__wrapper--animation'); - } - if (preIndex !== curIndex) { - ($preSwiperSlide = $swiperSlides.eq(preIndex)).removeClass('active'); - ($swiperSlide = $swiperSlides.eq(curIndex)).addClass('active'); - onChange && onChange(curIndex, $swiperSlides.eq(curIndex), $swiperSlide, $preSwiperSlide); - if (onChangeEnd) { - if (_animation) { - setTimeout(function() { - onChangeEnd(curIndex, $swiperSlides.eq(curIndex), $swiperSlide, $preSwiperSlide); - }, 400); - } else { - onChangeEnd(curIndex, $swiperSlides.eq(curIndex), $swiperSlide, $preSwiperSlide); - } - } - preIndex = curIndex; - } - $swiperWrapper.css('transform', 'translate(' + translateX + 'px, 0)'); - if (count > 1) { - if (curIndex <= 0) { - $swiperButtonPrev.addClass('disabled'); - } else { - $swiperButtonPrev.removeClass('disabled'); - } - if (curIndex >= count - 1) { - $swiperButtonNext.addClass('disabled'); - } else { - $swiperButtonNext.removeClass('disabled'); - } - } - }; - })(); - - function getTranslateXFromCurIndex() { - return curIndex <= 0 ? 0 : - rootWidth * curIndex; - } - - function moveToIndex(index ,params) { - preIndex = curIndex; - curIndex = index; - translateX = getTranslateXFromCurIndex(); - calc(false, params); - } - - function move(type) { - var nextIndex = curIndex, unstableTranslateX; - if (type === 'prev') { - nextIndex > 0 && nextIndex--; - } else if (type === 'next') { - nextIndex < count - 1 && nextIndex++; - } - if (type === 'cur') { - moveToIndex(curIndex, { animation: true }); - return; - } - unstableTranslateX = translateX % rootWidth !== 0; - if (nextIndex !== curIndex || unstableTranslateX) { - unstableTranslateX ? moveToIndex(nextIndex, { animation: true }) : moveToIndex(nextIndex); - } - } - - setOptions(options); - init(); - preIndex = curIndex; - - $swiperButtonPrev.on('click', function(e) { - e.stopPropagation(); - move('prev'); - }); - $swiperButtonNext.on('click', function(e) { - e.stopPropagation(); - move('next'); - }); - $window.on('resize', function() { - calc(true, { animation: false }); - }); - - (function() { - var pageX, pageY, velocityX, preTranslateX = translateX, timeStamp, touching; - function handleTouchstart(e) { - var point = e.touches ? e.touches[0] : e; - pageX = point.pageX; - pageY = point.pageY; - velocityX = 0; - preTranslateX = translateX; - } - function handleTouchmove(e) { - if (e.touches && e.touches.length > 1) { - return; - } - var point = e.touches ? e.touches[0] : e; - var deltaX = point.pageX - pageX; - var deltaY = point.pageY - pageY; - velocityX = deltaX / (e.timeStamp - timeStamp); - timeStamp = e.timeStamp; - if (e.cancelable && Math.abs(Math.atan(deltaY / deltaX)) < CRITICAL_ANGLE) { - touching = true; - translateX += deltaX; - calc(false, { animation: false }); - } - pageX = point.pageX; - pageY = point.pageY; - } - function handleTouchend() { - touching = false; - var deltaX = translateX - preTranslateX; - var distance = deltaX + velocityX * rootWidth; - if (Math.abs(distance) > rootWidth / 2) { - distance > 0 ? move('prev') : move('next'); - } else { - move('cur'); - } - } - $swiperWrapper.on('touchstart', handleTouchstart); - $swiperWrapper.on('touchmove', handleTouchmove); - $swiperWrapper.on('touchend', handleTouchend); - $swiperWrapper.on('touchcancel', handleTouchend); - - (function() { - var pressing = false, moved = false; - $swiperWrapper.on('mousedown', function(e) { - pressing = true; handleTouchstart(e); - }); - $swiperWrapper.on('mousemove', function(e) { - pressing && (e.preventDefault(), moved = true, handleTouchmove(e)); - }); - $swiperWrapper.on('mouseup', function(e) { - pressing && (pressing = false, handleTouchend(e)); - }); - $swiperWrapper.on('mouseleave', function(e) { - pressing && (pressing = false, handleTouchend(e)); - }); - $swiperWrapper.on('click', function(e) { - moved && (e.stopPropagation(), moved = false); - }); - })(); - - $root.on('touchmove', function(e) { - if (e.cancelable & touching) { - e.preventDefault(); - } - }); - })(); - - return { - setOptions: setOptions, - previous: function(){ - move('prev'); - }, - next: function(){ - move('next'); - }, - refresh: function() { - calc(true, { animation: false }); - } - }; - } - $.fn.swiper = swiper; - }); -})(); diff --git a/_includes/scripts/lib/throttle.js b/_includes/scripts/lib/throttle.js deleted file mode 100644 index 2add23c..0000000 --- a/_includes/scripts/lib/throttle.js +++ /dev/null @@ -1,28 +0,0 @@ -(function() { - window.throttle = function(func, wait) { - var args, result, thisArg, timeoutId, lastCalled = 0; - - function trailingCall() { - lastCalled = new Date; - timeoutId = null; - result = func.apply(thisArg, args); - } - return function() { - var now = new Date, - remaining = wait - (now - lastCalled); - - args = arguments; - thisArg = this; - - if (remaining <= 0) { - clearTimeout(timeoutId); - timeoutId = null; - lastCalled = now; - result = func.apply(thisArg, args); - } else if (!timeoutId) { - timeoutId = setTimeout(trailingCall, remaining); - } - return result; - }; - }; -})(); diff --git a/_includes/scripts/lib/toc.js b/_includes/scripts/lib/toc.js deleted file mode 100644 index fb43857..0000000 --- a/_includes/scripts/lib/toc.js +++ /dev/null @@ -1,107 +0,0 @@ -(function() { - var SOURCES = window.TEXT_VARIABLES.sources; - window.Lazyload.js(SOURCES.jquery, function() { - function toc(options) { - var $root = this, $window = $(window), $scrollTarget, $scroller, $tocUl = $('
    '), $tocLi, $headings, $activeLast, $activeCur, - selectors = 'h1,h2,h3', container = 'body', scrollTarget = window, scroller = 'html, body', disabled = false, - headingsPos, scrolling = false, hasRendered = false, hasInit = false; - - function setOptions(options) { - var _options = options || {}; - _options.selectors && (selectors = _options.selectors); - _options.container && (container = _options.container); - _options.scrollTarget && (scrollTarget = _options.scrollTarget); - _options.scroller && (scroller = _options.scroller); - _options.disabled !== undefined && (disabled = _options.disabled); - $headings = $(container).find(selectors).filter('[id]'); - $scrollTarget = $(scrollTarget); - $scroller = $(scroller); - } - function calc() { - headingsPos = []; - $headings.each(function() { - headingsPos.push(Math.floor($(this).position().top)); - }); - } - function setState(element, disabled) { - var scrollTop = $scrollTarget.scrollTop(), i; - if (disabled || !headingsPos || headingsPos.length < 1) { return; } - if (element) { - $activeCur = element; - } else { - for (i = 0; i < headingsPos.length; i++) { - if (scrollTop >= headingsPos[i]) { - $activeCur = $tocLi.eq(i); - } else { - $activeCur || ($activeCur = $tocLi.eq(i)); - break; - } - } - } - $activeLast && $activeLast.removeClass('active'); - ($activeLast = $activeCur).addClass('active'); - } - function render() { - if(!hasRendered) { - $root.append($tocUl); - $headings.each(function() { - var $this = $(this); - $tocUl.append($('
  • ').addClass('toc-' + $this.prop('tagName').toLowerCase()) - .append($('').text($this.text()).attr('href', '#' + $this.prop('id')))); - }); - $tocLi = $tocUl.children('li'); - $tocUl.on('click', 'a', function(e) { - e.preventDefault(); - var $this = $(this); - scrolling = true; - setState($this.parent()); - $scroller.scrollToAnchor($this.attr('href'), 400, function() { - scrolling = false; - }); - }); - } - hasRendered = true; - } - function init() { - var interval, timeout; - if(!hasInit) { - render(); calc(); setState(null, scrolling); - // run calc every 100 millisecond - interval = setInterval(function() { - calc(); - }, 100); - timeout = setTimeout(function() { - clearInterval(interval); - }, 45000); - window.pageLoad.then(function() { - setTimeout(function() { - clearInterval(interval); - clearTimeout(timeout); - }, 3000); - }); - $scrollTarget.on('scroll', function() { - disabled || setState(null, scrolling); - }); - $window.on('resize', window.throttle(function() { - if (!disabled) { - render(); calc(); setState(null, scrolling); - } - }, 100)); - } - hasInit = true; - } - - setOptions(options); - if (!disabled) { - init(); - } - $window.on('resize', window.throttle(function() { - init(); - }, 200)); - return { - setOptions: setOptions - }; - } - $.fn.toc = toc; - }); -})(); diff --git a/_includes/scripts/page.js b/_includes/scripts/page.js deleted file mode 100644 index 91d05b9..0000000 --- a/_includes/scripts/page.js +++ /dev/null @@ -1,3 +0,0 @@ -/*(function () { - -})();*/ diff --git a/_includes/scripts/utils/imagesLoad.js b/_includes/scripts/utils/imagesLoad.js deleted file mode 100644 index 63a6bdf..0000000 --- a/_includes/scripts/utils/imagesLoad.js +++ /dev/null @@ -1,28 +0,0 @@ -(function() { - window.imagesLoad = function(images) { - images = images || document.getElementsByTagName('img'); - var imagesCount = images.length, loadedCount = 0, image; - var i, j, loaded = false, cbs = []; - imagesCount < 1 && (loaded = true); - for (i = 0; i < imagesCount; i++) { - image = images[i]; - image.complete ? handleImageLoad() : image.addEventListener('load', handleImageLoad); - } - function handleImageLoad() { - loadedCount++; - if (loadedCount === imagesCount) { - loaded = true; - if (cbs.length > 0) { - for (j = 0; j < cbs.length; j++) { - cbs[j](); - } - } - } - } - return { - then: function(cb) { - cb && (loaded ? cb() : (cbs.push(cb))); - } - }; - }; -})(); diff --git a/_includes/scripts/utils/utils.js b/_includes/scripts/utils/utils.js deleted file mode 100644 index e7bce45..0000000 --- a/_includes/scripts/utils/utils.js +++ /dev/null @@ -1,39 +0,0 @@ -(function() { - window.isArray = function(val) { - return Object.prototype.toString.call(val) === '[object Array]'; - }; - window.isString = function(val) { - return typeof val === 'string'; - }; - - window.hasEvent = function(event) { - return 'on'.concat(event) in window.document; - }; - - window.isOverallScroller = function(node) { - return node === document.documentElement || node === document.body || node === window; - }; - - window.isFormElement = function(node) { - var tagName = node.tagName; - return tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA'; - }; - - window.pageLoad = (function () { - var loaded = false, cbs = []; - window.addEventListener('load', function () { - var i; - loaded = true; - if (cbs.length > 0) { - for (i = 0; i < cbs.length; i++) { - cbs[i](); - } - } - }); - return { - then: function(cb) { - cb && (loaded ? cb() : (cbs.push(cb))); - } - }; - })(); -})(); diff --git a/_includes/scripts/variables.html b/_includes/scripts/variables.html deleted file mode 100644 index 5bd1770..0000000 --- a/_includes/scripts/variables.html +++ /dev/null @@ -1,35 +0,0 @@ -{%- include snippets/get-sources.html -%} -{%- assign _sources = __return -%} - -{%- include snippets/get-nav-url.html path="/assets/search.js" -%} -{%- assign _paths_search_js = __return -%} - - diff --git a/_includes/search-providers/custom/search.html b/_includes/search-providers/custom/search.html deleted file mode 100644 index 1d7eba3..0000000 --- a/_includes/search-providers/custom/search.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/search-providers/default/search-data.js b/_includes/search-providers/default/search-data.js deleted file mode 100644 index f20e0c5..0000000 --- a/_includes/search-providers/default/search-data.js +++ /dev/null @@ -1,14 +0,0 @@ -window.TEXT_SEARCH_DATA={ - {%- for _collection in site.collections -%} - {%- unless forloop.first -%},{%- endunless -%} - '{{ _collection.label }}':[ - {%- for _article in _collection.docs -%} - {%- unless forloop.first -%},{%- endunless -%} - {'title':{{ _article.title | jsonify }}, - {%- include snippets/prepend-baseurl.html path=_article.url -%} - {%- assign _url = __return -%} - 'url':{{ _url | jsonify }}} - {%- endfor -%} - ] - {%- endfor -%} -}; diff --git a/_includes/search-providers/default/search.html b/_includes/search-providers/default/search.html deleted file mode 100644 index a21512c..0000000 --- a/_includes/search-providers/default/search.html +++ /dev/null @@ -1,18 +0,0 @@ - - diff --git a/_includes/search-providers/default/search.js b/_includes/search-providers/default/search.js deleted file mode 100644 index bf69c28..0000000 --- a/_includes/search-providers/default/search.js +++ /dev/null @@ -1,112 +0,0 @@ -var SOURCES = window.TEXT_VARIABLES.sources; -var PAHTS = window.TEXT_VARIABLES.paths; -window.Lazyload.js([SOURCES.jquery, PAHTS.search_js], function() { - var search = (window.search || (window.search = {})); - var searchData = window.TEXT_SEARCH_DATA || {}; - - function memorize(f) { - var cache = {}; - return function () { - var key = Array.prototype.join.call(arguments, ','); - if (key in cache) return cache[key]; - else return cache[key] = f.apply(this, arguments); - }; - } - - /// search - function searchByQuery(query) { - var i, j, key, keys, cur, _title, result = {}; - keys = Object.keys(searchData); - for (i = 0; i < keys.length; i++) { - key = keys[i]; - for (j = 0; j < searchData[key].length; j++) { - cur = searchData[key][j], _title = cur.title; - if ((result[key] === undefined || result[key] && result[key].length < 4 ) - && _title.toLowerCase().indexOf(query.toLowerCase()) >= 0) { - if (result[key] === undefined) { - result[key] = []; - } - result[key].push(cur); - } - } - } - return result; - } - - var renderHeader = memorize(function(header) { - return $('

    ' + header + '

    '); - }); - - var renderItem = function(index, title, url) { - return $('
  • ' + title + '
  • '); - }; - - function render(data) { - if (!data) { return null; } - var $root = $('
      '), i, j, key, keys, cur, itemIndex = 0; - keys = Object.keys(data); - for (i = 0; i < keys.length; i++) { - key = keys[i]; - $root.append(renderHeader(key)); - for (j = 0; j < data[key].length; j++) { - cur = data[key][j]; - $root.append(renderItem(itemIndex++, cur.title, cur.url)); - } - } - return $root; - } - - // search box - var $result = $('.js-search-result'), $resultItems; - var lastActiveIndex, activeIndex; - - function clear() { - $result.html(null); - $resultItems = $('.search-result__item'); activeIndex = 0; - } - function onInputNotEmpty(val) { - $result.html(render(searchByQuery(val))); - $resultItems = $('.search-result__item'); activeIndex = 0; - $resultItems.eq(0).addClass('active'); - } - - search.clear = clear; - search.onInputNotEmpty = onInputNotEmpty; - - function updateResultItems() { - lastActiveIndex >= 0 && $resultItems.eq(lastActiveIndex).removeClass('active'); - activeIndex >= 0 && $resultItems.eq(activeIndex).addClass('active'); - } - - function moveActiveIndex(direction) { - var itemsCount = $resultItems ? $resultItems.length : 0; - if (itemsCount > 1) { - lastActiveIndex = activeIndex; - if (direction === 'up') { - activeIndex = (activeIndex - 1 + itemsCount) % itemsCount; - } else if (direction === 'down') { - activeIndex = (activeIndex + 1 + itemsCount) % itemsCount; - } - updateResultItems(); - } - } - - // Char Code: 13 Enter, 37 ⬅, 38 ⬆, 39 ➡, 40 ⬇ - $(window).on('keyup', function(e) { - var modalVisible = search.getModalVisible && search.getModalVisible(); - if (modalVisible) { - if (e.which === 38) { - modalVisible && moveActiveIndex('up'); - } else if (e.which === 40) { - modalVisible && moveActiveIndex('down'); - } else if (e.which === 13) { - modalVisible && $resultItems && activeIndex >= 0 && $resultItems.eq(activeIndex).children('a')[0].click(); - } - } - }); - - $result.on('mouseover', '.search-result__item > a', function() { - var itemIndex = $(this).parent().data('index'); - itemIndex >= 0 && (lastActiveIndex = activeIndex, activeIndex = itemIndex, updateResultItems()); - }); -}); diff --git a/_includes/search-providers/google-custom-search-engine/search.html b/_includes/search-providers/google-custom-search-engine/search.html deleted file mode 100644 index cf132ab..0000000 --- a/_includes/search-providers/google-custom-search-engine/search.html +++ /dev/null @@ -1,21 +0,0 @@ -{%- if site.search.google.custom_search_engine_id -%} - - - -{%- endif -%} diff --git a/_includes/search-providers/google-custom-search-engine/search.js b/_includes/search-providers/google-custom-search-engine/search.js deleted file mode 100644 index 09e5273..0000000 --- a/_includes/search-providers/google-custom-search-engine/search.js +++ /dev/null @@ -1,33 +0,0 @@ -var SOURCES = window.TEXT_VARIABLES.sources; -window.Lazyload.js(SOURCES.jquery, function() { - /* global google */ - var search = (window.search || (window.search = {})); - var searchBox, searchInput, clearIcon, searchModal; - - search.clear = function() { - searchBox && searchBox.clearAllResults(); - }; - search.onShow = function() { - searchInput && searchInput.focus(); - }; - search.onHide = function() { - searchInput && searchInput.blur(); - }; - - window.__gcse = { - callback: function() { - searchBox = google.search.cse.element.getElement('search-box'); - searchInput = document.getElementById('gsc-i-id1'); - clearIcon = document.getElementById('gs_cb50'); - searchModal = search.searchModal; - searchModal && searchModal.$el && searchModal.$el.on('click', function(e) { - (e.target === this || e.target === clearIcon || e.target.className === 'gs-title') && searchModal.hide(); - }); - } - }; - var cx = '{{ site.search.google.custom_search_engine_id }}'; // Insert your own Custom Search Engine ID here - var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; - gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + - '//cse.google.com/cse.js?cx=' + cx; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); -}); diff --git a/_includes/search.html b/_includes/search.html deleted file mode 100644 index 680dd35..0000000 --- a/_includes/search.html +++ /dev/null @@ -1,20 +0,0 @@ -{%- include snippets/get-locale-string.html key='CANCEL' -%} -{%- assign _locale_cancel = __return -%} -{%- include snippets/get-locale-string.html key='SEARCH' -%} -{%- assign _locale_search = __return -%} - -{%- if site.search.provider == 'google' -%} - -{%- endif -%} - -{%- if site.search.provider -%} - -{%- endif -%} - -{%- if site.search.provider == 'default' -%} - {%- include search-providers/default/search.html -%} -{%- elsif site.search.provider == 'google' -%} - {%- include search-providers/google-custom-search-engine/search.html -%} -{%- elsif site.search.provider == 'custom' -%} - {%- include search-providers/custom/search.html -%} -{%- endif -%} diff --git a/_includes/sharing-providers/addthis.html b/_includes/sharing-providers/addthis.html deleted file mode 100644 index f2364d3..0000000 --- a/_includes/sharing-providers/addthis.html +++ /dev/null @@ -1,9 +0,0 @@ - -{%- assign _SHARING_ADDTHIS_ID = site.sharing.addthis.id -%} - -{%- if _SHARING_ADDTHIS_ID -%} - -
      -{%- endif -%} - diff --git a/_includes/sharing-providers/addtoany.html b/_includes/sharing-providers/addtoany.html deleted file mode 100644 index a433a1b..0000000 --- a/_includes/sharing-providers/addtoany.html +++ /dev/null @@ -1,10 +0,0 @@ - -
      - - - - - -
      - - diff --git a/_includes/sharing-providers/custom.html b/_includes/sharing-providers/custom.html deleted file mode 100644 index d2b17d2..0000000 --- a/_includes/sharing-providers/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/sharing.html b/_includes/sharing.html deleted file mode 100644 index f585346..0000000 --- a/_includes/sharing.html +++ /dev/null @@ -1,7 +0,0 @@ -{%- if site.sharing.provider == 'addtoany' -%} - {%- include sharing-providers/addtoany.html -%} -{%- elsif site.sharing.provider == 'addthis' -%} - {%- include sharing-providers/addthis.html -%} - {%- elsif site.sharing.provider == 'custom' -%} - {%- include sharing-providers/custom.html -%} -{%- endif -%} diff --git a/_includes/sidebar/toc.html b/_includes/sidebar/toc.html deleted file mode 100644 index 4e3469e..0000000 --- a/_includes/sidebar/toc.html +++ /dev/null @@ -1,25 +0,0 @@ -{%- if page.sidebar.nav -%} - -{%- endif -%} \ No newline at end of file diff --git a/_includes/snippets/assign.html b/_includes/snippets/assign.html deleted file mode 100644 index c2691f5..0000000 --- a/_includes/snippets/assign.html +++ /dev/null @@ -1,9 +0,0 @@ -{%- if include.source1 == nil -%} - {%- if include.source0 == nil -%} - {%- assign __return = include.target -%} - {%- else -%} - {%- assign __return = include.source0 -%} - {%- endif -%} -{%- else -%} - {%- assign __return = include.source1 -%} -{%- endif -%} diff --git a/_includes/snippets/get-article-title.html b/_includes/snippets/get-article-title.html deleted file mode 100644 index 395b793..0000000 --- a/_includes/snippets/get-article-title.html +++ /dev/null @@ -1,11 +0,0 @@ -{%- assign _title = include.article.title | default: layout.title -%} -{%- assign _titles = include.article.titles | default: layout.titles -%} - -{%- if _title -%} - {%- assign __return = _title -%} -{%- elsif _titles -%} - {%- include snippets/get-string-from-locale-config.html locale=_titles -%} - {%- assign __return = __return -%} -{%- else -%} - {%- assign __return = nil -%} -{%- endif -%} diff --git a/_includes/snippets/get-lang.html b/_includes/snippets/get-lang.html deleted file mode 100644 index 028c52a..0000000 --- a/_includes/snippets/get-lang.html +++ /dev/null @@ -1,6 +0,0 @@ -{%- assign __return = site.data.variables.default.lang -%} -{%- if page.lang -%} - {%- assign __return = page.lang -%} -{%- elsif site.lang -%} - {%- assign __return = site.lang -%} -{%- endif -%} diff --git a/_includes/snippets/get-locale-string.html b/_includes/snippets/get-locale-string.html deleted file mode 100644 index a7069ae..0000000 --- a/_includes/snippets/get-locale-string.html +++ /dev/null @@ -1,12 +0,0 @@ -{%- include snippets/get-lang.html -%} -{%- assign _lang = __return -%} -{%- assign _local_lang = site.data.locale[_lang] -%} -{%- assign _local_lang_en = site.data.locale.en -%} -{%- if _local_lang == nil -%} - {%- assign _local_lang = _local_lang_en -%} -{%- endif -%} -{%- if _local_lang[include.key] -%} - {%- assign __return = _local_lang[include.key] -%} -{%- else -%} - {%- assign __return = _local_lang_en[include.key] -%} -{%- endif -%} diff --git a/_includes/snippets/get-nav-url.html b/_includes/snippets/get-nav-url.html deleted file mode 100644 index 3b1b122..0000000 --- a/_includes/snippets/get-nav-url.html +++ /dev/null @@ -1,8 +0,0 @@ -{%- assign _pre7 = include.path | slice: 0, 7 -%} -{%- assign _pre8 = include.path | slice: 0, 8 -%} -{%- if _pre7 == 'http://' or _pre8 == 'https://' -%} - {%- assign __return = include.path -%} -{%- else -%} - {%- include snippets/prepend-baseurl.html path=include.path -%} - {%- assign __return = __return -%} -{%- endif -%} diff --git a/_includes/snippets/get-sources.html b/_includes/snippets/get-sources.html deleted file mode 100644 index 0de1cb5..0000000 --- a/_includes/snippets/get-sources.html +++ /dev/null @@ -1,2 +0,0 @@ -{%- assign _sources = site.sources | default: site.data.variables.default.sources -%} -{%- assign __return = site.data.variables.sources[_sources] -%} diff --git a/_includes/snippets/get-string-from-locale-config.html b/_includes/snippets/get-string-from-locale-config.html deleted file mode 100644 index 03325fa..0000000 --- a/_includes/snippets/get-string-from-locale-config.html +++ /dev/null @@ -1,7 +0,0 @@ -{%- include snippets/get-lang.html -%} -{%- assign _lang = __return -%} -{%- if include.locale[_lang] -%} - {%- assign __return = include.locale[_lang] -%} -{%- else -%} - {%- assign __return = include.locale.en -%} -{%- endif -%} diff --git a/_includes/snippets/is_collection.html b/_includes/snippets/is_collection.html deleted file mode 100644 index 559a624..0000000 --- a/_includes/snippets/is_collection.html +++ /dev/null @@ -1,6 +0,0 @@ -{%- assign _page_path_first_char = include.page.path | slice: 0, 1 -%} -{%- if _page_path_first_char == '_' -%} - {%- assign __return = true -%} -{%- else -%} - {%- assign __return = false -%} -{%- endif -%} diff --git a/_includes/snippets/page-url.html b/_includes/snippets/page-url.html deleted file mode 100644 index 3e9815d..0000000 --- a/_includes/snippets/page-url.html +++ /dev/null @@ -1,2 +0,0 @@ -{%- include snippets/prepend-baseurl.html path=page.url -%} -{{ __return | prepend: site.url }} \ No newline at end of file diff --git a/_includes/snippets/prepend-baseurl.html b/_includes/snippets/prepend-baseurl.html deleted file mode 100644 index d5d24ef..0000000 --- a/_includes/snippets/prepend-baseurl.html +++ /dev/null @@ -1,4 +0,0 @@ -{%- assign _include_path_replace_index = include.path | replace: 'index.html', '' -%} -{%- include snippets/prepend-path.html - path=_include_path_replace_index - prepend_path=site.baseurl -%} \ No newline at end of file diff --git a/_includes/snippets/prepend-path.html b/_includes/snippets/prepend-path.html deleted file mode 100644 index 5f6e904..0000000 --- a/_includes/snippets/prepend-path.html +++ /dev/null @@ -1 +0,0 @@ -{%- assign __return = include.path | prepend: '/' | prepend: include.prepend_path | replace:'///','/' | replace:'//','/' -%} diff --git a/_includes/svg/icon/social/behance.svg b/_includes/svg/icon/social/behance.svg deleted file mode 100644 index bba499c..0000000 --- a/_includes/svg/icon/social/behance.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/svg/icon/social/douban.svg b/_includes/svg/icon/social/douban.svg deleted file mode 100644 index 42a07d5..0000000 --- a/_includes/svg/icon/social/douban.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/_includes/svg/icon/social/facebook.svg b/_includes/svg/icon/social/facebook.svg deleted file mode 100644 index ba901bd..0000000 --- a/_includes/svg/icon/social/facebook.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/svg/icon/social/flicker.svg b/_includes/svg/icon/social/flicker.svg deleted file mode 100644 index eaacc73..0000000 --- a/_includes/svg/icon/social/flicker.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/_includes/svg/icon/social/github.svg b/_includes/svg/icon/social/github.svg deleted file mode 100644 index c5439a9..0000000 --- a/_includes/svg/icon/social/github.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/svg/icon/social/googleplus.svg b/_includes/svg/icon/social/googleplus.svg deleted file mode 100644 index 69ab1e5..0000000 --- a/_includes/svg/icon/social/googleplus.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/svg/icon/social/linkedin.svg b/_includes/svg/icon/social/linkedin.svg deleted file mode 100644 index 3c26dbc..0000000 --- a/_includes/svg/icon/social/linkedin.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/svg/icon/social/mail.svg b/_includes/svg/icon/social/mail.svg deleted file mode 100644 index a0d0751..0000000 --- a/_includes/svg/icon/social/mail.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/_includes/svg/icon/social/medium.svg b/_includes/svg/icon/social/medium.svg deleted file mode 100644 index 2dfdd92..0000000 --- a/_includes/svg/icon/social/medium.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/svg/icon/social/npm.svg b/_includes/svg/icon/social/npm.svg deleted file mode 100644 index c382c30..0000000 --- a/_includes/svg/icon/social/npm.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/_includes/svg/icon/social/pinterest.svg b/_includes/svg/icon/social/pinterest.svg deleted file mode 100644 index 68f400b..0000000 --- a/_includes/svg/icon/social/pinterest.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/_includes/svg/icon/social/qq.svg b/_includes/svg/icon/social/qq.svg deleted file mode 100644 index a305a5b..0000000 --- a/_includes/svg/icon/social/qq.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/svg/icon/social/telegram.svg b/_includes/svg/icon/social/telegram.svg deleted file mode 100644 index 1fc8d78..0000000 --- a/_includes/svg/icon/social/telegram.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/_includes/svg/icon/social/twitter.svg b/_includes/svg/icon/social/twitter.svg deleted file mode 100644 index b04f68d..0000000 --- a/_includes/svg/icon/social/twitter.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/svg/icon/social/weibo.svg b/_includes/svg/icon/social/weibo.svg deleted file mode 100644 index 2ccd8b1..0000000 --- a/_includes/svg/icon/social/weibo.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/_includes/svg/icon/social/weixin.svg b/_includes/svg/icon/social/weixin.svg deleted file mode 100644 index c2ed41b..0000000 --- a/_includes/svg/icon/social/weixin.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/svg/icon/social/zhihu.svg b/_includes/svg/icon/social/zhihu.svg deleted file mode 100644 index 210fb2e..0000000 --- a/_includes/svg/icon/social/zhihu.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/tags.html b/_includes/tags.html deleted file mode 100644 index 424804c..0000000 --- a/_includes/tags.html +++ /dev/null @@ -1,52 +0,0 @@ -{%- assign _tag_max_size = 1 -%} -{%- assign _tag_min_size = 1 -%} -{%- assign _tag_cur_size = 1 -%} -{%- assign _tags = site.tags | sort -%} -{%- for _tag in _tags -%} - {%- assign _tag_cur_size = _tag[1].size -%} - {%- if _tag_cur_size > _tag_max_size -%} - {%- assign _tag_max_size = _tag_cur_size -%} - {%- endif -%} - {%- if _tag_cur_size < _tag_min_size -%} - {%- assign _tag_min_size = _tag_cur_size -%} - {%- endif -%} -{%- endfor -%} -{%- assign _tag_gap_size = _tag_max_size | minus: _tag_min_size | plus: 1 | divided_by: 4 -%} -{%- if _tag_gap_size < 1 -%} - {%- assign _tag_gap_size = 1 -%} -{%- endif -%} -
      - -
      -- cgit v1.2.3