Skip to content

Commit d8e4179

Browse files
Faculty name tooltip on hover
1 parent cf341dc commit d8e4179

File tree

5 files changed

+12
-340
lines changed

5 files changed

+12
-340
lines changed

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
This file was deleted.

package-lock.json

Lines changed: 0 additions & 225 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/ui/CompoundTable.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,16 @@ export default function CompoundTable({ data, large }: CompoundTableProps) {
9191
{entry.slot.replace(/\+/g, '+\u200B')}
9292
</div>
9393
<div
94-
title={i === 0 ? displayName : undefined}
95-
className="w-[160px] shrink-0 break-words whitespace-normal text-right pr-4"
94+
onMouseEnter={e => {
95+
const r = e.currentTarget.getBoundingClientRect(), t = document.createElement('div');
96+
t.textContent = displayName;
97+
t.style = `position:fixed;top:${r.top - 24}px;left:${r.left}px;background:black;color:white;
98+
font-size:12px;padding:2px 6px;border-radius:4px;z-index:9999;white-space:nowrap`;
99+
t.id = 'tip'; document.body.append(t);
100+
}}
101+
onMouseLeave={() => document.getElementById('tip')?.remove()}
96102
>
97-
{i === 0 ? initials : ''}
103+
{initials}
98104
</div>
99105
</div>
100106
))}
@@ -106,4 +112,4 @@ export default function CompoundTable({ data, large }: CompoundTableProps) {
106112
</div>
107113
</div>
108114
);
109-
}
115+
}

src/components/ui/Loader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44

55
export default function Loader() {
66
return (
7-
<div className="flex flex-col items-center justify-center h-screen bg-[#CEE4E5]">
7+
<div className="flex flex-col items-center justify-center h-screen bg-[#CEE4E5] pointer-events-none">
88
<div className="text-4xl mb-8 font-pangolin text-[#00000088]">Loading</div>
99
<div
1010
className="w-16 h-16 animate-spin rounded-full"

0 commit comments

Comments
 (0)