From cbfebd1177ff274af61adbaf8c206e8caa7b2e0e Mon Sep 17 00:00:00 2001 From: xangelo Date: Thu, 31 Aug 2023 16:39:00 -0400 Subject: [PATCH] fix: tooltip text centered due to media-query --- public/assets/css/game.css | 4 ++-- src/server/views/profile.ts | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/assets/css/game.css b/public/assets/css/game.css index a7e31c0..f467f57 100644 --- a/public/assets/css/game.css +++ b/public/assets/css/game.css @@ -747,12 +747,12 @@ footer { /* tooltip styling */ @media(pointer: coarse), (hover: none) { - [title] { + .tooltip[title] { position: realtive; display: flex; justify-content: center; } - [title]:focus::after { + .tooltip[title]:focus::after { content: attr(title); background-color: #fff; color: #222; diff --git a/src/server/views/profile.ts b/src/server/views/profile.ts index 547cdef..e6a1c0c 100644 --- a/src/server/views/profile.ts +++ b/src/server/views/profile.ts @@ -11,7 +11,7 @@ export function renderProfilePage(player: Player, equipment: EquippedItemDetails StatDef.forEach(stat => { statBreakdown += ` - ${stat.display} + ${stat.display} ${player[stat.id].toLocaleString()} ${player.stat_points ? statPointIncreaser(stat) : ''} @@ -22,23 +22,23 @@ export function renderProfilePage(player: Player, equipment: EquippedItemDetails const html = `
- + - + - + - + - + ${statBreakdown} -- 2.25.1
HPHP ${player.hp.toLocaleString()}/${maxHp(player.constitution, player.level).toLocaleString()}
VigorVigor ${player.vigor.toLocaleString()}/${maxVigor(player.constitution, player.level).toLocaleString()}
EXPEXP ${player.exp.toLocaleString()}/${expToLevel(player.level + 1).toLocaleString()}
DefenceDefence ${totalDefence(equipment, player, false).toLocaleString()} (${totalDefence(equipment, player).toLocaleString()})
Stat PointsStat Points ${player.stat_points}