soiz1 commited on
Commit
a0dc52e
·
verified ·
1 Parent(s): 7d5486e

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +226 -111
index.html CHANGED
@@ -9,7 +9,7 @@
9
  <link href="https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c&display=swap" rel="stylesheet">
10
  <link rel="icon" href="icon.png" type="image/png">
11
  <style>
12
- body {
13
  display: flex;
14
  flex-direction: column;
15
  align-items: center;
@@ -323,126 +323,241 @@
323
  opacity: 0;
324
  }
325
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  </style>
327
  </head>
328
 
329
  <body>
 
 
 
 
 
 
 
 
 
 
 
 
330
  <div id="ripple-container">
331
  </div>
332
  <script>
333
- document.addEventListener('DOMContentLoaded', function() {
334
- const container = document.getElementById('ripple-container');
335
-
336
- function createRipple() {
337
- const ripple = document.createElement('div');
338
- ripple.classList.add('ripple');
339
-
340
- // ランダムな位置
341
- const posX = Math.random() * 100;
342
- const posY = Math.random() * 100;
343
-
344
- // ランダムなサイズとアニメーション時間
345
- const maxSize = 400 + Math.random() * 500;
346
- const duration = 3 + Math.random() * 3;
347
-
348
- // 半透明の薄い水色のバリエーション
349
- const hue = 190 + Math.random() * 20 - 10; // 水色を中心に少し変化
350
- const saturation = 80 + Math.random() * 15;
351
- const lightness = 70 + Math.random() * 20;
352
- const opacity = 0.3 + Math.random() * 0.3;
353
-
354
- ripple.style.left = `${posX}%`;
355
- ripple.style.top = `${posY}%`;
356
- ripple.style.borderColor = `hsla(${hue}, ${saturation}%, ${lightness}%, ${opacity})`;
357
- ripple.style.animationDuration = `${duration}s`;
358
-
359
- // キーフレームを動的に変更
360
- const animationName = `ripple-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
361
- ripple.style.animationName = animationName;
362
-
363
- const style = document.createElement('style');
364
- style.innerHTML = `
365
- @keyframes ${animationName} {
366
- 0% {
367
- width: 0;
368
- height: 0;
369
- opacity: ${opacity};
370
- }
371
- 100% {
372
- width: ${maxSize}px;
373
- height: ${maxSize}px;
374
- opacity: 0;
375
- }
376
- }
377
- `;
378
- document.head.appendChild(style);
379
-
380
- container.appendChild(ripple);
381
-
382
- // アニメーション終了後に要素を削除
383
- ripple.addEventListener('animationend', function() {
384
- ripple.remove();
385
- style.remove();
386
- });
387
- }
388
-
389
- // 最初の波紋をいくつか作成
390
- for (let i = 0; i < 8; i++) {
391
- setTimeout(createRipple, i * 600);
392
  }
393
-
394
- // 定期的に新しい波紋を作成
395
- setInterval(createRipple, 1200);
396
-
397
- // クリックでも波紋を作成
398
- document.addEventListener('click', function(e) {
399
- createRippleAtPosition(e.clientX, e.clientY);
400
- });
401
-
402
- function createRippleAtPosition(x, y) {
403
- const ripple = document.createElement('div');
404
- ripple.classList.add('ripple');
405
-
406
- const maxSize = 400 + Math.random() * 500;
407
- const duration = 3 + Math.random() * 3;
408
- const hue = 190 + Math.random() * 20 - 10;
409
- const saturation = 80 + Math.random() * 15;
410
- const lightness = 70 + Math.random() * 20;
411
- const opacity = 0.3 + Math.random() * 0.3;
412
-
413
- ripple.style.left = `${x}px`;
414
- ripple.style.top = `${y}px`;
415
- ripple.style.borderColor = `hsla(${hue}, ${saturation}%, ${lightness}%, ${opacity})`;
416
- ripple.style.animationDuration = `${duration}s`;
417
-
418
- const animationName = `ripple-click-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
419
- ripple.style.animationName = animationName;
420
-
421
- const style = document.createElement('style');
422
- style.innerHTML = `
423
- @keyframes ${animationName} {
424
- 0% {
425
- width: 0;
426
- height: 0;
427
- opacity: ${opacity};
428
- }
429
- 100% {
430
- width: ${maxSize}px;
431
- height: ${maxSize}px;
432
- opacity: 0;
433
- }
434
- }
435
- `;
436
- document.head.appendChild(style);
437
-
438
- container.appendChild(ripple);
439
-
440
- ripple.addEventListener('animationend', function() {
441
- ripple.remove();
442
- style.remove();
443
- });
 
 
 
 
 
 
444
  }
 
 
 
 
 
 
 
 
445
  });
 
 
446
  </script>
447
  <h1>ラジオ体操動画プレイヤー
448
  <br>For Kushihara</h1>
 
9
  <link href="https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c&display=swap" rel="stylesheet">
10
  <link rel="icon" href="icon.png" type="image/png">
11
  <style>
12
+ body {
13
  display: flex;
14
  flex-direction: column;
15
  align-items: center;
 
323
  opacity: 0;
324
  }
325
  }
326
+
327
+ /* ローディングアニメーション */
328
+ .loading-overlay {
329
+ position: fixed;
330
+ top: 0;
331
+ left: 0;
332
+ width: 100%;
333
+ height: 100%;
334
+ background-color: rgba(0, 0, 0, 0.8);
335
+ display: flex;
336
+ justify-content: center;
337
+ align-items: center;
338
+ z-index: 9999;
339
+ transition: opacity 1s ease-out;
340
+ }
341
+
342
+ .spinner-box {
343
+ width: 300px;
344
+ height: 300px;
345
+ display: flex;
346
+ justify-content: center;
347
+ align-items: center;
348
+ background-color: transparent;
349
+ }
350
+
351
+ /* 軌道スタイル */
352
+ .leo {
353
+ position: absolute;
354
+ display: flex;
355
+ justify-content: center;
356
+ align-items: center;
357
+ border-radius: 50%;
358
+ }
359
+
360
+ .blue-orbit {
361
+ width: 165px;
362
+ height: 165px;
363
+ border: 1px solid #91daffa5;
364
+ animation: spin3D 3s linear .2s infinite;
365
+ }
366
+
367
+ .green-orbit {
368
+ width: 120px;
369
+ height: 120px;
370
+ border: 1px solid #91ffbfa5;
371
+ animation: spin3D 2s linear 0s infinite;
372
+ }
373
+
374
+ .red-orbit {
375
+ width: 90px;
376
+ height: 90px;
377
+ border: 1px solid #ffca91a5;
378
+ animation: spin3D 1s linear 0s infinite;
379
+ }
380
+
381
+ .white-orbit {
382
+ width: 60px;
383
+ height: 60px;
384
+ border: 2px solid #ffffff;
385
+ animation: spin3D 10s linear 0s infinite;
386
+ }
387
+
388
+ .w1 {
389
+ transform: rotate3D(1, 1, 1, 90deg);
390
+ }
391
+
392
+ .w2 {
393
+ transform: rotate3D(1, 2, .5, 90deg);
394
+ }
395
+
396
+ .w3 {
397
+ transform: rotate3D(.5, 1, 2, 90deg);
398
+ }
399
+
400
+ /* キーフレームアニメーション */
401
+ @keyframes spin3D {
402
+ from {
403
+ transform: rotate3d(.5,.5,.5, 360deg);
404
+ }
405
+ to {
406
+ transform: rotate3d(0,0,0, 0deg);
407
+ }
408
+ }
409
+
410
+ @keyframes spin {
411
+ from {
412
+ transform: rotate(0deg);
413
+ }
414
+ to {
415
+ transform: rotate(360deg);
416
+ }
417
+ }
418
  </style>
419
  </head>
420
 
421
  <body>
422
+ <!-- ローディングオーバーレイ -->
423
+ <div class="loading-overlay" id="loadingOverlay">
424
+ <div class="spinner-box">
425
+ <div class="blue-orbit leo"></div>
426
+ <div class="green-orbit leo"></div>
427
+ <div class="red-orbit leo"></div>
428
+ <div class="white-orbit w1 leo"></div>
429
+ <div class="white-orbit w2 leo"></div>
430
+ <div class="white-orbit w3 leo"></div>
431
+ </div>
432
+ </div>
433
+
434
  <div id="ripple-container">
435
  </div>
436
  <script>
437
+ // ローディングアニメーションをフェードアウト
438
+ window.addEventListener('load', function() {
439
+ setTimeout(function() {
440
+ const loadingOverlay = document.getElementById('loadingOverlay');
441
+ loadingOverlay.style.opacity = '0';
442
+ setTimeout(function() {
443
+ loadingOverlay.style.display = 'none';
444
+ }, 1000); // フェードアウト完了後に非表示にする
445
+ }, 1500); // ページ読み込み後1.5秒でフェードアウト開始
446
+ });
447
+
448
+ document.addEventListener('DOMContentLoaded', function() {
449
+ const container = document.getElementById('ripple-container');
450
+
451
+ function createRipple() {
452
+ const ripple = document.createElement('div');
453
+ ripple.classList.add('ripple');
454
+
455
+ // ランダムな位置
456
+ const posX = Math.random() * 100;
457
+ const posY = Math.random() * 100;
458
+
459
+ // ランダムなサイズとアニメーション時間
460
+ const maxSize = 400 + Math.random() * 500;
461
+ const duration = 3 + Math.random() * 3;
462
+
463
+ // 半透明の薄い水色のバリエーション
464
+ const hue = 190 + Math.random() * 20 - 10; // 水色を中心に少し変化
465
+ const saturation = 80 + Math.random() * 15;
466
+ const lightness = 70 + Math.random() * 20;
467
+ const opacity = 0.3 + Math.random() * 0.3;
468
+
469
+ ripple.style.left = `${posX}%`;
470
+ ripple.style.top = `${posY}%`;
471
+ ripple.style.borderColor = `hsla(${hue}, ${saturation}%, ${lightness}%, ${opacity})`;
472
+ ripple.style.animationDuration = `${duration}s`;
473
+
474
+ // キーフレームを動的に変更
475
+ const animationName = `ripple-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
476
+ ripple.style.animationName = animationName;
477
+
478
+ const style = document.createElement('style');
479
+ style.innerHTML = `
480
+ @keyframes ${animationName} {
481
+ 0% {
482
+ width: 0;
483
+ height: 0;
484
+ opacity: ${opacity};
485
+ }
486
+ 100% {
487
+ width: ${maxSize}px;
488
+ height: ${maxSize}px;
489
+ opacity: 0;
490
+ }
 
 
 
 
 
491
  }
492
+ `;
493
+ document.head.appendChild(style);
494
+
495
+ container.appendChild(ripple);
496
+
497
+ // アニメーション終了後に要素を削除
498
+ ripple.addEventListener('animationend', function() {
499
+ ripple.remove();
500
+ style.remove();
501
+ });
502
+ }
503
+
504
+ // 最初の波紋をいくつか作成
505
+ for (let i = 0; i < 8; i++) {
506
+ setTimeout(createRipple, i * 600);
507
+ }
508
+
509
+ // 定期的に新しい波紋を作成
510
+ setInterval(createRipple, 1200);
511
+
512
+ // クリックでも波紋を作成
513
+ document.addEventListener('click', function(e) {
514
+ createRippleAtPosition(e.clientX, e.clientY);
515
+ });
516
+
517
+ function createRippleAtPosition(x, y) {
518
+ const ripple = document.createElement('div');
519
+ ripple.classList.add('ripple');
520
+
521
+ const maxSize = 400 + Math.random() * 500;
522
+ const duration = 3 + Math.random() * 3;
523
+ const hue = 190 + Math.random() * 20 - 10;
524
+ const saturation = 80 + Math.random() * 15;
525
+ const lightness = 70 + Math.random() * 20;
526
+ const opacity = 0.3 + Math.random() * 0.3;
527
+
528
+ ripple.style.left = `${x}px`;
529
+ ripple.style.top = `${y}px`;
530
+ ripple.style.borderColor = `hsla(${hue}, ${saturation}%, ${lightness}%, ${opacity})`;
531
+ ripple.style.animationDuration = `${duration}s`;
532
+
533
+ const animationName = `ripple-click-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
534
+ ripple.style.animationName = animationName;
535
+
536
+ const style = document.createElement('style');
537
+ style.innerHTML = `
538
+ @keyframes ${animationName} {
539
+ 0% {
540
+ width: 0;
541
+ height: 0;
542
+ opacity: ${opacity};
543
+ }
544
+ 100% {
545
+ width: ${maxSize}px;
546
+ height: ${maxSize}px;
547
+ opacity: 0;
548
+ }
549
  }
550
+ `;
551
+ document.head.appendChild(style);
552
+
553
+ container.appendChild(ripple);
554
+
555
+ ripple.addEventListener('animationend', function() {
556
+ ripple.remove();
557
+ style.remove();
558
  });
559
+ }
560
+ });
561
  </script>
562
  <h1>ラジオ体操動画プレイヤー
563
  <br>For Kushihara</h1>