UI changes
This commit is contained in:
parent
2e4a1720cd
commit
6747ae91a8
@ -46,10 +46,81 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Reset */
|
/* Reset */
|
||||||
*, *::before, *::after {
|
|
||||||
|
/* Box sizing rules */
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Prevent font size inflation */
|
||||||
|
html {
|
||||||
|
-moz-text-size-adjust: none;
|
||||||
|
-webkit-text-size-adjust: none;
|
||||||
|
text-size-adjust: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove default margin in favour of better control in authored CSS */
|
||||||
|
body, h1, h2, h3, h4, p,
|
||||||
|
figure, blockquote, dl, dd {
|
||||||
|
margin-block-end: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
|
||||||
|
ul[role='list'],
|
||||||
|
ol[role='list'] {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set core body defaults */
|
||||||
|
body {
|
||||||
|
min-height: 100vh;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set shorter line heights on headings and interactive elements */
|
||||||
|
h1, h2, h3, h4,
|
||||||
|
input, label {
|
||||||
|
line-height: 1.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Balance text wrapping on headings */
|
||||||
|
h1, h2,
|
||||||
|
h3, h4 {
|
||||||
|
text-wrap: balance;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* A elements that don't have a class get default styles */
|
||||||
|
a:not([class]) {
|
||||||
|
text-decoration-skip-ink: auto;
|
||||||
|
color: currentColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make images easier to work with */
|
||||||
|
img,
|
||||||
|
picture {
|
||||||
|
max-width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Inherit fonts for inputs and buttons */
|
||||||
|
input, button,
|
||||||
|
textarea, select {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make sure textareas without a rows attribute are not tiny */
|
||||||
|
/*textarea:not([rows]) {
|
||||||
|
min-height: 10em;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/* Anything that has been anchored to should have extra scroll margin */
|
||||||
|
:target {
|
||||||
|
scroll-margin-block: 5ex;
|
||||||
|
}
|
||||||
|
|
||||||
h1,h2,h3,h4,h5,h6, form {
|
h1,h2,h3,h4,h5,h6, form {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -228,6 +299,7 @@ button, .button {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
line-height: 1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover, .button:hover {
|
button:hover, .button:hover {
|
||||||
@ -1171,6 +1243,9 @@ dialog .content h5 {
|
|||||||
.col.half {
|
.col.half {
|
||||||
width: 49.99999%;
|
width: 49.99999%;
|
||||||
}
|
}
|
||||||
|
.col.m6, .col.half:first-child {
|
||||||
|
padding-right:10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:993px) and (min-width:768px) {
|
@media (max-width:993px) and (min-width:768px) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const cacheVersion = "0.282"
|
const cacheVersion = "0.283"
|
||||||
const cacheName = "speedtech-brainminder"
|
const cacheName = "speedtech-brainminder"
|
||||||
const cacheFiles = [
|
const cacheFiles = [
|
||||||
'/static/bootstrap-icons/font/bootstrap-icons.min.css',
|
'/static/bootstrap-icons/font/bootstrap-icons.min.css',
|
||||||
|
@ -42,17 +42,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</td>
|
</td>
|
||||||
<td class="no-label">
|
<td class="no-label">
|
||||||
<div class="w3-bar">
|
<a class="button secondary" href="#" hx-on::before-request="if(document.getElementById('ItemRelation-New-{{.Id}}-Row') != null) {event.preventDefault()}" hx-get="/item/relation/add/{{.Id}}" hx-target="#relations-items" hx-swap="beforeend"><i class="bi bi-link" title="Add relation"></i><span> Add</span></a>
|
||||||
<a
|
|
||||||
class="w3-right w3-btn w3-metro-dark-blue w3-round-large"
|
|
||||||
href="#"
|
|
||||||
hx-on::before-request=" if(document.getElementById('ItemRelation-New-{{.Id}}-Row') != null) {event.preventDefault()}"
|
|
||||||
hx-get="/item/relation/add/{{.Id}}"
|
|
||||||
hx-target="#relations-items"
|
|
||||||
hx-swap="beforeend"
|
|
||||||
><i class="bi bi-link" title="Add relation"></i><span class="hide-small"> Add</span></a
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{define "item:relations"}}
|
{{define "item:relations"}}
|
||||||
<table class="table-all w3-striped responsive">
|
<table class="table-all striped responsive">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Item</th>
|
<th>Item</th>
|
||||||
@ -25,25 +25,15 @@
|
|||||||
{{ $relation_type = "Parent" }}
|
{{ $relation_type = "Parent" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a
|
<a href="/item/view/{{$target_id}}" hx-get="/item/view/{{$target_id}}" hx-target="#modal-container"><i class="{{.Type_icon}}" title="{{.Type_title}}"></i> {{.Title}}</a>
|
||||||
href="/item/view/{{$target_id}}"
|
<input type="hidden" id="{{$relation_name_remove}}" name="{{$relation_name_remove}}" value=""/>
|
||||||
hx-get="/item/view/{{$target_id}}"
|
|
||||||
hx-target="#modal-container"
|
|
||||||
><i class="{{.Type_icon}}" title="{{.Type_title}}"></i> {{.Title}}</a
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
type="hidden"
|
|
||||||
id="{{$relation_name_remove}}"
|
|
||||||
name="{{$relation_name_remove}}"
|
|
||||||
value=""
|
|
||||||
/>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="no-label {{$relation_name}}-Col">
|
<td class="no-label {{$relation_name}}-Col">
|
||||||
{{ if gt (len .Categories) 0 }}
|
{{ if gt (len .Categories) 0 }}
|
||||||
<i class="hide-medium hide-large bi bi-tags-fill"></i>
|
<i class="hide-medium hide-large bi bi-tags-fill"></i>
|
||||||
{{ range (stringToArray .Categories "|")}}
|
{{ range (stringToArray .Categories "|")}}
|
||||||
{{ $category_name := index $.categoriesMap .}}
|
{{ $category_name := index $.categoriesMap .}}
|
||||||
<div class="tag" style="padding: 3px">class="w3-button w3-round-large w3-hover-metro-dark-blue w3-medium"
|
<div class="tag" style="padding: 3px">
|
||||||
{{ $category_name }}
|
{{ $category_name }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@ -61,20 +51,13 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="no-label {{$relation_name}}-Col">{{ widget_relation_type $relation_name $relation_type `id="$relation_name" class=" w3-border"` }}</td>
|
<td class="no-label {{$relation_name}}-Col">{{ widget_relation_type $relation_name $relation_type `id="$relation_name" class=" w3-border"` }}</td>
|
||||||
<td class="no-label">
|
<td class="no-label">
|
||||||
<div class="w3-bar">
|
<div class="bar">
|
||||||
<button
|
<button id="Delete-{{$relation_name}}" class="delete" type="button"
|
||||||
id="Delete-{{$relation_name}}"
|
|
||||||
class="w3-right w3-btn w3-metro-dark-red w3-round-large"
|
|
||||||
type="button"
|
|
||||||
_="on click set {value: '1'} on #{{$relation_name_remove}} then hide me then show #Undelete-{{$relation_name}} then add .w3-opacity-max to .{{$relation_name}}-Col"
|
_="on click set {value: '1'} on #{{$relation_name_remove}} then hide me then show #Undelete-{{$relation_name}} then add .w3-opacity-max to .{{$relation_name}}-Col"
|
||||||
>
|
>
|
||||||
<i class="bi bi-x-square" title="Remove"></i><span class="hide-small"> Remove</span>
|
<i class="bi bi-x-square" title="Remove"></i><span class="hide-small"> Remove</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button id="Undelete-{{$relation_name}}" style="margin-right: 5px; display: none" class="delete" type="button"
|
||||||
id="Undelete-{{$relation_name}}"
|
|
||||||
style="margin-right: 5px; display: none"
|
|
||||||
class="w3-right w3-btn w3-metro-blue w3-round-large"
|
|
||||||
type="button"
|
|
||||||
_="on click set {value: ''} on #{{$relation_name_remove}} then hide me then show #Delete-{{$relation_name}} then remove .w3-opacity-max from .{{$relation_name}}-Col"
|
_="on click set {value: ''} on #{{$relation_name_remove}} then hide me then show #Delete-{{$relation_name}} then remove .w3-opacity-max from .{{$relation_name}}-Col"
|
||||||
>
|
>
|
||||||
<i class="bi bi-arrow-counterclockwise" title="Undo"></i><span class="hide-small"> Undo</span>
|
<i class="bi bi-arrow-counterclockwise" title="Undo"></i><span class="hide-small"> Undo</span>
|
||||||
|
@ -21,18 +21,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<p>
|
<p>{{ widget_checkbox "Fields-New-{{.counter}}-Show_on_list" "Show on list" "1" .Show_on_list }}</p>
|
||||||
{{ widget_checkbox "Fields-New-{{.counter}}-Show_on_list" "Show on list" "1" .Show_on_list }}
|
<p>{{ widget_checkbox "Fields-New-{{.counter}}-Show_on_view" "Show on view" "1" .Show_on_view }}</p>
|
||||||
</p>
|
<p>{{ widget_checkbox "Fields-New-{{.counter}}-Is_multiple" "Multiple" "1" .Is_multiple }}</p>
|
||||||
<p>
|
|
||||||
{{ widget_checkbox "Fields-New-{{.counter}}-Show_on_view" "Show on view" "1" .Show_on_view }}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{{ widget_checkbox "Fields-New-{{.counter}}-Is_multiple" "Multiple" "1" .Is_multiple }}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="bar">
|
<div class="bar">
|
||||||
<button type="button" onclick="document.getElementById('field-new-{{.counter}}').remove()" class="delete"><i class="bi bi-file-minus" title="Remove"></i><span class="hide-small"> Remove</span></button>
|
<button type="button" style="float:right; margin-right: 5px;" onclick="document.getElementById('field-new-{{.counter}}').remove()" class="delete"><i class="bi bi-file-minus" title="Remove"></i><span class="hide-small"> Remove</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -22,22 +22,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<p>{{ widget_checkbox "Fields-{{.Type_field_id}}-Show_on_list" "Show on list" "1" .Show_on_list }}</p>
|
||||||
<p>
|
<p>{{ widget_checkbox "Fields-{{.Type_field_id}}-Show_on_view" "Show on view" "1" .Show_on_view }}</p>
|
||||||
{{ widget_checkbox "Fields-{{.Type_field_id}}-Show_on_list" "Show on list" "1" .Show_on_list }}
|
<p>{{ widget_checkbox "Fields-{{.Type_field_id}}-Is_multiple" "Multiple" "1" .Is_multiple }}</p>
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{{ widget_checkbox "Fields-{{.Type_field_id}}-Show_on_view" "Show on view" "1" .Show_on_view }}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{{ widget_checkbox "Fields-{{.Type_field_id}}-Is_multiple" "Multiple" "1" .Is_multiple }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" id="Fields-{{.Type_field_id}}-ToRemove" name="Fields-{{.Type_field_id}}-ToRemove" value=""/>
|
<input type="hidden" id="Fields-{{.Type_field_id}}-ToRemove" name="Fields-{{.Type_field_id}}-ToRemove" value=""/>
|
||||||
</div>
|
</div>
|
||||||
<div class="bar">
|
<div class="bar">
|
||||||
<button id="Delete-{{.Type_field_id}}" type="button" class="delete" onclick="bm_type_field_delete(this, '{{.Type_field_id}}')"><i class="bi bi-file-minus" title="Remove"></i><span class="hide-small"> Remove</span></button>
|
<button id="Delete-{{.Type_field_id}}" type="button" style="float:right; margin-right: 5px;" class="delete" onclick="bm_type_field_delete(this, '{{.Type_field_id}}')"><i class="bi bi-file-minus" title="Remove"></i><span class="hide-small"> Remove</span></button>
|
||||||
<button id="Undelete-{{.Type_field_id}}" style="margin-right: 5px;" hidden type="button" class="delete" onclick="bm_type_field_undelete(this, '{{.Type_field_id}}')"><i class="bi bi-arrow-counterclockwise" title="Undo"></i><span class="hide-small"> Undo</span></button>
|
<button id="Undelete-{{.Type_field_id}}" style="float:right; margin-right: 5px;" hidden type="button" class="delete" onclick="bm_type_field_undelete(this, '{{.Type_field_id}}')"><i class="bi bi-arrow-counterclockwise" title="Undo"></i><span class="hide-small"> Undo</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<div class="tab" id="general" style="display: block">
|
<div class="tab" id="general" style="display: block">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="half">
|
<div class="col half">
|
||||||
<p>
|
<p>
|
||||||
<label for="type-title">Title</label>
|
<label for="type-title">Title</label>
|
||||||
<input name="Title" id="type-title" type="text" value="{{.type.Title}}"/>
|
<input name="Title" id="type-title" type="text" value="{{.type.Title}}"/>
|
||||||
@ -18,10 +18,8 @@
|
|||||||
<input name="Icon" id="type-icon" type="text" value="{{.type.Icon}}"/>
|
<input name="Icon" id="type-icon" type="text" value="{{.type.Icon}}"/>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="half">
|
<div class="col half">
|
||||||
<p>
|
<p>{{ widget_checkboxes "Notebooks" "Notebooks" .type.Notebooks .notebooks `class=""` }}</p>
|
||||||
{{ widget_checkboxes "Notebooks" "Notebooks" .type.Notebooks .notebooks `class=""` }}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -30,22 +28,18 @@
|
|||||||
<textarea name="Description" id="type-description" rows="5">{{.type.Description}}</textarea>
|
<textarea name="Description" id="type-description" rows="5">{{.type.Description}}</textarea>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>{{ widget_checkbox "Show_summary" "Show summary" "1" .type.Show_summary }}</p>
|
||||||
{{ widget_checkbox "Show_summary" "Show summary" "1" .type.Show_summary }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<p>{{ widget_checkbox "Show_description" "Show description" "1" .type.Show_description }}</p>
|
||||||
{{ widget_checkbox "Show_description" "Show description" "1" .type.Show_description }}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab" id="fields" style="display: none">
|
<div class="tab" id="fields" style="display: none">
|
||||||
<div id="fields-list" style="margin-bottom: 10px">
|
<div id="fields-list" style="margin-bottom: 10px">
|
||||||
{{ template "types:fields" (map "fields" .type.Fields "widgets" $.widgets "uisections" $.uisections)}}
|
{{ template "types:fields" (map "fields" .type.Fields "widgets" $.widgets "uisections" $.uisections)}}
|
||||||
</div>
|
</div>
|
||||||
<div class="w3-bar" style="margin-top: 10px;">
|
<div class="bar">
|
||||||
<a class="button main" hx-get="/type/field-new" hx-target="#fields-list" hx-swap="beforeend" href="#" hx-vals="js:{counter: document.getElementById("fields-list").childElementCount + 1}"><i class="bi bi-file-plus" title="Add field"></i><span class="hide-small"> Add field</span></a>
|
<a class="button main" style="float:right; margin-top: 10px;" hx-get="/type/field-new" hx-target="#fields-list" hx-swap="beforeend" href="#" hx-vals="js:{counter: document.getElementById("fields-list").childElementCount + 1}"><i class="bi bi-file-plus" title="Add field"></i><span class="hide-small"> Add field</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user