| | <!DOCTYPE html> |
| | <html lang="en"> |
| | <head> |
| | <meta charset="UTF-8"> |
| | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | <title>Dashboard | Terrier Tutor</title> |
| | <style> |
| | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap'); |
| | |
| | body, html { |
| | margin: 0; |
| | padding: 0; |
| | font-family: 'Inter', sans-serif; |
| | background-color: #f7f7f7; |
| | background-image: url('https://www.transparenttextures.com/patterns/cubes.png'); |
| | background-repeat: repeat; |
| | display: flex; |
| | align-items: center; |
| | justify-content: center; |
| | height: 100vh; |
| | color: #333; |
| | } |
| | |
| | .container { |
| | background: rgba(255, 255, 255, 0.9); |
| | border: 1px solid #ddd; |
| | border-radius: 8px; |
| | width: 100%; |
| | max-width: 400px; |
| | padding: 50px; |
| | box-sizing: border-box; |
| | text-align: center; |
| | box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); |
| | backdrop-filter: blur(10px); |
| | -webkit-backdrop-filter: blur(10px); |
| | } |
| | |
| | .avatar { |
| | width: 90px; |
| | height: 90px; |
| | border-radius: 50%; |
| | margin-bottom: 25px; |
| | border: 2px solid #ddd; |
| | } |
| | |
| | .container h1 { |
| | margin-bottom: 15px; |
| | font-size: 24px; |
| | font-weight: 600; |
| | color: #1a1a1a; |
| | } |
| | |
| | .container p { |
| | font-size: 16px; |
| | color: #4a4a4a; |
| | margin-bottom: 30px; |
| | line-height: 1.5; |
| | } |
| | |
| | .tokens-left { |
| | font-size: 16px; |
| | color: #333; |
| | margin-bottom: 30px; |
| | font-weight: 600; |
| | } |
| | |
| | .button { |
| | padding: 12px 0; |
| | margin: 12px 0; |
| | font-size: 14px; |
| | border-radius: 6px; |
| | cursor: pointer; |
| | width: 100%; |
| | border: 1px solid #4285F4; |
| | background-color: #fff; |
| | color: #4285F4; |
| | transition: background-color 0.3s ease, border-color 0.3s ease; |
| | } |
| | |
| | .button:hover { |
| | background-color: #e0e0e0; |
| | border-color: #357ae8; |
| | } |
| | |
| | .start-button { |
| | border: 1px solid #4285F4; |
| | color: #4285F4; |
| | background-color: #fff; |
| | } |
| | |
| | .start-button:hover { |
| | background-color: #e0f0ff; |
| | border-color: #357ae8; |
| | color: #357ae8; |
| | } |
| | |
| | .sign-out-button { |
| | border: 1px solid #FF4C4C; |
| | background-color: #fff; |
| | color: #FF4C4C; |
| | } |
| | |
| | .sign-out-button:hover { |
| | background-color: #ffe6e6; |
| | border-color: #e04343; |
| | color: #e04343; |
| | } |
| | </style> |
| | </head> |
| | <body> |
| | <div class="container"> |
| | <img src="/public/avatars/ai_tutor.png" alt="AI Tutor Avatar" class="avatar"> |
| | <h1>Welcome, {{ username }}</h1> |
| | <p>Ready to start your AI tutoring session?</p> |
| | <p class="tokens-left">Tokens Left: {{ tokens_left }}</p> |
| | <form action="/start-tutor" method="post"> |
| | <button type="submit" class="button start-button">Start AI Tutor</button> |
| | </form> |
| | <form action="/logout" method="get"> |
| | <button type="submit" class="button sign-out-button">Sign Out</button> |
| | </form> |
| | </div> |
| | <script> |
| | let token = "{{ jwt_token }}"; |
| | console.log("Token: ", token); |
| | localStorage.setItem('token', token); |
| | </script> |
| | </body> |
| | </html> |
| |
|