|
70 | 70 | }
|
71 | 71 | </script>
|
72 | 72 |
|
| 73 | +<style> |
| 74 | + .text-wrap { |
| 75 | + white-space: pre-wrap; /* Beibehaltung von Zeilenumbrüchen und Umbruch von langen Zeilen */ |
| 76 | + word-wrap: break-word; /* Ermöglicht den Umbruch in langen Wörtern */ |
| 77 | + overflow-wrap: break-word; /* Für zusätzliche Browserkompatibilität */ |
| 78 | + } |
| 79 | + .modal-background { |
| 80 | + position: fixed; /* Fixiert das Modal in der Ansicht */ |
| 81 | + top: 0; |
| 82 | + left: 0; |
| 83 | + right: 0; /* Füllt die gesamte Breite */ |
| 84 | + bottom: 0; /* Füllt die gesamte Höhe */ |
| 85 | + display: flex; /* Flexbox benutzen */ |
| 86 | + align-items: center; /* Vertikal zentrieren */ |
| 87 | + justify-content: center; /* Horizontal zentrieren */ |
| 88 | + background-color: rgba(0, 0, 0, 0.5); /* Dunkler Hintergrund für das Modal */ |
| 89 | + } |
| 90 | +
|
| 91 | + .modal-content { |
| 92 | + /* max-width: 600px; Maximale Breite des Modals */ |
| 93 | + width: 70%; /* Breite des Modals */ |
| 94 | + background: white; /* Hintergrundfarbe des Modals */ |
| 95 | + border-radius: 8px; /* Abgerundete Ecken */ |
| 96 | + padding: 20px; /* Innenabstand */ |
| 97 | + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Schatten für das Modal */ |
| 98 | + } |
| 99 | +</style> |
| 100 | + |
73 | 101 | {#if data.resources.length == 0}
|
74 | 102 | <StarterHint type="assessment results" icon={QueueList}>
|
75 | 103 | <span slot="component">Clouditor Assessment component</span>
|
|
130 | 158 | {#each currentData as assessment}
|
131 | 159 | {#if showModalId == assessment.id}
|
132 | 160 | <tr>
|
133 |
| - <div |
134 |
| - class=" inset-0 flex max-w-80 items-center justify-center bg-gray-100 bg-opacity-75" |
135 |
| - > |
136 |
| - <div class="rounded bg-white p-6 shadow-lg"> |
137 |
| - <pre class="overflow-y-auto rounded bg-gray-100 p-4">{JSON.stringify( |
138 |
| - assessment, |
139 |
| - null, |
140 |
| - 5 |
141 |
| - )}</pre> |
| 161 | + <div class="modal-background" > |
| 162 | + <div class="modal-content"> |
| 163 | + <pre class="overflow-y-auto rounded bg-gray-100 p-4 text-wrap"> |
| 164 | + {JSON.stringify(assessment,null,5)} |
| 165 | + </pre> |
142 | 166 | <Button on:click={closeModal} class="mt-2">Close</Button>
|
143 | 167 | </div>
|
144 | 168 | </div>
|
|
0 commit comments