ventBox1.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <div class="vent-box1-bg">
  3. <div class="box1-top">
  4. <div class="title">
  5. <slot name="title"></slot>
  6. </div>
  7. </div>
  8. <div class="box1-center">
  9. <div class="box-container">
  10. <slot name="container"></slot>
  11. </div>
  12. </div>
  13. <div class="box1-bottom"></div>
  14. </div>
  15. </template>
  16. <script>
  17. import { defineComponent } from 'vue';
  18. export default defineComponent({
  19. name: 'VentBox1',
  20. setup() {},
  21. });
  22. </script>
  23. <style lang="less" scoped>
  24. @import '/@/design/theme.less';
  25. @{theme-green} {
  26. .vent-box1-bg {
  27. --image-box1-top: url(/@/assets/images/themify/green/vent/border/box-top.png);
  28. --image-box1-bottom: url('/@/assets/images/themify/green/vent/border/box-bottom.png');
  29. // --container-color: #1e2932;
  30. --container-image: linear-gradient(#3df6ff00, #308972, #3df6ff00);
  31. }
  32. // .box1-center {
  33. // height: calc(100% - 37px);
  34. // clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  35. // }
  36. }
  37. @{theme-deepblue} {
  38. .vent-box1-bg {
  39. --image-box1-top: url('/@/assets/images/themify/deepblue/vent/border/box2-top.png');
  40. --image-box1-bottom: none;
  41. // --image-box1-bottom: url('/@/assets/images/themify/deepblue/vent/border/box1-bottom.png');
  42. --container-color: #0e223b;
  43. // --container-image: linear-gradient(#3df6ff00, #2c3f59, #3df6ff00);
  44. --container-image: none;
  45. }
  46. .vent-box1-bg {
  47. border: 1px solid #3a4b5f;
  48. border-radius: 10px;
  49. background: var(--container-color) no-repeat;
  50. padding-top: 5px;
  51. .box1-top {
  52. height: 35px;
  53. background: var(--image-box1-top) no-repeat;
  54. background-size: 94% 25px;
  55. background-position: center center;
  56. margin-bottom: 5px;
  57. .title {
  58. height: 100%;
  59. padding-left: 8%;
  60. justify-content: flex-start;
  61. align-items: center;
  62. }
  63. }
  64. }
  65. }
  66. .vent-box1-bg {
  67. --image-box1-top: url('/@/assets/images/vent/border/box1-top.png');
  68. --image-box1-bottom: url('/@/assets/images/vent/border/box1-bottom.png');
  69. --container-color: #00213236;
  70. --container-image: linear-gradient(#3df6ff00, #3df6ff, #3df6ff00);
  71. width: 100%;
  72. min-height: 80px;
  73. position: relative;
  74. overflow-x: hidden;
  75. .box1-top {
  76. width: 100%;
  77. height: 35px;
  78. background: var(--image-box1-top) no-repeat;
  79. background-size: 100% 100%;
  80. .title {
  81. width: 100%;
  82. height: 35px;
  83. display: flex;
  84. justify-content: center;
  85. align-items: center;
  86. color: #fff;
  87. }
  88. }
  89. .box1-center {
  90. width: calc(100% + 0.5px);
  91. position: relative;
  92. .box-container {
  93. width: calc(100% - 2px);
  94. min-height: 50px;
  95. // position: relative;
  96. padding: 10px;
  97. color: #fff;
  98. // background-color: #0097ff05;
  99. background-color: var(--container-color);
  100. backdrop-filter: blur(5px);
  101. &::before {
  102. content: '';
  103. display: block;
  104. position: absolute;
  105. top: 5px;
  106. left: 0;
  107. width: 1px;
  108. height: calc(100% - 10px);
  109. background-image: var(--container-image);
  110. }
  111. &::after {
  112. content: '';
  113. display: block;
  114. position: absolute;
  115. right: 0;
  116. top: 5px;
  117. width: 1px;
  118. height: calc(100% - 10px);
  119. background: var(--container-image);
  120. }
  121. }
  122. }
  123. .box1-bottom {
  124. width: 100%;
  125. height: 35px;
  126. background: var(--image-box1-bottom) no-repeat;
  127. background-size: 100% 100%;
  128. position: absolute;
  129. bottom: 0px;
  130. z-index: 1;
  131. pointer-events: none;
  132. }
  133. }
  134. </style>