From 9cffd4d9819436b8b95e92296322ed4d5f2b80dd Mon Sep 17 00:00:00 2001 From: roberto Date: Sun, 4 May 2025 20:05:36 +0200 Subject: [PATCH] Improved UI. Upgraded Go version --- .../jstemplates/items/field-text.handlebars | 2 +- assets/jstemplates/items/field-url.handlebars | 2 +- assets/static/css/main.css | 221 +++++++++++++++--- assets/static/js/main.js | 10 + assets/static/js/serviceWorker.js | 2 +- assets/templates/base.tmpl | 14 +- assets/templates/categories/form.tmpl | 6 +- assets/templates/categories/list.tmpl | 6 +- assets/templates/categories/list_title.tmpl | 2 +- assets/templates/items/all_list.tmpl | 4 +- assets/templates/items/all_list_title.tmpl | 2 +- assets/templates/items/fields.tmpl | 4 +- assets/templates/items/form.tmpl | 16 +- assets/templates/items/list.tmpl | 6 +- assets/templates/items/list_title.tmpl | 4 +- assets/templates/items/read.tmpl | 8 +- assets/templates/items/share.tmpl | 2 +- assets/templates/items/share_edit.tmpl | 2 +- assets/templates/items/view.tmpl | 4 +- assets/templates/notebooks/form.tmpl | 6 +- assets/templates/notebooks/list.tmpl | 6 +- assets/templates/notebooks/list_title.tmpl | 2 +- assets/templates/quickbox/add.tmpl | 4 +- assets/templates/quickbox/list.tmpl | 4 +- assets/templates/quickbox/transform.tmpl | 2 +- assets/templates/types/field_new.tmpl | 2 +- assets/templates/types/fields.tmpl | 4 +- assets/templates/types/form.tmpl | 8 +- assets/templates/types/list.tmpl | 6 +- assets/templates/types/list_title.tmpl | 2 +- go.mod | 2 +- 31 files changed, 270 insertions(+), 95 deletions(-) diff --git a/assets/jstemplates/items/field-text.handlebars b/assets/jstemplates/items/field-text.handlebars index 78e8c49..d3ad41d 100644 --- a/assets/jstemplates/items/field-text.handlebars +++ b/assets/jstemplates/items/field-text.handlebars @@ -1,4 +1,4 @@
-
+
\ No newline at end of file diff --git a/assets/jstemplates/items/field-url.handlebars b/assets/jstemplates/items/field-url.handlebars index 19df062..0ffed93 100644 --- a/assets/jstemplates/items/field-url.handlebars +++ b/assets/jstemplates/items/field-url.handlebars @@ -1,4 +1,4 @@
-
+
\ No newline at end of file diff --git a/assets/static/css/main.css b/assets/static/css/main.css index 7e0b633..6417545 100644 --- a/assets/static/css/main.css +++ b/assets/static/css/main.css @@ -1,7 +1,6 @@ /* Global variables. */ :root, ::backdrop { - --nebula-font-stack: 'Nebula Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; --quickbox-topbar-height: 50px; --quickbox-footer-height: 64px; --quickbox-send-width: 66px; @@ -193,7 +192,7 @@ html { .display-left { position: absolute; top: 50%; - left: 0%; + left: 0; transform: translate(0%, -50%); -ms-transform: translate(-0%, -50%) } @@ -201,7 +200,7 @@ html { .display-right { position: absolute; top: 50%; - right: 0%; + right: 0; transform: translate(0%, -50%); -ms-transform: translate(0%, -50%) } @@ -245,7 +244,7 @@ ul { } ul li { - padding: 8px 0px; + padding: 8px 0; border-bottom: 1px solid #ddd } @@ -298,22 +297,7 @@ span.close-dialog { } button:hover, .button:hover { - box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); -} - -button.main, .button.main { - background-color: var(--primary-color); - color: #ffffff; -} - -button.secondary, .button.secondary { - background-color: #4d4d4d; - color: #ffffff; -} - -button.delete, .button.delete { - background-color: #aa2222; - color: #ffffff; + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 14px 0 rgba(0, 0, 0, 0.19); } button span, .button span { @@ -502,6 +486,7 @@ th.operations, td.operations { display: flex; align-items: center; position: fixed; + z-index: 1; } #app-title a { @@ -684,6 +669,7 @@ th.operations, td.operations { .menu-item-action { float: right; width: 50px; + margin-right: 10px; } .menu-item-title a { @@ -1001,28 +987,54 @@ th.operations, td.operations { font-size: 18px; } -#footer-navbar { +.dialog-confirm p { + margin-bottom: 20px; +} + +.dialog-navbar button{ + background-color: var(--primary-color); + color: white; + border-radius: 10px; +} + +.footer-navbar { display: flex; flex-direction: row; margin-bottom: 10px; margin-top: 10px; align-items: flex-start; + background-color: var(--primary-color); + color: white; + padding: 4px; + border-radius: 10px; } -#footer-navbar button, #footer-navbar a { +.footer-navbar button, .footer-navbar a { margin-right: 10px; + font-weight: 400; } -#footer-navbar span { +.footer-navbar button:hover, .footer-navbar a:hover { + font-weight: 400; + background-color: #fff; + color: black; +} + +.footer-navbar span { margin-left: 5px; } dialog { border-radius: 8px; - border-color: var(--primary-color); + border-color: #ccc; z-index:100; } +dialog .footer-navbar { + position: relative; + width: auto; +} + dialog header { display: flex; align-items: center @@ -1146,8 +1158,35 @@ dialog .content h5 { display: none !important } - #footer-navbar span { - display: none !important + #page-content { + padding-bottom: 100px; + } + + .footer-navbar { + align-items: center; + justify-content: space-evenly; + position: fixed; + bottom: 0; + width: calc(100vw - 8px); + } + + .footer-navbar button, .footer-navbar a { + margin-right: 0; + text-align: center; + } + + .footer-navbar button:hover, .footer-navbar .button:hover { + box-shadow: none; + } + + .footer-navbar .icon { + display: block !important; + margin-left: 5px; + } + + .footer-navbar span { + margin-left: 0; + padding-left: 0; } } @@ -1431,7 +1470,7 @@ dialog .content h5 { display: block !important; } - .row > .half:first { + .row > .half:first-child { padding-right: 4px; } @@ -1464,6 +1503,18 @@ dialog .content h5 { height: 24px; } +.icon-article { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7.5 16.5h6v-1h-6zm0-4h9v-1h-9zm0-4h9v-1h-9zM5.616 20q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h12.769q.69 0 1.153.463T20 5.616v12.769q0 .69-.462 1.153T18.384 20zm0-1h12.769q.23 0 .423-.192t.192-.424V5.616q0-.231-.192-.424T18.384 5H5.616q-.231 0-.424.192T5 5.616v12.769q0 .23.192.423t.423.192M5 5v14z'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-book { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7.616 21q-1.085 0-1.85-.766Q5 19.47 5 18.385V6q0-1.258.871-2.129T8 3h11v13.77q-.663 0-1.14.475t-.475 1.14t.476 1.139T19 20v1zM6 16.363q.33-.29.735-.442q.403-.152.88-.152h.77V4H8q-.817 0-1.409.591Q6 5.183 6 6zm3.385-.594H18V4H9.385zM6 16.363V4.385zM7.616 20h9.363q-.285-.33-.44-.732q-.155-.4-.155-.884q0-.457.152-.87t.443-.745H7.616q-.689 0-1.152.476T6 18.385q0 .688.464 1.151T7.616 20'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + .icon-notebook { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6.616 21q-.691 0-1.153-.462T5 19.385V4.615q0-.69.463-1.152T6.616 3h10.769q.69 0 1.153.463T19 4.616v14.769q0 .69-.462 1.153T17.384 21zm0-1h10.769q.23 0 .423-.192t.192-.424V4.616q0-.231-.192-.424T17.384 4H16v6.116l-2-1.193l-2 1.193V4H6.616q-.231 0-.424.192T6 4.615v14.77q0 .23.192.423t.423.192M6 20V4zm6-9.885l2-1.192l2 1.192l-2-1.192z'/%3E%3C/svg%3E"); -webkit-mask-image: var(--svg); @@ -1573,6 +1624,18 @@ dialog .content h5 { mask-image: var(--svg); } +.icon-send { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 15.289L15.288 12L12 8.711l-.688.689l2.1 2.1H8.5v1h4.912l-2.1 2.1zM12.003 21q-1.867 0-3.51-.708q-1.643-.709-2.859-1.924t-1.925-2.856T3 12.003t.709-3.51Q4.417 6.85 5.63 5.634t2.857-1.925T11.997 3t3.51.709q1.643.708 2.859 1.922t1.925 2.857t.709 3.509t-.708 3.51t-1.924 2.859t-2.856 1.925t-3.509.709M12 20q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-transform { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m15.692 21.923l-3.307-3.307l.707-.72l2.1 2.062v-3.785H9.423q-.69 0-1.153-.462t-.462-1.153v-5.77H3v-1h4.808V4.043l-2.1 2.062L5 5.384l3.308-3.307l3.308 3.308l-.708.719l-2.1-2.062v10.516q0 .23.192.423t.423.192H21v1h-4.808v3.785l2.1-2.062l.708.72zm-.5-8.75v-3.77q0-.23-.192-.422t-.423-.192h-3.77v-1h3.77q.69 0 1.153.462t.462 1.153v3.769z'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + .icon-view { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5.616 20q-.667 0-1.141-.475T4 18.386V5.615q0-.666.475-1.14T5.615 4h12.77q.666 0 1.14.475T20 5.615v12.77q0 .666-.475 1.14t-1.14.475zm0-1h12.769q.269 0 .442-.173t.173-.442V7H5v11.385q0 .269.173.442t.443.173M12 16q-1.627 0-2.932-.834Q7.763 14.333 7.096 13q.667-1.333 1.972-2.166Q10.373 10 12 10t2.932.834T16.904 13q-.667 1.333-1.972 2.166Q13.627 16 12 16m-.004-1.884q-.467 0-.79-.327q-.321-.327-.321-.793q0-.467.326-.79q.327-.321.793-.321q.467 0 .79.326q.322.327.322.793q0 .467-.327.79q-.327.322-.793.322m.004.769q.78 0 1.333-.552T13.885 13t-.552-1.333q-.552-.552-1.333-.552t-1.333.552T10.115 13t.552 1.333t1.333.552'/%3E%3C/svg%3E"); -webkit-mask-image: var(--svg); @@ -1592,7 +1655,7 @@ dialog .content h5 { } .icon-search { - --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 4v6.333v-.025V20zv4zm.616 17q-.691 0-1.153-.462T4 19.385V4.615q0-.69.463-1.152T5.616 3H13.5L18 7.5v3.02q-.244-.086-.494-.121T17 10.333V8h-4V4H5.616q-.231 0-.424.192T5 4.615v14.77q0 .23.192.423t.423.192h5.776q.188.292.418.536q.232.243.485.464zM16.5 19.308q1.185 0 1.996-.812q.812-.811.812-1.996t-.812-1.996t-1.996-.812t-1.996.812t-.812 1.996t.812 1.996t1.996.812m5.1 2.98l-2.777-2.776q-.487.388-1.08.592t-1.243.204q-1.586 0-2.697-1.111t-1.11-2.697t1.11-2.697t2.697-1.11t2.697 1.11t1.11 2.697q0 .65-.203 1.243t-.593 1.08L22.29 21.6z'/%3E%3C/svg%3E"); + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m19.485 20.154l-6.262-6.262q-.75.639-1.725.989t-1.96.35q-2.402 0-4.066-1.663T3.808 9.503T5.47 5.436t4.064-1.667t4.068 1.664T15.268 9.5q0 1.042-.369 2.017t-.97 1.668l6.262 6.261zM9.539 14.23q1.99 0 3.36-1.37t1.37-3.361t-1.37-3.36t-3.36-1.37t-3.361 1.37t-1.37 3.36t1.37 3.36t3.36 1.37'/%3E%3C/svg%3E"); -webkit-mask-image: var(--svg); mask-image: var(--svg); } @@ -1603,6 +1666,102 @@ dialog .content h5 { mask-image: var(--svg); } +.icon-add { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M11.5 16.5h1v-4h4v-1h-4v-4h-1v4h-4v1h4zm.503 4.5q-1.867 0-3.51-.708q-1.643-.709-2.859-1.924t-1.925-2.856T3 12.003t.709-3.51Q4.417 6.85 5.63 5.634t2.857-1.925T11.997 3t3.51.709q1.643.708 2.859 1.922t1.925 2.857t.709 3.509t-.708 3.51t-1.924 2.859t-2.856 1.925t-3.509.709M12 20q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-remove { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 12h9v1H7zm4.5-9a9.5 9.5 0 0 1 9.5 9.5a9.5 9.5 0 0 1-9.5 9.5A9.5 9.5 0 0 1 2 12.5A9.5 9.5 0 0 1 11.5 3m0 1A8.5 8.5 0 0 0 3 12.5a8.5 8.5 0 0 0 8.5 8.5a8.5 8.5 0 0 0 8.5-8.5A8.5 8.5 0 0 0 11.5 4'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-undo { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7.404 18v-1h7.254q1.556 0 2.65-1.067q1.096-1.067 1.096-2.606t-1.095-2.596q-1.096-1.058-2.651-1.058H6.916l2.965 2.965l-.708.708L5 9.173L9.173 5l.708.708l-2.965 2.965h7.742q1.963 0 3.355 1.354q1.39 1.354 1.39 3.3t-1.39 3.31T14.657 18z'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-yes { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m10.562 15.908l6.396-6.396l-.708-.708l-5.688 5.688l-2.85-2.85l-.708.708zM12.003 21q-1.866 0-3.51-.708q-1.643-.709-2.859-1.924t-1.925-2.856T3 12.003t.709-3.51Q4.417 6.85 5.63 5.634t2.857-1.925T11.997 3t3.51.709q1.643.708 2.859 1.922t1.925 2.857t.709 3.509t-.708 3.51t-1.924 2.859t-2.856 1.925t-3.509.709M12 20q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-no { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m8.4 16.308l3.6-3.6l3.6 3.6l.708-.708l-3.6-3.6l3.6-3.6l-.708-.708l-3.6 3.6l-3.6-3.6l-.708.708l3.6 3.6l-3.6 3.6zM12.003 21q-1.866 0-3.51-.708q-1.643-.709-2.859-1.924t-1.925-2.856T3 12.003t.709-3.51Q4.417 6.85 5.63 5.634t2.857-1.925T11.997 3t3.51.709q1.643.708 2.859 1.922t1.925 2.857t.709 3.509t-.708 3.51t-1.924 2.859t-2.856 1.925t-3.509.709M12 20q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-analysis { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7.975 13.371q.61.61 1.502.61t1.51-.61l3.381-3.381q.613-.613.613-1.506t-.61-1.509q-.616-.61-1.509-.61t-1.502.61q-.771-.286-1.537-.13t-1.294.684t-.685 1.294t.131 1.537q-.61.616-.61 1.509t.61 1.502M7 21v-3.762q-1.425-1.3-2.212-2.922T4 10.986q0-3.327 2.333-5.657T12 3q2.702 0 4.884 1.645t2.83 4.25l1.036 4.103q.1.38-.142.692q-.242.31-.646.31H18v3.385q0 .666-.475 1.14t-1.14.475H14v2h-1v-3h3.385q.269 0 .442-.173t.173-.442V13h2.7l-.95-3.875q-.575-2.294-2.47-3.71Q14.388 4 12 4Q9.1 4 7.05 6.03Q5 8.062 5 10.97q0 1.494.613 2.84q.612 1.346 1.737 2.392L8 16.8V21zm5.35-8.5'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-counselor { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10 13.385q-.846 0-1.423-.596Q8 12.192 8 11.385q0-.685.31-1.009t.39-.859q-.023-.288-.111-.563t-.089-.57q0-.648.349-1.151q.349-.504 1.097-.816q.385-.382.829-.707T12 5.385q.82 0 1.244.344t.81.688q.748.312 1.097.816q.349.503.349 1.152q0 .294-.089.569t-.111.563q.08.535.39.859t.31 1.009q0 .807-.577 1.404T14 13.385zm0-1h4q.425 0 .713-.3t.287-.7q0-.175-.062-.325t-.188-.3q-.275-.325-.363-.638t-.087-.587q0-.4.1-.688t.1-.462q0-.3-.175-.55t-.45-.375q-.225-.1-.413-.225t-.337-.325q-.125-.15-.413-.338T12 6.385t-.713.2t-.412.35q-.15.175-.338.3t-.412.225q-.275.125-.45.375t-.175.55q0 .175.1.462t.1.688q0 .275-.088.587t-.362.638q-.125.15-.188.3T9 11.385q0 .4.287.7t.713.3m-5 8.23V18.97q0-.619.36-1.158q.361-.54.97-.838q1.416-.679 2.834-1.018q1.417-.34 2.836-.34t2.837.34t2.832 1.018q.61.298.97.838q.361.539.361 1.158v1.646zm1-1h12v-.646q0-.332-.215-.625q-.214-.292-.593-.494q-1.234-.598-2.546-.916T12 16.615t-2.646.319t-2.546.916q-.38.202-.593.494Q6 18.637 6 18.97zm6-7.23'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-idea { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 21.154q-.69 0-1.201-.463t-.607-1.152h3.616q-.096.69-.607 1.152T12 21.154m-3.5-3.385v-1h7v1zM8.558 15q-1.417-.929-2.238-2.356T5.5 9.5q0-2.721 1.89-4.61T12 3t4.61 1.89T18.5 9.5q0 1.717-.82 3.144T15.442 15zm.292-1h6.3q1.125-.8 1.738-1.975T17.5 9.5q0-2.3-1.6-3.9T12 4T8.1 5.6T6.5 9.5q0 1.35.613 2.525T8.85 14M12 14'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-knowledge { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M11.5 17.32V7.507q-1.083-.773-2.386-1.16q-1.305-.386-2.614-.386q-.9 0-1.576.107t-1.501.4q-.23.077-.327.222Q3 6.835 3 7.008v9.015q0 .27.192.394t.423.03q.548-.185 1.267-.297t1.618-.111q1.31 0 2.547.3t2.453.98m.5 1.45q-1.22-.834-2.62-1.282t-2.88-.448q-.78 0-1.534.13q-.753.131-1.466.42q-.544.217-1.022-.131T2 16.496V6.831q0-.371.195-.689t.547-.442q.881-.388 1.833-.563T6.5 4.962q1.639 0 2.91.415q1.27.415 2.598 1.233q.236.13.364.35t.128.505v9.854q1.216-.678 2.453-.98t2.547-.3q.9 0 1.618.111t1.267.296q.23.096.423-.029t.192-.394V5.594q.087.029.17.064q.084.034.164.08q.333.145.5.443t.166.65v9.665q0 .614-.516.943q-.517.328-1.1.111q-.694-.27-1.418-.39q-.724-.121-1.466-.121q-1.48 0-2.88.448T12 18.769M15.192 14V4l3.116-1v10zM7.25 11.64'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-mental-model { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m17.866 19.289l-3.347-3.308l3.346-3.308l.689.708l-2.113 2.1H21v1h-4.56l2.114 2.1zM4.616 19q-.691 0-1.153-.462T3 17.384v-2.807q0-.69.463-1.153t1.152-.463h5.943q.69 0 1.153.463t.462 1.153v2.807q0 .691-.462 1.153T10.558 19zm0-1h5.942q.269 0 .442-.173t.173-.442v-2.808q0-.27-.173-.442q-.173-.173-.442-.173H4.616q-.27 0-.443.173T4 14.577v2.808q0 .269.173.442t.443.173m1.519-6.692l-.689-.708L7.56 8.5H3v-1h4.56L5.446 5.4l.688-.688L9.481 8zm7.307-.27q-.69 0-1.152-.462t-.463-1.153V6.615q0-.69.463-1.153T13.442 5h5.943q.69 0 1.153.462T21 6.615v2.808q0 .69-.462 1.153t-1.153.462zm0-1h5.943q.269 0 .442-.173T20 9.423V6.615q0-.269-.173-.442T19.385 6h-5.943q-.269 0-.442.173t-.173.443v2.807q0 .27.173.443t.442.173M11.173 18v-4.038zm1.654-7.961V6z'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-objective { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.003 21q-1.866 0-3.51-.708q-1.643-.709-2.859-1.924t-1.925-2.856T3 12.003t.709-3.51Q4.417 6.85 5.63 5.634t2.857-1.925T11.997 3t3.51.709q1.643.708 2.859 1.922t1.925 2.857t.709 3.509t-.708 3.51t-1.924 2.859t-2.856 1.925t-3.509.709M12 20q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m.005-3q-2.082 0-3.543-1.457T7 12.005T8.457 8.46T11.995 7t3.544 1.457T17 11.995t-1.457 3.544T12.005 17M12 16q1.65 0 2.825-1.175T16 12t-1.175-2.825T12 8T9.175 9.175T8 12t1.175 2.825T12 16m0-3q-.402 0-.701-.299T11 12t.299-.701T12 11t.701.299T13 12t-.299.701T12 13'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-plan { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5.77 20.23q-.834 0-1.417-.582q-.584-.584-.584-1.417q0-.706.428-1.238q.428-.531 1.072-.702V7.71q-.644-.171-1.072-.703t-.428-1.238q0-.833.584-1.416q.583-.584 1.416-.584q.706 0 1.238.428t.703 1.072h8.58q.166-.644.702-1.072t1.239-.428q.833 0 1.417.583q.583.584.583 1.417q0 .703-.428 1.24q-.428.535-1.072.7v8.582q.644.17 1.072.702t.428 1.238q0 .833-.583 1.417q-.584.583-1.417.583q-.706 0-1.238-.428q-.531-.428-.702-1.072H7.71q-.171.644-.703 1.072t-1.238.428m0-13.462q.425 0 .713-.287t.287-.713t-.287-.712t-.713-.288t-.712.288t-.288.712t.288.713t.712.287m12.462 0q.425 0 .712-.287t.288-.713t-.288-.712t-.712-.288t-.713.288t-.287.712t.287.713t.713.287M7.709 17.731h8.582q.148-.535.526-.914q.38-.378.914-.526V7.71q-.535-.13-.923-.518t-.518-.923H7.71q-.148.535-.527.914q-.38.378-.914.526v8.582q.535.148.914.526q.379.38.527.914m10.52 1.5q.426 0 .713-.288t.288-.712t-.288-.713t-.712-.287t-.713.287t-.287.713t.287.712t.713.288m-12.462 0q.425 0 .713-.288t.287-.712t-.287-.713t-.713-.287t-.712.287t-.288.713t.288.712t.712.288m0-1'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-principle { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M11 20.596V13H3.404l8-8H19v7.596zm4.5-5.921l2.5-2.5V6h-6.175l-2.5 2.5H15.5zm-3.5 3.5l2.5-2.5V9.5H8.325l-2.5 2.5H12z'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-project { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 13V5.616q0-.691.463-1.153T5.616 4H11v9zm9-9h5.385q.69 0 1.152.463T20 5.622V9h-7zm0 16v-9h7v7.385q0 .69-.462 1.152T18.384 20zm-9-5h7v5H5.616q-.691 0-1.153-.462T4 18.378zm1-3h5V5H5.616q-.27 0-.443.173T5 5.616zm9-4h5V5.616q0-.27-.173-.443T18.385 5H14zm0 4v7h4.385q.269 0 .442-.173t.173-.442V12zm-9 4v2.385q0 .269.173.442t.443.173H10v-3z'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-proposal { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.925 11.05L9.386 7.511l.714-.688l2.825 2.825l5.675-5.65l.689.688zm-6.521 7.604l7.565 2.207l5.989-1.85q-.03-.455-.276-.656q-.248-.201-.548-.201h-4.742q-.636 0-1.151-.05q-.516-.05-1.056-.238l-2.19-.718l.338-.988l2.025.732q.483.183 1.096.22q.613.036 1.68.042q0-.468-.171-.756t-.494-.402l-5.753-2.112q-.058-.019-.106-.028t-.106-.01h-2.1zm-4 2.346v-8.154h6.08q.137 0 .283.028q.147.028.277.078l5.779 2.117q.537.204.924.733q.388.529.388 1.352h3q.903 0 1.384.565q.481.566.481 1.435v.615l-6.98 2.154l-7.616-2.22V21zm1-1h2v-6.154h-2z'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + +.icon-step { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6.5 3Q5.433 3 4.716 4.192Q4 5.385 4 7q0 1.44.466 2.845q.467 1.405 1.15 2.332l2.153-.53q.364-.8.797-2.124Q9 8.2 9 7q0-1.616-.716-2.808Q7.567 3 6.5 3m1.375 13q.494 0 .81-.37q.315-.368.315-.955q0-.425-.229-.971t-.621-1.127L6 13.116q0 1.307.486 2.096Q6.97 16 7.875 16M17.5 8q-1.067 0-1.784 1.192Q15 10.385 15 12q0 1.2.443 2.51q.444 1.311.788 2.136l2.077.646q.894-1.388 1.293-2.569T20 12q0-1.616-.716-2.808Q18.567 8 17.5 8m-1.375 13q.865 0 1.37-.77T18 18.25l-2.13-.692q-.259.465-.564 1.02T15 19.676q0 .52.332.922q.331.403.793.403m-8.25-4q-1.348 0-2.127-1.06T5 13.26l-.604-1.118q-.506-.79-.95-2.213Q3 8.506 3 7q0-2.152.996-3.576T6.5 2q1.529 0 2.515 1.484Q10 4.967 10 7q0 1.316-.41 2.608t-.786 2.138l.45.748q.296.485.521 1.084T10 14.675q0 1.002-.599 1.664T7.875 17m8.25 5q-.927 0-1.526-.662T14 19.676q0-.498.225-1.097q.225-.6.521-1.084l.45-.748q-.358-.827-.777-2.129T14 12q0-2.033.986-3.516Q15.97 7 17.5 7q1.508 0 2.504 1.424T21 12q0 1.506-.436 2.907q-.435 1.4-.96 2.23l-.604.95q.006 1.332-.636 2.623Q17.723 22 16.125 22'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); +} + .icon-task { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m10.95 16.866l4.958-4.958l-.72-.72l-4.244 4.245l-2.138-2.139l-.714.714zM6.616 21q-.691 0-1.153-.462T5 19.385V4.615q0-.69.463-1.152T6.616 3H14.5L19 7.5v11.885q0 .69-.462 1.153T17.384 21zM14 8V4H6.616q-.231 0-.424.192T6 4.615v14.77q0 .23.192.423t.423.192h10.77q.23 0 .423-.192t.192-.424V8zM6 4v4zv16z'/%3E%3C/svg%3E"); -webkit-mask-image: var(--svg); @@ -1613,4 +1772,10 @@ dialog .content h5 { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7.039 16.808h4.307q.193 0 .327-.135q.135-.134.135-.327v-.654q0-.192-.135-.327q-.134-.134-.327-.134H7.04q-.193 0-.327.134q-.135.135-.135.327v.654q0 .193.135.327q.134.135.327.135M6.942 9.5h4.5q.166 0 .304-.138q.139-.139.139-.304q0-.166-.139-.304q-.138-.139-.304-.139h-4.5q-.165 0-.303.139q-.139.138-.139.304t.139.303t.303.139m0-2.116h4.5q.166 0 .304-.138q.139-.138.139-.304t-.139-.304t-.304-.138h-4.5q-.165 0-.303.138t-.139.304t.139.304t.303.139M15 10.192v-1h1.385q.269 0 .442-.173T17 8.577V7.423q0-.27-.173-.442q-.173-.173-.442-.173H15v-1h1.385q.666 0 1.14.474T18 7.423V7.5h1.692q.213 0 .357.144t.143.357t-.143.356t-.357.143H18v.077q0 .666-.475 1.14t-1.14.475zm-3.808 4.039h-1v-3.423h3.193q.269 0 .442-.173t.173-.443V5.808q0-.27-.173-.442q-.173-.174-.442-.174h-7q-.826 0-1.413.588t-.588 1.412v1.616q0 .825.588 1.412t1.412.588h1.808v3.423h-1v-2.423h-.808q-1.237 0-2.118-.881t-.882-2.12V7.193q0-1.237.882-2.118t2.118-.882h7q.667 0 1.141.475T15 5.807v4.385q0 .667-.475 1.141t-1.14.475h-2.193zM6.79 17.808q-.505 0-.859-.354q-.353-.353-.353-.858v-1.154q0-.505.353-.858q.354-.353.859-.353h4.807q.505 0 .858.353q.354.353.354.858v1.154q0 .505-.354.858q-.353.354-.858.354zm4.557-1h-4.77h5.23z'/%3E%3C/svg%3E"); -webkit-mask-image: var(--svg); mask-image: var(--svg); +} + +.icon-webresource { + --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M2 11.5v-1h3v1zm3.054 5.666l-.708-.72l2.1-2.1l.72.708zm1.392-9.512l-2.1-2.1l.708-.72l2.112 2.112zM16.962 18.5l-4.443-4.442l-.942 2.903l-2.193-7.23l7.308 2.192l-2.892 1.03l4.354 4.355zM10.116 6V3h1v3zm4.669 1.654l-.72-.708l2.112-2.111l.708.707z'/%3E%3C/svg%3E"); + -webkit-mask-image: var(--svg); + mask-image: var(--svg); } \ No newline at end of file diff --git a/assets/static/js/main.js b/assets/static/js/main.js index f10f928..44a934c 100644 --- a/assets/static/js/main.js +++ b/assets/static/js/main.js @@ -135,6 +135,10 @@ function bm_show_confirm_delete(sender, title, message) { htmx.trigger(sender, 'confirmed', null); document.querySelector("#dialog-confirm-delete").close(); }); + + document.getElementById("modal-confirm-cancel").addEventListener('click', (event) => { + document.querySelector("#dialog-confirm-delete").close(); + }); } function bm_show_confirm(sender, title, message) { @@ -145,6 +149,10 @@ function bm_show_confirm(sender, title, message) { htmx.trigger(sender, 'confirmed', null); document.querySelector("#dialog-confirm").close(); }); + + document.getElementById("modal-confirm-cancel").addEventListener('click', (event) => { + document.querySelector("#dialog-confirm").close(); + }); } function bm_item_field_add(type_field_id, widget) { @@ -256,7 +264,9 @@ document.addEventListener("DOMContentLoaded", function(event){ }); document.querySelector('body').addEventListener('click', (event) => { + console.log(event.target); if (event.target.classList.contains("close-dialog")) { + event.preventDefault(); let openDialog = event.target.closest('#dialog'); if(openDialog !== null) { openDialog.close(); diff --git a/assets/static/js/serviceWorker.js b/assets/static/js/serviceWorker.js index 5b6a630..9e18059 100644 --- a/assets/static/js/serviceWorker.js +++ b/assets/static/js/serviceWorker.js @@ -1,4 +1,4 @@ -const cacheVersion = "0.38" +const cacheVersion = "0.55" const cacheName = "speedtech-brainminder" const cacheFiles = [ "/static/easymde/easymde.min.css", diff --git a/assets/templates/base.tmpl b/assets/templates/base.tmpl index 221d103..30fd0c7 100644 --- a/assets/templates/base.tmpl +++ b/assets/templates/base.tmpl @@ -48,26 +48,26 @@
-

-
-

-
@@ -88,7 +88,7 @@
-
+
diff --git a/assets/templates/categories/form.tmpl b/assets/templates/categories/form.tmpl index cb5061b..6b6762c 100644 --- a/assets/templates/categories/form.tmpl +++ b/assets/templates/categories/form.tmpl @@ -7,9 +7,9 @@

- -
+
@@ -18,8 +18,8 @@ Name - - + + diff --git a/assets/templates/categories/list_title.tmpl b/assets/templates/categories/list_title.tmpl index 39c2c32..9524547 100644 --- a/assets/templates/categories/list_title.tmpl +++ b/assets/templates/categories/list_title.tmpl @@ -1,7 +1,7 @@ {{define "page:title"}}
Categories
- +
{{end}} diff --git a/assets/templates/items/all_list.tmpl b/assets/templates/items/all_list.tmpl index 6c0d213..e52abc5 100644 --- a/assets/templates/items/all_list.tmpl +++ b/assets/templates/items/all_list.tmpl @@ -16,7 +16,7 @@ -
+
@@ -29,7 +29,7 @@ Categories Tags - + diff --git a/assets/templates/items/all_list_title.tmpl b/assets/templates/items/all_list_title.tmpl index 830285f..e3a08e8 100644 --- a/assets/templates/items/all_list_title.tmpl +++ b/assets/templates/items/all_list_title.tmpl @@ -1,7 +1,7 @@ {{define "page:title"}}
All Items
- +
{{end}} \ No newline at end of file diff --git a/assets/templates/items/fields.tmpl b/assets/templates/items/fields.tmpl index f5dbbaa..3c71415 100644 --- a/assets/templates/items/fields.tmpl +++ b/assets/templates/items/fields.tmpl @@ -14,7 +14,7 @@
{{ field_widget $field.Widget $field.TypeFieldId $counter "" $value $field.ValidValues ""}}
- +
@@ -23,7 +23,7 @@ {{incr $g_counter }} - + {{ else }}

diff --git a/assets/templates/items/form.tmpl b/assets/templates/items/form.tmpl index 8d4bca8..6f85311 100644 --- a/assets/templates/items/form.tmpl +++ b/assets/templates/items/form.tmpl @@ -99,7 +99,7 @@

- Find + Find
@@ -116,15 +116,15 @@ {{ end }}
-
- +
@@ -33,8 +33,8 @@ {{.Title}} {{end}} - - + + diff --git a/assets/templates/items/list_title.tmpl b/assets/templates/items/list_title.tmpl index 7c3b8b3..0a10ea3 100644 --- a/assets/templates/items/list_title.tmpl +++ b/assets/templates/items/list_title.tmpl @@ -1,8 +1,8 @@ {{define "page:title"}}
{{.type.Title}} Items
- - + +
{{end}} \ No newline at end of file diff --git a/assets/templates/items/read.tmpl b/assets/templates/items/read.tmpl index 54390e3..4c6af3c 100644 --- a/assets/templates/items/read.tmpl +++ b/assets/templates/items/read.tmpl @@ -46,9 +46,9 @@ - - -
- +
@@ -20,8 +20,8 @@ Title - - + + diff --git a/assets/templates/notebooks/list_title.tmpl b/assets/templates/notebooks/list_title.tmpl index 409777d..7ff8b70 100644 --- a/assets/templates/notebooks/list_title.tmpl +++ b/assets/templates/notebooks/list_title.tmpl @@ -1,7 +1,7 @@ {{define "page:title"}}
Notebooks
- +
{{end}} diff --git a/assets/templates/quickbox/add.tmpl b/assets/templates/quickbox/add.tmpl index 5df8a3a..da74bbe 100644 --- a/assets/templates/quickbox/add.tmpl +++ b/assets/templates/quickbox/add.tmpl @@ -1,8 +1,8 @@ {{define "quickbox:add"}}
- - + +
{{.quicknote.NoteRendered | safeHTML}}
diff --git a/assets/templates/quickbox/list.tmpl b/assets/templates/quickbox/list.tmpl index 4f37b33..2da9978 100644 --- a/assets/templates/quickbox/list.tmpl +++ b/assets/templates/quickbox/list.tmpl @@ -10,8 +10,8 @@ hx-get="/quickbox/all?offset={{ $offset }}" hx-trigger="intersect once" hx-swap= {{ end }} {{ end }}>
- - + +
{{.NoteRendered | safeHTML}}
diff --git a/assets/templates/quickbox/transform.tmpl b/assets/templates/quickbox/transform.tmpl index 541e302..9efd440 100644 --- a/assets/templates/quickbox/transform.tmpl +++ b/assets/templates/quickbox/transform.tmpl @@ -47,7 +47,7 @@ Keep in Quickbox

-
- +
{{ end }} diff --git a/assets/templates/types/fields.tmpl b/assets/templates/types/fields.tmpl index e5f52f5..9507962 100644 --- a/assets/templates/types/fields.tmpl +++ b/assets/templates/types/fields.tmpl @@ -29,8 +29,8 @@
- - + +
{{ end }} diff --git a/assets/templates/types/form.tmpl b/assets/templates/types/form.tmpl index fa0400f..8e82665 100644 --- a/assets/templates/types/form.tmpl +++ b/assets/templates/types/form.tmpl @@ -38,14 +38,14 @@ {{ template "types:fields" (map "fields" .type.Fields "widgets" $.widgets "uisections" $.uisections)}}
- Add field +
- -
+
@@ -18,8 +18,8 @@ Title - - + + diff --git a/assets/templates/types/list_title.tmpl b/assets/templates/types/list_title.tmpl index 8463131..93a57b2 100644 --- a/assets/templates/types/list_title.tmpl +++ b/assets/templates/types/list_title.tmpl @@ -1,7 +1,7 @@ {{define "page:title"}}
Types
- +
{{end}} diff --git a/go.mod b/go.mod index 462bc6f..bf00148 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module brainminder.speedtech.it -go 1.24 +go 1.24.2 require ( github.com/alexedwards/flow v0.1.0