container.blade.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <body
  2. class="dcat-admin-body sidebar-mini layout-fixed {{ $configData['body_class']}} {{ $configData['sidebar_class'] }}
  3. {{ $configData['navbar_class'] === 'fixed-top' ? 'navbar-fixed-top' : '' }} " >
  4. <script>
  5. var Dcat = CreateDcat({!! Dcat\Admin\Admin::jsVariables() !!});
  6. </script>
  7. {!! admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_BEFORE']) !!}
  8. <div class="wrapper">
  9. @include('admin::partials.sidebar')
  10. @include('admin::partials.navbar')
  11. <div class="app-content content">
  12. <div class="content-wrapper" id="{{ $pjaxContainerId }}" style="top: 0;min-height: 900px;">
  13. @yield('app')
  14. </div>
  15. </div>
  16. </div>
  17. <footer class="main-footer pt-1">
  18. <p class="clearfix blue-grey lighten-2 mb-0 text-center">
  19. <span class="text-center d-block d-md-inline-block mt-25">
  20. Powered by
  21. <a target="_blank" href="https://github.com/ycookies/dcat-plus-admin">Dcat-plus Admin (速码邦)</a>
  22. <span>&nbsp;·&nbsp;</span>
  23. {{ \Dcat\Admin\Support\Helper::getPackageVersion('dcat-plus/laravel-admin') }}
  24. </span>
  25. <button class="btn btn-primary btn-icon scroll-top pull-right" style="position: fixed;bottom: 2%; right: 10px;display: none">
  26. <i class="feather icon-arrow-up"></i>
  27. </button>
  28. </p>
  29. </footer>
  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>