Spaces:
Running

File size: 2,755 Bytes
c224ffb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6576277
c224ffb
 
6576277
c224ffb
 
 
 
6576277
 
 
 
c224ffb
6576277
 
 
 
 
 
 
c224ffb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
class LoadingScreen extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        :host {
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background: #111827;
          z-index: 9999;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          transition: opacity 0.5s ease;
        }
        .logo {
          font-size: 3.5rem;
          font-weight: 900;
          margin-bottom: 2rem;
          background: linear-gradient(90deg, #f59e0b, #ffffff, #fbbf24);
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          opacity: 0;
          transform: translateY(20px);
          animation: 
            fadeIn 0.8s ease forwards 0.3s,
            textGlow 2s ease infinite 1s;
          text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
        }

        @keyframes textGlow {
          0% { text-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }
          50% { text-shadow: 0 0 20px rgba(245, 158, 11, 0.6); }
          100% { text-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }
        }
.progress-container {
          width: 300px;
          height: 3px;
          background: rgba(255, 255, 255, 0.1);
          border-radius: 3px;
          overflow: hidden;
        }
        
        .progress-bar {
          height: 100%;
          width: 0;
          background: linear-gradient(90deg, #f59e0b, #fbbf24);
          transition: width 0.3s ease;
        }
        
        .message {
          margin-top: 1rem;
          color: #fbbf24;
          font-size: 0.9rem;
          opacity: 0;
          animation: fadeIn 0.5s ease forwards 0.6s;
        }
        
        @keyframes fadeIn {
          to {
            opacity: 1;
            transform: translateY(0);
          }
        }
      </style>
      <div class="logo">OG ENCRO</div>
      <div class="progress-container">
        <div class="progress-bar"></div>
      </div>
      <div class="message">Laster eksklusivt innhold...</div>
    `;
    
    // Simulate loading progress
    const progressBar = this.shadowRoot.querySelector('.progress-bar');
    let progress = 0;
    const interval = setInterval(() => {
      progress += Math.random() * 10;
      progressBar.style.width = `${Math.min(progress, 100)}%`;
      
      if (progress >= 100) {
        clearInterval(interval);
        setTimeout(() => {
          this.style.opacity = '0';
          setTimeout(() => {
            this.remove();
          }, 500);
        }, 300);
      }
    }, 100);
  }
}
customElements.define('loading-screen', LoadingScreen);