index.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <title>{block name="title"}{$title|default=''}{if !empty($title)} · {/if}{:sysconf('site_name')}{/block}</title>
  5. <meta charset="utf-8">
  6. <meta name="renderer" content="webkit">
  7. <meta name="format-detection" content="telephone=no">
  8. <meta name="apple-mobile-web-app-capable" content="yes">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  11. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=0.4">
  12. <link rel="shortcut icon" href="{:sysconf('site_icon')}">
  13. <link rel="stylesheet" href="__ROOT__/static/plugs/awesome/fonts.css?at={:date('md')}">
  14. <link rel="stylesheet" href="__ROOT__/static/plugs/layui/css/layui.css?at={:date('md')}">
  15. <link rel="stylesheet" href="__ROOT__/static/theme/css/console.css?at={:date('md')}">
  16. {block name="style"}{/block}
  17. <script>window.tapiRoot = '{:sysuri("admin/index/index",[],false)}'</script>
  18. <script src="__ROOT__/static/plugs/jquery/pace.min.js"></script>
  19. </head>
  20. <body class="layui-layout-body">
  21. {block name='body'}
  22. <div class="layui-layout layui-layout-admin layui-layout-left-hide">
  23. <!-- 顶部菜单 开始 -->
  24. <div class="layui-header notselect">
  25. <a href="{:url('@')}" class="layui-logo layui-elip">
  26. {:sysconf('app_name')} {if sysconf('app_version')}<sup>{:sysconf('app_version')}</sup>{/if}
  27. </a>
  28. <ul class="layui-nav layui-layout-left">
  29. <li class="layui-nav-item" lay-unselect>
  30. <a class="text-center" data-target-menu-type>
  31. <i class="layui-icon layui-icon-spread-left"></i>
  32. </a>
  33. </li>
  34. {foreach $menus as $one}
  35. <li class="layui-nav-item">
  36. <a data-menu-node="m-{$one.id}" data-open="{$one.url}">
  37. {notempty name='one.icon'}<span class='{$one.icon} padding-right-5'></span>{/notempty}
  38. <span>{$one.title|default=''}</span>
  39. </a>
  40. </li>
  41. {/foreach}
  42. </ul>
  43. <ul class="layui-nav layui-layout-right">
  44. <li lay-unselect class="layui-nav-item"><a data-reload><i class="layui-icon layui-icon-refresh-3"></i></a></li>
  45. {if session('user.username')}
  46. <li class="layui-nav-item">
  47. <dl class="layui-nav-child">
  48. <dd lay-unselect><a data-modal="{:url('admin/index/info',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-set-fill"></i> 基本资料</a></dd>
  49. <dd lay-unselect><a data-modal="{:url('admin/index/pass',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-component"></i> 安全设置</a></dd>
  50. {if session('user.username') eq 'admin'}
  51. <dd lay-unselect><a data-load="{:url('admin/api.plugs/pushRuntime')}"><i class="layui-icon layui-icon-template-1"></i> 缓存加速</a></dd>
  52. <dd lay-unselect><a data-load="{:url('admin/api.plugs/clearRuntime')}"><i class="layui-icon layui-icon-fonts-clear"></i> 清理缓存</a></dd>
  53. {/if}
  54. <dd lay-unselect><a data-load="{:url('admin/login/out')}" data-confirm="确定要退出登录吗?"><i class="layui-icon layui-icon-release"></i> 退出登录</a></dd>
  55. </dl>
  56. <a class="layui-elip">
  57. <img alt=" " onerror="this.src='__ROOT__/static/theme/img/headimg.png'" src="{:htmlentities(session('user.headimg'))}">
  58. <span>{:htmlentities(session('user.nickname')?:session('user.username'))}</span>
  59. </a>
  60. </li>
  61. {else}
  62. <li class="layui-nav-item">
  63. <a data-href="{:sysuri('admin/login/index')}"><i class="layui-icon layui-icon-username"></i> 立即登录</a>
  64. </li>
  65. {/if}
  66. </ul>
  67. </div>
  68. <!-- 顶部菜单 结束 -->
  69. <!-- 左则菜单 开始 -->
  70. <div class="layui-side layui-bg-black notselect">
  71. <div class="layui-side-scroll">
  72. {foreach $menus as $one}{notempty name='one.sub'}
  73. <ul class="layui-nav layui-nav-tree layui-hide" data-menu-layout="m-{$one.id}">
  74. {foreach $one.sub as $two}{empty name='two.sub'}
  75. <li class="layui-nav-item">
  76. <a data-target-tips="{$two.title}" data-menu-node="m-{$one.id}-{$two.id}" data-open="{$two.url}">
  77. <span class='{$two.icon|default="layui-icon layui-icon-link"}'></span>
  78. <span class="nav-text">{$two.title|default=''}</span>
  79. </a>
  80. </li>
  81. {else}
  82. <li class="layui-nav-item" data-submenu-layout='m-{$one.id}-{$two.id}'>
  83. <a data-target-tips="{$two.title}" style="background:#393D49">
  84. <span class='nav-icon layui-hide {$two.icon|default="layui-icon layui-icon-triangle-d"}'></span>
  85. <span class="nav-text">{$two.title|default=''}</span>
  86. </a>
  87. <dl class="layui-nav-child">
  88. {foreach $two.sub as $thr}
  89. <dd>
  90. <a data-target-tips="{$thr.title}" data-open="{$thr.url}" data-menu-node="m-{$one.id}-{$two.id}-{$thr.id}">
  91. <span class='nav-icon {$thr.icon|default="layui-icon layui-icon-link"}'></span>
  92. <span class="nav-text">{$thr.title|default=''}</span>
  93. </a>
  94. </dd>
  95. {/foreach}
  96. </dl>
  97. </li>
  98. {/empty}{/foreach}
  99. </ul>
  100. {/notempty}{/foreach}
  101. </div>
  102. </div>
  103. <!-- 左则菜单 结束 -->
  104. <!-- 主体内容 开始 -->
  105. <div class="layui-body layui-bg-gray">{block name='content'}{/block}</div>
  106. <!-- 主体内容 结束 -->
  107. </div>
  108. {/block}
  109. <script src="__ROOT__/static/plugs/layui/layui.all.js"></script>
  110. <script src="__ROOT__/static/plugs/require/require.js"></script>
  111. <script src="__ROOT__/static/admin.js"></script>
  112. {block name='script'}{/block}
  113. </body>
  114. </html>