main.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  6. <title>{{.siteName}}</title>
  7. <link rel="stylesheet" href="/static/layui/css/layui.css">
  8. <link rel="stylesheet" href="/static/css/app.css?t=154">
  9. <link rel="stylesheet" href="/static/font-awesome/css/font-awesome.min.css" media="all">
  10. </head>
  11. <body>
  12. <div class="layui-layout layui-layout-admin kit-layout-admin">
  13. <div class="layui-header">
  14. <div class="layui-logo">{{.siteName}}</div>
  15. <div class="layui-logo kit-logo-mobile">P</div>
  16. <ul class="layui-nav layui-layout-right kit-nav">
  17. <li class="layui-nav-item">
  18. <a href="javascript:;">
  19. <img src="/static/img/userface.jpg" class="layui-nav-img"> {{.loginUserName}}
  20. </a>
  21. </li>
  22. <li class="layui-nav-item"><a href="/login_out"><i class="fa fa-sign-out" aria-hidden="true"></i> 注销</a></li>
  23. </ul>
  24. </div>
  25. <div class="layui-side layui-bg-black kit-side">
  26. <div class="layui-side-scroll">
  27. <div class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
  28. <!-- 左侧导航区域(可配合layui已有的垂直导航) -->
  29. <ul class="layui-nav layui-nav-tree" lay-filter="kitNavbar" kit-navbar>
  30. {{range $index, $elem := .SideMenu1}}
  31. {{if $elem}}
  32. <li class="layui-nav-item ">
  33. <a class="" href="javascript:;">
  34. <i class="fa {{$elem.Icon}}"></i> &nbsp;&nbsp;<span>{{$elem.AuthName}}</span>
  35. </a>
  36. <dl class="layui-nav-child">
  37. {{range $i, $e := $.SideMenu2}}
  38. {{if eq $e.Pid $elem.Id}}
  39. <dd><a data-url="{{$e.AuthUrl}}" data-icon="&#xe715;" data-title="{{$e.AuthName}}" kit-target data-id="{{$e.Id}}">
  40. <i class="fa {{$e.Icon}}"></i> &nbsp;&nbsp;<span>{{$e.AuthName}}</span>
  41. </a>
  42. </dd>
  43. {{end}}
  44. {{end}}
  45. </dl>
  46. </li>
  47. {{end}}
  48. {{end}}
  49. </ul>
  50. </div>
  51. </div>
  52. <div class="layui-body" id="container">
  53. <!-- 内容主体区域 -->
  54. <div style="padding: 15px;">主体内容加载中,请稍等...</div>
  55. </div>
  56. <div class="layui-footer" style="font-size: 12px;text-align:center;">
  57. <!-- 底部固定区域 -->
  58. 2017 &copy; PPGO_ApiAdmin Power by Beego
  59. </div>
  60. </div>
  61. <script src="/static/layui/layui.js?s=36"></script>
  62. <script>
  63. var message;
  64. layui.config({
  65. base: '/static/js/'
  66. }).use(['app', 'message'], function() {
  67. var app = layui.app,
  68. $ = layui.jquery,
  69. layer = layui.layer;
  70. //将message设置为全局以便子页面调用
  71. message = layui.message;
  72. //主入口
  73. app.set({
  74. type: 'iframe'
  75. }).init();
  76. });
  77. </script>
  78. </body>
  79. </html>