tex2lab / templates /login.html
Zunayedthebot's picture
Upload 132 files
3e6b063 verified
{% 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 %}