码农笔录博客源码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.7 KiB

6 years ago
{{define "nav"}}
<div class='nav-container'>
6 years ago
<nav>
<ul class="layui-nav layui-bg-molv" lay-filter="">
<a href="/" style="color: rgba(255,255,255,.9)"><p>码农随笔</p></a>
5 years ago
<li class="layui-nav-item">
<a href="/search"><i class="layui-icon">&#xe615;</i><span style="padding-left:8px">搜索</span></a>
</li>
6 years ago
<li class="layui-nav-item">
<a href="/blog/new"><i class="layui-icon">&#xe642;</i>写文章</a>
</li>
<li class="layui-nav-item">
<a href="/blogs">博客 </a>
</li>
<li class="layui-nav-item">
<a href="https://note.aiprose.com" target="_blank">免费笔记</a>
6 years ago
</li>
<li class="layui-nav-item">
<a href="/me/info">个人中心</span></a>
</li>
{{if .IsLogin }}
<li class="layui-nav-item">
<a href=""><img src="{{.HeadImg}}" class="layui-nav-img"></a>
<dl class="layui-nav-child">
<dd><a href="/me/info">个人中心</a></dd>
<dd><a href="/note">我的笔记</a></dd>
<dd><a href="/logout">退出登录</a></dd>
</dl>
</li>
{{else}}
<li class="layui-nav-item">
<a href="/login">登录 <span class="layui-badge-dot"></span></a>
</li>
{{end}}
</ul>
6 years ago
</nav>
6 years ago
</div>
6 years ago
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
var element = layui.element;
//…
});
</script>
6 years ago
{{end}}