62 lines
1.9 KiB
HTML
62 lines
1.9 KiB
HTML
{{define "boards"}}
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>{{.Title}}</title>
|
|
<link rel="stylesheet" href="{{.StaticPath}}/style.css">
|
|
</head>
|
|
<body>
|
|
{{template "navbar" .}}
|
|
<main>
|
|
<header>
|
|
<h2>Boards</h2>
|
|
</header>
|
|
<section>
|
|
<h3>Public Boards</h3>
|
|
{{if .PublicBoards}}
|
|
<ul class="board-list">
|
|
{{range .PublicBoards}}
|
|
<li class="board-item">
|
|
<a href="{{$.BasePath}}/board/?id={{.ID}}">{{.Name}}</a>
|
|
<p class="board-desc">{{.Description}}</p>
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
{{else}}
|
|
<p>No public boards available at the moment.</p>
|
|
{{end}}
|
|
</section>
|
|
{{if .LoggedIn}}
|
|
<section>
|
|
<h3>Private Boards</h3>
|
|
{{if .PrivateBoards}}
|
|
<ul class="board-list">
|
|
{{range .PrivateBoards}}
|
|
<li class="board-item">
|
|
<a href="{{$.BasePath}}/board/?id={{.ID}}">{{.Name}}</a>
|
|
<p class="board-desc">{{.Description}}</p>
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
{{else}}
|
|
<p>No private boards available to you at the moment.</p>
|
|
{{end}}
|
|
</section>
|
|
{{end}}
|
|
{{if .IsAdmin}}
|
|
<section>
|
|
<h3>Create New Public Board</h3>
|
|
<form method="post" action="{{.BasePath}}/boards/">
|
|
<label for="name">Board Name:</label>
|
|
<input type="text" id="name" name="name" required><br>
|
|
<label for="description">Description:</label>
|
|
<textarea id="description" name="description"></textarea><br>
|
|
<input type="submit" value="Create Board">
|
|
</form>
|
|
</section>
|
|
{{end}}
|
|
</main>
|
|
{{template "cookie_banner" .}}
|
|
</body>
|
|
</html>
|
|
{{end}} |