From 6747ae91a8e9459f02a506595e18beb2841ff787 Mon Sep 17 00:00:00 2001 From: roberto Date: Thu, 26 Dec 2024 21:09:09 +0100 Subject: [PATCH] UI changes --- assets/static/css/main.css | 77 ++++++++++++++++++- assets/static/js/serviceWorker.js | 2 +- .../templates/items/list_for_relations.tmpl | 12 +-- assets/templates/items/relations.tmpl | 31 ++------ assets/templates/types/field_new.tmpl | 14 +--- assets/templates/types/fields.tmpl | 19 ++--- assets/templates/types/form.tmpl | 22 ++---- 7 files changed, 103 insertions(+), 74 deletions(-) diff --git a/assets/static/css/main.css b/assets/static/css/main.css index ba70c7c..9878cd5 100644 --- a/assets/static/css/main.css +++ b/assets/static/css/main.css @@ -46,10 +46,81 @@ */ /* Reset */ -*, *::before, *::after { + +/* Box sizing rules */ +*, +*::before, +*::after { 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 { margin: 0; padding: 0; @@ -228,6 +299,7 @@ button, .button { user-select: none; font-size: 0.9rem; border-radius: 8px; + line-height: 1.2rem; } button:hover, .button:hover { @@ -1171,6 +1243,9 @@ dialog .content h5 { .col.half { width: 49.99999%; } + .col.m6, .col.half:first-child { + padding-right:10px; + } } @media (max-width:993px) and (min-width:768px) { diff --git a/assets/static/js/serviceWorker.js b/assets/static/js/serviceWorker.js index 6213938..92b92a6 100644 --- a/assets/static/js/serviceWorker.js +++ b/assets/static/js/serviceWorker.js @@ -1,4 +1,4 @@ -const cacheVersion = "0.282" +const cacheVersion = "0.283" const cacheName = "speedtech-brainminder" const cacheFiles = [ '/static/bootstrap-icons/font/bootstrap-icons.min.css', diff --git a/assets/templates/items/list_for_relations.tmpl b/assets/templates/items/list_for_relations.tmpl index 1072ae8..985f7cf 100644 --- a/assets/templates/items/list_for_relations.tmpl +++ b/assets/templates/items/list_for_relations.tmpl @@ -42,17 +42,7 @@ {{ end }} -
- Add -
+ Add {{ end }} diff --git a/assets/templates/items/relations.tmpl b/assets/templates/items/relations.tmpl index 46ffcb4..1935ad4 100644 --- a/assets/templates/items/relations.tmpl +++ b/assets/templates/items/relations.tmpl @@ -1,5 +1,5 @@ {{define "item:relations"}} - +
@@ -25,25 +25,15 @@ {{ $relation_type = "Parent" }} {{ end }} {{ end }} - {{.Title}} - + {{.Title}} +
Item {{ if gt (len .Categories) 0 }} {{ range (stringToArray .Categories "|")}} {{ $category_name := index $.categoriesMap .}} -
class="w3-button w3-round-large w3-hover-metro-dark-blue w3-medium" +
{{ $category_name }}
{{ end }} @@ -61,20 +51,13 @@
{{ widget_relation_type $relation_name $relation_type `id="$relation_name" class=" w3-border"` }} -
- -
-

- {{ widget_checkbox "Fields-New-{{.counter}}-Show_on_list" "Show on list" "1" .Show_on_list }} -

-

- {{ widget_checkbox "Fields-New-{{.counter}}-Show_on_view" "Show on view" "1" .Show_on_view }} -

-

- {{ widget_checkbox "Fields-New-{{.counter}}-Is_multiple" "Multiple" "1" .Is_multiple }} -

+

{{ widget_checkbox "Fields-New-{{.counter}}-Show_on_list" "Show on list" "1" .Show_on_list }}

+

{{ widget_checkbox "Fields-New-{{.counter}}-Show_on_view" "Show on view" "1" .Show_on_view }}

+

{{ widget_checkbox "Fields-New-{{.counter}}-Is_multiple" "Multiple" "1" .Is_multiple }}

- +
{{ end }} diff --git a/assets/templates/types/fields.tmpl b/assets/templates/types/fields.tmpl index 0c45c80..88b858f 100644 --- a/assets/templates/types/fields.tmpl +++ b/assets/templates/types/fields.tmpl @@ -22,22 +22,15 @@ -
-

- {{ widget_checkbox "Fields-{{.Type_field_id}}-Show_on_list" "Show on list" "1" .Show_on_list }} -

-

- {{ widget_checkbox "Fields-{{.Type_field_id}}-Show_on_view" "Show on view" "1" .Show_on_view }} -

-

- {{ widget_checkbox "Fields-{{.Type_field_id}}-Is_multiple" "Multiple" "1" .Is_multiple }} -

-
+

{{ widget_checkbox "Fields-{{.Type_field_id}}-Show_on_list" "Show on list" "1" .Show_on_list }}

+

{{ widget_checkbox "Fields-{{.Type_field_id}}-Show_on_view" "Show on view" "1" .Show_on_view }}

+

{{ widget_checkbox "Fields-{{.Type_field_id}}-Is_multiple" "Multiple" "1" .Is_multiple }}

+
- - + +
{{ end }} diff --git a/assets/templates/types/form.tmpl b/assets/templates/types/form.tmpl index ca550c1..a1967c0 100644 --- a/assets/templates/types/form.tmpl +++ b/assets/templates/types/form.tmpl @@ -8,7 +8,7 @@
-
+

@@ -18,10 +18,8 @@

-
-

- {{ widget_checkboxes "Notebooks" "Notebooks" .type.Notebooks .notebooks `class=""` }} -

+
+

{{ widget_checkboxes "Notebooks" "Notebooks" .type.Notebooks .notebooks `class=""` }}

@@ -30,22 +28,18 @@

-

- {{ widget_checkbox "Show_summary" "Show summary" "1" .type.Show_summary }} -

+

{{ widget_checkbox "Show_summary" "Show summary" "1" .type.Show_summary }}

-

- {{ widget_checkbox "Show_description" "Show description" "1" .type.Show_description }} -

+

{{ widget_checkbox "Show_description" "Show description" "1" .type.Show_description }}