Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
46 lines
1.7 KiB
46 lines
1.7 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"></i><span style="padding-left:8px">搜索</span></a>
|
|
</li>
|
|
<li class="layui-nav-item">
|
|
<a href="/blog/new"><i class="layui-icon"></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">
|
|
<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 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">
|
|
<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}}
|