File size: 6,007 Bytes
3e6b063
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
{% extends "base.html" %}

{% block title %}Login - TexLab{% endblock %}

{% block content %}
<div class="login-container">
  <div class="login-content">
    <div class="login-header animate__animated animate__fadeInDown">
      <div class="logo-placeholder">
        <img src="{{ url_for('static', filename='images/logo.svg') }}" alt="TexLab Logo" class="logo-img">
      </div>
      <h1 class="login-title">Welcome to TexLab</h1>
      <p class="login-subtitle">Transform your handwritten math into beautiful LaTeX</p>
    </div>
    
    <div class="login-body animate__animated animate__fadeInUp">
      <div class="login-message">
        <h2>Let's Dive In!</h2>
        <p>Sign in to continue your journey with TexLab</p>
      </div>
      
      <div class="login-options">
        <a href="{{ url_for('auth.google_login') }}" class="btn btn-google">
          <i class="fab fa-google me-2"></i>Continue with Google
        </a>
        
        <div class="divider">
          <span>OR</span>
        </div>
        
        <form id="guestForm" method="POST" action="{{ url_for('auth.guest_login') }}">
          <div class="form-group">
            <input type="text" class="form-control" id="guestName" name="name" placeholder="Enter your name" required>
          </div>
          <button class="btn btn-primary btn-block" type="submit">
            <i class="fas fa-user me-2"></i>Continue as Guest
          </button>
        </form>
      </div>
    </div>
    
    <div class="login-footer animate__animated animate__fadeIn">
      <div class="small">
        <a href="#!" class="text-decoration-none">Privacy Policy</a> 
        &middot; 
        <a href="#!" class="text-decoration-none">Terms of Service</a>
      </div>
      <div class="small mt-2">
        &copy; 2025 TexLab. All rights reserved.
      </div>
    </div>
  </div>
</div>

<style>

body, html {

  height: 100%;

  margin: 0;

  padding: 0;

}



.login-container {

  min-height: 100vh;

  display: flex;

  align-items: center;

  justify-content: center;

  background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);

  padding: 1rem;

  margin: 0;

}



.login-content {

  width: 100%;

  max-width: 450px;

  text-align: center;

  color: white;

}



.login-header {

  padding: 2rem 1rem;

}



.logo-img {

  width: 100px;

  height: 100px;

  margin-bottom: 1.5rem;

  animation: pulse 2s infinite;

}



.login-title {

  font-size: 2.2rem;

  font-weight: 700;

  margin-bottom: 0.5rem;

  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);

}



.login-subtitle {

  font-size: 1.1rem;

  opacity: 0.9;

  margin-bottom: 0;

}



.login-body {

  padding: 2rem 1rem;

  background: rgba(255, 255, 255, 0.15);

  border-radius: 15px;

  backdrop-filter: blur(10px);

  margin: 1rem;

}



.login-message {

  margin-bottom: 2rem;

}



.login-message h2 {

  font-size: 1.8rem;

  font-weight: 700;

  margin-bottom: 0.5rem;

  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);

}



.login-message p {

  opacity: 0.9;

  margin-bottom: 0;

}



.login-options {

  display: flex;

  flex-direction: column;

  gap: 1.5rem;

}



.btn-google {

  background-color: white;

  color: #757575;

  border: none;

  padding: 14px 20px;

  border-radius: 8px;

  font-weight: 600;

  transition: all 0.3s ease;

  text-align: center;

  text-decoration: none;

  display: block;

  font-size: 1.1rem;

  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

}



.btn-google:hover {

  background-color: #f8f8f8;

  transform: translateY(-3px);

  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);

}



.divider {

  display: flex;

  align-items: center;

  text-align: center;

  color: rgba(255, 255, 255, 0.8);

  font-weight: 500;

}



.divider::before,

.divider::after {

  content: "";

  flex: 1;

  border-bottom: 1px solid rgba(255, 255, 255, 0.3);

}



.divider::before {

  margin-right: 1rem;

}



.divider::after {

  margin-left: 1rem;

}



.form-group {

  margin-bottom: 1rem;

}



.form-control {

  width: 100%;

  padding: 14px 15px;

  border: none;

  border-radius: 8px;

  font-size: 1.1rem;

  transition: all 0.3s;

  box-sizing: border-box;

  background: rgba(255, 255, 255, 0.9);

  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

}



.form-control:focus {

  outline: none;

  background: white;

  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);

}



.btn-primary {

  background: linear-gradient(135deg, #ff6b6b 0%, #ffa502 100%);

  color: white;

  border: none;

  padding: 14px 20px;

  border-radius: 8px;

  font-weight: 600;

  transition: all 0.3s ease;

  cursor: pointer;

  font-size: 1.1rem;

  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

}



.btn-primary:hover {

  transform: translateY(-3px);

  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);

}



.btn-block {

  width: 100%;

  display: block;

}



.login-footer {

  padding: 1.5rem 1rem;

  color: rgba(255, 255, 255, 0.7);

}



.login-footer a {

  color: rgba(255, 255, 255, 0.9);

  text-decoration: none;

}



.login-footer a:hover {

  text-decoration: underline;

}



@keyframes pulse {

  0% {

    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);

  }

  70% {

    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);

  }

  100% {

    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);

  }

}



/* Remove navbar and footer on login page */

.navbar,

.footer,

.chat-toggle,

#chatPanel,

#latexToTextPanel,

#latexToTextToggle {

  display: none !important;

}



.main-content {

  padding: 0 !important;

}



/* Ensure full background coverage */

body {

  background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%) !important;

}

</style>
{% endblock %}

{% block extra_js %}
<script>

document.getElementById('guestForm').addEventListener('submit', function(e) {

  const guestName = document.getElementById('guestName').value.trim();

  if (!guestName) {

    e.preventDefault();

    alert('Please enter your name');

    return;

  }

});

</script>
{% endblock %}