Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,25 @@
<win-modal></win-modal>
<new-lobby-prompt></new-lobby-prompt>
<game-starting-modal></game-starting-modal>
<div class="flex flex-col items-end fixed top-0 right-0 z-1000 gap-2">
<game-right-sidebar></game-right-sidebar>
<replay-panel></replay-panel>
<!-- Top HUD: below lg each piece is fixed on its own. From lg, where the
leaderboard opens by default, they share one row, leaderboard | card |
sidebar: the card is centered when it fits and shifts right or narrows
to clear the open leaderboard instead of covering it. -->
<div
class="contents lg:fixed lg:top-0 lg:inset-x-0 lg:z-1000 lg:grid lg:grid-cols-[minmax(max-content,1fr)_minmax(0,max-content)_minmax(max-content,1fr)] lg:items-start lg:pointer-events-none"
>
<game-left-sidebar
class="lg:col-start-1 lg:justify-self-start"
></game-left-sidebar>
<player-info-overlay
class="lg:col-start-2 lg:min-w-0"
></player-info-overlay>
<div
class="flex flex-col items-end gap-2 max-lg:fixed max-lg:top-0 max-lg:right-0 max-lg:z-1000 lg:col-start-3 lg:justify-self-end lg:pointer-events-auto"
>
<game-right-sidebar></game-right-sidebar>
<replay-panel></replay-panel>
</div>
</div>
<settings-modal></settings-modal>
<!-- The in-game settings modal: the same component as #page-settings, but
Expand All @@ -548,9 +564,7 @@
<alert-frame></alert-frame>
<chat-modal></chat-modal>
<multi-tab-modal></multi-tab-modal>
<game-left-sidebar></game-left-sidebar>
<performance-overlay></performance-overlay>
<player-info-overlay></player-info-overlay>
<heads-up-message></heads-up-message>

<!-- Featured stream: direct <body> child (NOT inside the in-[.in-game]:hidden
Expand Down
2 changes: 1 addition & 1 deletion src/client/hud/layers/GameLeftSidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class GameLeftSidebar extends LitElement implements Controller {
render() {
return html`
<aside
class=${`fixed top-0 left-0 z-900 flex flex-col max-h-[calc(100vh-80px)] overflow-y-auto p-2 bg-gray-800/92 backdrop-blur-sm shadow-xs rounded-br-lg ${this.isPlayerStatsShown || this.isTeamStatsShown ? "max-[400px]:w-full max-[400px]:rounded-none" : ""} transition-all duration-300 ease-out transform ${
class=${`max-lg:fixed max-lg:top-0 max-lg:left-0 max-lg:z-900 lg:pointer-events-auto flex flex-col max-h-[calc(100vh-80px)] overflow-y-auto p-2 bg-gray-800/92 backdrop-blur-sm shadow-xs rounded-br-lg ${this.isPlayerStatsShown || this.isTeamStatsShown ? "max-[400px]:w-full max-[400px]:rounded-none" : ""} transition-all duration-300 ease-out transform ${
this.isVisible ? "translate-x-0" : "hidden"
}`}
style="margin-top: ${this.barOffset}px;"
Expand Down
8 changes: 5 additions & 3 deletions src/client/hud/layers/PlayerInfoOverlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,20 +913,22 @@ export class PlayerInfoOverlay extends LitElement implements Controller {
}

const containerClasses = this._isInfoVisible
? "opacity-100 visible"
? "opacity-100 visible pointer-events-auto"
: "opacity-0 invisible pointer-events-none";

// From lg it sits in the top HUD row (index.html), which shifts or narrows
// it to clear the open leaderboard.
return html`
<div
class="fixed top-0 left-0 right-0 sm:left-1/2 sm:right-auto sm:-translate-x-1/2 z-[1001]"
class="max-lg:fixed max-lg:top-0 max-lg:left-0 max-lg:right-0 sm:max-lg:left-1/2 sm:max-lg:right-auto sm:max-lg:-translate-x-1/2 max-lg:z-[1001]"
style="margin-top: ${this.barOffset}px;"
@click=${() => this.hide()}
@contextmenu=${(e: MouseEvent) => e.preventDefault()}
>
<div
class="bg-gray-800/92 backdrop-blur-sm shadow-xs min-[1200px]:rounded-lg sm:rounded-b-lg shadow-lg text-white text-lg lg:text-base w-full ${
this.showShortcutButtons() ? "sm:w-[598px]" : "sm:w-[500px]"
} overflow-hidden ${containerClasses}"
} lg:max-w-full overflow-hidden ${containerClasses}"
@mouseenter=${this.onPanelEnter}
@mouseleave=${this.onPanelLeave}
>
Expand Down
Loading