码农笔录博客源码
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

46 行
1.8 KiB

{{define "nav"}}
<div class='nav-container'>
<nav>
<ul class="layui-nav layui-bg-molv" lay-filter="">
<a href="/" style="color: rgba(255,255,255,.9)"><p>码农随笔</p></a>
<li class="layui-nav-item">
<a href="/search"><i class="layui-icon">&#xe615;</i><span style="padding-left:8px">搜索</span></a>
</li>
<li class="layui-nav-item auto-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>
</li>
<li class="layui-nav-item auto-item">
<a href="/me/info">个人中心</span></a>
</li>
{{if .IsLogin }}
<li class="layui-nav-item auto-item">
<a href=""><img src="{{.HeadImg}}" class="layui-nav-img"></a>
<dl class="layui-nav-child layui-anim layui-anim-upbit">
<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 auto-item">
<a href="/login">登录 <span class="layui-badge-dot"></span></a>
</li>
{{end}}
</ul>
</nav>
</div>
<script>
$(function () {
// element
layui.use('element', function(){
var element = layui.element;
});
})
</script>
{{end}}