container.blade.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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('distributor.partials.sidebar')
  10. @include('distributor.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 Mietubl
  21. </span>
  22. <button class="btn btn-primary btn-icon scroll-top pull-right" style="position: fixed;bottom: 2%; right: 10px;display: none">
  23. <i class="feather icon-arrow-up"></i>
  24. </button>
  25. </p>
  26. </footer>
  27. {!! admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_AFTER']) !!}
  28. {!! Dcat\Admin\Admin::asset()->jsToHtml() !!}
  29. <script>
  30. Dcat.ready(function () {
  31. var clipboard = new ClipboardJS('.copy');
  32. clipboard.on('success', function(e) {
  33. e.clearSelection();
  34. layer.msg('已复制');
  35. });
  36. clipboard.on('error', function(e) {
  37. e.clearSelection();
  38. layer.msg('复制内容失败');
  39. });
  40. /**
  41. * 全屏
  42. */
  43. $('body').on('click', '[data-check-screen]', function () {
  44. var check = $(this).attr('data-check-screen');
  45. if (check == 'full') {
  46. openFullscreen();
  47. $(this).attr('data-check-screen', 'exit');
  48. $(this).html('<i class="feather icon-minimize"</i>');
  49. } else {
  50. closeFullscreen();
  51. $(this).attr('data-check-screen', 'full');
  52. $(this).html('<i class="feather icon-maximize"></i>');
  53. }
  54. });
  55. // 进入全屏
  56. function openFullscreen() {
  57. var elem = document.documentElement;
  58. if (elem.requestFullscreen) {
  59. elem.requestFullscreen();
  60. } else if (elem.mozRequestFullScreen) { /* Firefox */
  61. elem.mozRequestFullScreen();
  62. } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
  63. elem.webkitRequestFullscreen();
  64. } else if (elem.msRequestFullscreen) { /* IE/Edge */
  65. elem.msRequestFullscreen();
  66. }
  67. }
  68. // 退出全屏
  69. function closeFullscreen() {
  70. if (document.exitFullscreen) {
  71. document.exitFullscreen();
  72. } else if (document.mozCancelFullScreen) { /* Firefox */
  73. document.mozCancelFullScreen();
  74. } else if (document.webkitExitFullscreen) { /* Chrome, Safari and Opera */
  75. document.webkitExitFullscreen();
  76. } else if (document.msExitFullscreen) { /* IE/Edge */
  77. document.msExitFullscreen();
  78. }
  79. }
  80. })
  81. Dcat.boot();
  82. </script>
  83. </body>
  84. </html>