First pass at basic functionality.
This PR introduces the beginnings of Sprint Padawan. Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
{{define "room.html"}}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
{{template "app-head" (dict "Title" .Room.Name "UseHTMX" true "UseSSE"
|
||||
true)}}
|
||||
<body class="app-body">
|
||||
<div class="app-shell">
|
||||
<div class="main-content">
|
||||
<header class="topbar">
|
||||
<div class="topbar-brand">
|
||||
{{template "brand-mark" .}}
|
||||
<a href="/" class="back-btn">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<line x1="19" y1="12" x2="5" y2="12"></line>
|
||||
<polyline points="12 19 5 12 12 5"></polyline>
|
||||
</svg>
|
||||
</a>
|
||||
<span class="topbar-title room-title"
|
||||
>{{.Room.Name}}</span
|
||||
>
|
||||
<span class="room-code-badge">{{.Room.Code}}</span>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
<span class="scale-badge">{{.Room.Scale}}</span>
|
||||
{{if .IsOwner}}
|
||||
<button
|
||||
hx-get="/rooms/{{.Room.ID}}/stories/new"
|
||||
hx-target="#modal-container"
|
||||
hx-swap="innerHTML"
|
||||
class="btn-primary topbar-btn"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<line x1="12" y1="5" x2="12" y2="19"></line>
|
||||
<line x1="5" y1="12" x2="19" y2="12"></line>
|
||||
</svg>
|
||||
Add Story
|
||||
</button>
|
||||
{{end}} {{template "session-controls" .User}}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="page-content">
|
||||
<div
|
||||
id="room-stream"
|
||||
class="room-stream"
|
||||
hx-ext="sse"
|
||||
sse-connect="/sse/{{.Room.ID}}"
|
||||
>
|
||||
<div
|
||||
hidden
|
||||
hx-get="/rooms/{{.Room.ID}}/partial/stories"
|
||||
hx-trigger="sse:stories"
|
||||
hx-target="#stories-panel"
|
||||
hx-swap="outerHTML"
|
||||
></div>
|
||||
<div
|
||||
hidden
|
||||
hx-get="/rooms/{{.Room.ID}}/partial/members"
|
||||
hx-trigger="sse:members"
|
||||
hx-target="#members-panel"
|
||||
hx-swap="outerHTML"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div class="room-layout">
|
||||
{{template "stories-panel" .}} {{template
|
||||
"members-panel" .}}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modal-container"></div>
|
||||
|
||||
{{template "sse-script"}}
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user