No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

175 líneas
3.6 KiB

  1. <template>
  2. <div
  3. class="modal fade"
  4. id="showText"
  5. tabindex="-1"
  6. role="dialog"
  7. aria-labelledby="exampleModalLabel"
  8. aria-hidden="true"
  9. >
  10. <div class="modal-dialog modal-lg" role="document">
  11. <div class="modal-content">
  12. <div class="modal-header">
  13. <h5 class="modal-title" id="exampleModalLabel">
  14. <i class="fas fa-clipboard-list"></i> توضیح کامل
  15. </h5>
  16. <button
  17. type="button"
  18. class="btn-close"
  19. data-bs-dismiss="modal"
  20. aria-label="Close"
  21. ></button>
  22. </div>
  23. <div class="modal-body">
  24. <div class="subject-container">
  25. <textarea
  26. disabled
  27. class="subject-text"
  28. v-model="localDesc"
  29. ></textarea>
  30. </div>
  31. </div>
  32. <div class="modal-footer">
  33. <button
  34. type="button"
  35. class="btn btn-secondary"
  36. data-bs-dismiss="modal"
  37. >
  38. بستن
  39. </button>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </template>
  45. <script>
  46. import "vue3-toastify/dist/index.css";
  47. import { watch, ref } from "vue";
  48. export default {
  49. props: {
  50. desc: {
  51. type: String,
  52. required: true,
  53. },
  54. },
  55. setup(props) {
  56. const localDesc = ref();
  57. watch(
  58. () => props.desc,
  59. (newVal) => (localDesc.value = newVal)
  60. );
  61. return {
  62. localDesc,
  63. };
  64. },
  65. };
  66. </script>
  67. <style scoped>
  68. .modal-dialog {
  69. max-width: 600px; /* Larger size for better content visibility */
  70. margin-top: 10vh; /* Center vertically */
  71. }
  72. .modal-content {
  73. border-radius: 16px; /* More rounded corners */
  74. box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1); /* Larger shadow for more depth */
  75. background: linear-gradient(
  76. to bottom right,
  77. #f5f7fb,
  78. #e0e8ed
  79. ); /* Soft gradient background */
  80. }
  81. .modal-header {
  82. border-bottom: none; /* Remove default border */
  83. }
  84. .modal-title {
  85. color: #007bff;
  86. font-weight: 600;
  87. font-size: 1.75rem;
  88. display: flex;
  89. align-items: center;
  90. }
  91. .modal-title i {
  92. margin-right: 12px;
  93. font-size: 1.75rem;
  94. }
  95. .btn-close {
  96. background: none;
  97. border: none;
  98. font-size: 1.75rem;
  99. color: #007bff;
  100. transition: color 0.3s ease;
  101. }
  102. .btn-close:hover {
  103. color: #0056b3;
  104. }
  105. .modal-body {
  106. padding: 25px;
  107. }
  108. .subject-container {
  109. display: flex;
  110. align-items: center;
  111. background: #ffffff;
  112. border-radius: 12px;
  113. padding: 15px;
  114. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  115. margin-top: 10px;
  116. }
  117. .subject-container i {
  118. color: #007bff;
  119. margin-right: 15px;
  120. font-size: 1.75rem;
  121. }
  122. .subject-text {
  123. color: #333;
  124. font-weight: 500;
  125. border: 2px solid #007bff;
  126. width: 100%;
  127. height: 180px;
  128. padding: 12px;
  129. border-radius: 10px;
  130. font-size: 1rem;
  131. background-color: #f9f9f9;
  132. box-sizing: border-box;
  133. resize: none;
  134. transition: border-color 0.3s;
  135. }
  136. .subject-text:focus {
  137. border-color: #0056b3; /* Highlight border on focus */
  138. outline: none;
  139. }
  140. .modal-footer {
  141. display: flex;
  142. justify-content: flex-end;
  143. margin-top: 1.5rem;
  144. }
  145. .btn-secondary {
  146. background-color: #6c757d;
  147. color: #fff;
  148. padding: 10px 16px;
  149. border-radius: 8px;
  150. transition: background 0.3s;
  151. font-size: 1.1rem;
  152. }
  153. .btn-secondary:hover {
  154. background-color: #5a6268;
  155. }
  156. </style>