DmitrMakeev commited on
Commit
b23560b
·
verified ·
1 Parent(s): ff6952a

Update pages.html

Browse files
Files changed (1) hide show
  1. pages.html +156 -0
pages.html CHANGED
@@ -219,7 +219,85 @@ z-index: 1000; /* Убедитесь, что кнопка находится п
219
 
220
 
221
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
 
 
 
 
 
 
 
 
 
 
 
223
 
224
 
225
 
@@ -235,6 +313,9 @@ z-index: 1000; /* Убедитесь, что кнопка находится п
235
  <button id="toggleAppBtn" style="position: absolute; top: 10px; left: 10px;">Показать/Скрыть приложение</button>
236
  <!-- Кнопка для открытия модального окна -->
237
  <button id="myBtn" style="position: absolute; top: 30px; right: 10px;">Открыть модальное</button>
 
 
 
238
  <!-- Кнопка для проверки работы -->
239
  <button id="testBtn" style="position: absolute; top: 70px; right: 32px;">Тестовая кнопка</button>
240
  <div id="gjs" style="height: 90vh;"></div>
@@ -268,6 +349,43 @@ z-index: 1000; /* Убедитесь, что кнопка находится п
268
  </div>
269
  </div>
270
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  <script>
272
  // Инициализация GrapesJS редактора
273
  const editor = grapesjs.init({
@@ -618,6 +736,44 @@ window.onclick = function(event) {
618
  }
619
  </script>
620
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
621
  <script>
622
  document.addEventListener('DOMContentLoaded', () => {
623
  console.log('DOMContentLoaded выполнен');
 
219
 
220
 
221
 
222
+ <style>
223
+ /* Модальный (фон) */
224
+ .modal_2 {
225
+ display: none; /* Скрыто по умолчанию */
226
+ position: fixed; /* Оставаться на месте */
227
+ z-index: 10; /* Сидеть на вершине */
228
+ padding-top: 100px; /* Расположение коробки */
229
+ left: 0;
230
+ top: 0;
231
+ width: 100%; /* Полная ширина */
232
+ height: 100%; /* Полная высота */
233
+ overflow: auto; /* Включите прокрутку, если это необходимо */
234
+ background-color: rgb(0,0,0); /* Цвет запасной вариант */
235
+ background-color: rgba(0,0,0,0.4); /*Черный с непрозрачностью */
236
+ }
237
+
238
+ /* Модальное содержание */
239
+ .modal-content_2 {
240
+ position: relative;
241
+ background-color: #fefefe;
242
+ margin: auto;
243
+ padding: 0;
244
+ border: 1px solid #888;
245
+ width: 60%;
246
+ box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
247
+ -webkit-animation-name: animatetop_2;
248
+ -webkit-animation-duration: 0.4s;
249
+ animation-name: animatetop_2;
250
+ animation-duration: 0.4s
251
+ }
252
+
253
+ /* Добавить анимацию */
254
+ @-webkit-keyframes animatetop_2 {
255
+ from {top:-300px; opacity:0}
256
+ to {top:0; opacity:1}
257
+ }
258
+ @keyframes animatetop_2 {
259
+ from {top:-300px; opacity:0}
260
+ to {top:0; opacity:1}
261
+ }
262
+
263
+ /* Кнопка закрытия */
264
+ .close_2 {
265
+ color: white;
266
+ float: right;
267
+ font-size: 28px;
268
+ font-weight: bold;
269
+ }
270
+ .close_2:hover,
271
+ .close_2:focus {
272
+ color: #000;
273
+ text-decoration: none;
274
+ cursor: pointer;
275
+ }
276
+
277
+ .modal-header_2 {
278
+ padding: 2px 16px;
279
+ background-color: green;
280
+ color: white;
281
+ }
282
+
283
+ .modal-body_2 {padding: 2px 16px;}
284
+
285
+ .modal-footer_2 {
286
+ padding: 2px 16px;
287
+ background-color: green;
288
+ color: white;
289
+ }
290
 
291
+ #gjs {
292
+ position: absolute;
293
+ left: 0;
294
+ transition: left 0.3s ease;
295
+ }
296
+
297
+ #toggleAppBtn {
298
+ z-index: 1000; /* Убедитесь, что кнопка находится поверх других элементов */
299
+ }
300
+ </style>
301
 
302
 
303
 
 
313
  <button id="toggleAppBtn" style="position: absolute; top: 10px; left: 10px;">Показать/Скрыть приложение</button>
314
  <!-- Кнопка для открытия модального окна -->
315
  <button id="myBtn" style="position: absolute; top: 30px; right: 10px;">Открыть модальное</button>
316
+
317
+ <button id="myBtn_2" style="position: absolute; top: 50px; right: 10px;">Открыть модальное_2</button>
318
+
319
  <!-- Кнопка для проверки работы -->
320
  <button id="testBtn" style="position: absolute; top: 70px; right: 32px;">Тестовая кнопка</button>
321
  <div id="gjs" style="height: 90vh;"></div>
 
349
  </div>
350
  </div>
351
  </div>
352
+
353
+
354
+
355
+
356
+ <!-- The Modal_2 -->
357
+ <div id="myModal_2" class="modal_2">
358
+ <!-- Модальное содержание -->
359
+ <div class="modal-content_2">
360
+ <div class="modal-header_2">
361
+ <span class="close_2">&times;</span>
362
+ <h2>HTMLешка</h2>
363
+ </div>
364
+ <div class="modal-body_2">
365
+ <p>Некоторый текст в модальном теле</p>
366
+
367
+ <div id="progressBarContainer">
368
+ <div id="progressBar">0%</div>
369
+ </div>
370
+ <div id="imageUrl" onclick="copyToClipboard(this)">Кликните после загрузки, для получения ссылки на страницу.</div>
371
+ <form id="uploadForm" enctype="multipart/form-data" method="post" action="/up_page">
372
+ <input type="file" name="file" accept=".html">
373
+ <input type="text" name="filename" placeholder="имя файла(маршрут)">
374
+ <button type="submit">Загрузить</button>
375
+ </form>
376
+
377
+ <br><br><br>
378
+ </div>
379
+ <div class="modal-footer_2">
380
+ <h3>Добавление HTML файла с пользовательским маршрутом.</h3>
381
+ </div>
382
+ </div>
383
+ </div>
384
+
385
+
386
+
387
+
388
+
389
  <script>
390
  // Инициализация GrapesJS редактора
391
  const editor = grapesjs.init({
 
736
  }
737
  </script>
738
 
739
+
740
+ <script>
741
+ // Get the modal_2
742
+ var modal_2 = document.getElementById("myModal_2");
743
+
744
+ // Get the button that opens the modal
745
+ var btn_2 = document.getElementById("myBtn_2");
746
+
747
+ // Get the <span> element that closes the modal
748
+ var span_2 = document.getElementsByClassName("close_2")[0];
749
+
750
+ // When the user clicks the button, open the modal
751
+ btn_2.onclick = function() {
752
+ modal_2.style.display = "block";
753
+ }
754
+
755
+ // When the user clicks on <span> (x), close the modal
756
+ span_2.onclick = function() {
757
+ modal_2.style.display = "none";
758
+ }
759
+
760
+ // When the user clicks anywhere outside of the modal, close it
761
+ window.onclick = function(event) {
762
+ if (event.target == modal_2) {
763
+ modal_2.style.display = "none";
764
+ }
765
+ }
766
+ </script>
767
+
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
  <script>
778
  document.addEventListener('DOMContentLoaded', () => {
779
  console.log('DOMContentLoaded выполнен');