82 lines
3.5 KiB
Cheetah
82 lines
3.5 KiB
Cheetah
{{define "partial:sidebar"}}
|
|
<!-- Sidebar/menu -->
|
|
<nav id="main-sidebar">
|
|
<div id="app-title">
|
|
<a class="hide-large" href="#" onclick="bm_toggle_sidebar('main-sidebar'); return false;"><img src="/static/img/brainminder.svg" alt="BrainMinder" class="logo" /></a>
|
|
<a class="hide-large" href="#" onclick="bm_toggle_sidebar('main-sidebar'); return false;"><h5>BrainMinder</h5></a>
|
|
<a class="show-large" href="/" hx-get="/" hx-push-url="true" hx-target="#page-content"><img src="/static/img/brainminder.svg" alt="BrainMinder" class="logo" /></a>
|
|
<a class="show-large" href="/" hx-get="/" hx-push-url="true" hx-target="#page-content"><h5>BrainMinder</h5></a>
|
|
</div>
|
|
|
|
<div id="main-sidebar-content">
|
|
<div id="sidebar-search" class="hide-large">
|
|
<form method="POST" hx-post="/items/search" hx-target="#page-content" hx-push-url="true" hx-on:submit="bm_sidebar_click('main-sidebar')">
|
|
<div style="display: flex;">
|
|
<div style="flex-grow:1">
|
|
<input type="text" id="searchText" name="SearchText" placeholder="Search.." />
|
|
</div>
|
|
<div>
|
|
<button type="submit" class="main" style="padding: 4px 8px; margin-top: 5px; margin-left: 4px; margin-right: 4px;"><i class='bi bi-search'></i></button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="sidebar-block">
|
|
<h5>
|
|
<a hx-get="/" hx-target="#page-content" hx-push-url="true" href="/" hx-on:click="bm_sidebar_click('main-sidebar')"><i class="bi bi-speedometer"></i> Dashboard</a>
|
|
</h5>
|
|
</div>
|
|
|
|
<div class="sidebar-block">
|
|
<h5>
|
|
<i class="bi bi-journals"></i> Notebook
|
|
</h5>
|
|
<form method="POST" action="/" hx-post="/" hx-push-url="true" hx-target="#page-content">
|
|
{{template "partial:notebooks-list" . }}
|
|
</form>
|
|
</div>
|
|
|
|
<div class="sidebar-block">
|
|
<h5 class="accordion" onclick="bm_toggle_visibility('types_menu')">
|
|
<i class="bi bi-list-task"></i> Items <i class='bi bi-chevron-down types_menu'></i><i class='bi bi-chevron-up hidden types_menu'></i>
|
|
</h5>
|
|
</div>
|
|
|
|
<div id="types_menu" class="sidebar-block hidden">
|
|
{{template "partial:types-list" . }}
|
|
<div class="menu-item">
|
|
<div class="menu-item-title">
|
|
<a class="button" hx-get="/items" hx-target="#page-content" hx-push-url="true" href="/items" hx-on:click="bm_sidebar_click('main-sidebar')">
|
|
<i class="bi bi-list-task"></i> <strong>All</strong>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="sidebar-block">
|
|
<h5 class="accordion" onclick="bm_toggle_visibility('settings_menu')">
|
|
<i class="bi bi-gear-fill"></i> Settings <i class='bi bi-chevron-down settings_menu'></i><i class='bi bi-chevron-up hidden settings_menu'></i>
|
|
</h5>
|
|
</div>
|
|
|
|
<div id="settings_menu" class="sidebar-block sidebar-menu hidden">
|
|
<a class="button" hx-get="/notebooks" hx-target="#page-content" hx-push-url="true" href="/notebooks" hx-on:click="bm_sidebar_click('main-sidebar')">
|
|
<i class="bi bi-journals"></i> Notebooks
|
|
</a>
|
|
<a class="button" hx-get="/categories" hx-target="#page-content" hx-push-url="true" href="/categories" hx-on:click="bm_sidebar_click('main-sidebar')">
|
|
<i class="bi bi-bookmarks"></i> Categories
|
|
</a>
|
|
<a class="button" hx-get="/types" hx-target="#page-content" hx-push-url="true" href="/types" hx-on:click="bm_sidebar_click('main-sidebar')">
|
|
<i class="bi bi-boxes"></i> Types
|
|
</a>
|
|
</div>
|
|
|
|
<div class="sidebar-block">
|
|
<h5><a href="/logout"><i class="bi bi-box-arrow-left"></i></i> Logout</a></h5>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
{{ end }}
|