ace_page.blade.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
  6. {{-- 默认使用谷歌浏览器内核--}}
  7. <meta name="renderer" content="webkit">
  8. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  9. <title>@if(! empty($header)){{ $header }} | @endif {{ Dcat\Admin\Admin::title() }}</title>
  10. @if(! config('admin.disable_no_referrer_meta'))
  11. <meta name="referrer" content="no-referrer"/>
  12. @endif
  13. @if(! empty($favicon = Dcat\Admin\Admin::favicon()))
  14. <link rel="shortcut icon" href="{{ $favicon }}">
  15. @endif
  16. {!! admin_section(Dcat\Admin\Admin::SECTION['HEAD']) !!}
  17. {!! Dcat\Admin\Admin::asset()->headerJsToHtml() !!}
  18. {!! Dcat\Admin\Admin::asset()->cssToHtml() !!}
  19. </head>
  20. <body
  21. class="dcat-admin-body sidebar-mini layout-fixed {{ $configData['body_class']}} {{ $configData['sidebar_class'] }}
  22. {{ $configData['navbar_class'] === 'fixed-top' ? 'navbar-fixed-top' : '' }} " >
  23. <script>
  24. var Dcat = CreateDcat({!! Dcat\Admin\Admin::jsVariables() !!});
  25. </script>
  26. {!! admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_BEFORE']) !!}
  27. <div class="container-fluid">
  28. @yield('app')
  29. </div>
  30. {!! admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_AFTER']) !!}
  31. {!! Dcat\Admin\Admin::asset()->jsToHtml() !!}
  32. <script>
  33. Dcat.ready(function () {
  34. var clipboard = new ClipboardJS('.copy');
  35. clipboard.on('success', function(e) {
  36. e.clearSelection();
  37. layer.msg('已复制');
  38. });
  39. clipboard.on('error', function(e) {
  40. e.clearSelection();
  41. layer.msg('复制内容失败');
  42. });
  43. /**
  44. * 全屏
  45. */
  46. $('body').on('click', '[data-check-screen]', function () {
  47. var check = $(this).attr('data-check-screen');
  48. if (check == 'full') {
  49. openFullscreen();
  50. $(this).attr('data-check-screen', 'exit');
  51. $(this).html('<i class="feather icon-minimize"</i>');
  52. } else {
  53. closeFullscreen();
  54. $(this).attr('data-check-screen', 'full');
  55. $(this).html('<i class="feather icon-maximize"></i>');
  56. }
  57. });
  58. // 进入全屏
  59. function openFullscreen() {
  60. var elem = document.documentElement;
  61. if (elem.requestFullscreen) {
  62. elem.requestFullscreen();
  63. } else if (elem.mozRequestFullScreen) { /* Firefox */
  64. elem.mozRequestFullScreen();
  65. } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
  66. elem.webkitRequestFullscreen();
  67. } else if (elem.msRequestFullscreen) { /* IE/Edge */
  68. elem.msRequestFullscreen();
  69. }
  70. }
  71. // 退出全屏
  72. function closeFullscreen() {
  73. if (document.exitFullscreen) {
  74. document.exitFullscreen();
  75. } else if (document.mozCancelFullScreen) { /* Firefox */
  76. document.mozCancelFullScreen();
  77. } else if (document.webkitExitFullscreen) { /* Chrome, Safari and Opera */
  78. document.webkitExitFullscreen();
  79. } else if (document.msExitFullscreen) { /* IE/Edge */
  80. document.msExitFullscreen();
  81. }
  82. }
  83. })
  84. Dcat.boot();
  85. </script>
  86. </body>
  87. </html>