index.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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.ROOT_URL = '__ROOT__';</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 class="padding-left-5">{: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 $oneMenu}
  35. <li class="layui-nav-item">
  36. <a data-menu-node="m-{$oneMenu.id}" data-open="{$oneMenu.url}">
  37. {notempty name='oneMenu.icon'}<span class='{$oneMenu.icon} padding-right-5'></span>{/notempty}
  38. <span>{$oneMenu.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. {notempty name='Think.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 margin-right-5"></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 margin-right-5"></i>安全设置</a></dd>
  50. {if auth('admin/index/buildoptimize')}
  51. <dd lay-unselect><a data-modal="{:url('admin/index/buildOptimize')}"><i class="layui-icon layui-icon-template-1 margin-right-5"></i>压缩发布</a></dd>
  52. {/if}
  53. {if auth('admin/index/clearruntime')}
  54. <dd lay-unselect><a data-modal="{:url('admin/index/clearRuntime')}"><i class="layui-icon layui-icon-fonts-clear margin-right-5"></i>清理缓存</a></dd>
  55. {/if}
  56. {notempty name='GLOBALS.AdminUserRightOption'}{foreach $GLOBALS.AdminUserRightOption as $option}{if auth($option.node)}
  57. <dd lay-unselect><a data-{$option.type}="{$option.action}"><i class="{$option.icon} margin-right-5"></i>{$option.title}</a></dd>
  58. {/if}{/foreach}{/notempty}
  59. <dd lay-unselect><a data-confirm="确定要退出登录吗?" data-load="{:url('admin/login/out')}"><i class="layui-icon layui-icon-release margin-right-5"></i>退出登录</a></dd>
  60. </dl>
  61. <a><span><i class="layui-icon layui-icon-username margin-right-5"></i> {:session('user.username')}</span></a>
  62. </li>
  63. {else}
  64. <li class="layui-nav-item">
  65. <a data-href="{:url('@admin/login')}"><i class="layui-icon layui-icon-username"></i> 立即登录</a>
  66. </li>
  67. {/notempty}
  68. </ul>
  69. </div>
  70. <!-- 顶部菜单 结束 -->
  71. <!-- 左则菜单 开始 -->
  72. <div class="layui-side layui-bg-black notselect">
  73. <div class="layui-side-scroll">
  74. {foreach $menus as $oneMenu}
  75. {notempty name='oneMenu.sub'}
  76. <ul class="layui-nav layui-nav-tree layui-hide" data-menu-layout="m-{$oneMenu.id}">
  77. {foreach $oneMenu.sub as $twoMenu}
  78. {empty name='twoMenu.sub'}
  79. <li class="layui-nav-item">
  80. <a data-target-tips="{$twoMenu.title}" data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}" data-open="{$twoMenu.url}">
  81. <span class='{$twoMenu.icon|default="layui-icon layui-icon-link"}'></span>
  82. <span class="nav-text padding-left-5">{$twoMenu.title}</span>
  83. </a>
  84. </li>
  85. {else}
  86. <li class="layui-nav-item" data-submenu-layout='m-{$oneMenu.id}-{$twoMenu.id}'>
  87. <a data-target-tips="{$twoMenu.title}" style="background:#393D49">
  88. <span class='nav-icon layui-hide {$twoMenu.icon|default="layui-icon layui-icon-triangle-d"}'></span>
  89. <span class="nav-text padding-left-5">{$twoMenu.title}</span>
  90. </a>
  91. <dl class="layui-nav-child">
  92. {foreach $twoMenu.sub as $thrMenu}
  93. <dd>
  94. <a data-target-tips="{$thrMenu.title}" data-open="{$thrMenu.url}" data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}-{$thrMenu.id}">
  95. <span class='nav-icon padding-left-5 {$thrMenu.icon|default="layui-icon layui-icon-link"}'></span>
  96. <span class="nav-text padding-left-5">{$thrMenu.title}</span>
  97. </a>
  98. </dd>
  99. {/foreach}
  100. </dl>
  101. </li>
  102. {/empty}
  103. {/foreach}
  104. </ul>
  105. {/notempty}
  106. {/foreach}
  107. </div>
  108. </div>
  109. <!-- 左则菜单 结束 -->
  110. <!-- 主体内容 开始 -->
  111. <div class="layui-body layui-bg-gray">{block name='content'}{/block}</div>
  112. <!-- 主体内容 结束 -->
  113. </div>
  114. {/block}
  115. <script src="__ROOT__/static/plugs/layui/layui.all.js"></script>
  116. <script src="__ROOT__/static/plugs/require/require.js"></script>
  117. <script src="__ROOT__/static/admin.js"></script>
  118. {block name='script'}{/block}
  119. </body>
  120. </html>