File size: 5,721 Bytes
a566fb0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="https://base44.com/logo_v2.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="manifest" href="/manifest.json" />
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.jsx"></script>
  </body>
</html>





<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Class Entry</title>
  <style>

    :root{

      --bg1:#0f172a;      /* slate-900 */

      --bg2:#2e1065;      /* purple-900-ish */

      --card:#0b1220cc;

      --border:#ffffff1a;

      --text:#e5e7eb;

      --muted:#cbd5e180;

      --cyan:#22d3ee;

      --purple:#a855f7;

      --danger:#fb7185;

    }

    *{box-sizing:border-box}

    html,body{height:100%; margin:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;}

    body{

      color:var(--text);

      background: radial-gradient(900px 500px at 20% 20%, rgba(59,130,246,.22), transparent 60%),

                  radial-gradient(900px 500px at 80% 80%, rgba(168,85,247,.22), transparent 60%),

                  linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg1));

      display:grid;

      place-items:center;

      padding:24px;

      overflow-x:hidden;

    }

    .card{

      width:min(520px, 100%);

      background: linear-gradient(180deg, rgba(15,23,42,.75), rgba(15,23,42,.45));

      border:1px solid var(--border);

      border-radius:24px;

      padding:28px;

      backdrop-filter: blur(14px);

      box-shadow: 0 25px 60px rgba(0,0,0,.45);

      position:relative;

      overflow:hidden;

    }

    .glow{

      position:absolute; inset:-80px;

      background: radial-gradient(circle at 30% 20%, rgba(34,211,238,.16), transparent 55%),

                  radial-gradient(circle at 70% 80%, rgba(168,85,247,.16), transparent 55%);

      pointer-events:none;

    }

    h1{margin:0 0 8px; font-size:28px; letter-spacing:.2px;}

    .sub{margin:0 0 18px; color:var(--muted); line-height:1.4;}

    label{display:block; font-size:14px; color:#e5e7ebcc; margin:14px 0 8px;}

    input{

      width:100%;

      padding:14px 14px;

      border-radius:14px;

      border:1px solid rgba(255,255,255,.15);

      background: rgba(2,6,23,.55);

      color:var(--text);

      outline:none;

      font-size:16px;

    }

    input:focus{

      border-color: rgba(34,211,238,.55);

      box-shadow: 0 0 0 4px rgba(34,211,238,.12);

    }

    .row{display:flex; gap:12px; margin-top:16px; align-items:center; flex-wrap:wrap;}

    button{

      border:0;

      border-radius:16px;

      padding:12px 16px;

      font-size:16px;

      font-weight:700;

      color:white;

      cursor:pointer;

      background: linear-gradient(90deg, rgba(59,130,246,1), rgba(168,85,247,1));

      box-shadow: 0 16px 30px rgba(168,85,247,.22);

    }

    button:active{transform: translateY(1px);}

    .hint{

      font-size:13px;

      color:var(--muted);

      flex: 1 1 auto;

    }

    .error{

      margin-top:12px;

      color: var(--danger);

      font-size:14px;

      display:none;

    }

    .ok{

      margin-top:12px;

      color: rgba(34,211,238,.95);

      font-size:14px;

      display:none;

    }

    .tiny{

      margin-top:18px;

      border-top:1px solid var(--border);

      padding-top:12px;

      color:#ffffff66;

      font-size:12px;

      text-align:center;

    }

  </style>
</head>
<body>
  <div class="card">
    <div class="glow"></div>

    <h1>Computer Vision Lab</h1>
    <p class="sub">Enter your class username to continue.</p>

    <form id="entryForm" autocomplete="off">
      <label for="username">Username</label>
      <input id="username" name="username" placeholder="e.g., cv-student" required />

      <div class="row">
        <button type="submit">Continue</button>
        <div class="hint">Tip: usernames are case-insensitive in this form.</div>
      </div>

      <div id="ok" class="ok">Accepted. Redirecting…</div>
      <div id="error" class="error">That username isn’t allowed.</div>
    </form>

    <div class="tiny">Class access check (client-side)</div>
  </div>

  <script>

    // ---- Configure these two values ----

    const ONLY_ALLOWED_USERNAME = "GLIS26STEM";  // the one username you want to allow

    const REDIRECT_TO = "./Dashboard.html";       // where to go after success (change this)

    // -----------------------------------



    const form = document.getElementById("entryForm");

    const input = document.getElementById("username");

    const error = document.getElementById("error");

    const ok = document.getElementById("ok");



    const normalize = (s) => (s || "").trim().toLowerCase();



    form.addEventListener("submit", (e) => {

      e.preventDefault();



      const entered = normalize(input.value);

      const allowed = normalize(ONLY_ALLOWED_USERNAME);



      error.style.display = "none";

      ok.style.display = "none";



      if (!entered) return;



      if (entered === allowed) {

        ok.style.display = "block";



        // Remember they passed (optional)

        localStorage.setItem("class_username", entered);

        localStorage.setItem("class_access_granted", "true");



        setTimeout(() => {

          window.location.href = REDIRECT_TO;

        }, 450);

      } else {

        error.style.display = "block";

        input.focus();

        input.select();

      }

    });

  </script>
</body>
</html>