home-header.hbs 1.04 KB
<div id="home-header" class="home-header clearfix" {{# bgColor}}style="background-color:{{.}};background-image:none"{{/ bgColor}}>
    <div id="browser-header">
        <span class="nav-btn iconfont">&#xe60b;</span>
        <span class="logo"></span>
        <span class="search-btn iconfont"><a href="{{searchUrl}}">&#xe60f;</a></span>
    </div>
    <div id="wechat-header" class="hide">
        <span class="nav-btn iconfont">&#xe60b;</span>
        <div class="search-input">
            <a href="{{searchUrl}}">
                <i class="search-icon iconfont">&#xe60f;</i>
                <p>{{defaultTerms}}</p>
            </a>
        </div>
    </div>
    <script type="text/javascript">
        var isWechat = /micromessenger/i.test(navigator.userAgent || '');
        if (isWechat) {
            document.getElementById('browser-header').classList.add('hide');
            document.getElementById('wechat-header').classList.remove('hide');
            document.getElementById('home-header').classList.add('iswechat');
        }
    </script>
</div>