80 lines
4.3 KiB
HTML
Executable File
80 lines
4.3 KiB
HTML
Executable File
<header class="am-topbar shop-navigation">
|
|
<div class="am-container">
|
|
<button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-default am-show-sm-only switch-submit" data-am-collapse="{target: '#doc-topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
|
|
|
|
<h1 class="am-topbar-brand wap-logo am-show-sm-only">
|
|
<a href="{{$Think.__MY_URL__}}">
|
|
<img src="{{$attachment_host}}{{:MyC('home_site_logo_wap')}}" alt="{{:MyC('home_seo_site_title')}}" />
|
|
</a>
|
|
</h1>
|
|
|
|
<a href="{{:MyUrl('index/category/index')}}" class="am-show-md-only">
|
|
<div class="goods-category-title am-hide-sm-only">
|
|
<span class="all-goods">全部分类</span>
|
|
</div>
|
|
</a>
|
|
|
|
<form class="am-topbar-form am-topbar-left am-form-inline am-show-sm-only navigation-search" role="search" action="{{:MyUrl('index/search/index')}}" method="POST">
|
|
<div class="am-input-group am-input-group-sm">
|
|
<input type="text" name="wd" class="am-form-field" placeholder="其实搜索很简单^_^ !" value="{{if !empty($params['wd'])}}{{$params.wd}}{{/if}}" autocomplete="off" />
|
|
<span class="am-input-group-btn">
|
|
<button class="am-btn am-btn-default" type="submit">
|
|
<span class="am-icon-search am-icon-xs"></span>
|
|
</button>
|
|
</span>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse">
|
|
{{if empty($user)}}
|
|
<!-- 未登录 -->
|
|
<div class="navigation-button am-show-sm-only">
|
|
{{if MyC('home_user_login_state') eq 1}}
|
|
<a href="{{:MyUrl('index/user/logininfo')}}" class="am-btn am-btn-primary am-topbar-btn am-btn-sm">登录</a>
|
|
{{/if}}
|
|
{{if in_array('sms', MyC('home_user_reg_state')) or in_array('email', MyC('home_user_reg_state')) or in_array('username', MyC('home_user_reg_state'))}}
|
|
<a href="{{:MyUrl('index/user/regInfo')}}" class="am-btn am-btn-success am-topbar-btn am-btn-sm">注册</a>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<!-- 主导航 -->
|
|
<ul class="am-nav am-nav-pills am-topbar-nav">
|
|
<li><a href="{{$Think.__MY_URL__}}">首页</a></li>
|
|
{{if !empty($nav_header)}}
|
|
{{foreach $nav_header as $nav}}
|
|
{{if empty($nav['items'])}}
|
|
<li>
|
|
<a href="{{$nav.url}}" {{if $nav['is_new_window_open'] eq 1}}target="_blank"{{/if}} title="{{$nav.name}}">{{$nav.name}}</a>
|
|
</li>
|
|
{{else /}}
|
|
<li class="am-dropdown" data-am-dropdown>
|
|
<a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
|
|
{{$nav.name}} <span class="am-icon-angle-down"></span>
|
|
</a>
|
|
<ul class="am-dropdown-content">
|
|
{{foreach $nav.items as $navs}}
|
|
<li>
|
|
<a href="{{$navs.url}}" title="{{$navs.name}}">{{$navs.name}}</a>
|
|
</li>
|
|
{{/foreach}}
|
|
</ul>
|
|
{{/if}}
|
|
{{/foreach}}
|
|
{{/if}}
|
|
</ul>
|
|
|
|
<div class="am-topbar-right am-hide-sm-only">
|
|
<div class="navigation-user {{if empty($user)}}login-event{{/if}}">
|
|
<a href="{{if empty($user)}}javascript:;{{else /}}{{:MyUrl('index/user/index')}}{{/if}}">
|
|
<img src="{{if !empty($user['avatar'])}}{{$user.avatar}}{{else /}}{{$attachment_host}}/static/{{$module_name}}/{{$default_theme}}/images/default-user-avatar.jpg{{/if}}" class="nav-user" />
|
|
<b></b>
|
|
<span>我的商城</span>
|
|
<i class="am-icon-angle-right"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|