-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
119 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 4 additions & 19 deletions
23
dashboard/src/main/resources/templates/Dashboard/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
{#include main.html} | ||
|
||
<div class="container" hx-sse="connect:{uri:Dashboard.events}" hx-ext="morph"> | ||
<div class="container" hx-ext="morph"> | ||
<div | ||
id="game-container" | ||
hx-headers='{"{inject:csrf.headerName}":"{inject:csrf.token}"}' | ||
hx-trigger="sse:GameUpdate" | ||
hx-get="{uri:Dashboard.index}" | ||
hx-swap="morph:innerHTML" | ||
> | ||
> | ||
{#fragment id=game} | ||
<div class="board-container d-flex justify-content-center align-items-center" | ||
hx-trigger="sse:BoardUpdate" | ||
hx-get="{uri:Dashboard.board}" | ||
hx-swap="morph:innerHTML" | ||
> | ||
{#include Dashboard/board /} | ||
</div> | ||
<div class="controls-container d-flex justify-content-center align-items-center flex-column" | ||
hx-trigger="sse:ControlsUpdate" | ||
hx-get="{uri:Dashboard.controls}" | ||
hx-swap="morph:innerHTML" | ||
> | ||
{#include Dashboard/controls /} | ||
</div> | ||
<div class="board-container d-flex justify-content-center align-items-center" hx-ext="sse" sse-connect="{uri:Dashboard.boardEvents}" sse-swap="BoardUpdate" hx-swap="morph:innerHTML">{#include Dashboard/board /}</div> | ||
<div class="controls-container d-flex justify-content-center align-items-center flex-column" hx-ext="sse" sse-connect="{uri:Dashboard.controlsEvents}" sse-swap="ControlsUpdate" hx-swap="morph:innerHTML">{#include Dashboard/controls /}</div> | ||
{/fragment} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import "htmx.org"; | ||
import htmx from "htmx.org"; | ||
import "idiomorph"; | ||
import _hyperscript from "hyperscript.org"; | ||
import "bootstrap"; | ||
|
||
window.htmx = htmx; | ||
|
||
require("htmx.org/dist/ext/sse"); | ||
_hyperscript.browserInit(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters