CSS reworking - work in progress
This commit is contained in:
parent
4c704a5566
commit
6da79bc9c8
File diff suppressed because it is too large
Load Diff
2107
assets/static/css/orig.css
Normal file
2107
assets/static/css/orig.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,15 @@
|
||||
{{define "base"}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" >
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" >
|
||||
<meta http-equiv="Pragma" content="no-cache" >
|
||||
<meta http-equiv="Expires" content="0" >
|
||||
<title>BrainMinder</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="manifest" href="/static/manifest.json" />
|
||||
<link rel="stylesheet" href="/static/bootstrap-icons/font/bootstrap-icons.min.css" />
|
||||
<link rel="stylesheet" href="/static/easymde/easymde.min.css" />
|
||||
<link rel="stylesheet" href="/static/css/slimselect.css" />
|
||||
<link rel="stylesheet" href="/static/css/main.css" />
|
||||
<link rel="stylesheet" href="/static/css/orig.css" />
|
||||
<link rel="icon" type="image/svg+xml" href="/static/img/brainminder-icon.svg">
|
||||
|
||||
{{block "page:meta" . }}
|
||||
@ -24,39 +21,21 @@
|
||||
|
||||
{{template "partial:sidebar" .}}
|
||||
|
||||
<div
|
||||
id="page-main"
|
||||
class="w3-main"
|
||||
>
|
||||
<div class="w3-bar w3-top w3-metro-dark-blue w3-large" id="page-top-bar">
|
||||
<div class="w3-bar-item" id="page-title-container">
|
||||
<a
|
||||
class="w3-bar-item w3-button w3-hide-large w3-hover-none w3-hover-text-light-grey"
|
||||
onclick="bm_toggle_sidebar('main-sidebar'); return false"
|
||||
href="#"
|
||||
style="padding-left: 4px; padding-right: 10px;">
|
||||
<img src="/static/img/brainminder.svg" style="height: 32px;" />
|
||||
<div id="page-main" class="w3-main">
|
||||
<div class="w3-top w3-metro-dark-blue w3-large" id="page-top-bar">
|
||||
<div id="page-title-container">
|
||||
<a class="w3-hide-large w3-hover-none w3-hover-text-light-grey" onclick="bm_toggle_sidebar('main-sidebar'); return false" href="#" style="float: left; padding-left: 4px; padding-right: 10px;">
|
||||
<img src="/static/img/brainminder.svg" alt="BrainMinder" style="height: 32px;" />
|
||||
</a>
|
||||
<div id="page-title">{{template "page:title" .}}</div>
|
||||
<div class="w3-bar-item w3-right w3-hide-small" id="searchBar">
|
||||
<form
|
||||
method="POST"
|
||||
hx-post="/items/search"
|
||||
hx-target="#page-content"
|
||||
hx-push-url="true"
|
||||
>
|
||||
<div id="search-bar">
|
||||
<form class="w3-hide-small" method="POST" hx-post="/items/search" hx-target="#page-content" hx-push-url="true" style="float: left">
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}" />
|
||||
<input
|
||||
type="text"
|
||||
id="searchText"
|
||||
name="SearchText"
|
||||
class="w3-bar-item w3-input"
|
||||
placeholder="Search.."
|
||||
/>
|
||||
<button type="submit" class="w3-bar-item w3-button w3-round-large" style="margin-left: 4px;padding: 4px 8px; margin-top: 4px; margin-right: 8px;"><i class="bi bi-search"></i></button>
|
||||
<button type="button" onclick="bm_toggle_quickbox();" class="w3-bar-item w3-button w3-round-large" style="margin-left: 4px;padding: 4px 8px; margin-top: 4px; margin-right: 8px;"><i class="bi bi-inbox-fill"></i></button>
|
||||
<input type="text" id="search-text" name="SearchText" class="w3-bar-item" placeholder="Search.." />
|
||||
<button type="submit" style="margin-left: 4px;padding: 4px 8px;"><i class="bi bi-search"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
<button type="button" onclick="bm_toggle_quickbox();" style="margin-left: 4px;padding: 4px 8px; margin-right: 8px;"><i class="bi bi-inbox-fill"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -73,8 +52,7 @@
|
||||
<div id="modal-confirm-dialog" class="w3-modal" style="display: none;">
|
||||
<div id="modal-confirm-dialog-content" class="w3-modal-content w3-round-large w3-padding w3-animate-top">
|
||||
<header class="w3-container">
|
||||
<span _="on click hide #modal-confirm-dialog"
|
||||
class="w3-button w3-small w3-round-large w3-display-topright" style="margin-top: 2px; margin-right: 8px; padding: 8px;"><i class='bi bi-x-circle-fill'></i></span>
|
||||
<span _="on click hide #modal-confirm-dialog" class="w3-button w3-small w3-round-large w3-display-topright" style="margin-top: 2px; margin-right: 8px; padding: 8px;"><i class='bi bi-x-circle-fill'></i></span>
|
||||
<h5></h5>
|
||||
</header>
|
||||
<div class="w3-container">
|
||||
@ -93,21 +71,14 @@
|
||||
<div id="quickbox" class="w3-light-gray">
|
||||
<div class="w3-bar w3-top w3-metro-dark-blue w3-large noswipe" id="quickbox-top-bar">
|
||||
<div class="w3-bar-item" id="quickbox-title-container">
|
||||
<button
|
||||
type="button"
|
||||
class="w3-bar-item w3-button w3-hide-large w3-hover-none w3-hover-text-light-grey"
|
||||
onclick="bm_toggle_sidebar('main-sidebar');"
|
||||
style="padding-left: 4px; padding-right: 10px;">
|
||||
<img class="w3-hide-large" src="/static/img/brainminder.svg" style="height: 32px;">
|
||||
<button type="button" class="w3-bar-item w3-button w3-hide-large w3-hover-none w3-hover-text-light-grey"
|
||||
onclick="bm_toggle_sidebar('main-sidebar');" style="padding-left: 4px; padding-right: 10px;">
|
||||
<img class="w3-hide-large" alt="BrainMinder" src="/static/img/brainminder.svg" style="height: 32px;">
|
||||
</button>
|
||||
<div id="quickbox-title">
|
||||
<div class="w3-left"><h5>Quickbox</h5></div>
|
||||
<div class="w3-right" style="margin-top: 6px; margin-right: 12px;">
|
||||
<button
|
||||
class="w3-button w3-medium w3-round-large"
|
||||
style="padding: 2px 6px;"
|
||||
onclick="bm_hide_quickbox()"><i class="bi bi-x-circle-fill" style="margin-top: 4px;"></i>
|
||||
</button>
|
||||
<button class="w3-button w3-medium w3-round-large" style="padding: 2px 6px;" onclick="bm_hide_quickbox()"><i class="bi bi-x-circle-fill" style="margin-top: 4px;"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,16 +1,13 @@
|
||||
{{define "full"}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" >
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" >
|
||||
<meta http-equiv="Pragma" content="no-cache" >
|
||||
<meta http-equiv="Expires" content="0" >
|
||||
<title>BrainMinder</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="stylesheet" href="/static/bootstrap-icons/font/bootstrap-icons.min.css" />
|
||||
<link rel="stylesheet" href="/static/css/main.css" />
|
||||
<link rel="stylesheet" href="/static/css/orig.css" />
|
||||
<link rel="icon" type="image/x-icon" href="/static/img/brainminder-icon.svg">
|
||||
|
||||
{{block "page:meta" . }}
|
||||
|
@ -1,9 +1,3 @@
|
||||
{{define "page:title"}}
|
||||
<div class="w3-left">
|
||||
<h5>All Items</h5>
|
||||
</div>
|
||||
<div class="w3-right w3-hide-medium w3-hide-large" style="margin-top: 6px; margin-right: 6px;">
|
||||
<a class="w3-button w3-medium w3-round-large" href="#" onclick="bm_toggle_visibility('all_items_search'); return false;"><i class="bi bi-search"></i></a>
|
||||
<a href="#" onclick="bm_toggle_quickbox(); return false;" class="w3-button w3-medium w3-round-large"><i class='bi bi-inbox-fill'></i></a>
|
||||
</div>
|
||||
<h5>All Items</h5>
|
||||
{{end}}
|
@ -1,5 +1,3 @@
|
||||
{{define "page:title"}}
|
||||
<div class="w3-left">
|
||||
<h5>New {{ .type.Title}}</h5>
|
||||
</div>
|
||||
{{end}}
|
@ -5,33 +5,14 @@
|
||||
{{ $fields_present = true }}
|
||||
{{ end }}
|
||||
|
||||
<form
|
||||
method="POST"
|
||||
hx-post="{{.formAction}}"
|
||||
hx-target="{{.formTarget}}"
|
||||
>
|
||||
<div class="w3-container page-container">
|
||||
<div class="tab-bar w3-bar w3-light-gray">
|
||||
<a
|
||||
class="active tab-button w3-bar-item w3-button w3-border-top w3-border-left w3-border-right"
|
||||
onclick="bm_open_tab(this, 'tab-button', 'tab', 'general')"
|
||||
>
|
||||
General
|
||||
</a>
|
||||
<form method="POST" hx-post="{{.formAction}}" hx-target="{{.formTarget}}">
|
||||
<div class="page-container">
|
||||
<div class="tab-bar">
|
||||
<a class="active tab-button" onclick="bm_open_tab(this, 'tab-button', 'tab', 'general')">General</a>
|
||||
{{ if $fields_present }}
|
||||
<a
|
||||
class="tab-button w3-bar-item w3-button w3-border-top w3-border-left w3-border-right"
|
||||
onclick="bm_open_tab(this, 'tab-button', 'tab', 'fields')"
|
||||
>
|
||||
Fields
|
||||
</a>
|
||||
<a class="tab-button" onclick="bm_open_tab(this, 'tab-button', 'tab', 'fields')">Fields</a>
|
||||
{{ end }}
|
||||
<a
|
||||
class="tab-button w3-bar-item w3-button w3-border-top w3-border-left w3-border-right"
|
||||
onclick="bm_open_tab(this, 'tab-button', 'tab', 'relationsSection')"
|
||||
>
|
||||
Relations
|
||||
</a>
|
||||
<a class="tab-button" onclick="bm_open_tab(this, 'tab-button', 'tab', 'relationsSection')">Relations</a>
|
||||
</div>
|
||||
|
||||
<div id="general" class="tab" style="display: block">
|
||||
@ -39,7 +20,7 @@
|
||||
<div class="w3-half">
|
||||
<p>
|
||||
<label for="item-title">Title</label>
|
||||
<input name="Title" id="item-title" type="text" value="{{.item.Title}}" style="width: 100%"/>
|
||||
<input name="Title" id="item-title" type="text" value="{{.item.Title}}" />
|
||||
</p>
|
||||
<p>
|
||||
{{ widget_select "Type_id" "Type" .item.Type_id .types `style="width: 100%"` }}
|
||||
@ -66,21 +47,14 @@
|
||||
{{ if eq .item.Type_show_description 1}}
|
||||
<p>
|
||||
<label for="item-description">Description</label>
|
||||
<textarea
|
||||
name="Description"
|
||||
class="w3-input w3-border"
|
||||
id="item-description"
|
||||
type="text"
|
||||
rows="10"
|
||||
>{{.item.Description}}</textarea
|
||||
>
|
||||
<textarea name="Description" class="w3-input w3-border" id="item-description" rows="10">{{.item.Description}}</textarea>
|
||||
</p>
|
||||
{{ end }}
|
||||
<div class="w3-row">
|
||||
<div class="w3-half">
|
||||
<p>
|
||||
<label for="item-tags">Tags</label>
|
||||
<input name="Tags" id="item-tags" type="text" value="{{.item.Tags}}" style="width: 100%" />
|
||||
<input name="Tags" id="item-tags" type="text" value="{{.item.Tags}}" />
|
||||
</p>
|
||||
</div>
|
||||
<div class="w3-half">
|
||||
@ -91,10 +65,11 @@
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<label>
|
||||
<label class="switch">
|
||||
<input id="on_dashboard" name="On_dashboard" type="checkbox" value="1" {{if eq .item.On_dashboard 1}} checked="checked" {{end}} />
|
||||
On dashboard
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="on_dashboard" class="label-checkbox">On dashboard</label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -117,25 +92,11 @@
|
||||
<legend>Add items</legend>
|
||||
<div class="w3-row">
|
||||
<div class="w3-col l6 m9 s10">
|
||||
<input
|
||||
id="search-item-relation"
|
||||
name="SearchText"
|
||||
type="text"
|
||||
value=""
|
||||
placeholder="Search"
|
||||
hx-get="/items/search-for-relations/{{.item.Id}}"
|
||||
hx-trigger="search-item-relation, keyup changed delay:1s"
|
||||
hx-vals="js:{SearchText: document.getElementById('search-item-relation').value}"
|
||||
hx-target="#items-list-for-relations"
|
||||
<input id="search-item-relation" name="SearchText" type="text" value="" placeholder="Search" hx-get="/items/search-for-relations/{{.item.Id}}" hx-trigger="search-item-relation, keyup changed delay:1s" hx-vals="js:{SearchText: document.getElementById('search-item-relation').value}" hx-target="#items-list-for-relations"
|
||||
/>
|
||||
</div>
|
||||
<div class="w3-col l6 m3 s1" style="padding-left: 10px;">
|
||||
<a
|
||||
class="w3-btn w3-metro-blue w3-round-large"
|
||||
hx-vals="js:{SearchText: document.getElementById('search-item-relation').value}"
|
||||
hx-target="#items-list-for-relations"
|
||||
hx-get="/items/search-for-relations/{{.item.Id}}"
|
||||
><i class="bi bi-search"></i><span class="w3-hide-small"> Find</span></a>
|
||||
<a class="button w3-metro-blue" hx-vals="js:{SearchText: document.getElementById('search-item-relation').value}" hx-target="#items-list-for-relations" hx-get="/items/search-for-relations/{{.item.Id}}"><i class="bi bi-search"></i><span class="w3-hide-small"> Find</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="items-list-for-relations" style="margin-top:10px">
|
||||
@ -144,75 +105,34 @@
|
||||
</div>
|
||||
</div>
|
||||
<p class="w3-hide-small w3-container">
|
||||
<button class="w3-btn w3-metro-dark-blue w3-round-large">
|
||||
<button class="w3-metro-dark-blue">
|
||||
<i class="bi bi-floppy"></i> Save
|
||||
</button>
|
||||
{{ if not (eq .item.Id 0) }}
|
||||
<a
|
||||
class="w3-btn w3-metro-blue w3-round-large"
|
||||
href="/item/read/{{.item.Id}}"
|
||||
hx-get="/item/read/{{.item.Id}}"
|
||||
hx-push-url="true"
|
||||
hx-target="#page-content"
|
||||
><i class="bi bi-binoculars"></i> View</a
|
||||
>
|
||||
<a class="w3-button w3-metro-blue w3-delete w3-round-large" hx-delete="/item/delete/{{.item.Id}}" hx-target="#page-content" hx-trigger="confirmed" onClick="bm_show_confirm(this, 'Items', 'Delete this item ?')"><i class="bi bi-trash"></i> Delete</a>
|
||||
<a
|
||||
class="w3-btn w3-metro-blue w3-round-large"
|
||||
href="#"
|
||||
hx-target="#modal-container"
|
||||
hx-get="/item/share/{{.item.Id}}"
|
||||
title="Share"
|
||||
><i class="bi bi-share-fill"></i> Share</a
|
||||
>
|
||||
<a class="button w3-metro-blue" href="/item/read/{{.item.Id}}" hx-get="/item/read/{{.item.Id}}" hx-push-url="true" hx-target="#page-content"><i class="bi bi-binoculars"></i> View</a>
|
||||
<a class="button w3-metro-blue w3-delete" hx-delete="/item/delete/{{.item.Id}}" hx-target="#page-content" hx-trigger="confirmed" onClick="bm_show_confirm(this, 'Items', 'Delete this item ?')"><i class="bi bi-trash"></i> Delete</a>
|
||||
<a class="button w3-metro-blue" href="#" hx-target="#modal-container" hx-get="/item/share/{{.item.Id}}" title="Share"><i class="bi bi-share-fill"></i> Share</a>
|
||||
{{ end }}
|
||||
<a
|
||||
class="w3-btn w3-metro-blue w3-round-large"
|
||||
hx-target="#page-content"
|
||||
hx-push-url="true"
|
||||
hx-get="/items/type/{{.item.Type_id}}"
|
||||
><i class="bi bi-arrow-left-circle"></i> Back</a
|
||||
>
|
||||
<a class="button w3-metro-blue" hx-target="#page-content" hx-push-url="true" hx-get="/items/type/{{.item.Type_id}}"><i class="bi bi-arrow-left-circle"></i> Back</a>
|
||||
</p>
|
||||
|
||||
<div class="footerNavbar-container">
|
||||
<div class="w3-bar footerNavbar w3-hide-medium w3-hide-large w3-round-large">
|
||||
<div class="w3-bar footerNavbar w3-hide-medium w3-hide-large">
|
||||
<div class="w3-bar-item">
|
||||
<button type="submit" class="w3-button w3-metro-dark-blue w3-round-large" title="Save">
|
||||
<button type="submit" class="w3-metro-dark-blue" title="Save">
|
||||
<i class="bi bi-floppy"></i>
|
||||
</button>
|
||||
</div>
|
||||
{{ if not (eq .item.Id 0) }}
|
||||
<div class="w3-bar-item">
|
||||
<a
|
||||
class="w3-button w3-metro-dark-blue w3-delete w3-round-large"
|
||||
hx-delete="/item/delete/{{.item.Id}}"
|
||||
hx-target="#page-content"
|
||||
hx-trigger="confirmed"
|
||||
onClick="bm_show_confirm(this, 'Items', 'Delete this item ?')"
|
||||
title="Delete"
|
||||
><i class="bi bi-trash"></i>
|
||||
<a class="button w3-metro-dark-blue w3-delete" hx-delete="/item/delete/{{.item.Id}}" hx-target="#page-content" hx-trigger="confirmed" onClick="bm_show_confirm(this, 'Items', 'Delete this item ?')" title="Delete"><i class="bi bi-trash"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="w3-bar-item">
|
||||
<a
|
||||
class="w3-button w3-metro-dark-blue w3-round-large"
|
||||
href="#"
|
||||
hx-target="#modal-container"
|
||||
hx-get="/item/share/{{.item.Id}}"
|
||||
title="Share"
|
||||
><i class="bi bi-share-fill"></i>
|
||||
</a>
|
||||
<a class="button w3-metro-dark-blue" href="#" hx-target="#modal-container" hx-get="/item/share/{{.item.Id}}" title="Share"><i class="bi bi-share-fill"></i></a>
|
||||
</div>
|
||||
<div class="w3-bar-item">
|
||||
<a
|
||||
class="w3-button w3-metro-dark-blue w3-round-large"
|
||||
href="/item/read/{{.item.Id}}"
|
||||
hx-get="/item/read/{{.item.Id}}"
|
||||
hx-push-url="true"
|
||||
hx-target="#page-content"
|
||||
title="View"
|
||||
><i class="bi bi-binoculars"></i>
|
||||
<a class="button w3-metro-dark-blue" href="/item/read/{{.item.Id}}" hx-get="/item/read/{{.item.Id}}" hx-push-url="true" hx-target="#page-content" title="View"><i class="bi bi-binoculars"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -43,7 +43,7 @@
|
||||
<i class="w3-hide-medium w3-hide-large bi bi-tags-fill"></i>
|
||||
{{ range (stringToArray .Categories "|")}}
|
||||
{{ $category_name := index $.categoriesMap .}}
|
||||
<div class="tag" style="padding: 3px">
|
||||
<div class="tag" style="padding: 3px">class="w3-button w3-round-large w3-hover-metro-dark-blue w3-medium"
|
||||
{{ $category_name }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -1,8 +1,3 @@
|
||||
{{define "page:title"}}
|
||||
<div class="w3-left">
|
||||
<h5>Edit {{.item.Type_title}}</h5>
|
||||
</div>
|
||||
<div class="w3-right w3-hide-medium w3-hide-large" style="margin-top: 6px; margin-right: 6px;">
|
||||
<a href="#" onclick="bm_toggle_quickbox(); return false;" class="w3-button w3-medium w3-round-large"><i class='bi bi-inbox-fill'></i></a>
|
||||
</div>
|
||||
{{end}}
|
@ -15,26 +15,11 @@
|
||||
<div class="w3-card w3-display-container w3-round-large" style="padding: 10px; background-color: #fff;">
|
||||
<div class="w3-row">
|
||||
<div class="w3-col l11 m11 s11">
|
||||
<h5 style="color: #2b5797">
|
||||
<a
|
||||
class="w3-hide-small"
|
||||
href="/item/view/{{.Id}}"
|
||||
hx-get="/item/view/{{.Id}}"
|
||||
hx-target="#modal-container"
|
||||
><i class="{{.Type_icon}}" title="{{.Type_title}}"></i> {{.Title}}</a>
|
||||
|
||||
<a
|
||||
class="w3-hide-medium w3-hide-large"
|
||||
href="/item/read/{{.Id}}"
|
||||
hx-get="/item/read/{{.Id}}"
|
||||
hx-target="#page-content"
|
||||
hx-push-url="true"
|
||||
><i class="{{.Type_icon}}" title="{{.Type_title}}"></i> {{.Title}}</a>
|
||||
|
||||
<h5>
|
||||
<a class="w3-hide-small" href="/item/view/{{.Id}}" hx-get="/item/view/{{.Id}}" hx-target="#modal-container"><i class="{{.Type_icon}}" title="{{.Type_title}}"></i> {{.Title}}</a>
|
||||
<a class="w3-hide-medium w3-hide-large" href="/item/read/{{.Id}}" hx-get="/item/read/{{.Id}}" hx-target="#page-content" hx-push-url="true"><i class="{{.Type_icon}}" title="{{.Type_title}}"></i> {{.Title}}</a>
|
||||
</h5>
|
||||
<div class="home-card-summary">
|
||||
{{.Summary | markdownfy | safeHTML}}
|
||||
</div>
|
||||
<div class="home-card-summary">{{.Summary | markdownfy | safeHTML}}</div>
|
||||
</div>
|
||||
<div class="w3-col l1 m1 s1">
|
||||
<a
|
||||
|
@ -1,10 +1,7 @@
|
||||
{{define "partial:sidebar"}}
|
||||
<!-- Sidebar/menu -->
|
||||
<nav
|
||||
class="w3-sidebar w3-collapse w3-white w3-animate-left"
|
||||
id="main-sidebar"
|
||||
>
|
||||
<div id="appTitle">
|
||||
<nav class="w3-sidebar w3-collapse w3-white w3-animate-left" id="main-sidebar">
|
||||
<div id="app-title">
|
||||
<a class="w3-hide-large" href="#" onclick="bm_toggle_sidebar('main-sidebar'); return false;">
|
||||
<img src="/static/img/brainminder.svg" style="height: 32px; padding-right: 10px;" />
|
||||
<span style="font-weight: bold;">B</span>rain<span style="font-weight: bold;">M</span>inder
|
||||
@ -16,96 +13,72 @@
|
||||
</div>
|
||||
|
||||
<div id="main-sidebar-content">
|
||||
<div class="w3-bar-block w3-container" id="searchSidebar">
|
||||
<form method="POST" hx-post="/items/search" hx-target="#page-content" hx-push-url="true" hx-on:submit="bm_sidebar_click('main-sidebar')">
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}" />
|
||||
<div class="w3-row">
|
||||
<div class="threequarter">
|
||||
<input type="text" id="searchText" name="SearchText" placeholder="Search.." />
|
||||
</div>
|
||||
<div class="quarter">
|
||||
<button type="submit" class="w3-right w3-button w3-round-large w3-metro-dark-blue" style="padding: 4px 8px; margin-top: 5px; margin-right: 8px;"><i class='bi bi-search'></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="w3-bar-block w3-container" id="searchSidebar">
|
||||
<form method="POST" hx-post="/items/search" hx-target="#page-content" hx-push-url="true" hx-on:submit="bm_sidebar_click('main-sidebar')">
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}" />
|
||||
<div class="w3-row">
|
||||
<div class="threequarter">
|
||||
<input type="text" id="searchText" name="SearchText" placeholder="Search.." />
|
||||
</div>
|
||||
<div class="quarter">
|
||||
<button type="submit" class="w3-right w3-button w3-round-large w3-metro-dark-blue" style="padding: 4px 8px; margin-top: 5px; margin-right: 8px;"><i class='bi bi-search'></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="w3-container">
|
||||
<h5 class="w3-text-metro-dark-blue">
|
||||
<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>
|
||||
|
||||
<h5 class="w3-text-metro-dark-blue">
|
||||
<i class="bi bi-journals"></i> Notebook
|
||||
</h5>
|
||||
<form method="POST" action="/" hx-post="/" hx-push-url="true" hx-target="#page-content">
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}" />
|
||||
{{template "partial:notebooks-list" . }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="w3-container">
|
||||
<h5 class="w3-text-metro-dark-blue accordion" onclick="bm_toggle_visibility('types_menu')">
|
||||
<i class="bi bi-list-task"></i> Items <i class='w3-right bi bi-caret-down types_menu'></i><i class='w3-right bi bi-caret-up hidden types_menu'></i>
|
||||
<div class="sidebar-block">
|
||||
<h5 class="w3-text-metro-dark-blue">
|
||||
<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 id="types_menu" class="w3-bar-block w3-margin-left w3-margin-right hidden">
|
||||
|
||||
<div class="sidebar-block">
|
||||
<h5 class="w3-text-metro-dark-blue">
|
||||
<i class="bi bi-journals"></i> Notebook
|
||||
</h5>
|
||||
<form method="POST" action="/" hx-post="/" hx-push-url="true" hx-target="#page-content">
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}" />
|
||||
{{template "partial:notebooks-list" . }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-block">
|
||||
<h5 class="w3-text-metro-dark-blue accordion" onclick="bm_toggle_visibility('types_menu')">
|
||||
<i class="bi bi-list-task"></i> Items <i class='w3-right bi bi-chevron-down types_menu'></i><i class='w3-right bi bi-chevron-up hidden types_menu'></i>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div id="types_menu" class="sidebar-block hidden">
|
||||
{{template "partial:types-list" . }}
|
||||
<a
|
||||
class="w3-bar-item w3-button w3-padding w3-hover-metro-dark-blue w3-hover-round-large"
|
||||
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 class="menu-item">
|
||||
<div class="menu-item-title">
|
||||
<a class="button w3-hover-metro-dark-blue w3-hover-round-large" 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="w3-container">
|
||||
<div class="sidebar-block">
|
||||
<h5 class="w3-text-metro-dark-blue accordion" onclick="bm_toggle_visibility('settings_menu')">
|
||||
<i class="bi bi-gear-fill"></i> Settings <i class='w3-right bi bi-caret-down settings_menu'></i><i class='w3-right bi bi-caret-up hidden settings_menu'></i>
|
||||
<i class="bi bi-gear-fill"></i> Settings <i class='w3-right bi bi-chevron-down settings_menu'></i><i class='w3-right bi bi-chevron-up hidden settings_menu'></i>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="settings_menu" class="w3-bar-block w3-margin-left w3-margin-right hidden">
|
||||
<a
|
||||
class="w3-bar-item w3-button w3-padding w3-hover-metro-dark-blue w3-hover-round-large"
|
||||
hx-get="/notebooks"
|
||||
hx-target="#page-content"
|
||||
hx-push-url="true"
|
||||
href="/notebooks"
|
||||
hx-on:click="bm_sidebar_click('main-sidebar')">
|
||||
|
||||
<div id="settings_menu" class="sidebar-block sidebar-menu hidden">
|
||||
<a class="button w3-hover-metro-dark-blue w3-hover-round-large" 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="w3-bar-item w3-button w3-padding w3-hover-metro-dark-blue w3-hover-round-large"
|
||||
hx-get="/categories"
|
||||
hx-target="#page-content"
|
||||
hx-push-url="true"
|
||||
href="/categories"
|
||||
hx-on:click="bm_sidebar_click('main-sidebar')">
|
||||
<a class="button w3-hover-metro-dark-blue w3-hover-round-large" 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="w3-bar-item w3-button w3-padding w3-hover-metro-dark-blue w3-hover-round-large"
|
||||
hx-get="/types"
|
||||
hx-target="#page-content"
|
||||
hx-push-url="true"
|
||||
href="/types"
|
||||
hx-on:click="bm_sidebar_click('main-sidebar')">
|
||||
<a class="button w3-hover-metro-dark-blue w3-hover-round-large" 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="w3-container">
|
||||
|
||||
<div class="sidebar-block">
|
||||
<h5 class="w3-text-metro-dark-blue">
|
||||
<a href="/logout"><i class="bi bi-box-arrow-left"></i></i> Logout</a>
|
||||
</h5>
|
||||
|
@ -1,21 +1,14 @@
|
||||
{{define "partial:types-list"}}
|
||||
<div class="w3-bar-item w3-row" id="types-list" style="padding: 0;">
|
||||
<div id="types-list">
|
||||
{{ range .typesList }}
|
||||
<div class="w3-row">
|
||||
<div class="w3-col w3-right" style="width: 50px;">
|
||||
<a class="w3-button w3-round-large w3-hover-metro-dark-blue w3-medium" hx-on:click="bm_sidebar_click('main-sidebar')" hx-get="/item/create/{{ .Id }}" hx-push-url="true" hx-target="#page-content"><i class="bi bi-plus-square"></i></a>
|
||||
<div class="menu-item">
|
||||
<div class="menu-item-action">
|
||||
<a class="button w3-hover-metro-dark-blue w3-medium" hx-on:click="bm_sidebar_click('main-sidebar')" hx-get="/item/create/{{ .Id }}" hx-push-url="true" hx-target="#page-content"><i class="bi bi-plus-square"></i></a>
|
||||
</div>
|
||||
<div class="w3-rest">
|
||||
<a
|
||||
class="w3-button w3-hover-metro-dark-blue w3-hover-round-large"
|
||||
style="text-align:left; width: 100%"
|
||||
hx-get="/items/type/{{.Id}}"
|
||||
hx-target="#page-content"
|
||||
hx-push-url="true"
|
||||
href="/items/type/{{.Id}}"
|
||||
hx-on:click="bm_sidebar_click('main-sidebar')">
|
||||
<i class="{{.Icon}}"></i> {{.Title}}
|
||||
</a>
|
||||
<div class="menu-item-title">
|
||||
<a class="button w3-hover-metro-dark-blue w3-hover-round-large" hx-get="/items/type/{{.Id}}" hx-target="#page-content" hx-push-url="true" href="/items/type/{{.Id}}" hx-on:click="bm_sidebar_click('main-sidebar')">
|
||||
<i class="{{.Icon}}"></i> {{.Title}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -428,9 +428,8 @@ func widget_checkboxes(name string, label string, value any, options []WidgetOpt
|
||||
}
|
||||
id_str := strings.ReplaceAll(name+"-"+option.Key, " ", "-")
|
||||
o = o + "<p>"
|
||||
//o = o + fmt.Sprintf(`<label class="switch"><input id="%v" type="checkbox" name="%v" %v value="%v" %v /><span class="slider round"></span></label>`, id_str, name, checked, option.Key, attributes)
|
||||
o = o + fmt.Sprintf(`<label><input id="%v" type="checkbox" name="%v" %v value="%v" %v />%v</label>`, id_str, name, checked, option.Key, attributes, option.Value)
|
||||
//o = o + fmt.Sprintf(`<label class="label-checkbox" for="%v">%v</label>`, id_str, option.Value)
|
||||
o = o + fmt.Sprintf(`<label class="switch"><input id="%v" type="checkbox" name="%v" %v value="%v" %v /><span class="slider round"></span></label>`, id_str, name, checked, option.Key, attributes)
|
||||
o = o + fmt.Sprintf(`<label class="label-checkbox" for="%v">%v</label>`, id_str, option.Value)
|
||||
o = o + "</p>"
|
||||
}
|
||||
o = o + "</fiedlset>"
|
||||
|
Loading…
Reference in New Issue
Block a user