Skip to content

Commit

Permalink
修复next搜索框弹不出手机键盘bug和美化搜索框
Browse files Browse the repository at this point in the history
  • Loading branch information
no5ix committed Oct 22, 2017
1 parent 939237d commit 3dea59d
Show file tree
Hide file tree
Showing 14 changed files with 207 additions and 316 deletions.
2 changes: 2 additions & 0 deletions source/_posts/Base64编码原理与应用.md
Expand Up @@ -37,6 +37,8 @@ categories:
> 是为了方便把含有不可见字符串的信息用可见字符串表示出来,以便复制粘贴
<!-- more -->

# 详细解释

转自[Base64编码原理与应用](http://blog.xiayf.cn/2016/01/24/base64-encoding/)
Expand Down
Expand Up @@ -7,7 +7,7 @@ tags:
- c++
categories:
- UE4
top: 2
top: 4
---

# GitHub
Expand All @@ -22,7 +22,6 @@ this Plugin version can Run **2000+** fishes at the same time

> 这个插件版本可以同时运行 **2000+** 条鱼儿
<!-- more -->

![OldDemoScreenshot.png](https://ooo.0o0.ooo/2016/10/18/58060a188d281.png)

Expand All @@ -32,6 +31,8 @@ this Plugin version can Run **2000+** fishes at the same time
> 查看 [视频演示](http://v.youku.com/v_show/id_XMTc2NTM4MjkyMA==.html)


<!-- more -->

# **Download**
* Download [**MyFish.exe (Win64)**](http://pan.baidu.com/s/1qYbBrHU) (*This is packaged by an unoptimized version( check out branch old_demo)*)

Expand Down
@@ -0,0 +1,28 @@
---
title: 修复next搜索框弹不出手机键盘bug和美化搜索框
date: 2017-10-22 22:59:31
tags:
- next
categories:
-
---

# 动机

- next自带的搜索框在iPhone上有键盘不能自动弹出来的bug, 需要点击两次才可以弹出来
- next自带的搜索框达不到它一直倡导的简洁风的要求

# 展示图

如本博客右上角所示

# GitHub

我的[博客源码](https://github.com/no5ix/no5ix.github.io/tree/source), 欢迎Fork+Star.

如果你也喜欢这样的搜索框, 参考这个[commit]()便可改成跟我一样.

## 已知问题

归档(archives)界面下, 搜索结果内容和归档内容混在一起了, 所以我暂时禁用了归档(反正这玩意也没啥用), 待修复.

2 changes: 1 addition & 1 deletion source/_posts/快速完成一个slg游戏思路(二).md
Expand Up @@ -15,7 +15,7 @@ tags:
- ruby
categories:
- server
top: 4
top: 2
---


Expand Down
Expand Up @@ -7,7 +7,6 @@ tags:
- kbengine
categories:
- server
top: 1
---

根据之前的博文 [服务端常用架构](2016/07/11/服务端常用架构一)
Expand Down
14 changes: 12 additions & 2 deletions source/about/index.md
@@ -1,6 +1,6 @@
---
title: About me
date: 2017-08-31 09:54:52
date: 2014-08-31 09:54:52
type: "about"
---

Expand All @@ -27,4 +27,14 @@ type: "about"

## 交流一下啊

- **FoxMail** : no5ix@foxmail.com
- **FoxMail** : no5ix@foxmail.com

# 也想做一个这样的博客?

这是我的[博客源码](https://github.com/no5ix/no5ix.github.io/tree/source), 欢迎Fork+Star.

# 想评论一哈?

> 不想在博客引入第三方模块了, 不稳定又丑
想评论的话, 直接去我的[博客源码项目](https://github.com/no5ix/no5ix.github.io/issues/new)下的提issue好了,
4 changes: 2 additions & 2 deletions themes/next/_config.yml
Expand Up @@ -46,10 +46,10 @@ index_with_subtitle: true

# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash (/archives -> archives)
menu:
home: /
#home: /
categories: /categories/
about: /about/
archives: /archives/
#archives: /archives/
tags: /tags/
#sitemap: /sitemap.xml
#commonweal: /404/
Expand Down
5 changes: 3 additions & 2 deletions themes/next/layout/_partials/header.swig
Expand Up @@ -34,9 +34,10 @@

<nav class="site-nav">
{% set hasSearch = theme.swiftype_key || theme.algolia_search.enable || theme.tinysou_Key || theme.local_search.enable %}
{% set isMist = theme.scheme === 'Mist'%}

{% if theme.menu %}
<ul id="menu" class="menu">
<ul id="menu" class="menu menu-left">
{% for name, path in theme.menu %}
{% set itemName = name.toLowerCase() %}
<li class="menu-item menu-item-{{ itemName }}">
Expand All @@ -49,7 +50,7 @@
</li>
{% endfor %}

{% if hasSearch %}
{% if not isMist and hasSearch %}
<li class="menu-item menu-item-search">
{% if theme.swiftype_key %}
<a href="javascript:;" class="st-search-show-outputs">
Expand Down
29 changes: 13 additions & 16 deletions themes/next/layout/_partials/search/localsearch.swig
@@ -1,16 +1,13 @@
<div class="popup search-popup local-search-popup">
<div class="local-search-header clearfix">
<span class="search-icon">
<i class="fa fa-search"></i>
</span>
<span class="popup-btn-close">
<i class="fa fa-times-circle"></i>
</span>
<div class="local-search-input-wrapper">
<input autocomplete="off"
placeholder="{{ __('search.placeholder') }}" spellcheck="false"
type="text" id="local-search-input">
</div>
</div>
<div id="local-search-result"></div>
</div>
{% if theme.scheme %}
<form class="site-search-form">
<span class="search-icon fa fa-search"></span>
<input type="text" id="local-search-input" class="st-search-input" />
</form>
<div id="local-search-result" class="local-search-result-cls"></div>
{% endif %}

<script type="text/javascript" id="local.search.active">
var inputArea = document.querySelector("#local-search-input");
inputArea.onclick = function(){ getSearchFile(); this.onclick = null }
inputArea.onkeydown = function(){ if(event.keyCode == 13) return false }
</script>

0 comments on commit 3dea59d

Please sign in to comment.