Merge pull request #5 from tools4ds/retargeting
Browse files
apps/ai_tutor/public/files/students_encrypted.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"0645db6f7b415e3b04a4fc327151c3c7bbcd25ec546ee0b3604957b571a79bc2": ["instructor", "bu"], "
|
|
|
1 |
+
{"0645db6f7b415e3b04a4fc327151c3c7bbcd25ec546ee0b3604957b571a79bc2": ["admin", "instructor", "bu"], "452d72a2299a347a8ed8d24313e2e59548b75adc1cf908316f251cd346c4607c": ["admin", "instructor", "bu"], "7810b25bef84317130e2a59da978ee716bb96f6a8a9296c051b7ad4108aa8e6a": ["admin", "instructor", "bu"], "34966bc6ddaf6842103fae481f48f0ccfd3bd0b553112dd6ae1bc3cd97d4e21e": ["admin", "instructor", "bu"], "bfaaf563e829d22ec1b8f6c2f846a7ee3739782915666be12b38f39abff80250": ["admin", "instructor", "bu"], "51ebf87ac51618300acfef8bfa9768fdee40e2d3f39cfb4ae8a76722ee336de4": ["admin", "instructor", "bu"], "a95f36e2700c554639d3522834b47733f5ed1f05c5a43d04ac2575571dd43563": ["student", "bu"], "0bf8b6cca820bd8628a31d8d44a7b94fcd6d058c9d5a0c52b7ffdf01ac5ce310": ["student", "bu"], "ce081e4be8113feed6f5e8685e4b470ade9b799aed3d9710c1e0b22ca925b7ad": ["student", "bu"], "0581abb6cfd2dadecd26fcbe7a5515299bbd7f51a9a671aae43ba61820529ebd": ["student", "bu"], "4354b6b63a222fa1d7fa5add153bbdd905c6408a0fcdea192212de3293ccf1ea": ["student", "bu"], "c150690b05f28c58ff7d65e492e146c777fe60eafdff7a9e296082663c17ffa1": ["student", "bu"], "9b3e9e96638d64356ff3d70dae0c3e7308383a6fc2f364c339858d5b6f278be8": ["student", "bu"], "31e1c52c911545e29ccd99ea9572da1b42f75ca61ca899a6c8df4ebc6e5a0395": ["student", "bu"], "aac76c2eed19b5df48ea098df49d42fd43157063432b4ec9ebd0546b2baf815f": ["student", "bu"], "b18e4e23da151056aa55031f9076bb0bc2d464a6a19247383e0d8be839589e7a": ["student", "bu"], "1787ac19d56e4cb3ee0689d540be627fa5bf95fa33106c38cfbb537ed634d1ed": ["student", "bu"], "71e7f6ab8b51a04a74c1e5f938a9d9d6fe5e891b3fb2b284c9b78812d7ca88d2": ["student", "bu"], "6b866e7e75a097efa853941dce9b3279f7877e9fb4157dc600c8db64a5e55dd4": ["student", "bu"], "9feac560d83481b70b86d6ad6aba4fd84df0ddfdc24732f41721587b5ef48237": ["student", "bu"], "efdcaa185dc69d0cd611d76f58c661c9d4f0524da57a65b711e63c19583459e8": ["student", "bu"], "db51426532d8ee47d83834d3ce9806b4adb739aa95a38ebd091362b8171c675e": ["student", "bu"], "4cc7f30544f2b58781ab57f301db7f56d2bcc64a0b37afe7948ba8e1c4fa4138": ["student", "bu"], "3521f63e6fca06c8ac34d3cebe0738607e45317f79fe7825b2e33185cb24601f": ["student", "bu"], "9c44b6704951e7f056a5fead759ae8513de492b82ac71d9cd8a76fb353366aa3": ["student", "bu"], "c2f99484d908fba1224005c8dcd00e8b5e6c7e8680d9748239b83e710ed2cb77": ["student", "bu"], "7796cb3c8c2054a9ec02214547dee1189d9e128886ce94a5ad1a0890b7cdc441": ["student", "bu"], "69418711679ae649fb084335616391fc39231644f5c8987bc506220b7ce236de": ["student", "bu"], "e86db5004d39eef02d4f88b6243bc7dffcb9ea46eb3cab6d32d6baba7ff47c81": ["student", "bu"], "d98aae640b122d81a439c1d13bcfe029df696e07a5629550e0ec1f8e19efb666": ["student", "bu"], "6675ec095fc8ca16406f57291da8d2fb4d786ecc25b0d6ce863dc7a351e88a64": ["student", "bu"], "531f944c41ae7cce8d1b296cf724637c1905f26b50e8b2682dfa0e906e4bf8bd": ["student", "bu"], "286bf6e0355cdf29e05a5f616cf3a634d120dc6a29315d3599c245ce8bf5ce7f": ["student", "bu"], "8f229a4afa637bb480084490772b63aecb6663f70d968a3f9f5b0c934420cadb": ["student", "bu"], "0462dd34f7ad731007e842419bf1ef5362a7354ce905b4008e09fea1191f13fa": ["student", "bu"], "a5723a884d98149e52d0bdebdf22fa487be5ea3efdff61431aeb3595f70554b6": ["student", "bu"], "c82ffcf05b86411df0bdbe101591933cdf48c551a8aeb9f696f91ce6a22f802f": ["student", "bu"], "3ec4db1f069a48db27b6f9686f9d4462dbafeb8d3a3e1f78d30ccd0e5bee3203": ["student", "bu"], "b29b8f60f540a7220cc8161ff385b1457e5e35526a534dd86af9a9c4e2617571": ["student", "bu"], "9ecc4e5fc7be95840c4414c279c91308da4bf6908e782760575826d0f8cc8442": ["student", "bu"], "e25357c249625bb00596be7717d0e852b74e065e8febfb518b99dfefaf23b159": ["student", "bu"], "a8b5fc661657d3e53712673ed3bb14f46442d70a38422248aacfd00962c6456b": ["student", "bu"], "d09c2ac8f130d4183bd8679fad6823fd13ff61849c5d13f733761e3c36f2199b": ["student", "bu"], "b5361f8a7d62c117d3f22ece90e3593ec905ee4f1c4eb04e418e9a771254a857": ["student", "bu"], "ea20f16c6db20bc0844b2bf3778871352b172c7c53a9ebb8c1bf3024c8621d67": ["student", "bu"], "0076415c69a8fec00cbd4c44c519114ae19b6d33c0a689f0ca36ca564fae29d3": ["student", "bu"], "5912f6e67491ded23d0bca68b7b238bce08b3ec9f64a86473cea8185b0a6b0ee": ["student", "bu"], "8a6380542f4bad6b4479b0c3337acc197f627e68576100e2321fac5d0ca4721c": ["student", "bu"], "8bf922b6b9ae70bb05e04a8d6a76ba2efc92aaf4a3edf0f85f2bfffdebecdc92": ["student", "bu"], "9e21067d7b8116ee8b2c280ef7eea80bf3d4365b1f425b09359a7e2ae91e1a6a": ["student", "bu"], "f3a2d820267a4dfef33d843c82d458215b5abc8ccdbe48fbf92ba69a22b47590": ["student", "bu"], "d3d94343fc35ca5af626f312593954c17aa9989f2bafaea1bec9c50b6866b5ce": ["student", "bu"], "f8b0d5216783acb5be06e4d6af872549f34de2b70219d9fe1fba71fde3ff9527": ["student", "bu"], "0250b2a5ead8107e211bf93c83383d6b4f70a3daa51c4916955942029a3de8d8": ["student", "bu"], "eef3d43d90afaa672c420eddb88673dc84077704c40ea055b12ccba817293dac": ["student", "bu"], "6caf6f427ac583e6324b769a5aa5e3b2293c01828b68ad1f54fbbd774952477e": ["student", "bu"], "cba7efd7e4f70c2a3acaa461e640ebd6f404cfae4f08fb069108a7157966ad86": ["student", "bu"], "07afd7776facb60014f781b7617b1ede88a55f15e7ec7a4ef8ccdf79f2b9ffbc": ["student", "bu"], "6454d9b0afd10253fafb194d88d5414e798dd883e46ff73febad36f7390e2461": ["student", "bu"], "b7339a0de72d687579d244a7f8ffe43d83e4e31bcfc0c123dd4bcd0e99502c90": ["student", "bu"], "65b08dc846332b0b39ef2a158ad159705a066a92ed5050af4f35b0ebdcd94c36": ["student", "bu"], "6ca1236d11b0abf929afe2f8951b8002c1bec08e72012682a408f8d655b2dbf2": ["student", "bu"], "6680c1ffc2d91882857275e5e4e2f1c9e3cc448a80e2dc112c6d881c32e53d72": ["student", "bu"], "3d914943e535321d6b7e2dc60aeb7f86ee2bcff830f31f4a80c1795e5ed5031b": ["student", "bu"], "8526972979c0535a9ea7de74ee717840a7ef3cdda38930f5382c1991276e5170": ["student", "bu"], "8f4d4eb67b33fbe7a29b337cc32504ee30e9b37c5b2917dd39de26d124e1d3f6": ["student", "bu"], "ef724f437cad79545924f2f6a3900d68350eb398ff628a7aed8e86c7dad1a72d": ["student", "bu"], "d46bf5fbb8af901b2763e95e2de68a31f600aa50f9d3b7c85145be4b8e009f2c": ["student", "bu"], "cdc5fafe97bf979472732b9d33848eaf377392c8d747d6d5aea0bd563f12086d": ["student", "bu"], "af4d3f57d15f05d78f30af13a40319aaa8d4b96aabc8a60edffd6e369fe9013e": ["student", "bu"], "bdf1fd1c242ab99fd37234f99106fdfd18c9ba7a515fb12de840f6baf7f7d47a": ["student", "bu"], "42888c3c5eda823c370b4cec331502b00a46dcf179194803646aedc17925f0c0": ["student", "bu"], "f40c9c0420ddb2d322ab838af7ef8df4ce57a4124e9f219b996608e5aa81a864": ["student", "bu"], "6846b8b1ee64927745984fa158329f11d5f09d2c362c84df892cf14b8ee9f68e": ["student", "bu"], "599321492cb8f304000cd9ab9aeb03031a5a9f539b7fe6c67b7f1164c206999a": ["student", "bu"], "a3df056bcad6e7fb5de90142084ac8257fcad66a8802d09506eba0e77a2df3b9": ["student", "bu"], "73b3f8d9cb9bf4313733172a5a61510af4f2905899b81edf06542cfef4713446": ["student", "bu"], "030f1e81db247f38d4013e4cb564c9194bb90a2de5783904d0e90337aea594d7": ["student", "bu"], "c169358fad0ce86af4b2c4493cec716576692583796007e783d770cafa29104f": ["student", "bu"], "e2600f2fac7f78e74f31f514b3d050790c9b88958bbfb057ac3126519db5d8a9": ["student", "bu"], "e3b881db3e1dc3a3ef9b3101cf31a847fe0d31047a7830425f35abaeaa126881": ["student", "bu"], "36472b70ca07e035a65d02f1b02cce63582bd2c44e75af647f6b0edebf4cbcbf": ["student", "bu"], "5e5f9905dab12f29dd7bec40eb4b266339369c1334897175af124a57717ff220": ["student", "bu"]}
|
apps/ai_tutor/templates/cooldown.html
CHANGED
@@ -1,181 +1,197 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8"
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"
|
6 |
<title>Cooldown Period | Terrier Tutor</title>
|
7 |
<style>
|
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 |
</style>
|
121 |
-
</head>
|
122 |
-
<body>
|
123 |
<div class="container">
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
</div>
|
136 |
<script>
|
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 |
</script>
|
180 |
-
</body>
|
181 |
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
<title>Cooldown Period | Terrier Tutor</title>
|
7 |
<style>
|
8 |
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");
|
9 |
+
|
10 |
+
body,
|
11 |
+
html {
|
12 |
+
margin: 0;
|
13 |
+
padding: 0;
|
14 |
+
font-family: "Inter", sans-serif;
|
15 |
+
background-color: #f7f7f7;
|
16 |
+
background-image: url("https://www.transparenttextures.com/patterns/cubes.png");
|
17 |
+
background-repeat: repeat;
|
18 |
+
display: flex;
|
19 |
+
align-items: center;
|
20 |
+
justify-content: center;
|
21 |
+
height: 100vh;
|
22 |
+
color: #333;
|
23 |
+
}
|
24 |
+
|
25 |
+
.container {
|
26 |
+
background: rgba(255, 255, 255, 0.9);
|
27 |
+
border: 1px solid #ddd;
|
28 |
+
border-radius: 8px;
|
29 |
+
width: 100%;
|
30 |
+
max-width: 400px;
|
31 |
+
padding: 50px;
|
32 |
+
box-sizing: border-box;
|
33 |
+
text-align: center;
|
34 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
35 |
+
backdrop-filter: blur(10px);
|
36 |
+
-webkit-backdrop-filter: blur(10px);
|
37 |
+
}
|
38 |
+
|
39 |
+
.avatar {
|
40 |
+
width: 90px;
|
41 |
+
height: 90px;
|
42 |
+
border-radius: 50%;
|
43 |
+
margin-bottom: 25px;
|
44 |
+
border: 2px solid #ddd;
|
45 |
+
}
|
46 |
+
|
47 |
+
.container h1 {
|
48 |
+
margin-bottom: 15px;
|
49 |
+
font-size: 24px;
|
50 |
+
font-weight: 600;
|
51 |
+
color: #1a1a1a;
|
52 |
+
}
|
53 |
+
|
54 |
+
.container p {
|
55 |
+
font-size: 16px;
|
56 |
+
color: #4a4a4a;
|
57 |
+
margin-bottom: 30px;
|
58 |
+
line-height: 1.5;
|
59 |
+
}
|
60 |
+
|
61 |
+
.cooldown-message {
|
62 |
+
font-size: 16px;
|
63 |
+
color: #333;
|
64 |
+
margin-bottom: 30px;
|
65 |
+
}
|
66 |
+
|
67 |
+
.tokens-left {
|
68 |
+
font-size: 14px;
|
69 |
+
color: #333;
|
70 |
+
margin-bottom: 30px;
|
71 |
+
font-weight: 600;
|
72 |
+
}
|
73 |
+
|
74 |
+
.button {
|
75 |
+
padding: 12px 0;
|
76 |
+
margin: 12px 0;
|
77 |
+
font-size: 14px;
|
78 |
+
border-radius: 6px;
|
79 |
+
cursor: pointer;
|
80 |
+
width: 100%;
|
81 |
+
border: 1px solid #4285f4;
|
82 |
+
background-color: #fff;
|
83 |
+
color: #4285f4;
|
84 |
+
transition: background-color 0.3s ease, border-color 0.3s ease;
|
85 |
+
display: none;
|
86 |
+
}
|
87 |
+
|
88 |
+
.button.start-tutor {
|
89 |
+
display: none;
|
90 |
+
}
|
91 |
+
|
92 |
+
.button:hover {
|
93 |
+
background-color: #e0e0e0;
|
94 |
+
border-color: #357ae8;
|
95 |
+
}
|
96 |
+
|
97 |
+
.sign-out-button {
|
98 |
+
border: 1px solid #ff4c4c;
|
99 |
+
background-color: #fff;
|
100 |
+
color: #ff4c4c;
|
101 |
+
display: block;
|
102 |
+
}
|
103 |
+
|
104 |
+
.sign-out-button:hover {
|
105 |
+
background-color: #ffe6e6;
|
106 |
+
border-color: #e04343;
|
107 |
+
color: #e04343;
|
108 |
+
}
|
109 |
+
|
110 |
+
#countdown {
|
111 |
+
font-size: 14px;
|
112 |
+
color: #555;
|
113 |
+
margin-bottom: 20px;
|
114 |
+
}
|
115 |
+
|
116 |
+
.footer {
|
117 |
+
font-size: 12px;
|
118 |
+
color: #777;
|
119 |
+
margin-top: 20px;
|
120 |
+
}
|
121 |
</style>
|
122 |
+
</head>
|
123 |
+
<body>
|
124 |
<div class="container">
|
125 |
+
<img
|
126 |
+
src="/public/assets/images/avatars/logo.png"
|
127 |
+
alt="AI Tutor Avatar"
|
128 |
+
class="avatar"
|
129 |
+
/>
|
130 |
+
<h1>Hello, {{ username }}</h1>
|
131 |
+
<p>It seems like you need to wait a bit before starting a new session.</p>
|
132 |
+
<p class="cooldown-message">
|
133 |
+
Time remaining until the cooldown period ends:
|
134 |
+
</p>
|
135 |
+
<p id="countdown"></p>
|
136 |
+
<p class="tokens-left">
|
137 |
+
Tokens Left: <span id="tokensLeft">{{ tokens_left }}</span>
|
138 |
+
</p>
|
139 |
+
<button
|
140 |
+
id="startTutorBtn"
|
141 |
+
class="button start-tutor"
|
142 |
+
onclick="startTutor()"
|
143 |
+
>
|
144 |
+
Start AI Tutor
|
145 |
+
</button>
|
146 |
+
<form action="/logout" method="get">
|
147 |
+
<button type="submit" class="button sign-out-button">Sign Out</button>
|
148 |
+
</form>
|
149 |
+
<div class="footer">Reload the page to update token stats</div>
|
150 |
</div>
|
151 |
<script>
|
152 |
+
function startCountdown(endTime) {
|
153 |
+
const countdownElement = document.getElementById("countdown");
|
154 |
+
const startTutorBtn = document.getElementById("startTutorBtn");
|
155 |
+
const endTimeDate = new Date(endTime);
|
156 |
+
|
157 |
+
function updateCountdown() {
|
158 |
+
const now = new Date();
|
159 |
+
const timeLeft = endTimeDate.getTime() - now.getTime();
|
160 |
+
|
161 |
+
if (timeLeft <= 0) {
|
162 |
+
countdownElement.textContent = "Cooldown period has ended.";
|
163 |
+
startTutorBtn.style.display = "block";
|
164 |
+
} else {
|
165 |
+
const hours = Math.floor(timeLeft / 1000 / 60 / 60);
|
166 |
+
const minutes = Math.floor((timeLeft / 1000 / 60) % 60);
|
167 |
+
const seconds = Math.floor((timeLeft / 1000) % 60);
|
168 |
+
countdownElement.textContent = `${hours}h ${minutes}m ${seconds}s`;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
updateCountdown();
|
173 |
+
setInterval(updateCountdown, 1000);
|
174 |
+
}
|
175 |
+
|
176 |
+
function startTutor() {
|
177 |
+
window.location.href = "/start-tutor";
|
178 |
+
}
|
179 |
+
|
180 |
+
function updateTokensLeft() {
|
181 |
+
fetch("/get-tokens-left")
|
182 |
+
.then((response) => response.json())
|
183 |
+
.then((data) => {
|
184 |
+
document.getElementById("tokensLeft").textContent =
|
185 |
+
data.tokens_left;
|
186 |
+
})
|
187 |
+
.catch((error) => console.error("Error fetching tokens:", error));
|
188 |
+
}
|
189 |
+
|
190 |
+
// Start the countdown
|
191 |
+
startCountdown("{{ cooldown_end_time }}");
|
192 |
+
|
193 |
+
// Update tokens left when the page loads
|
194 |
+
updateTokensLeft();
|
195 |
</script>
|
196 |
+
</body>
|
197 |
</html>
|
apps/ai_tutor/templates/dashboard.html
CHANGED
@@ -1,145 +1,155 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8"
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"
|
6 |
<title>Dashboard | Terrier Tutor</title>
|
7 |
<style>
|
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 |
</style>
|
123 |
-
</head>
|
124 |
-
<body>
|
125 |
<div class="container">
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
</div>
|
139 |
<script>
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
</script>
|
144 |
-
</body>
|
145 |
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
<title>Dashboard | Terrier Tutor</title>
|
7 |
<style>
|
8 |
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");
|
9 |
|
10 |
+
body,
|
11 |
+
html {
|
12 |
+
margin: 0;
|
13 |
+
padding: 0;
|
14 |
+
font-family: "Inter", sans-serif;
|
15 |
+
background-color: #f7f7f7; /* Light gray background */
|
16 |
+
background-image: url("https://www.transparenttextures.com/patterns/cubes.png"); /* Subtle geometric pattern */
|
17 |
+
background-repeat: repeat;
|
18 |
+
display: flex;
|
19 |
+
align-items: center;
|
20 |
+
justify-content: center;
|
21 |
+
height: 100vh;
|
22 |
+
color: #333;
|
23 |
+
}
|
24 |
|
25 |
+
.container {
|
26 |
+
background: rgba(255, 255, 255, 0.9);
|
27 |
+
border: 1px solid #ddd;
|
28 |
+
border-radius: 8px;
|
29 |
+
width: 100%;
|
30 |
+
max-width: 400px;
|
31 |
+
padding: 40px;
|
32 |
+
box-sizing: border-box;
|
33 |
+
text-align: center;
|
34 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
35 |
+
backdrop-filter: blur(10px);
|
36 |
+
-webkit-backdrop-filter: blur(10px);
|
37 |
+
}
|
38 |
|
39 |
+
.avatar {
|
40 |
+
width: 90px;
|
41 |
+
height: 90px;
|
42 |
+
border-radius: 50%;
|
43 |
+
margin-bottom: 20px;
|
44 |
+
border: 2px solid #ddd;
|
45 |
+
}
|
46 |
|
47 |
+
.container h1 {
|
48 |
+
margin-bottom: 20px;
|
49 |
+
font-size: 26px;
|
50 |
+
font-weight: 600;
|
51 |
+
color: #1a1a1a;
|
52 |
+
}
|
53 |
|
54 |
+
.container p {
|
55 |
+
font-size: 15px;
|
56 |
+
color: #4a4a4a;
|
57 |
+
margin-bottom: 25px;
|
58 |
+
line-height: 1.5;
|
59 |
+
}
|
60 |
|
61 |
+
.tokens-left {
|
62 |
+
font-size: 17px;
|
63 |
+
color: #333;
|
64 |
+
margin-bottom: 10px;
|
65 |
+
font-weight: 600;
|
66 |
+
}
|
67 |
|
68 |
+
.all-time-tokens {
|
69 |
+
font-size: 14px; /* Reduced font size */
|
70 |
+
color: #555;
|
71 |
+
margin-bottom: 30px;
|
72 |
+
font-weight: 500;
|
73 |
+
white-space: nowrap; /* Prevents breaking to a new line */
|
74 |
+
}
|
75 |
|
76 |
+
.button {
|
77 |
+
padding: 12px 0;
|
78 |
+
margin: 12px 0;
|
79 |
+
font-size: 15px;
|
80 |
+
border-radius: 6px;
|
81 |
+
cursor: pointer;
|
82 |
+
width: 100%;
|
83 |
+
border: 1px solid #4285f4; /* Button border color */
|
84 |
+
background-color: #fff; /* Button background color */
|
85 |
+
color: #4285f4; /* Button text color */
|
86 |
+
transition: background-color 0.3s ease, border-color 0.3s ease;
|
87 |
+
}
|
88 |
|
89 |
+
.button:hover {
|
90 |
+
background-color: #e0e0e0;
|
91 |
+
border-color: #357ae8; /* Darker blue for hover */
|
92 |
+
}
|
93 |
|
94 |
+
.start-button {
|
95 |
+
border: 1px solid #4285f4;
|
96 |
+
color: #4285f4;
|
97 |
+
background-color: #fff;
|
98 |
+
}
|
99 |
|
100 |
+
.start-button:hover {
|
101 |
+
background-color: #e0f0ff; /* Light blue on hover */
|
102 |
+
border-color: #357ae8; /* Darker blue for hover */
|
103 |
+
color: #357ae8; /* Blue text on hover */
|
104 |
+
}
|
105 |
|
106 |
+
.sign-out-button {
|
107 |
+
border: 1px solid #ff4c4c;
|
108 |
+
background-color: #fff;
|
109 |
+
color: #ff4c4c;
|
110 |
+
}
|
111 |
|
112 |
+
.sign-out-button:hover {
|
113 |
+
background-color: #ffe6e6; /* Light red on hover */
|
114 |
+
border-color: #e04343; /* Darker red for hover */
|
115 |
+
color: #e04343; /* Red text on hover */
|
116 |
+
}
|
117 |
|
118 |
+
.footer {
|
119 |
+
font-size: 12px;
|
120 |
+
color: #777;
|
121 |
+
margin-top: 25px;
|
122 |
+
}
|
123 |
</style>
|
124 |
+
</head>
|
125 |
+
<body>
|
126 |
<div class="container">
|
127 |
+
<img
|
128 |
+
src="/public/assets/images/avatars/logo.png"
|
129 |
+
alt="AI Tutor Avatar"
|
130 |
+
class="avatar"
|
131 |
+
/>
|
132 |
+
<h1>Welcome, {{ username }}</h1>
|
133 |
+
<p>Ready to start your AI tutoring session?</p>
|
134 |
+
<p class="tokens-left">Tokens Left: {{ tokens_left }}</p>
|
135 |
+
<p class="all-time-tokens">
|
136 |
+
All-Time Tokens Allocated: {{ all_time_tokens_allocated }} / {{
|
137 |
+
total_tokens_allocated }}
|
138 |
+
</p>
|
139 |
+
<form action="/start-tutor" method="post">
|
140 |
+
<button type="submit" class="button start-button">
|
141 |
+
Start AI Tutor
|
142 |
+
</button>
|
143 |
+
</form>
|
144 |
+
<form action="/logout" method="get">
|
145 |
+
<button type="submit" class="button sign-out-button">Sign Out</button>
|
146 |
+
</form>
|
147 |
+
<div class="footer">Reload the page to update token stats</div>
|
148 |
</div>
|
149 |
<script>
|
150 |
+
let token = "{{ jwt_token }}";
|
151 |
+
console.log("Token: ", token);
|
152 |
+
localStorage.setItem("token", token);
|
153 |
</script>
|
154 |
+
</body>
|
155 |
</html>
|
apps/ai_tutor/templates/login.html
CHANGED
@@ -1,132 +1,151 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8"
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"
|
6 |
<title>Login | Terrier Tutor</title>
|
7 |
<style>
|
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 |
</style>
|
107 |
-
</head>
|
108 |
-
<body>
|
109 |
<div class="container">
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
</div>
|
131 |
-
</body>
|
132 |
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
<title>Login | Terrier Tutor</title>
|
7 |
<style>
|
8 |
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");
|
9 |
|
10 |
+
body,
|
11 |
+
html {
|
12 |
+
margin: 0;
|
13 |
+
padding: 0;
|
14 |
+
font-family: "Inter", sans-serif;
|
15 |
+
background-color: #f7f7f7; /* Light gray background */
|
16 |
+
background-image: url("https://www.transparenttextures.com/patterns/cubes.png"); /* Subtle geometric pattern */
|
17 |
+
background-repeat: repeat;
|
18 |
+
display: flex;
|
19 |
+
align-items: center;
|
20 |
+
justify-content: center;
|
21 |
+
height: 100vh;
|
22 |
+
color: #333;
|
23 |
+
}
|
24 |
|
25 |
+
.container {
|
26 |
+
background: rgba(255, 255, 255, 0.9);
|
27 |
+
border: 1px solid #ddd;
|
28 |
+
border-radius: 8px;
|
29 |
+
width: 100%;
|
30 |
+
max-width: 400px;
|
31 |
+
padding: 50px;
|
32 |
+
box-sizing: border-box;
|
33 |
+
text-align: center;
|
34 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
35 |
+
backdrop-filter: blur(10px);
|
36 |
+
-webkit-backdrop-filter: blur(10px);
|
37 |
+
}
|
38 |
|
39 |
+
.avatar {
|
40 |
+
width: 90px;
|
41 |
+
height: 90px;
|
42 |
+
border-radius: 50%;
|
43 |
+
margin-bottom: 25px;
|
44 |
+
border: 2px solid #ddd;
|
45 |
+
}
|
46 |
|
47 |
+
.container h1 {
|
48 |
+
margin-bottom: 15px;
|
49 |
+
font-size: 24px;
|
50 |
+
font-weight: 600;
|
51 |
+
color: #1a1a1a;
|
52 |
+
}
|
53 |
|
54 |
+
.container p {
|
55 |
+
font-size: 16px;
|
56 |
+
color: #4a4a4a;
|
57 |
+
margin-bottom: 30px;
|
58 |
+
line-height: 1.5;
|
59 |
+
}
|
60 |
|
61 |
+
.button {
|
62 |
+
padding: 12px 0;
|
63 |
+
margin: 12px 0;
|
64 |
+
font-size: 14px;
|
65 |
+
border-radius: 6px;
|
66 |
+
cursor: pointer;
|
67 |
+
width: 100%;
|
68 |
+
border: 1px solid #4285f4; /* Google button border color */
|
69 |
+
background-color: #fff; /* Guest button color */
|
70 |
+
color: #4285f4; /* Google button text color */
|
71 |
+
transition: background-color 0.3s ease, border-color 0.3s ease;
|
72 |
+
}
|
73 |
|
74 |
+
.button:hover {
|
75 |
+
background-color: #e0f0ff; /* Light blue on hover */
|
76 |
+
border-color: #357ae8; /* Darker blue for hover */
|
77 |
+
color: #357ae8; /* Blue text on hover */
|
78 |
+
}
|
79 |
|
80 |
+
.footer {
|
81 |
+
margin-top: 40px;
|
82 |
+
font-size: 15px;
|
83 |
+
color: #666;
|
84 |
+
text-align: center; /* Center the text in the footer */
|
85 |
+
}
|
86 |
|
87 |
+
.footer a {
|
88 |
+
color: #333;
|
89 |
+
text-decoration: none;
|
90 |
+
font-weight: 500;
|
91 |
+
display: inline-flex;
|
92 |
+
align-items: center;
|
93 |
+
justify-content: center; /* Center the content of the links */
|
94 |
+
transition: color 0.3s ease;
|
95 |
+
margin-bottom: 8px;
|
96 |
+
width: 100%; /* Make the link block level */
|
97 |
+
}
|
98 |
|
99 |
+
.footer a:hover {
|
100 |
+
color: #000;
|
101 |
+
}
|
102 |
|
103 |
+
.footer svg {
|
104 |
+
margin-right: 8px;
|
105 |
+
fill: currentColor;
|
106 |
+
}
|
107 |
</style>
|
108 |
+
</head>
|
109 |
+
<body>
|
110 |
<div class="container">
|
111 |
+
<img
|
112 |
+
src="/public/assets/images/avatars/logo.png"
|
113 |
+
alt="AI Tutor Avatar"
|
114 |
+
class="avatar"
|
115 |
+
/>
|
116 |
+
<h1>Terrier Tutor</h1>
|
117 |
+
<p>Welcome to the DS598 AI Tutor. Please sign in to continue.</p>
|
118 |
+
<form action="/login/google" method="get">
|
119 |
+
<button type="submit" class="button">Sign in with Google</button>
|
120 |
+
</form>
|
121 |
+
<div class="footer">
|
122 |
+
<a href="{{ GITHUB_REPO }}" target="_blank">
|
123 |
+
<svg
|
124 |
+
xmlns="http://www.w3.org/2000/svg"
|
125 |
+
width="16"
|
126 |
+
height="16"
|
127 |
+
viewBox="0 0 24 24"
|
128 |
+
>
|
129 |
+
<path
|
130 |
+
d="M12 .5C5.596.5.5 5.596.5 12c0 5.098 3.292 9.414 7.852 10.94.574.105.775-.249.775-.553 0-.272-.01-1.008-.015-1.98-3.194.694-3.87-1.544-3.87-1.544-.521-1.324-1.273-1.676-1.273-1.676-1.04-.714.079-.7.079-.7 1.148.08 1.75 1.181 1.75 1.181 1.022 1.752 2.683 1.246 3.34.954.104-.74.4-1.246.73-1.533-2.551-.292-5.234-1.276-5.234-5.675 0-1.253.447-2.277 1.181-3.079-.12-.293-.51-1.47.113-3.063 0 0 .96-.307 3.15 1.174.913-.255 1.892-.383 2.867-.388.975.005 1.954.133 2.868.388 2.188-1.481 3.147-1.174 3.147-1.174.624 1.593.233 2.77.114 3.063.735.802 1.18 1.826 1.18 3.079 0 4.407-2.688 5.38-5.248 5.668.413.354.782 1.049.782 2.113 0 1.526-.014 2.757-.014 3.132 0 .307.198.662.783.553C20.21 21.411 23.5 17.096 23.5 12c0-6.404-5.096-11.5-11.5-11.5z"
|
131 |
+
/>
|
132 |
+
</svg>
|
133 |
+
View on GitHub
|
134 |
+
</a>
|
135 |
+
<a href="{{ DOCS_WEBSITE }}" target="_blank">
|
136 |
+
<svg
|
137 |
+
xmlns="http://www.w3.org/2000/svg"
|
138 |
+
width="16"
|
139 |
+
height="16"
|
140 |
+
viewBox="0 0 24 24"
|
141 |
+
>
|
142 |
+
<path
|
143 |
+
d="M19 2H8c-1.103 0-2 .897-2 2v16c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V7l-5-5zm0 2l.001 4H14V4h5zm-1 14H9V4h4v6h6v8zM7 4H6v16c0 1.654 1.346 3 3 3h9v-2H9c-.551 0-1-.449-1-1V4z"
|
144 |
+
/>
|
145 |
+
</svg>
|
146 |
+
View Docs
|
147 |
+
</a>
|
148 |
+
</div>
|
149 |
</div>
|
150 |
+
</body>
|
151 |
</html>
|
apps/ai_tutor/templates/unauthorized.html
CHANGED
@@ -80,7 +80,7 @@
|
|
80 |
<body>
|
81 |
<div class="container">
|
82 |
<img
|
83 |
-
src="/public/assets/images/avatars/
|
84 |
alt="AI Tutor Avatar"
|
85 |
class="avatar"
|
86 |
/>
|
|
|
80 |
<body>
|
81 |
<div class="container">
|
82 |
<img
|
83 |
+
src="/public/assets/images/avatars/logo.png"
|
84 |
alt="AI Tutor Avatar"
|
85 |
class="avatar"
|
86 |
/>
|