voice2text/login.php

183 lines
4.6 KiB
PHP

<?php
/**
* Login Landing Page
* Displays Microsoft sign-in button
*/
require_once 'auth_config.php';
// In dev mode, bypass login page entirely
if (DEV_MODE) {
header('Location: index.php');
exit;
}
// If already authenticated, redirect to main app
if (isAuthenticated()) {
header('Location: index.php');
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign In - Voice to Text</title>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Montserrat', sans-serif;
background: #000000;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.login-container {
background: #1a1a1a;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(255, 196, 7, 0.2);
border: 1px solid #333;
padding: 60px 50px;
max-width: 500px;
width: 100%;
text-align: center;
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.logo {
width: 350px;
height: auto;
display: block;
margin: 0 auto 40px;
filter: invert(1) brightness(2);
}
h1 {
color: #FFC407;
font-size: 28px;
font-weight: 700;
margin-bottom: 15px;
}
.subtitle {
color: #999;
font-size: 16px;
margin-bottom: 40px;
line-height: 1.6;
}
.microsoft-login-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 12px;
padding: 16px 40px;
background: #FFC407;
color: #000;
text-decoration: none;
border-radius: 50px;
font-weight: 700;
font-size: 16px;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(255, 196, 7, 0.4);
border: none;
cursor: pointer;
}
.microsoft-login-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(255, 196, 7, 0.6);
background: #ffcd2e;
}
.microsoft-login-btn:active {
transform: translateY(0);
}
.microsoft-icon {
width: 20px;
height: 20px;
}
.info-box {
margin-top: 40px;
padding: 20px;
background: #0a0a0a;
border-radius: 12px;
border: 1px solid #333;
}
.info-box p {
color: #666;
font-size: 14px;
line-height: 1.6;
}
@media screen and (max-width: 600px) {
.login-container {
padding: 40px 30px;
}
.logo {
width: 280px;
}
h1 {
font-size: 24px;
}
.subtitle {
font-size: 14px;
}
}
</style>
</head>
<body>
<div class="login-container">
<img src="V2T.svg" alt="Voice to Text" class="logo">
<h1>Welcome to Voice to Text</h1>
<p class="subtitle">
Transcribe audio files using OpenAI Whisper<br>
Translate with DeepL into 30+ languages
</p>
<a href="auth.php" class="microsoft-login-btn">
<svg class="microsoft-icon" viewBox="0 0 23 23" xmlns="http://www.w3.org/2000/svg">
<rect width="11" height="11" fill="#f25022"/>
<rect x="12" width="11" height="11" fill="#7fba00"/>
<rect y="12" width="11" height="11" fill="#00a4ef"/>
<rect x="12" y="12" width="11" height="11" fill="#ffb900"/>
</svg>
Sign in with Microsoft
</a>
<div class="info-box">
<p>
Sign in with your Microsoft account to access the application.<br>
Supported formats: Text, VTT, SRT
</p>
</div>
</div>
</body>
</html>