Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiaoheiAh/hugo-theme-pure.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorotis <hdzee19@gmail.com>2019-10-12 09:18:48 +0300
committerotis <hdzee19@gmail.com>2019-10-12 09:18:48 +0300
commitdfd724d29124edc3debb76cc41f87ec1f947850c (patch)
treeff6597ec11e8876dddebd614eda913594d170b61
parent2966804cac37a57b8f9826b79e2583a7ae7a90a3 (diff)
fix
-rw-r--r--i18n/en.yaml15
-rw-r--r--i18n/zh.yaml16
-rw-r--r--layouts/partials/_script/comment.html2
-rw-r--r--layouts/partials/_script/pv.html8
-rw-r--r--layouts/partials/_widgets/archive.html0
-rw-r--r--layouts/partials/_widgets/tagcloud.html0
-rw-r--r--layouts/partials/header.html2
-rw-r--r--layouts/partials/script.html33
-rw-r--r--layouts/partials/search.html26
9 files changed, 85 insertions, 17 deletions
diff --git a/i18n/en.yaml b/i18n/en.yaml
index 2c83284..5434065 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -143,4 +143,17 @@ copyright_theme_by:
copyright_base_on:
other: base on
copyright_powered_by:
- other: Powered by \ No newline at end of file
+ other: Powered by
+
+insight_hint:
+ other: Type something...
+insight_posts:
+ other: Posts
+insight_pages:
+ other: Pages
+insight_categories:
+ other: Categories
+insight_tags:
+ other: Tags
+insight_untitled:
+ other: (Untitled) \ No newline at end of file
diff --git a/i18n/zh.yaml b/i18n/zh.yaml
index 1993410..22412df 100644
--- a/i18n/zh.yaml
+++ b/i18n/zh.yaml
@@ -147,4 +147,18 @@ copyright_theme_by:
copyright_base_on:
other: base on
copyright_powered_by:
- other: Powered by \ No newline at end of file
+ other: Powered by
+
+
+insight_hint:
+ other: 想要查找什么...
+insight_posts:
+ other: 文章
+insight_pages:
+ other: 页面
+insight_categories:
+ other: 分类
+insight_tags:
+ other: 标签
+insight_untitled:
+ other: (未命名) \ No newline at end of file
diff --git a/layouts/partials/_script/comment.html b/layouts/partials/_script/comment.html
index bd61016..16c8cf1 100644
--- a/layouts/partials/_script/comment.html
+++ b/layouts/partials/_script/comment.html
@@ -34,7 +34,7 @@
(d.head || d.body).appendChild(s);
})();
</script>
-{{- else if $comment.type "gitalk" }}
+{{- else if eq $comment.type "gitalk" }}
<!-- <link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css"> -->
<script src="//cdn.jsdelivr.net/npm/gitalk@1.4.0/dist/gitalk.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/blueimp-md5@2.10.0/js/md5.min.js"></script>
diff --git a/layouts/partials/_script/pv.html b/layouts/partials/_script/pv.html
index b04b2c9..656b129 100644
--- a/layouts/partials/_script/pv.html
+++ b/layouts/partials/_script/pv.html
@@ -1,12 +1,12 @@
-{{- if .Site.pv.busuanzi.enable }}
+{{- if .Site.Params.pv.busuanzi.enable }}
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
-{{- else if and (.Site.pv.leancloud.enable) ( not .Site.comment.valine.visitor ) }}
+{{- else if and (.Site.Params.pv.leancloud.enable) ( not .Site.Params.comment.valine.visitor ) }}
<!-- custom analytics part create by xiamo -->
<script defer src="https://cdn1.lncld.net/static/js/av-min-1.2.1.js"></script>
<script defer>
AV.init({
- appId: '{{- .Site.pv.leancloud.app_id }}',
- appKey: '{{- .Site.pv.leancloud.app_key }}'
+ appId: '{{- .Site.Params.pv.leancloud.app_id }}',
+ appKey: '{{- .Site.Params.pv.leancloud.app_key }}'
});
function showTime(Counter) {
diff --git a/layouts/partials/_widgets/archive.html b/layouts/partials/_widgets/archive.html
deleted file mode 100644
index e69de29..0000000
--- a/layouts/partials/_widgets/archive.html
+++ /dev/null
diff --git a/layouts/partials/_widgets/tagcloud.html b/layouts/partials/_widgets/tagcloud.html
deleted file mode 100644
index e69de29..0000000
--- a/layouts/partials/_widgets/tagcloud.html
+++ /dev/null
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 2b8f0f9..3e0b71c 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -12,7 +12,7 @@
<small id="location" class="text-muted hidden-xs hidden-sm"><i class="icon icon-map-marker"></i> {{- $profile.location }}</small>
</div>
{{- end }}
- <!-- TODO partial search -->
+ <!-- {{- partial "search.html" . }} -->
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
diff --git a/layouts/partials/script.html b/layouts/partials/script.html
index 07dff09..7704a8f 100644
--- a/layouts/partials/script.html
+++ b/layouts/partials/script.html
@@ -1,23 +1,40 @@
<script src="//cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<script>
-window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
+ window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
</script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/highlight.min.js"></script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/languages/rust.min.js"></script>
-<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
+<script type="text/javascript"
+ src="https://cdn.staticfile.org/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript" src="{{ "js/application.js" | relURL }}"></script>
<script type="text/javascript" src="{{ "js/plugin.js" | relURL }}"></script>
-{{- partial "search.html" }}
+<script>
+ (function (window) {
+ var INSIGHT_CONFIG = {
+ TRANSLATION: {
+ POSTS: '{{ T "insight_posts"}}',
+ PAGES: '{{ T "insight_pages"}}',
+ CATEGORIES: '{{ T "insight_categories"}}',
+ TAGS: '{{ T "insight_tags"}}',
+ UNTITLED: '{{ T "insight_untitled"}}',
+ },
+ ROOT_URL: '{{ .Site.BaseURL }}',
+ CONTENT_URL: '{{ "/algolia.json" | absURL}} ',
+ };
+ window.INSIGHT_CONFIG = INSIGHT_CONFIG;
+ })(window);
+ </script>
+<script type="text/javascript" src="{{ "js/insight.js" | relURL }}"></script>
{{- if eq .Type "repository" }}
- {{- partial "_script/repository.html" }}
+{{- partial "_script/repository.html" . }}
{{- end}}
<!-- TODO books -->
{{- if .IsPage }}
- {{- partial "_script/pv.html" }}
+{{- partial "_script/pv.html" . }}
{{- end }}
{{- if eq .Type "posts" }}
- {{- partial "_script/comment.html" . }}
+{{- partial "_script/comment.html" . }}
{{- end }}
-{{- partial "_script/fancybox.html" }}
-{{- partial "_script/analytics.html" }} \ No newline at end of file
+{{- partial "_script/fancybox.html" . }}
+{{- partial "_script/analytics.html" . }} \ No newline at end of file
diff --git a/layouts/partials/search.html b/layouts/partials/search.html
index 30404ce..ae0abdd 100644
--- a/layouts/partials/search.html
+++ b/layouts/partials/search.html
@@ -1 +1,25 @@
-TODO \ No newline at end of file
+<div class="search" id="search-form-wrap">
+ <form class="search-form sidebar-form">
+ <div class="input-group">
+ <input type="text" class="search-form-input form-control" placeholder="{{ T "widget_search" }}" />
+ <span class="input-group-btn">
+ <button type="submit" class="search-form-submit btn btn-flat" onclick="return false;"><i
+ class="icon icon-search"></i></button>
+ </span>
+ </div>
+ <div class="ins-search">
+ <div class="ins-search-mask"></div>
+ <div class="ins-search-container">
+ <div class="ins-input-wrapper">
+ <input type="text" class="ins-search-input" placeholder="{{ T "insight_hint" }}"
+ x-webkit-speech />
+ <button type="button" class="close ins-close ins-selectable" data-dismiss="modal"
+ aria-label="Close"><span aria-hidden="true">×</span></button>
+ </div>
+ <div class="ins-section-wrapper">
+ <div class="ins-section-container"></div>
+ </div>
+ </div>
+ </div>
+ </form>
+</div> \ No newline at end of file