Browse Source

首页查询跳转完成&补充提交footer

layui
yirenyishi 6 years ago
parent
commit
9db5ffd295
  1. 24
      views/T.footer.tpl
  2. 20
      views/blogs.html

24
views/T.footer.tpl

@ -0,0 +1,24 @@
{{define "footer"}}
<div class="footer-root">
<div class="footer-friend" style="margin-top: 15px">
<a href="https://blog.csdn.net/yp090416" target="_blank" style="padding: 0 5px">码农笔录-CSDN</a>
<a href="https://www.jianshu.com/u/6baf4cdc7ce1" target="_blank" style="padding: 0 5px">码农笔录-简书</a>
<a href="http://www.alexa.cn" target="_blank" style="padding: 0 5px">ALEXA</a>
</div>
<div class="footer-friend">
<span>© 2018
<a href="https://www.aiprose.com/">个人随笔</a> </span>
<a href="https://www.aiprose.com/">aiprose.com</a>
<span>版权所有&nbsp;&nbsp;&nbsp; ICP证:</span>
<a href="http://www.miitbeian.gov.cn/" target="_blank">陕ICP备18016846号</a>
</div>
<div class="footer-friend">
<span>前端QQ群: 128806068</span>
<span>/</span>
<span>golang QQ群: 189633710</span>
</div>
<div class="wxcode">
<img src="/static/img/wxcode.png" alt="" width="80" height="80">
</div>
</div>
{{end}}

20
views/blogs.html

@ -9,15 +9,21 @@
<div class="home-hearder">
<div style="flex: 1">
<span>
<select class="form-control input-lg" style="width: 150px;display: inline-block;height: 32px">
<select class="form-control input-lg" style="width: 150px;display: inline-block;height: 32px"
id="selCat">
{{range .Cats}}
<option value="-1">选择语言</option>
<option value="{{.Id}}">{{.Title}}</option>
{{end}}
</select>
</span>
<div class="btn-group" role="group" style="display: inline-block;margin-top: -3px">
<button type="button" class="btn btn-default btn-xl">最新</button>
<button type="button" class="btn btn-default btn-xl">最热</button>
<button type="button " class="btn btn-default btn-xl {{if eq 0 .Flag}}active{{end}}">
<a href="/blogs?num=1&flag=0&cat={{.Cat}}" style="color: #555;text-decoration: none;">最新</a>
</button>
<button type="button active" class="btn btn-default btn-xl {{if eq 1 .Flag}}active{{end}}">
<a href="/blogs?num=1&flag=1&cat={{.Cat}}" style="color: #555;text-decoration: none;">最热</a>
</button>
</div>
</div>
<button type="button" onclick="window.open('/blog/new')" class="btn btn-danger" style="border-radius: 12px">
@ -86,4 +92,12 @@
</div>
</div>
</body>
<script>
$(function () {
$("#selCat").val({{.Cat}})
$("#selCat").change(function () {
window.location.href = "/blogs?num=1&flag={{.Flag}}&cat=" + $("#selCat").val()
})
})
</script>
</html>
Loading…
Cancel
Save