From: xangelo Date: Thu, 31 Aug 2023 20:39:00 +0000 (-0400) Subject: fix: tooltip text centered due to media-query X-Git-Tag: v0.3.1~3 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=cbfebd1177ff274af61adbaf8c206e8caa7b2e0e;p=risinglegends.git fix: tooltip text centered due to media-query --- 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}
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}