updated avatars, version label moved
All checks were successful
Deploy FluentGerman.ai / deploy (push) Successful in 52s
All checks were successful
Deploy FluentGerman.ai / deploy (push) Successful in 52s
This commit is contained in:
@@ -1192,11 +1192,11 @@ tr:hover td {
|
|||||||
|
|
||||||
/* ── Version label ───────────────────────────────────────────────── */
|
/* ── Version label ───────────────────────────────────────────────── */
|
||||||
.version-label {
|
.version-label {
|
||||||
display: block;
|
position: fixed;
|
||||||
text-align: center;
|
bottom: 16px;
|
||||||
margin-top: 16px;
|
right: 16px;
|
||||||
font-size: 0.7rem;
|
font-size: 0.75rem;
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
letter-spacing: 0.06em;
|
opacity: 0.6;
|
||||||
opacity: 0.5;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
BIN
frontend/img/tutor1.jpg
Normal file
BIN
frontend/img/tutor1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
BIN
frontend/img/tutor2.jpg
Normal file
BIN
frontend/img/tutor2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
BIN
frontend/img/tutor3.jpg
Normal file
BIN
frontend/img/tutor3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
BIN
frontend/img/tutor4.jpg
Normal file
BIN
frontend/img/tutor4.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
BIN
frontend/img/tutor5.jpg
Normal file
BIN
frontend/img/tutor5.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
@@ -30,7 +30,7 @@
|
|||||||
<button type="submit" class="btn btn-primary btn-block">Sign In</button>
|
<button type="submit" class="btn btn-primary btn-block">Sign In</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<span class="version-label">v0.1</span>
|
<span class="version-label">v0.1.1</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/js/api.js"></script>
|
<script src="/js/api.js"></script>
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ function relativeTime(dateStr) {
|
|||||||
return date.toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' });
|
return date.toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avatar — DiceBear "avataaars" style for friendly illustrated headshots
|
|
||||||
const AVATAR_SEEDS = ['Felix', 'Lena', 'Hans', 'Sophie', 'Klaus', 'Marta', 'Otto', 'Emma'];
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', async () => {
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
if (!requireAuth()) return;
|
if (!requireAuth()) return;
|
||||||
@@ -38,10 +37,18 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||||||
const displayName = user?.username || 'User';
|
const displayName = user?.username || 'User';
|
||||||
document.getElementById('user-name').textContent = displayName;
|
document.getElementById('user-name').textContent = displayName;
|
||||||
|
|
||||||
// Random avatar from DiceBear
|
// Deterministic avatar based on username (tutor1.jpg - tutor5.jpg)
|
||||||
const avatarImg = document.getElementById('avatar-img');
|
const avatarImg = document.getElementById('avatar-img');
|
||||||
const seed = AVATAR_SEEDS[Math.floor(Math.random() * AVATAR_SEEDS.length)];
|
|
||||||
avatarImg.src = `https://api.dicebear.com/9.x/avataaars/svg?seed=${seed}&backgroundColor=b6e3f4,c0aede,d1d4f9`;
|
// Simple hash function for username
|
||||||
|
let hash = 0;
|
||||||
|
for (let i = 0; i < displayName.length; i++) {
|
||||||
|
hash = displayName.charCodeAt(i) + ((hash << 5) - hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Map hash to index 1-5
|
||||||
|
const avatarIndex = (Math.abs(hash) % 5) + 1;
|
||||||
|
avatarImg.src = `/img/tutor${avatarIndex}.jpg`;
|
||||||
|
|
||||||
const messagesEl = document.getElementById('chat-messages');
|
const messagesEl = document.getElementById('chat-messages');
|
||||||
const inputEl = document.getElementById('chat-input');
|
const inputEl = document.getElementById('chat-input');
|
||||||
|
|||||||
Reference in New Issue
Block a user